anv: do not explode on 32 bit builds
authorIván Briano <ivan.briano@intel.com>
Thu, 15 Jun 2023 23:22:53 +0000 (16:22 -0700)
committerMarge Bot <emma+marge@anholt.net>
Fri, 16 Jun 2023 22:22:07 +0000 (22:22 +0000)
Fixes: 930e862af7a ("anv: add shaders for copying query results")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9213

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23686>

src/intel/vulkan/anv_internal_kernels.h

index 7dce6e5..de951d2 100644 (file)
@@ -104,16 +104,21 @@ struct anv_query_copy_shader_params {
    uint32_t num_items;
 
    /* First query to copy result from */
-   uint query_base;
+   uint32_t query_base;
 
    /* Query stride in bytes */
-   uint query_stride;
+   uint32_t query_stride;
 
    /* Offset at which the data should be read from */
-   uint query_data_offset;
+   uint32_t query_data_offset;
 
    /* Stride of destination writes */
-   uint destination_stride;
+   uint32_t destination_stride;
+
+   /* We need to be 64 bit aligned, or 32 bit builds get
+    * very unhappy.
+    */
+   uint32_t padding;
 };
 
 struct anv_query_copy_params {