radeonsi: fix si_compute_copy_image if DCC decompression happens before a copy
The buffer clear after DCC decompression overwrote user SGPRs that we set
here, leading to invalid image coordinates. Set them after we bind images.
This will actually be fixed by "radeonsi: don't decompress DCC for float
formats in si_compute_copy_image" as well.
Fixes: ad71ef9326
"radeonsi: don't use a constant buffer for the copy_image compute shader"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4583
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10061>
This commit is contained in:
parent
fc7ce9b636
commit
6bc7a0b366
|
@ -475,12 +475,6 @@ void si_compute_copy_image(struct si_context *sctx, struct pipe_resource *dst, u
|
|||
|
||||
void *saved_cs = sctx->cs_shader_state.program;
|
||||
|
||||
if (!is_dcc_decompress) {
|
||||
sctx->cs_user_data[0] = src_box->x | (dstx << 16);
|
||||
sctx->cs_user_data[1] = src_box->y | (dsty << 16);
|
||||
sctx->cs_user_data[2] = src_box->z | (dstz << 16);
|
||||
}
|
||||
|
||||
struct pipe_image_view image[2] = {0};
|
||||
image[0].resource = src;
|
||||
image[0].shader_access = image[0].access = PIPE_IMAGE_ACCESS_READ;
|
||||
|
@ -511,6 +505,12 @@ void si_compute_copy_image(struct si_context *sctx, struct pipe_resource *dst, u
|
|||
|
||||
ctx->set_shader_images(ctx, PIPE_SHADER_COMPUTE, 0, 2, 0, image);
|
||||
|
||||
if (!is_dcc_decompress) {
|
||||
sctx->cs_user_data[0] = src_box->x | (dstx << 16);
|
||||
sctx->cs_user_data[1] = src_box->y | (dsty << 16);
|
||||
sctx->cs_user_data[2] = src_box->z | (dstz << 16);
|
||||
}
|
||||
|
||||
struct pipe_grid_info info = {0};
|
||||
|
||||
if (is_dcc_decompress) {
|
||||
|
|
Loading…
Reference in New Issue