mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 18:38:11 +02:00
i965: Set MOCS for push constant buffers on Haswell and Gfx9+
We set MOCS on Ivybridge/Baytrail, but not Haswell, and not Skylake and later. We shoud set it everywhere. While we're at it, we also set it for null constant buffers, so that we aren't programming a 0 MOCS, to allow us to add some safeguards against that. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13480>
This commit is contained in:
parent
d0e356b333
commit
59f53b07c4
1 changed files with 7 additions and 2 deletions
|
|
@ -3097,6 +3097,12 @@ genX(upload_push_constant_packets)(struct brw_context *brw)
|
|||
|
||||
brw_batch_emit(brw, GENX(3DSTATE_CONSTANT_VS), pkt) {
|
||||
pkt._3DCommandSubOpcode = push_constant_opcodes[stage];
|
||||
#if GFX_VER >= 9
|
||||
pkt.MOCS = mocs;
|
||||
#elif GFX_VER < 8
|
||||
/* MOCS is MBZ on Gfx8 so we skip it there */
|
||||
pkt.ConstantBody.MOCS = mocs;
|
||||
#endif
|
||||
if (stage_state->prog_data) {
|
||||
#if GFX_VERx10 >= 75
|
||||
/* The Skylake PRM contains the following restriction:
|
||||
|
|
@ -3157,8 +3163,7 @@ genX(upload_push_constant_packets)(struct brw_context *brw)
|
|||
}
|
||||
#else
|
||||
pkt.ConstantBody.ReadLength[0] = stage_state->push_const_size;
|
||||
pkt.ConstantBody.Buffer[0].offset =
|
||||
stage_state->push_const_offset | mocs;
|
||||
pkt.ConstantBody.Buffer[0].offset = stage_state->push_const_offset;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue