mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
radv: Add a shader variant for PLOC with extended SAH
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20656>
This commit is contained in:
parent
b1755c0b21
commit
c53eb2f3d4
3 changed files with 19 additions and 0 deletions
|
|
@ -50,6 +50,11 @@ bvh_shaders = [
|
|||
'ploc_internal',
|
||||
['EXTENDED_SAH=0'],
|
||||
],
|
||||
[
|
||||
'ploc_internal.comp',
|
||||
'ploc_internal_extended',
|
||||
['EXTENDED_SAH=1'],
|
||||
],
|
||||
[
|
||||
'converter_internal.comp',
|
||||
'converter_internal',
|
||||
|
|
|
|||
|
|
@ -53,6 +53,10 @@ static const uint32_t ploc_spv[] = {
|
|||
#include "bvh/ploc_internal.spv.h"
|
||||
};
|
||||
|
||||
static const uint32_t ploc_extended_spv[] = {
|
||||
#include "bvh/ploc_internal_extended.spv.h"
|
||||
};
|
||||
|
||||
static const uint32_t copy_spv[] = {
|
||||
#include "bvh/copy.spv.h"
|
||||
};
|
||||
|
|
@ -331,6 +335,8 @@ radv_device_finish_accel_struct_build_state(struct radv_device *device)
|
|||
&state->alloc);
|
||||
radv_DestroyPipeline(radv_device_to_handle(device), state->accel_struct_build.ploc_pipeline,
|
||||
&state->alloc);
|
||||
radv_DestroyPipeline(radv_device_to_handle(device),
|
||||
state->accel_struct_build.ploc_extended_pipeline, &state->alloc);
|
||||
radv_DestroyPipeline(radv_device_to_handle(device),
|
||||
state->accel_struct_build.lbvh_generate_ir_pipeline, &state->alloc);
|
||||
radv_DestroyPipeline(radv_device_to_handle(device), state->accel_struct_build.lbvh_main_pipeline,
|
||||
|
|
@ -592,6 +598,13 @@ radv_device_init_accel_struct_build_state(struct radv_device *device)
|
|||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
|
||||
result = create_build_pipeline_spv(device, ploc_extended_spv, sizeof(ploc_extended_spv),
|
||||
sizeof(struct ploc_args),
|
||||
&device->meta_state.accel_struct_build.ploc_extended_pipeline,
|
||||
&device->meta_state.accel_struct_build.ploc_p_layout);
|
||||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
|
||||
result = create_build_pipeline_spv(device, convert_leaf_spv, sizeof(convert_leaf_spv),
|
||||
sizeof(struct convert_leaf_args),
|
||||
&device->meta_state.accel_struct_build.convert_leaf_pipeline,
|
||||
|
|
|
|||
|
|
@ -688,6 +688,7 @@ struct radv_meta_state {
|
|||
VkPipeline lbvh_generate_ir_pipeline;
|
||||
VkPipelineLayout ploc_p_layout;
|
||||
VkPipeline ploc_pipeline;
|
||||
VkPipeline ploc_extended_pipeline;
|
||||
VkPipelineLayout convert_leaf_p_layout;
|
||||
VkPipeline convert_leaf_pipeline;
|
||||
VkPipelineLayout convert_internal_p_layout;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue