anv, iris: Add Wa_22011440098 for DG2

Rework:
 * Jordan: Set MOCS after
   7b78b2fcac ("intel/genxml: Assert that all MOCS fields are non-zero on Gfx7+")

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14212>
This commit is contained in:
Anuj Phogat 2021-05-12 10:42:41 -07:00 committed by Marge Bot
parent 17a1df79ba
commit 40b66a4499
2 changed files with 28 additions and 0 deletions

View File

@ -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

View File

@ -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: