[Mesa-stable] [Mesa-dev] [PATCH] radv: fix saved compute state when doing statistics/occlusion queries
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Wed Sep 27 03:41:01 UTC 2017
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
On Tue, Sep 26, 2017 at 7:52 AM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> We are pushing 16-bytes of constants, so we have to save/restore
> the same amount of data to avoid data corruption.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> Cc: 17.2 <mesa-stable at lists.freedesktop.org>
> ---
> src/amd/vulkan/radv_query.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c
> index 4f79db4a93..1dbc493e1b 100644
> --- a/src/amd/vulkan/radv_query.c
> +++ b/src/amd/vulkan/radv_query.c
> @@ -653,7 +653,7 @@ static void radv_query_shader(struct radv_cmd_buffer *cmd_buffer,
> struct radv_device *device = cmd_buffer->device;
> struct radv_meta_saved_compute_state saved_state;
>
> - radv_meta_save_compute(&saved_state, cmd_buffer, 4);
> + radv_meta_save_compute(&saved_state, cmd_buffer, 16);
>
> struct radv_buffer dst_buffer = {
> .bo = dst_bo,
> @@ -737,7 +737,7 @@ static void radv_query_shader(struct radv_cmd_buffer *cmd_buffer,
> RADV_CMD_FLAG_INV_VMEM_L1 |
> RADV_CMD_FLAG_CS_PARTIAL_FLUSH;
>
> - radv_meta_restore_compute(&saved_state, cmd_buffer, 4);
> + radv_meta_restore_compute(&saved_state, cmd_buffer, 16);
> }
>
> VkResult radv_CreateQueryPool(
> --
> 2.14.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-stable
mailing list