From 2aac8ef1256ae4d1993daf443bd744d7bd26a440 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 3 Oct 2022 15:17:12 -0600 Subject: [PATCH] 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 Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/frontends/lavapipe/lvp_execute.c | 21 +++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/gallium/frontends/lavapipe/lvp_execute.c b/src/gallium/frontends/lavapipe/lvp_execute.c index eed9ff05fa7..0c03f2d0203 100644 --- a/src/gallium/frontends/lavapipe/lvp_execute.c +++ b/src/gallium/frontends/lavapipe/lvp_execute.c @@ -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) {