From d06a78d935b2743494d47ed5cd3f36e38ac9c5ac Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 3 Feb 2022 19:17:30 -0800 Subject: Add gfx interop to allow more direct D3D12 usage scenarios. (#2117) * Add gfx interop to allow more direct D3D12 usage scenarios. * Fix compile error in win32. * gfx: Implement IFence::getNativeHandle() on d3d12. * More GFX-D3D interop interface. * Fix cuda. Co-authored-by: Yong He --- tools/gfx-unit-test/copy-texture-tests.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tools/gfx-unit-test/copy-texture-tests.cpp') diff --git a/tools/gfx-unit-test/copy-texture-tests.cpp b/tools/gfx-unit-test/copy-texture-tests.cpp index fa206afda..069d20f02 100644 --- a/tools/gfx-unit-test/copy-texture-tests.cpp +++ b/tools/gfx-unit-test/copy-texture-tests.cpp @@ -222,9 +222,9 @@ namespace gfx_test RefPtr generateTextureData(int width, int height, uint32_t mipLevels, uint32_t arrayLayers) { RefPtr texture = new TextureStuff(); - for (int layer = 0; layer < arrayLayers; ++layer) + for (uint32_t layer = 0; layer < arrayLayers; ++layer) { - for (int mip = 0; mip < mipLevels; ++mip) + for (uint32_t mip = 0; mip < mipLevels; ++mip) { RefPtr subresource = new SubresourceStuff(); texture->subresourceObjects.add(subresource); @@ -239,10 +239,10 @@ namespace gfx_test for (int w = 0; w < mipWidth; ++w) { // 4 channels per pixel - subresource->texels[h * mipWidth + w].channels[0] = w; - subresource->texels[h * mipWidth + w].channels[1] = h; - subresource->texels[h * mipWidth + w].channels[2] = mip; - subresource->texels[h * mipWidth + w].channels[3] = layer; + subresource->texels[h * mipWidth + w].channels[0] = (float)w; + subresource->texels[h * mipWidth + w].channels[1] = (float)h; + subresource->texels[h * mipWidth + w].channels[2] = (float)mip; + subresource->texels[h * mipWidth + w].channels[3] = (float)layer; } } -- cgit v1.2.3