radv/rt: adjust shared_size when lowering hit_attribs
authorDaniel Schürmann <daniel@schuermann.dev>
Fri, 10 Mar 2023 19:10:25 +0000 (20:10 +0100)
committerMarge Bot <emma+marge@anholt.net>
Thu, 8 Jun 2023 00:37:03 +0000 (00:37 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>

src/amd/vulkan/radv_rt_shader.c

index 23abd74..36fb4c0 100644 (file)
@@ -771,6 +771,10 @@ lower_hit_attribs(nir_shader *shader, nir_variable **hit_attribs, uint32_t workg
          nir_instr_remove(instr);
       }
    }
+
+   if (!hit_attribs)
+      shader->info.shared_size =
+         MAX2(shader->info.shared_size, workgroup_size * RADV_MAX_HIT_ATTRIB_SIZE);
 }
 
 static void