mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
radeonsi: fix the size of the query result SSBO
This was harmless because the shader writes only 4 bytes if the type has 32 bits. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29053>
This commit is contained in:
parent
96cf96f611
commit
1d3dbb2bef
1 changed files with 3 additions and 2 deletions
|
|
@ -322,7 +322,8 @@ static void gfx11_sh_query_get_result_resource(struct si_context *sctx, struct s
|
|||
consts.config = 1;
|
||||
}
|
||||
|
||||
if (result_type == PIPE_QUERY_TYPE_I64 || result_type == PIPE_QUERY_TYPE_U64)
|
||||
bool is_result_64bit = result_type == PIPE_QUERY_TYPE_I64 || result_type == PIPE_QUERY_TYPE_U64;
|
||||
if (is_result_64bit)
|
||||
consts.config |= 8;
|
||||
|
||||
constant_buffer.buffer_size = sizeof(consts);
|
||||
|
|
@ -370,7 +371,7 @@ static void gfx11_sh_query_get_result_resource(struct si_context *sctx, struct s
|
|||
if (qbuf == query->last) {
|
||||
ssbo[2].buffer = resource;
|
||||
ssbo[2].buffer_offset = offset;
|
||||
ssbo[2].buffer_size = 8;
|
||||
ssbo[2].buffer_size = is_result_64bit ? 8 : 4;
|
||||
}
|
||||
|
||||
sctx->b.set_constant_buffer(&sctx->b, PIPE_SHADER_COMPUTE, 0, false, &constant_buffer);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue