Skip to content

Commit e30938c

Browse files
author
devsh
committed
test that we're not overflown submitted when providing correct max size scratch buffer
1 parent c8d4b60 commit e30938c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

71_RayTracingPipeline/main.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1452,7 +1452,7 @@ class RaytracingPipelineApp final : public examples::SimpleWindowedApplication,
14521452
{
14531453
constexpr auto MaxAlignment = 256;
14541454
constexpr auto MinAllocationSize = 1024;
1455-
const auto scratchSize = core::alignUp(reservation.getMinASBuildScratchSize(false), MaxAlignment);
1455+
const auto scratchSize = core::alignUp(reservation.getMaxASBuildScratchSize(false), MaxAlignment);
14561456

14571457

14581458
IGPUBuffer::SCreationParams creationParams = {};
@@ -1496,6 +1496,9 @@ class RaytracingPipelineApp final : public examples::SimpleWindowedApplication,
14961496
m_logger->log("Failed to await submission feature!", ILogger::ELL_ERROR);
14971497
return false;
14981498
}
1499+
// 2 submits, BLAS build, TLAS build, DO NOT ADD COMPACTIONS IN THIS EXAMPLE!
1500+
if (compute.getFutureScratchSemaphore().value>3)
1501+
m_logger->log("Overflow submitted on Compute Queue despite using ReBAR (no transfer submits or usage of staging buffer) and providing a AS Build Scratch Buffer of correctly queried max size!",system::ILogger::ELL_ERROR);
14991502

15001503
// assign gpu objects to output
15011504
auto&& tlases = reservation.getGPUObjects<ICPUTopLevelAccelerationStructure>();

0 commit comments

Comments
 (0)