From: Kenneth Graunke Date: Tue, 30 Jan 2018 09:44:07 +0000 (-0800) Subject: iris: don't do samplers for disabled stages X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f9d834d588c6750e720fd8460fe37506072e4d6a;p=mesa.git iris: don't do samplers for disabled stages --- diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 2f6adc7578d..f374d077d5e 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -1910,7 +1910,7 @@ iris_upload_render_state(struct iris_context *ice, for (int stage = 0; stage <= MESA_SHADER_FRAGMENT; stage++) { struct iris_compiled_shader *shader = ice->shaders.prog[stage]; - if (!shader) // XXX: dirty bits + if (!shader) // XXX: dirty bits...also, emit a disable maybe? continue; struct brw_stage_prog_data *prog_data = (void *) shader->prog_data; @@ -1940,7 +1940,8 @@ iris_upload_render_state(struct iris_context *ice, } for (int stage = 0; stage <= MESA_SHADER_FRAGMENT; stage++) { - if (!(dirty & (IRIS_DIRTY_SAMPLER_STATES_VS << stage))) + if (!(dirty & (IRIS_DIRTY_SAMPLER_STATES_VS << stage)) || + !ice->shaders.prog[stage]) continue; // XXX: get sampler count from shader; don't emit them all...