radv: Rename internal node shader to lbvh_internal
authorFriedrich Vock <friedrich.vock@gmx.de>
Mon, 19 Sep 2022 21:15:31 +0000 (23:15 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 26 Sep 2022 22:25:22 +0000 (22:25 +0000)
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18769>

src/amd/vulkan/bvh/build_interface.h
src/amd/vulkan/bvh/lbvh_internal.comp [moved from src/amd/vulkan/bvh/internal.comp with 99% similarity]
src/amd/vulkan/bvh/meson.build
src/amd/vulkan/radv_acceleration_structure.c
src/amd/vulkan/radv_private.h

index cc40430..2519f73 100644 (file)
@@ -57,7 +57,7 @@ struct morton_args {
    REF(key_id_pair) ids;
 };
 
-struct internal_args {
+struct lbvh_internal_args {
    VOID_REF bvh;
    REF(key_id_pair) src_ids;
    REF(key_id_pair) dst_ids;
similarity index 99%
rename from src/amd/vulkan/bvh/internal.comp
rename to src/amd/vulkan/bvh/lbvh_internal.comp
index de4de86..c8d6fc7 100644 (file)
@@ -38,7 +38,7 @@ layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in;
 #include "build_interface.h"
 
 layout(push_constant) uniform CONSTS {
-   internal_args args;
+   lbvh_internal_args args;
 };
 
 void
index 21a709d..9473197 100644 (file)
@@ -20,7 +20,7 @@
 
 bvh_shaders = [
   'copy.comp',
-  'internal.comp',
+  'lbvh_internal.comp',
   'leaf.comp',
   'morton.comp',
 ]
index c6cee6d..6bf6f1c 100644 (file)
@@ -39,8 +39,8 @@ static const uint32_t morton_spv[] = {
 #include "bvh/morton.comp.spv.h"
 };
 
-static const uint32_t internal_spv[] = {
-#include "bvh/internal.comp.spv.h"
+static const uint32_t lbvh_internal_spv[] = {
+#include "bvh/lbvh_internal.comp.spv.h"
 };
 
 static const uint32_t copy_spv[] = {
@@ -219,8 +219,8 @@ radv_device_finish_accel_struct_build_state(struct radv_device *device)
    struct radv_meta_state *state = &device->meta_state;
    radv_DestroyPipeline(radv_device_to_handle(device), state->accel_struct_build.copy_pipeline,
                         &state->alloc);
-   radv_DestroyPipeline(radv_device_to_handle(device), state->accel_struct_build.internal_pipeline,
-                        &state->alloc);
+   radv_DestroyPipeline(radv_device_to_handle(device),
+                        state->accel_struct_build.lbvh_internal_pipeline, &state->alloc);
    radv_DestroyPipeline(radv_device_to_handle(device), state->accel_struct_build.leaf_pipeline,
                         &state->alloc);
    radv_DestroyPipeline(radv_device_to_handle(device), state->accel_struct_build.morton_pipeline,
@@ -228,7 +228,7 @@ radv_device_finish_accel_struct_build_state(struct radv_device *device)
    radv_DestroyPipelineLayout(radv_device_to_handle(device),
                               state->accel_struct_build.copy_p_layout, &state->alloc);
    radv_DestroyPipelineLayout(radv_device_to_handle(device),
-                              state->accel_struct_build.internal_p_layout, &state->alloc);
+                              state->accel_struct_build.lbvh_internal_p_layout, &state->alloc);
    radv_DestroyPipelineLayout(radv_device_to_handle(device),
                               state->accel_struct_build.leaf_p_layout, &state->alloc);
    radv_DestroyPipelineLayout(radv_device_to_handle(device),
@@ -320,10 +320,10 @@ radv_device_init_accel_struct_build_state(struct radv_device *device)
    if (result != VK_SUCCESS)
       return result;
 
-   result = create_build_pipeline_spv(device, internal_spv, sizeof(internal_spv),
-                                      sizeof(struct internal_args),
-                                      &device->meta_state.accel_struct_build.internal_pipeline,
-                                      &device->meta_state.accel_struct_build.internal_p_layout);
+   result = create_build_pipeline_spv(
+      device, lbvh_internal_spv, sizeof(lbvh_internal_spv), sizeof(struct lbvh_internal_args),
+      &device->meta_state.accel_struct_build.lbvh_internal_pipeline,
+      &device->meta_state.accel_struct_build.lbvh_internal_p_layout);
    if (result != VK_SUCCESS)
       return result;
 
@@ -552,7 +552,7 @@ radv_CmdBuildAccelerationStructuresKHR(
    cmd_buffer->state.flush_bits |= flush_bits;
 
    radv_CmdBindPipeline(commandBuffer, VK_PIPELINE_BIND_POINT_COMPUTE,
-                        cmd_buffer->device->meta_state.accel_struct_build.internal_pipeline);
+                        cmd_buffer->device->meta_state.accel_struct_build.lbvh_internal_pipeline);
    bool progress = true;
    for (unsigned iter = 0; progress; ++iter) {
       progress = false;
@@ -587,7 +587,7 @@ radv_CmdBuildAccelerationStructuresKHR(
                              radv_bvh_node_internal);
          }
 
-         const struct internal_args consts = {
+         const struct lbvh_internal_args consts = {
             .bvh = accel_struct->va,
             .src_ids = pInfos[i].scratchData.deviceAddress + src_scratch_offset,
             .dst_ids = pInfos[i].scratchData.deviceAddress + dst_scratch_offset,
@@ -596,7 +596,7 @@ radv_CmdBuildAccelerationStructuresKHR(
          };
 
          radv_CmdPushConstants(commandBuffer,
-                               cmd_buffer->device->meta_state.accel_struct_build.internal_p_layout,
+                               cmd_buffer->device->meta_state.accel_struct_build.lbvh_internal_p_layout,
                                VK_SHADER_STAGE_COMPUTE_BIT, 0, sizeof(consts), &consts);
          radv_unaligned_dispatch(cmd_buffer, dst_node_count, 1, 1);
          if (!final_iter)
index fef8a97..de28e80 100644 (file)
@@ -674,8 +674,8 @@ struct radv_meta_state {
       VkPipeline leaf_pipeline;
       VkPipelineLayout morton_p_layout;
       VkPipeline morton_pipeline;
-      VkPipelineLayout internal_p_layout;
-      VkPipeline internal_pipeline;
+      VkPipelineLayout lbvh_internal_p_layout;
+      VkPipeline lbvh_internal_pipeline;
       VkPipelineLayout copy_p_layout;
       VkPipeline copy_pipeline;