summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-01-19 11:14:38 -0800
committerGitHub <noreply@github.com>2022-01-19 11:14:38 -0800
commitb40cd149c2038b0a429e46d60ddee5610e08b0ba (patch)
tree914f8661a7f7dd3566772536cab609bfbc592413 /examples
parent3b41c818a46cb7761e5a5f2878ceb76d9aef1a20 (diff)
More fixes to GFX d3d12. (#2084)
* Fixes to GFX. * Fix binding null resource views in d3d12. * Fix array render target view creation. * Add support for more primitive topologies. * More gfx fixes. * D3D12 feature report on conservative raster, programmable sample position, barycentrics and ROV. * Add QueryPool::reset. * Fix resource setDebugName. * Dynamically expanding GPU descriptor heap. * Render passes without render targets (null frame buffer). * Fix. Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/example-base/example-base.cpp2
-rw-r--r--examples/ray-tracing-pipeline/main.cpp2
-rw-r--r--examples/ray-tracing/main.cpp2
3 files changed, 5 insertions, 1 deletions
diff --git a/examples/example-base/example-base.cpp b/examples/example-base/example-base.cpp
index 2a50c12db..68a30fd60 100644
--- a/examples/example-base/example-base.cpp
+++ b/examples/example-base/example-base.cpp
@@ -71,7 +71,7 @@ Slang::Result WindowedAppBase::initializeBase(
for (uint32_t i = 0; i < kSwapchainImageCount; i++)
{
- gfx::ITransientResourceHeap::Desc transientHeapDesc;
+ gfx::ITransientResourceHeap::Desc transientHeapDesc = {};
transientHeapDesc.constantBufferSize = 4096 * 1024;
auto transientHeap = gDevice->createTransientResourceHeap(transientHeapDesc);
gTransientHeaps.add(transientHeap);
diff --git a/examples/ray-tracing-pipeline/main.cpp b/examples/ray-tracing-pipeline/main.cpp
index c2bb4b9d7..a4e6333e9 100644
--- a/examples/ray-tracing-pipeline/main.cpp
+++ b/examples/ray-tracing-pipeline/main.cpp
@@ -390,6 +390,8 @@ Slang::Result initialize()
SLANG_RETURN_ON_FAIL(
gDevice->createAccelerationStructure(draftCreateDesc, draftAS.writeRef()));
+ compactedSizeQuery->reset();
+
auto commandBuffer = gTransientHeaps[0]->createCommandBuffer();
auto encoder = commandBuffer->encodeRayTracingCommands();
IAccelerationStructure::BuildDesc buildDesc = {};
diff --git a/examples/ray-tracing/main.cpp b/examples/ray-tracing/main.cpp
index bc4e9ad0a..9d6a638d4 100644
--- a/examples/ray-tracing/main.cpp
+++ b/examples/ray-tracing/main.cpp
@@ -382,6 +382,8 @@ Slang::Result initialize()
SLANG_RETURN_ON_FAIL(
gDevice->createAccelerationStructure(draftCreateDesc, draftAS.writeRef()));
+ compactedSizeQuery->reset();
+
auto commandBuffer = gTransientHeaps[0]->createCommandBuffer();
auto encoder = commandBuffer->encodeRayTracingCommands();
IAccelerationStructure::BuildDesc buildDesc = {};