From 0c04885da9edc3df7a1ef5cb520be1bd29eb13e4 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 10 Feb 2022 11:50:07 -0800 Subject: gfx: support d3d12 root parameters (#2122) * Various fixes to gfx. * Fix. * Fixes. * Fix. * gfx: support root parameter via user-defined attribute. * Fix. * Fix. * Skip d3d12 tests on win x86. * Fixes. Co-authored-by: Yong He Co-authored-by: jsmall-nvidia --- tools/gfx-unit-test/gfx-test-util.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tools/gfx-unit-test/gfx-test-util.cpp') diff --git a/tools/gfx-unit-test/gfx-test-util.cpp b/tools/gfx-unit-test/gfx-test-util.cpp index 1133e3842..ecd19f179 100644 --- a/tools/gfx-unit-test/gfx-test-util.cpp +++ b/tools/gfx-unit-test/gfx-test-util.cpp @@ -202,6 +202,14 @@ namespace gfx_test const char* searchPaths[] = { "", "../../tools/gfx-unit-test", "tools/gfx-unit-test" }; deviceDesc.slang.searchPathCount = (SlangInt)SLANG_COUNT_OF(searchPaths); deviceDesc.slang.searchPaths = searchPaths; + + gfx::D3D12DeviceExtendedDesc extDesc = {}; + extDesc.rootParameterShaderAttributeName = "root"; + + deviceDesc.extendedDescCount = 1; + void* extDescPtr = &extDesc; + deviceDesc.extendedDescs = &extDescPtr; + auto createDeviceResult = gfxCreateDevice(&deviceDesc, device.writeRef()); if (SLANG_FAILED(createDeviceResult)) { -- cgit v1.2.3