summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2021-01-26 18:26:31 -0800
committerMarge Bot <eric+marge@anholt.net>2021-01-29 01:24:14 +0000
commitfdbb5d4dd9af52d34ac8e87b02e4376b312785c2 (patch)
tree60af59abed1be864cbcfd6fc2ad6764b8f50a692
parentddfdd944688eeb3a8a71e33635e8468cf0d6c65e (diff)
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 <anuj.phogat@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8759>
-rw-r--r--src/gallium/drivers/iris/iris_program.c18
1 files 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);