From 393d5beb1e0e71e6f2a384c9ab19b717f389a056 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 23 Feb 2022 10:30:19 -0800 Subject: gfx: d3d12 performance optimizations. (#2140) * gfx: d3d12 performance optimizations. * Fix. * Fix unit test bug. * Add gfx interface for directly allocating GPU descriptor tables. Co-authored-by: Yong He --- tools/gfx-unit-test/nested-parameter-block.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/gfx-unit-test/nested-parameter-block.cpp') diff --git a/tools/gfx-unit-test/nested-parameter-block.cpp b/tools/gfx-unit-test/nested-parameter-block.cpp index 774a94c5f..907b4c868 100644 --- a/tools/gfx-unit-test/nested-parameter-block.cpp +++ b/tools/gfx-unit-test/nested-parameter-block.cpp @@ -68,7 +68,7 @@ namespace gfx_test srvDesc.type = IResourceView::Type::ShaderResource; srvDesc.format = Format::Unknown; srvDesc.bufferElementSize = sizeof(uint32_t) * 4; - srvDesc.bufferRange.elementCount = 4; + srvDesc.bufferRange.elementCount = 1; srvDesc.bufferRange.firstElement = 0; srvs.add(device->createBufferView(srvBuffers[i], nullptr, srvDesc)); } @@ -78,7 +78,7 @@ namespace gfx_test resultBufferViewDesc.type = IResourceView::Type::UnorderedAccess; resultBufferViewDesc.format = Format::Unknown; resultBufferViewDesc.bufferElementSize = sizeof(uint32_t) * 4; - resultBufferViewDesc.bufferRange.elementCount = 4; + resultBufferViewDesc.bufferRange.elementCount = 1; resultBufferViewDesc.bufferRange.firstElement = 0; Slang::ComPtr resultBufferView; SLANG_CHECK(SLANG_SUCCEEDED(device->createBufferView( -- cgit v1.2.3