From f493d24c70a6227754296439e97adf35ec412496 Mon Sep 17 00:00:00 2001 From: lucy96chen <47800040+lucy96chen@users.noreply.github.com> Date: Thu, 21 Apr 2022 12:59:09 -0700 Subject: GFX renaming work part 2: slang-gfx.h renames (#2194) * Fixed all build errors and type conversion warnings from renames in slang-gfx.h * Made necessary build fixes to the CUDA implementation * Renamed ITextureResource::Size to ITextureResource::Extents * More rename changes based on CI errors * More renames to fix CI build errors * Rerun tests --- tools/gfx-unit-test/copy-texture-tests.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 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 3461a8cdf..6a9d39d22 100644 --- a/tools/gfx-unit-test/copy-texture-tests.cpp +++ b/tools/gfx-unit-test/copy-texture-tests.cpp @@ -19,7 +19,7 @@ namespace gfx_test { SubresourceRange srcSubresource; SubresourceRange dstSubresource; - ITextureResource::Size extent; + ITextureResource::Extents extent; ITextureResource::Offset3D srcOffset; ITextureResource::Offset3D dstOffset; }; @@ -27,10 +27,10 @@ namespace gfx_test struct TextureToBufferCopyInfo { SubresourceRange srcSubresource; - ITextureResource::Size extent; + ITextureResource::Extents extent; ITextureResource::Offset3D textureOffset; - size_t bufferOffset; - size_t bufferSize; + Offset bufferOffset; + Offset bufferSize; }; struct BaseCopyTextureTest @@ -38,7 +38,7 @@ namespace gfx_test IDevice* device; UnitTestContext* context; - size_t alignedRowStride; + Size alignedRowStride; RefPtr srcTextureInfo; RefPtr dstTextureInfo; @@ -185,7 +185,7 @@ namespace gfx_test queue->waitOnHost(); } - bool isWithinCopyBounds(Int x, Int y, Int z) + bool isWithinCopyBounds(GfxIndex x, GfxIndex y, GfxIndex z) { auto copyExtents = texCopyInfo.extent; auto copyOffset = texCopyInfo.dstOffset; @@ -213,11 +213,11 @@ namespace gfx_test auto srcTexOffset = texCopyInfo.srcOffset; auto dstTexOffset = texCopyInfo.dstOffset; - for (Int x = 0; x < actualExtents.width; ++x) + for (GfxIndex x = 0; x < actualExtents.width; ++x) { - for (Int y = 0; y < actualExtents.height; ++y) + for (GfxIndex y = 0; y < actualExtents.height; ++y) { - for (Int z = 0; z < actualExtents.depth; ++z) + for (GfxIndex z = 0; z < actualExtents.depth; ++z) { auto actualBlock = actual.getBlockAt(x, y, z); if (isWithinCopyBounds(x, y, z)) @@ -241,7 +241,7 @@ namespace gfx_test } } - void checkTestResults(ITextureResource::Size srcMipExtent, const void* expectedCopiedData, const void* expectedOriginalData) + void checkTestResults(ITextureResource::Extents srcMipExtent, const void* expectedCopiedData, const void* expectedOriginalData) { ComPtr resultBlob; GFX_CHECK_CALL_ABORT(device->readBufferResource(resultsBuffer, 0, bufferCopyInfo.bufferSize, resultBlob.writeRef())); @@ -251,7 +251,7 @@ namespace gfx_test actual.extents = bufferCopyInfo.extent; actual.textureData = results; actual.strides.x = getTexelSize(dstTextureInfo->format); - actual.strides.y = (uint32_t)alignedRowStride; + actual.strides.y = alignedRowStride; actual.strides.z = actual.extents.height * actual.strides.y; ValidationTextureData expectedCopied; @@ -746,9 +746,9 @@ namespace gfx_test { // Skip Type::Unknown and Type::Buffer as well as Format::Unknown // TODO: Add support for TextureCube - for (uint32_t i = 2; i < (uint32_t)ITextureResource::Type::CountOf - 1; ++i) + for (uint32_t i = 2; i < (uint32_t)ITextureResource::Type::_Count - 1; ++i) { - for (uint32_t j = 1; j < (uint32_t)Format::CountOf; ++j) + for (uint32_t j = 1; j < (uint32_t)Format::_Count; ++j) { auto type = (ITextureResource::Type)i; auto format = (Format)j; -- cgit v1.2.3