From: Kenneth Graunke Date: Mon, 16 Jul 2018 23:45:22 +0000 (-0700) Subject: iris: fix crash X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6e7e49cc4f38e070c3052dd8dfc8a0f4137e9f88;p=mesa.git iris: fix crash --- 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;