yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

gl_state: Make references const where applicable in Apply()

This commit is contained in:
Lioncash 2018-07-20 01:12:29 -04:00
parent e6b3d3a9ea
commit 0faa13baeb
1 changed files with 3 additions and 2 deletions

View File

@ -206,8 +206,9 @@ void OpenGLState::Apply() const {
// Constbuffers // Constbuffers
for (std::size_t stage = 0; stage < draw.const_buffers.size(); ++stage) { for (std::size_t stage = 0; stage < draw.const_buffers.size(); ++stage) {
for (std::size_t buffer_id = 0; buffer_id < draw.const_buffers[stage].size(); ++buffer_id) { for (std::size_t buffer_id = 0; buffer_id < draw.const_buffers[stage].size(); ++buffer_id) {
auto& current = cur_state.draw.const_buffers[stage][buffer_id]; const auto& current = cur_state.draw.const_buffers[stage][buffer_id];
auto& new_state = draw.const_buffers[stage][buffer_id]; const auto& new_state = draw.const_buffers[stage][buffer_id];
if (current.enabled != new_state.enabled || current.bindpoint != new_state.bindpoint || if (current.enabled != new_state.enabled || current.bindpoint != new_state.bindpoint ||
current.ssbo != new_state.ssbo) { current.ssbo != new_state.ssbo) {
if (new_state.enabled) { if (new_state.enabled) {