From fdbb5d4dd9af52d34ac8e87b02e4376b312785c2 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 26 Jan 2021 18:26:31 -0800 Subject: [PATCH] iris: Minor code restyling in iris_bind_vs_state We'll be adding more code here shortly, this will make it easier. Reviewed-by: Anuj Phogat Part-of: --- src/gallium/drivers/iris/iris_program.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c index f5b7d7933e7..fe597b51913 100644 --- a/src/gallium/drivers/iris/iris_program.c +++ b/src/gallium/drivers/iris/iris_program.c @@ -2514,17 +2514,17 @@ static void iris_bind_vs_state(struct pipe_context *ctx, void *state) { struct iris_context *ice = (struct iris_context *)ctx; - struct iris_uncompiled_shader *new_ish = state; + struct iris_uncompiled_shader *ish = state; - if (new_ish && - ice->state.window_space_position != - new_ish->nir->info.vs.window_space_position) { - ice->state.window_space_position = - new_ish->nir->info.vs.window_space_position; + if (ish) { + const struct shader_info *info = &ish->nir->info; + if (ice->state.window_space_position != info->vs.window_space_position) { + ice->state.window_space_position = info->vs.window_space_position; - ice->state.dirty |= IRIS_DIRTY_CLIP | - IRIS_DIRTY_RASTER | - IRIS_DIRTY_CC_VIEWPORT; + ice->state.dirty |= IRIS_DIRTY_CLIP | + IRIS_DIRTY_RASTER | + IRIS_DIRTY_CC_VIEWPORT; + } } bind_shader_state((void *) ctx, state, MESA_SHADER_VERTEX);