DRW: Fix incorrect logic in state redundancy check

Error introduced by rB3c39a3affee7.
This commit is contained in:
Clément Foucault 2022-11-03 19:40:30 +01:00
parent c2a99cb0b6
commit 9dfc134c9d
1 changed files with 4 additions and 2 deletions

View File

@ -166,8 +166,10 @@ void StateSet::execute(RecordingState &recording_state) const
*/
BLI_assert(DST.state_lock == 0);
if (!assign_if_different(recording_state.pipeline_state, new_state) &&
!assign_if_different(recording_state.clip_plane_count, clip_plane_count)) {
bool state_changed = assign_if_different(recording_state.pipeline_state, new_state);
bool clip_changed = assign_if_different(recording_state.clip_plane_count, clip_plane_count);
if (!state_changed && !clip_changed) {
return;
}