Module: Mesa Branch: main Commit: b7c582e5c7128658983f5e681f94f15576ed7edf URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b7c582e5c7128658983f5e681f94f15576ed7edf
Author: Konstantin Seurer <konstantin.seu...@gmail.com> Date: Mon Aug 21 12:54:42 2023 +0200 radv: Add RADV_MAX_HIT_ATTRIB_DWORDS Reviewed-by: Friedrich Vock <friedrich.v...@gmx.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24271> --- src/amd/vulkan/radv_constants.h | 3 ++- src/amd/vulkan/radv_rt_shader.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/amd/vulkan/radv_constants.h b/src/amd/vulkan/radv_constants.h index 796a1c87f63..514f82ac685 100644 --- a/src/amd/vulkan/radv_constants.h +++ b/src/amd/vulkan/radv_constants.h @@ -121,7 +121,8 @@ /* The spec requires this to be 32. */ #define RADV_RT_HANDLE_SIZE 32 -#define RADV_MAX_HIT_ATTRIB_SIZE 32 +#define RADV_MAX_HIT_ATTRIB_SIZE 32 +#define RADV_MAX_HIT_ATTRIB_DWORDS (RADV_MAX_HIT_ATTRIB_SIZE / 4) #define RADV_SHADER_ALLOC_ALIGNMENT 256 #define RADV_SHADER_ALLOC_MIN_ARENA_SIZE (256 * 1024) diff --git a/src/amd/vulkan/radv_rt_shader.c b/src/amd/vulkan/radv_rt_shader.c index 3dea00da54e..a5a0131bebf 100644 --- a/src/amd/vulkan/radv_rt_shader.c +++ b/src/amd/vulkan/radv_rt_shader.c @@ -1488,7 +1488,7 @@ radv_build_traversal(struct radv_device *device, struct radv_ray_tracing_pipelin lower_hit_attrib_derefs(b->shader); /* Register storage for hit attributes */ - nir_variable *hit_attribs[RADV_MAX_HIT_ATTRIB_SIZE / sizeof(uint32_t)]; + nir_variable *hit_attribs[RADV_MAX_HIT_ATTRIB_DWORDS]; if (!monolithic) { for (uint32_t i = 0; i < ARRAY_SIZE(hit_attribs); i++)