diff options
| author | Yong He <yonghe@outlook.com> | 2022-02-09 15:30:38 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-09 15:30:38 -0800 |
| commit | b8982fcf43b86c1e39dcc3dd19bff2821633eda6 (patch) | |
| tree | 0d66dbf46b50e760cce4aee232bd6a020976e6fb /tools/gfx-unit-test | |
| parent | 59f3fdc0a372d19ce4e989514ee3e9ecbcbf234c (diff) | |
Various fixes to gfx. (#2120)
* Various fixes to gfx.
* Fix.
* Fixes.
* Fix.
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools/gfx-unit-test')
| -rw-r--r-- | tools/gfx-unit-test/buffer-barrier-test.cpp | 3 | ||||
| -rw-r--r-- | tools/gfx-unit-test/compute-smoke.cpp | 3 | ||||
| -rw-r--r-- | tools/gfx-unit-test/create-buffer-from-handle.cpp | 3 | ||||
| -rw-r--r-- | tools/gfx-unit-test/existing-device-handle-test.cpp | 3 | ||||
| -rw-r--r-- | tools/gfx-unit-test/format-unit-tests.cpp | 3 | ||||
| -rw-r--r-- | tools/gfx-unit-test/gfx-test-util.cpp | 4 | ||||
| -rw-r--r-- | tools/gfx-unit-test/mutable-shader-object.cpp | 3 | ||||
| -rw-r--r-- | tools/gfx-unit-test/nested-parameter-block.cpp | 4 | ||||
| -rw-r--r-- | tools/gfx-unit-test/root-mutable-shader-object.cpp | 3 | ||||
| -rw-r--r-- | tools/gfx-unit-test/shared-buffers-tests.cpp | 3 | ||||
| -rw-r--r-- | tools/gfx-unit-test/shared-textures-tests.cpp | 3 |
11 files changed, 22 insertions, 13 deletions
diff --git a/tools/gfx-unit-test/buffer-barrier-test.cpp b/tools/gfx-unit-test/buffer-barrier-test.cpp index fb3d62f8c..b2692f6fd 100644 --- a/tools/gfx-unit-test/buffer-barrier-test.cpp +++ b/tools/gfx-unit-test/buffer-barrier-test.cpp @@ -48,7 +48,8 @@ namespace gfx_test viewDesc.type = unorderedAccess ? IResourceView::Type::UnorderedAccess : IResourceView::Type::ShaderResource; viewDesc.format = Format::Unknown; viewDesc.bufferElementSize = sizeof(float); - GFX_CHECK_CALL_ABORT(device->createBufferView(outBuffer.buffer, viewDesc, outBuffer.view.writeRef())); + GFX_CHECK_CALL_ABORT(device->createBufferView( + outBuffer.buffer, nullptr, viewDesc, outBuffer.view.writeRef())); } void barrierTestImpl(IDevice* device, UnitTestContext* context) diff --git a/tools/gfx-unit-test/compute-smoke.cpp b/tools/gfx-unit-test/compute-smoke.cpp index 185e8aa99..68925f1e0 100644 --- a/tools/gfx-unit-test/compute-smoke.cpp +++ b/tools/gfx-unit-test/compute-smoke.cpp @@ -51,7 +51,8 @@ namespace gfx_test IResourceView::Desc viewDesc = {}; viewDesc.type = IResourceView::Type::UnorderedAccess; viewDesc.format = Format::Unknown; - GFX_CHECK_CALL_ABORT(device->createBufferView(numbersBuffer, viewDesc, bufferView.writeRef())); + GFX_CHECK_CALL_ABORT( + device->createBufferView(numbersBuffer, nullptr, viewDesc, bufferView.writeRef())); // We have done all the set up work, now it is time to start recording a command buffer for // GPU execution. diff --git a/tools/gfx-unit-test/create-buffer-from-handle.cpp b/tools/gfx-unit-test/create-buffer-from-handle.cpp index 22612dbf0..4e2261465 100644 --- a/tools/gfx-unit-test/create-buffer-from-handle.cpp +++ b/tools/gfx-unit-test/create-buffer-from-handle.cpp @@ -57,7 +57,8 @@ namespace gfx_test IResourceView::Desc viewDesc = {}; viewDesc.type = IResourceView::Type::UnorderedAccess; viewDesc.format = Format::Unknown; - GFX_CHECK_CALL_ABORT(device->createBufferView(numbersBuffer, viewDesc, bufferView.writeRef())); + GFX_CHECK_CALL_ABORT( + device->createBufferView(numbersBuffer, nullptr, viewDesc, bufferView.writeRef())); // We have done all the set up work, now it is time to start recording a command buffer for // GPU execution. diff --git a/tools/gfx-unit-test/existing-device-handle-test.cpp b/tools/gfx-unit-test/existing-device-handle-test.cpp index cf13fe090..d6f66af84 100644 --- a/tools/gfx-unit-test/existing-device-handle-test.cpp +++ b/tools/gfx-unit-test/existing-device-handle-test.cpp @@ -51,7 +51,8 @@ namespace gfx_test IResourceView::Desc viewDesc = {}; viewDesc.type = IResourceView::Type::UnorderedAccess; viewDesc.format = Format::Unknown; - GFX_CHECK_CALL_ABORT(device->createBufferView(numbersBuffer, viewDesc, bufferView.writeRef())); + GFX_CHECK_CALL_ABORT( + device->createBufferView(numbersBuffer, nullptr, viewDesc, bufferView.writeRef())); // We have done all the set up work, now it is time to start recording a command buffer for // GPU execution. diff --git a/tools/gfx-unit-test/format-unit-tests.cpp b/tools/gfx-unit-test/format-unit-tests.cpp index 55aa2768b..1a885174f 100644 --- a/tools/gfx-unit-test/format-unit-tests.cpp +++ b/tools/gfx-unit-test/format-unit-tests.cpp @@ -153,7 +153,8 @@ namespace gfx_test IResourceView::Desc viewDesc = {}; viewDesc.type = IResourceView::Type::UnorderedAccess; viewDesc.format = Format::Unknown; - GFX_CHECK_CALL_ABORT(device->createBufferView(outBuffer, viewDesc, bufferView.writeRef())); + GFX_CHECK_CALL_ABORT( + device->createBufferView(outBuffer, nullptr, viewDesc, bufferView.writeRef())); return bufferView; } diff --git a/tools/gfx-unit-test/gfx-test-util.cpp b/tools/gfx-unit-test/gfx-test-util.cpp index c95c3d0e5..1133e3842 100644 --- a/tools/gfx-unit-test/gfx-test-util.cpp +++ b/tools/gfx-unit-test/gfx-test-util.cpp @@ -57,7 +57,7 @@ namespace gfx_test slangReflection = composedProgram->getLayout(); gfx::IShaderProgram::Desc programDesc = {}; - programDesc.slangProgram = composedProgram.get(); + programDesc.slangGlobalScope = composedProgram.get(); auto shaderProgram = device->createProgram(programDesc); @@ -105,7 +105,7 @@ namespace gfx_test slangReflection = composedProgram->getLayout(); gfx::IShaderProgram::Desc programDesc = {}; - programDesc.slangProgram = composedProgram.get(); + programDesc.slangGlobalScope = composedProgram.get(); auto shaderProgram = device->createProgram(programDesc); diff --git a/tools/gfx-unit-test/mutable-shader-object.cpp b/tools/gfx-unit-test/mutable-shader-object.cpp index 28ec8fb45..cc9707643 100644 --- a/tools/gfx-unit-test/mutable-shader-object.cpp +++ b/tools/gfx-unit-test/mutable-shader-object.cpp @@ -51,7 +51,8 @@ namespace gfx_test IResourceView::Desc viewDesc = {}; viewDesc.type = IResourceView::Type::UnorderedAccess; viewDesc.format = Format::Unknown; - GFX_CHECK_CALL_ABORT(device->createBufferView(numbersBuffer, viewDesc, bufferView.writeRef())); + GFX_CHECK_CALL_ABORT( + device->createBufferView(numbersBuffer, nullptr, viewDesc, bufferView.writeRef())); { slang::TypeReflection* addTransformerType = diff --git a/tools/gfx-unit-test/nested-parameter-block.cpp b/tools/gfx-unit-test/nested-parameter-block.cpp index 2917218f1..b21b0bcf2 100644 --- a/tools/gfx-unit-test/nested-parameter-block.cpp +++ b/tools/gfx-unit-test/nested-parameter-block.cpp @@ -70,7 +70,7 @@ namespace gfx_test srvDesc.bufferElementSize = sizeof(uint32_t) * 4; srvDesc.bufferRange.elementCount = 4; srvDesc.bufferRange.firstElement = 0; - srvs.add(device->createBufferView(srvBuffers[i], srvDesc)); + srvs.add(device->createBufferView(srvBuffers[i], nullptr, srvDesc)); } Slang::ComPtr<IBufferResource> resultBuffer = createBuffer(device, 0, gfx::ResourceState::UnorderedAccess); @@ -82,7 +82,7 @@ namespace gfx_test resultBufferViewDesc.bufferRange.firstElement = 0; Slang::ComPtr<IResourceView> resultBufferView; SLANG_CHECK(SLANG_SUCCEEDED(device->createBufferView( - resultBuffer, resultBufferViewDesc, resultBufferView.writeRef()))); + resultBuffer, nullptr, resultBufferViewDesc, resultBufferView.writeRef()))); Slang::ComPtr<IShaderObject> materialObject; SLANG_CHECK(SLANG_SUCCEEDED(device->createMutableShaderObject( diff --git a/tools/gfx-unit-test/root-mutable-shader-object.cpp b/tools/gfx-unit-test/root-mutable-shader-object.cpp index 43c5fbd1f..10079b62a 100644 --- a/tools/gfx-unit-test/root-mutable-shader-object.cpp +++ b/tools/gfx-unit-test/root-mutable-shader-object.cpp @@ -51,7 +51,8 @@ namespace gfx_test IResourceView::Desc viewDesc = {}; viewDesc.type = IResourceView::Type::UnorderedAccess; viewDesc.format = Format::Unknown; - GFX_CHECK_CALL_ABORT(device->createBufferView(numbersBuffer, viewDesc, bufferView.writeRef())); + GFX_CHECK_CALL_ABORT( + device->createBufferView(numbersBuffer, nullptr, viewDesc, bufferView.writeRef())); ComPtr<IShaderObject> rootObject; device->createMutableRootShaderObject(shaderProgram, rootObject.writeRef()); diff --git a/tools/gfx-unit-test/shared-buffers-tests.cpp b/tools/gfx-unit-test/shared-buffers-tests.cpp index 915da798b..ccd223fc0 100644 --- a/tools/gfx-unit-test/shared-buffers-tests.cpp +++ b/tools/gfx-unit-test/shared-buffers-tests.cpp @@ -70,7 +70,8 @@ namespace gfx_test IResourceView::Desc viewDesc = {}; viewDesc.type = IResourceView::Type::UnorderedAccess; viewDesc.format = Format::Unknown; - GFX_CHECK_CALL_ABORT(dstDevice->createBufferView(dstBuffer, viewDesc, bufferView.writeRef())); + GFX_CHECK_CALL_ABORT( + dstDevice->createBufferView(dstBuffer, nullptr, viewDesc, bufferView.writeRef())); { ICommandQueue::Desc queueDesc = { ICommandQueue::QueueType::Graphics }; diff --git a/tools/gfx-unit-test/shared-textures-tests.cpp b/tools/gfx-unit-test/shared-textures-tests.cpp index b83f58a78..831296c72 100644 --- a/tools/gfx-unit-test/shared-textures-tests.cpp +++ b/tools/gfx-unit-test/shared-textures-tests.cpp @@ -130,7 +130,8 @@ namespace gfx_test IResourceView::Desc viewDesc = {}; viewDesc.type = IResourceView::Type::UnorderedAccess; viewDesc.format = Format::Unknown; - GFX_CHECK_CALL_ABORT(device->createBufferView(outBuffer, viewDesc, bufferView.writeRef())); + GFX_CHECK_CALL_ABORT( + device->createBufferView(outBuffer, nullptr, viewDesc, bufferView.writeRef())); return bufferView; } |
