diff options
author | Juston Li <justonli@google.com> | 2023-06-28 13:25:57 -0700 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2023-07-15 22:49:50 +0100 |
commit | aa92db5ea46c66daea616c482af9340139487c6d (patch) | |
tree | d42cac02be51e61edda623a797f282d78af0a66a /src | |
parent | 62537eecff592b7ecad1a1a4b1bf96b7cb21b07e (diff) | |
download | mesa-aa92db5ea46c66daea616c482af9340139487c6d.tar.gz mesa-aa92db5ea46c66daea616c482af9340139487c6d.tar.bz2 mesa-aa92db5ea46c66daea616c482af9340139487c6d.zip |
radv: fix incorrect size for primitives generated query
Primitives generated queries write 1 integer, the primitives-generated
count that is incremented every time a primitive emitted to that stream
reaches the transform feedback stage.
Fixes: 1ebf463a5a6 ("radv: implement VK_EXT_primitives_generated_query")
Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23915>
(cherry picked from commit 33ee59af1def0dc2c46051d160cb39f940f544ab)
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/vulkan/radv_query.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c index abea2590e65..d0de76332e6 100644 --- a/src/amd/vulkan/radv_query.c +++ b/src/amd/vulkan/radv_query.c @@ -662,7 +662,7 @@ build_pg_query_shader(struct radv_device *device) * } * available = true; * } - * uint32_t result_size = flags & VK_QUERY_RESULT_64_BIT ? 16 : 8; + * uint32_t result_size = flags & VK_QUERY_RESULT_64_BIT ? 8 : 4; * if ((flags & VK_QUERY_RESULT_PARTIAL_BIT) || available) { * if (flags & VK_QUERY_RESULT_64_BIT) { * dst_buf[dst_offset] = result; @@ -752,7 +752,7 @@ build_pg_query_shader(struct radv_device *device) /* Determine if result is 64 or 32 bit. */ nir_ssa_def *result_is_64bit = nir_test_mask(&b, flags, VK_QUERY_RESULT_64_BIT); nir_ssa_def *result_size = - nir_bcsel(&b, result_is_64bit, nir_imm_int(&b, 16), nir_imm_int(&b, 8)); + nir_bcsel(&b, result_is_64bit, nir_imm_int(&b, 8), nir_imm_int(&b, 4)); /* Store the result if complete or partial results have been requested. */ nir_push_if(&b, nir_ior(&b, nir_test_mask(&b, flags, VK_QUERY_RESULT_PARTIAL_BIT), |