lavapipe: remove continue statements in emit_state() to be more consistent

Rejig some dirty state checks to avoid continue and make it consistent
with surrounding code.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18953>
This commit is contained in:
Brian Paul 2022-10-03 15:17:12 -06:00 committed by Marge Bot
parent 77515d722b
commit 2aac8ef125

View file

@ -525,21 +525,18 @@ static void emit_state(struct rendering_state *state)
}
for (sh = 0; sh < PIPE_SHADER_COMPUTE; sh++) {
if (!state->sv_dirty[sh])
continue;
state->pctx->set_sampler_views(state->pctx, sh, 0, state->num_sampler_views[sh],
0, false, state->sv[sh]);
state->sv_dirty[sh] = false;
if (state->sv_dirty[sh]) {
state->pctx->set_sampler_views(state->pctx, sh, 0, state->num_sampler_views[sh],
0, false, state->sv[sh]);
state->sv_dirty[sh] = false;
}
}
for (sh = 0; sh < PIPE_SHADER_COMPUTE; sh++) {
if (!state->ss_dirty[sh])
continue;
cso_set_samplers(state->cso, sh, state->num_sampler_states[sh], state->cso_ss_ptr[sh]);
state->ss_dirty[sh] = false;
if (state->ss_dirty[sh]) {
cso_set_samplers(state->cso, sh, state->num_sampler_states[sh], state->cso_ss_ptr[sh]);
state->ss_dirty[sh] = false;
}
}
if (state->vp_dirty) {