From b3dfe383c6d31ff3dbd76dcfb32de8d536382f3e Mon Sep 17 00:00:00 2001 From: lucy96chen <47800040+lucy96chen@users.noreply.github.com> Date: Mon, 4 Oct 2021 09:46:33 -0700 Subject: Get native handles for TextureResource and BufferResource (#1960) * Added getNativeHandle() to TextureResource and BufferResource; Implemented getNativeHandle() in Vulkan and D3D12; Added new unit test files for the aforementioned implementation * Added missing getNativeHandle() implementations to renderer-shared.cpp and CUDA * Finished new getNativeHandle() unit tests for ITextureResource and IBufferResource; Modified ICommandQueue and ICommandBuffer unit tests to call QueryInterface to convert to IUnknown then back and compare resulting pointers for equality * Unit tests updated and pass locally * Cast m_buffer.m_buffer and m_image to uint64_t --- tools/gfx-unit-test/existing-device-handle-test.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tools/gfx-unit-test/existing-device-handle-test.cpp') diff --git a/tools/gfx-unit-test/existing-device-handle-test.cpp b/tools/gfx-unit-test/existing-device-handle-test.cpp index a8ebb67c9..2a4ffea26 100644 --- a/tools/gfx-unit-test/existing-device-handle-test.cpp +++ b/tools/gfx-unit-test/existing-device-handle-test.cpp @@ -100,7 +100,7 @@ namespace gfx_test { if ((api & context->enabledApis) == 0) { - return SLANG_IGNORE_TEST; + SLANG_IGNORE_TEST; } Slang::ComPtr device; IDevice::Desc deviceDesc = {}; @@ -116,7 +116,7 @@ namespace gfx_test deviceDesc.deviceType = gfx::DeviceType::Vulkan; break; default: - return SLANG_IGNORE_TEST; + SLANG_IGNORE_TEST; } deviceDesc.slang.slangGlobalSession = context->slangGlobalSession; const char* searchPaths[] = { "", "../../tools/gfx-unit-test", "tools/gfx-unit-test" }; @@ -125,7 +125,7 @@ namespace gfx_test auto createDeviceResult = gfxCreateDevice(&deviceDesc, device.writeRef()); if (SLANG_FAILED(createDeviceResult)) { - return SLANG_IGNORE_TEST; + SLANG_IGNORE_TEST; } IDevice::NativeHandle handle = {}; @@ -136,7 +136,7 @@ namespace gfx_test auto createTestDeviceResult = gfxCreateDevice(&testDeviceDesc, testDevice.writeRef()); if (SLANG_FAILED(createTestDeviceResult)) { - return SLANG_IGNORE_TEST; + SLANG_IGNORE_TEST; } existingDeviceHandleTestImpl(testDevice, context); -- cgit v1.2.3