diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index ace28b38ef3..1c9266aa868 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -939,6 +939,20 @@ iris_alloc_push_constants(struct iris_batch *batch) alloc.ConstantBufferSize = i == MESA_SHADER_FRAGMENT ? frag_size : stage_size; } } + +#if GFX_VERx10 == 125 + /* Wa_22011440098 + * + * In 3D mode, after programming push constant alloc command immediately + * program push constant command(ZERO length) without any commit between + * them. + */ + if (intel_device_info_is_dg2(devinfo)) { + iris_emit_cmd(batch, GENX(3DSTATE_CONSTANT_ALL), c) { + c.MOCS = iris_mocs(NULL, &batch->screen->isl_dev, 0); + } + } +#endif } #if GFX_VER >= 12 diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 186485ba78a..22f89403841 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -2518,6 +2518,20 @@ cmd_buffer_alloc_push_constants(struct anv_cmd_buffer *cmd_buffer) alloc.ConstantBufferSize = push_constant_kb - kb_used; } +#if GFX_VERx10 == 125 + /* Wa_22011440098 + * + * In 3D mode, after programming push constant alloc command immediately + * program push constant command(ZERO length) without any commit between + * them. + */ + if (intel_device_info_is_dg2(&cmd_buffer->device->info)) { + anv_batch_emit(&cmd_buffer->batch, GENX(3DSTATE_CONSTANT_ALL), c) { + c.MOCS = anv_mocs(cmd_buffer->device, NULL, 0); + } + } +#endif + cmd_buffer->state.gfx.push_constant_stages = stages; /* From the BDW PRM for 3DSTATE_PUSH_CONSTANT_ALLOC_VS: