From f9d834d588c6750e720fd8460fe37506072e4d6a Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 30 Jan 2018 01:44:07 -0800 Subject: iris: don't do samplers for disabled stages --- src/gallium/drivers/iris/iris_state.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers') 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... -- cgit v1.2.3