mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
anv/iris: stop using 3DSTATE_PUSH_CONSTANT_ALLOC_PS on Gfx12.5
According to documents linked in HSD 1209977789, the push constant allocation for PS stage is not applicable on Gfx12.5+ (removed). The documents says push constant data is fetched by SBE in URB. The HW must still parse the command and do nothing with it. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39584>
This commit is contained in:
parent
85c4c87a58
commit
696163d0e2
3 changed files with 12 additions and 3 deletions
|
|
@ -1117,10 +1117,11 @@ iris_alloc_push_constants(struct iris_batch *batch)
|
|||
|
||||
/* Divide as equally as possible with any remainder given to FRAGMENT. */
|
||||
const unsigned push_constant_kb = devinfo->max_constant_urb_size_kb;
|
||||
const unsigned stage_size = push_constant_kb / 5;
|
||||
const unsigned n_stages = GFX_VERx10 >= 125 ? 4 : 5;
|
||||
const unsigned stage_size = push_constant_kb / n_stages;
|
||||
const unsigned frag_size = push_constant_kb - 4 * stage_size;
|
||||
|
||||
for (int i = 0; i <= MESA_SHADER_FRAGMENT; i++) {
|
||||
for (int i = 0; i <= (GFX_VERx10 >= 125 ? MESA_SHADER_GEOMETRY : MESA_SHADER_FRAGMENT); i++) {
|
||||
iris_emit_cmd(batch, GENX(3DSTATE_PUSH_CONSTANT_ALLOC_VS), alloc) {
|
||||
alloc._3DCommandSubOpcode = 18 + i;
|
||||
alloc.ConstantBufferOffset = stage_size * i;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
<genxml name="GFX125" gen="12.5">
|
||||
<import name="gen120.xml">
|
||||
<exclude name="3D_CHICKEN3" />
|
||||
<exclude name="3DSTATE_PUSH_CONSTANT_ALLOC_PS" />
|
||||
<exclude name="GPGPU_WALKER" />
|
||||
<exclude name="GT_MODE" />
|
||||
<exclude name="MEDIA_CURBE_LOAD" />
|
||||
|
|
|
|||
|
|
@ -47,9 +47,14 @@ batch_emit_push_constants(struct anv_batch *batch,
|
|||
else
|
||||
push_constant_kb = device->info->max_constant_urb_size_kb;
|
||||
|
||||
/* On Gfx12.5 there is no more push constant allocation required */
|
||||
if (GFX_VERx10 >= 125)
|
||||
stages &= ~VK_SHADER_STAGE_FRAGMENT_BIT;
|
||||
|
||||
const unsigned num_stages =
|
||||
util_bitcount(stages & VK_SHADER_STAGE_ALL_GRAPHICS);
|
||||
unsigned size_per_stage = push_constant_kb / num_stages;
|
||||
unsigned size_per_stage = num_stages == 0 ? push_constant_kb :
|
||||
push_constant_kb / num_stages;
|
||||
|
||||
/* Broadwell+ and Haswell gt3 require that the push constant sizes be in
|
||||
* units of 2KB. Incidentally, these are the same platforms that have
|
||||
|
|
@ -69,10 +74,12 @@ batch_emit_push_constants(struct anv_batch *batch,
|
|||
kb_used += push_size;
|
||||
}
|
||||
|
||||
#if GFX_VERx10 < 125
|
||||
anv_batch_emit(batch, GENX(3DSTATE_PUSH_CONSTANT_ALLOC_PS), alloc) {
|
||||
alloc.ConstantBufferOffset = kb_used;
|
||||
alloc.ConstantBufferSize = push_constant_kb - kb_used;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if GFX_VERx10 == 125
|
||||
/* DG2: Wa_22011440098
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue