test(rt): BuildTLAS's read barrier makes the build visible to TLAS reads
TLASBuildBarrier drives BuildTlasReadBarrier with no GPU device: the dependency starts at the acceleration-structure build, reaches the ray-tracing and compute shader stages, and carries the acceleration-structure write -> read memory dependency that the old execution-only barrier lacked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
824436e67c
commit
5d25c1f825
2 changed files with 77 additions and 0 deletions
26
project.cpp
26
project.cpp
|
|
@ -502,6 +502,32 @@ extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> a
|
|||
tlc.GetInterfacesAndImplementations(ifaces, tlasImpls);
|
||||
cfg.tests.push_back(std::move(tlasTest));
|
||||
|
||||
// The barrier BuildTLAS records after the build carries the
|
||||
// acceleration-structure memory dependency to the shaders that read
|
||||
// the TLAS, not just execution order. BuildTlasReadBarrier is pure
|
||||
// CPU logic, so no GPU device is needed at runtime.
|
||||
Test tlasBarrierTest;
|
||||
Configuration& tbc = tlasBarrierTest.config;
|
||||
tbc.path = cfg.path;
|
||||
tbc.name = "TLASBuildBarrier";
|
||||
tbc.outputName = "TLASBuildBarrier";
|
||||
tbc.type = ConfigurationType::Executable;
|
||||
tbc.target = cfg.target;
|
||||
tbc.march = cfg.march;
|
||||
tbc.mtune = cfg.mtune;
|
||||
tbc.debug = cfg.debug;
|
||||
tbc.sysroot = cfg.sysroot;
|
||||
tbc.dependencies = cfg.dependencies;
|
||||
tbc.externalDependencies = cfg.externalDependencies;
|
||||
tbc.compileFlags = cfg.compileFlags;
|
||||
tbc.linkFlags = cfg.linkFlags;
|
||||
tbc.defines = cfg.defines;
|
||||
tbc.cFiles = cfg.cFiles;
|
||||
std::vector<fs::path> tlasBarrierImpls(impls.begin(), impls.end());
|
||||
tlasBarrierImpls.emplace_back("tests/TLASBuildBarrier/main");
|
||||
tbc.GetInterfacesAndImplementations(ifaces, tlasBarrierImpls);
|
||||
cfg.tests.push_back(std::move(tlasBarrierTest));
|
||||
|
||||
// Issue #118: the per-frame TLAS instance+metadata host rebuild copies
|
||||
// (and flushes) only the slots whose element's host-authored data
|
||||
// changed, tracked via RenderingElement3D::hostDataVersion against the
|
||||
|
|
|
|||
Loading…
Reference in a new issue