From cfd5fcc256e96bfe9d894cc696212366b5ac5b3d Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 22 Jan 2018 22:40:51 -0800 Subject: [PATCH] iris: emit shader packets --- src/gallium/drivers/iris/iris_state.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 65201c1658d..dff04e47d52 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -1525,6 +1525,23 @@ iris_upload_render_state(struct iris_context *ice, } } + for (int stage = 0; stage <= MESA_SHADER_FRAGMENT; stage++) { + if (!(dirty & (IRIS_DIRTY_VS << stage))) + continue; + + if (ice->shaders.prog[stage]) { + iris_batch_emit(batch, ice->shaders.prog[stage]->derived_data, + iris_derived_program_state_size(stage)); + } else { + if (stage == MESA_SHADER_TESS_EVAL) { + iris_emit_cmd(batch, GENX(3DSTATE_HS), hs); + iris_emit_cmd(batch, GENX(3DSTATE_DS), ds); + } else if (stage == MESA_SHADER_GEOMETRY) { + iris_emit_cmd(batch, GENX(3DSTATE_GS), gs); + } + } + } + for (int stage = 0; stage <= MESA_SHADER_FRAGMENT; stage++) { if (!(dirty & (IRIS_DIRTY_SAMPLER_STATES_VS << stage))) continue; -- 2.30.2