mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
radv: fix emitting DGC indirect draws with drawid/base_instance
This fixes test_execute_indirect_state_vbo_offsets, a new vkd3d-proton test. The drawid/base_instance bits were cleared by mistake. Fixes:e59a16bbb8("radv: use an indirect draw when IBO isn't updated as part of DGC") Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30971> (cherry picked from commit8873382703)
This commit is contained in:
parent
2a9a45784c
commit
6460525c7a
2 changed files with 3 additions and 2 deletions
|
|
@ -1484,7 +1484,7 @@
|
|||
"description": "radv: fix emitting DGC indirect draws with drawid/base_instance",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "e59a16bbb8fb770bc11bbacfa2254d6a958c7cb8",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -719,11 +719,12 @@ dgc_emit_pkt3_draw_indirect(struct dgc_cmdbuf *cs, bool indexed)
|
|||
nir_builder *b = cs->b;
|
||||
|
||||
nir_def *vtx_base_sgpr = load_param16(b, vtx_base_sgpr);
|
||||
vtx_base_sgpr = nir_iand_imm(b, nir_u2u32(b, vtx_base_sgpr), 0x3FFF);
|
||||
|
||||
nir_def *has_drawid = nir_test_mask(b, vtx_base_sgpr, DGC_USES_DRAWID);
|
||||
nir_def *has_baseinstance = nir_test_mask(b, vtx_base_sgpr, DGC_USES_BASEINSTANCE);
|
||||
|
||||
vtx_base_sgpr = nir_iand_imm(b, nir_u2u32(b, vtx_base_sgpr), 0x3FFF);
|
||||
|
||||
/* vertex_offset_reg = (base_reg - SI_SH_REG_OFFSET) >> 2 */
|
||||
nir_def *vertex_offset_reg = vtx_base_sgpr;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue