| 1055 | static_cast<ID3D12GraphicsCommandList4 *>(_orig)->ExecuteMetaCommand(pMetaCommand, pExecutionParametersData, ExecutionParametersDataSizeInBytes); |
| 1056 | } |
| 1057 | void STDMETHODCALLTYPE D3D12GraphicsCommandList::BuildRaytracingAccelerationStructure(const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC *pDesc, UINT NumPostbuildInfoDescs, const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC *pPostbuildInfoDescs) |
| 1058 | { |
| 1059 | assert(_interface_version >= 4); |
| 1060 | |
| 1061 | #if RESHADE_ADDON >= 2 |
| 1062 | assert(pDesc != nullptr); |
| 1063 | |
| 1064 | if (reshade::has_addon_event<reshade::addon_event::build_acceleration_structure>()) |
| 1065 | { |
| 1066 | std::vector<reshade::api::acceleration_structure_build_input> build_inputs; |
| 1067 | if (pDesc->Inputs.Type == D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL) |
| 1068 | { |
| 1069 | build_inputs.push_back({ reshade::api::resource {}, pDesc->Inputs.InstanceDescs, pDesc->Inputs.NumDescs, pDesc->Inputs.DescsLayout == D3D12_ELEMENTS_LAYOUT_ARRAY_OF_POINTERS }); |
| 1070 | } |
| 1071 | else |
| 1072 | { |
| 1073 | build_inputs.reserve(pDesc->Inputs.NumDescs); |
| 1074 | for (UINT k = 0; k < pDesc->Inputs.NumDescs; ++k) |
| 1075 | build_inputs.push_back(reshade::d3d12::convert_acceleration_structure_build_input(pDesc->Inputs.DescsLayout == D3D12_ELEMENTS_LAYOUT_ARRAY_OF_POINTERS ? *pDesc->Inputs.ppGeometryDescs[k] : pDesc->Inputs.pGeometryDescs[k])); |
| 1076 | } |
| 1077 | |
| 1078 | if (reshade::invoke_addon_event<reshade::addon_event::build_acceleration_structure>( |
| 1079 | this, |
| 1080 | reshade::d3d12::convert_acceleration_structure_type(pDesc->Inputs.Type), |
| 1081 | reshade::d3d12::convert_acceleration_structure_build_flags(pDesc->Inputs.Flags), |
| 1082 | static_cast<uint32_t>(build_inputs.size()), |
| 1083 | build_inputs.data(), |
| 1084 | reshade::api::resource {}, |
| 1085 | pDesc->ScratchAccelerationStructureData, |
| 1086 | reshade::api::resource_view { pDesc->SourceAccelerationStructureData }, |
| 1087 | reshade::api::resource_view { pDesc->DestAccelerationStructureData }, |
| 1088 | (pDesc->Inputs.Flags & D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_PERFORM_UPDATE) != 0 ? reshade::api::acceleration_structure_build_mode::update : reshade::api::acceleration_structure_build_mode::build)) |
| 1089 | return; |
| 1090 | } |
| 1091 | #endif |
| 1092 | |
| 1093 | static_cast<ID3D12GraphicsCommandList4 *>(_orig)->BuildRaytracingAccelerationStructure(pDesc, NumPostbuildInfoDescs, pPostbuildInfoDescs); |
| 1094 | } |
| 1095 | void STDMETHODCALLTYPE D3D12GraphicsCommandList::EmitRaytracingAccelerationStructurePostbuildInfo(const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC *pDesc, UINT NumSourceAccelerationStructures, const D3D12_GPU_VIRTUAL_ADDRESS *pSourceAccelerationStructureData) |
| 1096 | { |
| 1097 | assert(_interface_version >= 4); |
no outgoing calls
no test coverage detected