summaryrefslogtreecommitdiff
path: root/tools/gfx/d3d12/d3d12-device.cpp
diff options
context:
space:
mode:
authorskallweitNV <64953474+skallweitNV@users.noreply.github.com>2024-05-14 00:39:49 +0200
committerGitHub <noreply@github.com>2024-05-13 15:39:49 -0700
commit9f23046138629f78995d54a7722ad6749bd84db9 (patch)
tree25ac343566f896cae547046ac7e960441874ec00 /tools/gfx/d3d12/d3d12-device.cpp
parent04d3dd51125182767d90c318895a6232ec4ee750 (diff)
[gfx] specify resource view buffer range in bytes (#4149)
* refactor gfx buffer range to use byte range * create buffer view with zero struct stride for ClearUnorderedAccessViewUint/Float * create buffer descriptors on demand * avoid copying gfx.dll --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tools/gfx/d3d12/d3d12-device.cpp')
-rw-r--r--tools/gfx/d3d12/d3d12-device.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/tools/gfx/d3d12/d3d12-device.cpp b/tools/gfx/d3d12/d3d12-device.cpp
index 03f9997f4..6be37b079 100644
--- a/tools/gfx/d3d12/d3d12-device.cpp
+++ b/tools/gfx/d3d12/d3d12-device.cpp
@@ -1674,15 +1674,9 @@ Result DeviceImpl::createBufferView(
viewImpl->m_counterResource = counterResourceImpl;
viewImpl->m_desc = desc;
- SLANG_RETURN_ON_FAIL(createD3D12BufferDescriptor(
- resourceImpl,
- counterResourceImpl,
- desc,
- this,
- m_cpuViewHeap.get(),
- &viewImpl->m_descriptor));
- if (viewImpl->m_descriptor.cpuHandle.ptr != 0)
- viewImpl->m_allocator = m_cpuViewHeap.get();
+ // Buffer view descriptors are created on demand.
+ viewImpl->m_descriptor = {0};
+ viewImpl->m_allocator = m_cpuViewHeap.get();
returnComPtr(outView, viewImpl);
return SLANG_OK;