Use square dimensions for CUBE_COMPATIBLE 2D images
authorSlawomir Cygan <slawomir.cygan@intel.com>
Mon, 27 May 2019 10:53:31 +0000 (12:53 +0200)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 30 May 2019 10:20:59 +0000 (06:20 -0400)
VK-GL-CTS Issue: 1789

Components: Vulkan

Affects: dEQP-VK.api.image_clearing.core.*_attachment.cube_*

Change-Id: I17fd12d1941f44e8c7393b1e37f3c59731b1f3a0

external/vulkancts/modules/vulkan/api/vktApiImageClearingTests.cpp

index 8969028..2729a22 100644 (file)
@@ -1854,13 +1854,14 @@ TestCaseGroup* createImageClearingTestsCommon (TestContext& testCtx, tcu::TestCa
                                {
                                        const VkFormat          format                  = colorImageFormatsToTest[imageFormatIndex];
                                        const std::string       testCaseName    = getFormatCaseName(format);
+                                       const bool                      isCube                  = imageLayerParamsToTest[imageLayerParamsIndex].isCube;
                                        const TestParams        testParams              =
                                        {
                                                true,                                                                                                                   // bool                         useSingleMipLevel;
                                                VK_IMAGE_TYPE_2D,                                                                                               // VkImageType          imageType;
                                                format,                                                                                                                 // VkFormat                     format;
                                                VK_IMAGE_TILING_OPTIMAL,                                                                                // VkImageTiling        tiling;
-                                               { 200, 180, 1 },                                                                                                // VkExtent3D           extent;
+                                               { 200u, isCube ? 200u : 180u, 1u },                                                             // VkExtent3D           extent;
                                                imageLayerParamsToTest[imageLayerParamsIndex].imageLayerCount,  // deUint32         imageLayerCount;
                                                imageLayerParamsToTest[imageLayerParamsIndex].imageViewRange,   // LayerRange           imageViewLayerRange;
                                                makeClearColorValue(format, 0.2f, 0.1f, 0.7f, 0.8f),                    // VkClearValue         initValue
@@ -1870,7 +1871,7 @@ TestCaseGroup* createImageClearingTestsCommon (TestContext& testCtx, tcu::TestCa
                                                },
                                                imageLayerParamsToTest[imageLayerParamsIndex].clearLayerRange,  // LayerRange       clearLayerRange;
                                                allocationKind,                                                                                                 // AllocationKind       allocationKind;
-                                               imageLayerParamsToTest[imageLayerParamsIndex].isCube                    // bool                         isCube;
+                                               isCube                                                                                                                  // bool                         isCube;
                                        };
                                        colorAttachmentClearLayersGroup->addChild(new InstanceFactory1<ClearAttachmentTestInstance, TestParams>(testCtx, NODETYPE_SELF_VALIDATE, testCaseName, "Clear Color Attachment", testParams));
                                        partialColorAttachmentClearLayersGroup->addChild(new InstanceFactory1<PartialClearAttachmentTestInstance, TestParams>(testCtx, NODETYPE_SELF_VALIDATE, testCaseName, "Partial Clear Color Attachment", testParams));
@@ -1896,13 +1897,14 @@ TestCaseGroup* createImageClearingTestsCommon (TestContext& testCtx, tcu::TestCa
                                {
                                        const VkFormat          format                  = depthStencilImageFormatsToTest[imageFormatIndex];
                                        const std::string       testCaseName    = getFormatCaseName(format);
+                                       const bool                      isCube                  = imageLayerParamsToTest[imageLayerParamsIndex].isCube;
                                        const TestParams        testParams              =
                                        {
                                                true,                                                                                                                   // bool                         useSingleMipLevel;
                                                VK_IMAGE_TYPE_2D,                                                                                               // VkImageType          imageType;
                                                format,                                                                                                                 // VkFormat                     format;
                                                VK_IMAGE_TILING_OPTIMAL,                                                                                // VkImageTiling        tiling;
-                                               { 200, 180, 1 },                                                                                                // VkExtent3D           extent;
+                                               { 200u, isCube ? 200u : 180u, 1u },                                                             // VkExtent3D           extent;
                                                imageLayerParamsToTest[imageLayerParamsIndex].imageLayerCount,  // deUint32         imageLayerCount;
                                                imageLayerParamsToTest[imageLayerParamsIndex].imageViewRange,   // LayerRange           imageViewLayerRange;
                                                makeClearValueDepthStencil(0.5f, 0x03),                                                 // VkClearValue         initValue
@@ -1912,7 +1914,7 @@ TestCaseGroup* createImageClearingTestsCommon (TestContext& testCtx, tcu::TestCa
                                                },
                                                imageLayerParamsToTest[imageLayerParamsIndex].clearLayerRange,  // LayerRange       clearLayerRange;
                                                allocationKind,                                                                                                 // AllocationKind       allocationKind;
-                                               imageLayerParamsToTest[imageLayerParamsIndex].isCube                    // bool                         isCube;
+                                               isCube                                                                                                                  // bool                         isCube;
                                        };
                                        depthStencilLayersGroup->addChild(new InstanceFactory1<ClearAttachmentTestInstance, TestParams>(testCtx, NODETYPE_SELF_VALIDATE, testCaseName, "Clear Depth/Stencil Attachment", testParams));
                                        partialDepthStencilLayersGroup->addChild(new InstanceFactory1<PartialClearAttachmentTestInstance, TestParams>(testCtx, NODETYPE_SELF_VALIDATE, testCaseName, "Parital Clear Depth/Stencil Attachment", testParams));