radv: Fix loading stack_size from the cache
authorKonstantin Seurer <konstantin.seurer@gmail.com>
Thu, 16 Mar 2023 20:04:37 +0000 (21:04 +0100)
committerMarge Bot <emma+marge@anholt.net>
Sat, 18 Mar 2023 14:57:51 +0000 (14:57 +0000)
Fixes: 3e03fe4 ("radv/rt: move stack_sizes into radv_ray_tracing_module")
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21969>

src/amd/vulkan/radv_pipeline_cache.c

index 4ae8dcd..1688187 100644 (file)
@@ -390,8 +390,8 @@ radv_create_shaders_from_pipeline_cache(struct radv_device *device,
    assert(num_rt_groups == entry->num_stack_sizes);
    for (int i = 0; i < num_rt_groups; ++i) {
       memcpy(&rt_groups[i].stack_size, p, sizeof(struct radv_pipeline_shader_stack_size));
+      p += sizeof(struct radv_pipeline_shader_stack_size);
    }
-   p += entry->num_stack_sizes * sizeof(struct radv_pipeline_shader_stack_size);
 
    if (device->instance->debug_flags & RADV_DEBUG_NO_MEMORY_CACHE && cache == device->mem_cache)
       vk_free(&cache->alloc, entry);