radv: Fix compute scratch buffer emission.
Copied wrong from radeonsi. The registers following the scratch buffer address are the shader rsrc1/rsrc2. Not the user SGPR0 containing the ring resource word 1. Fixes:278e533ec9
("radv: update scratch buffer registers on GFX11") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19488> (cherry picked from commitb8865ad046
)
This commit is contained in:

committed by
Dylan Baker

parent
842759cf77
commit
7ade4ab5d5
@@ -1795,7 +1795,7 @@
|
||||
"description": "radv: Fix compute scratch buffer emission.",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "278e533ec9c29d68b661bc27cbfbe6bca4f57094"
|
||||
},
|
||||
|
@@ -4243,13 +4243,12 @@ radv_emit_compute_scratch(struct radv_device *device, struct radeon_cmdbuf *cs,
|
||||
radv_cs_add_buffer(device->ws, cs, compute_scratch_bo);
|
||||
|
||||
if (info->gfx_level >= GFX11) {
|
||||
radeon_set_sh_reg_seq(cs, R_00B840_COMPUTE_DISPATCH_SCRATCH_BASE_LO, 4);
|
||||
radeon_set_sh_reg_seq(cs, R_00B840_COMPUTE_DISPATCH_SCRATCH_BASE_LO, 2);
|
||||
radeon_emit(cs, scratch_va >> 8);
|
||||
radeon_emit(cs, scratch_va >> 40);
|
||||
} else {
|
||||
radeon_set_sh_reg_seq(cs, R_00B900_COMPUTE_USER_DATA_0, 2);
|
||||
}
|
||||
|
||||
radeon_set_sh_reg_seq(cs, R_00B900_COMPUTE_USER_DATA_0, 2);
|
||||
radeon_emit(cs, scratch_va);
|
||||
radeon_emit(cs, rsrc1);
|
||||
|
||||
|
Reference in New Issue
Block a user