diff options
| author | lucy96chen <47800040+lucy96chen@users.noreply.github.com> | 2022-04-21 12:59:09 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-21 12:59:09 -0700 |
| commit | f493d24c70a6227754296439e97adf35ec412496 (patch) | |
| tree | 25fffb03c067477bef68ccdc66865683159e3ab5 /tools/gfx-unit-test/copy-texture-tests.cpp | |
| parent | 1b6cea2219307f6271e131c43d6e8f48910bd435 (diff) | |
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
Diffstat (limited to 'tools/gfx-unit-test/copy-texture-tests.cpp')
| -rw-r--r-- | tools/gfx-unit-test/copy-texture-tests.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
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<TextureInfo> srcTextureInfo; RefPtr<TextureInfo> 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<ISlangBlob> 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; |
