|
6 | 6 | #include "nbl/ext/FullScreenTriangle/FullScreenTriangle.h" |
7 | 7 | #include "nbl/builtin/hlsl/indirect_commands.hlsl" |
8 | 8 |
|
9 | | -#define TEST_ASSET_CONV_AS |
| 9 | +//#define TEST_ASSET_CONV_AS |
10 | 10 |
|
11 | 11 | class RaytracingPipelineApp final : public examples::SimpleWindowedApplication, public application_templates::MonoAssetManagerAndBuiltinResourceApplication |
12 | 12 | { |
@@ -1955,9 +1955,9 @@ class RaytracingPipelineApp final : public examples::SimpleWindowedApplication, |
1955 | 1955 | // build bottom level ASes |
1956 | 1956 | { |
1957 | 1957 | core::vector<uint32_t> primitiveCounts(blasCount); |
1958 | | - core::vector<IGPUBottomLevelAccelerationStructure::Triangles<const IGPUBuffer>> triangles(m_gpuTriangleGeometries.size()); |
| 1958 | + core::vector<IGPUBottomLevelAccelerationStructure::Triangles<IGPUBuffer>> triangles(m_gpuTriangleGeometries.size()); |
1959 | 1959 | core::vector<uint32_t> scratchSizes(blasCount); |
1960 | | - IGPUBottomLevelAccelerationStructure::AABBs<const IGPUBuffer> aabbs; |
| 1960 | + IGPUBottomLevelAccelerationStructure::AABBs<IGPUBuffer> aabbs; |
1961 | 1961 |
|
1962 | 1962 | auto blasFlags = bitflag(IGPUBottomLevelAccelerationStructure::BUILD_FLAGS::PREFER_FAST_TRACE_BIT) | IGPUBottomLevelAccelerationStructure::BUILD_FLAGS::ALLOW_COMPACTION_BIT; |
1963 | 1963 | if (m_physicalDevice->getProperties().limits.rayTracingPositionFetch) |
@@ -2017,12 +2017,12 @@ class RaytracingPipelineApp final : public examples::SimpleWindowedApplication, |
2017 | 2017 | if (isProcedural) |
2018 | 2018 | { |
2019 | 2019 | const auto* aabbData = &aabbs; |
2020 | | - buildSizes = m_device->getAccelerationStructureBuildSizes(blasBuildInfos[i].buildFlags, false, std::span{ aabbData, 1 }, maxPrimCount); |
| 2020 | + buildSizes = m_device->getAccelerationStructureBuildSizes(false, blasBuildInfos[i].buildFlags, false, std::span{ aabbData, 1 }, maxPrimCount); |
2021 | 2021 | } |
2022 | 2022 | else |
2023 | 2023 | { |
2024 | 2024 | const auto* trianglesData = triangles.data(); |
2025 | | - buildSizes = m_device->getAccelerationStructureBuildSizes(blasBuildInfos[i].buildFlags, false, std::span{ trianglesData,1 }, maxPrimCount); |
| 2025 | + buildSizes = m_device->getAccelerationStructureBuildSizes(false, blasBuildInfos[i].buildFlags, false, std::span{ trianglesData,1 }, maxPrimCount); |
2026 | 2026 | } |
2027 | 2027 | if (!buildSizes) |
2028 | 2028 | return logFail("Failed to get BLAS build sizes"); |
@@ -2144,8 +2144,8 @@ class RaytracingPipelineApp final : public examples::SimpleWindowedApplication, |
2144 | 2144 | IGPUBottomLevelAccelerationStructure::CopyInfo copyInfo; |
2145 | 2145 | copyInfo.src = cleanupBlas[i].get(); |
2146 | 2146 | copyInfo.dst = m_gpuBlasList[i].get(); |
2147 | | - copyInfo.mode = IGPUBottomLevelAccelerationStructure::COPY_MODE::COMPACT; |
2148 | | - if (!cmdbufCompact->copyAccelerationStructure(copyInfo)) |
| 2147 | + copyInfo.compact = true; |
| 2148 | + if (!cmdbufCompact->copyAccelerationStructure<IGPUBottomLevelAccelerationStructure>(copyInfo)) |
2149 | 2149 | return logFail("Failed to copy AS to compact"); |
2150 | 2150 | } |
2151 | 2151 | } |
|
0 commit comments