From 6e7e49cc4f38e070c3052dd8dfc8a0f4137e9f88 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 16 Jul 2018 16:45:22 -0700 Subject: iris: fix crash --- src/gallium/drivers/iris/iris_program.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c index eba97450c6e..26c40efe440 100644 --- a/src/gallium/drivers/iris/iris_program.c +++ b/src/gallium/drivers/iris/iris_program.c @@ -117,12 +117,13 @@ bind_state(struct iris_context *ice, gl_shader_stage stage) { uint64_t dirty_bit = IRIS_DIRTY_UNCOMPILED_VS << stage; + const uint64_t nos = ish ? ish->nos : 0; ice->shaders.uncompiled[stage] = ish; ice->state.dirty |= dirty_bit; for (int i = 0; i < IRIS_NOS_COUNT; i++) { - if (ish->nos & (1 << i)) + if (nos & (1 << i)) ice->state.dirty_for_nos[i] |= dirty_bit; else ice->state.dirty_for_nos[i] &= ~dirty_bit; -- cgit v1.2.3