Add tests for sparse compressed textures.
authorAri Suonpaa <ari.suonpaa@siru.fi>
Mon, 16 Oct 2017 06:29:08 +0000 (09:29 +0300)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Wed, 31 Jan 2018 10:02:38 +0000 (05:02 -0500)
Extended compressed texture test to include sparse images used as
textures.

Affects:

dEQP-VK.texture.compressed.*

Components: Vulkan

VK-GL-CTS issue: 101

Change-Id: If317985fa8ff1c9a83040a77209c90172834968d

android/cts/master/vk-master.txt
external/vulkancts/modules/vulkan/texture/vktTextureCompressedFormatTests.cpp
external/vulkancts/mustpass/1.0.4/vk-default-no-waivers.txt
external/vulkancts/mustpass/1.0.4/vk-default.txt

index e5dfeb5f244d64a116ed0baa672e10d9c9dca885..4db4fa2fcafe0d8a6f0741bd808f22af23ad545b 100644 (file)
@@ -273953,25 +273953,45 @@ dEQP-VK.texture.filtering_anisotropy.mipmap.anisotropy_max.mag_linear_min_linear
 dEQP-VK.texture.filtering_anisotropy.mipmap.anisotropy_max.mag_nearest_min_linear_mipmap_linear
 dEQP-VK.texture.filtering_anisotropy.mipmap.anisotropy_max.mag_linear_min_linear_mipmap_linear
 dEQP-VK.texture.compressed.etc2_r8g8b8_unorm_block_2d_pot
+dEQP-VK.texture.compressed.etc2_r8g8b8_unorm_block_2d_pot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8_srgb_block_2d_pot
+dEQP-VK.texture.compressed.etc2_r8g8b8_srgb_block_2d_pot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a1_unorm_block_2d_pot
+dEQP-VK.texture.compressed.etc2_r8g8b8a1_unorm_block_2d_pot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a1_srgb_block_2d_pot
+dEQP-VK.texture.compressed.etc2_r8g8b8a1_srgb_block_2d_pot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a8_unorm_block_2d_pot
+dEQP-VK.texture.compressed.etc2_r8g8b8a8_unorm_block_2d_pot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a8_srgb_block_2d_pot
+dEQP-VK.texture.compressed.etc2_r8g8b8a8_srgb_block_2d_pot_sparse
 dEQP-VK.texture.compressed.eac_r11_unorm_block_2d_pot
+dEQP-VK.texture.compressed.eac_r11_unorm_block_2d_pot_sparse
 dEQP-VK.texture.compressed.eac_r11_snorm_block_2d_pot
+dEQP-VK.texture.compressed.eac_r11_snorm_block_2d_pot_sparse
 dEQP-VK.texture.compressed.eac_r11g11_unorm_block_2d_pot
+dEQP-VK.texture.compressed.eac_r11g11_unorm_block_2d_pot_sparse
 dEQP-VK.texture.compressed.eac_r11g11_snorm_block_2d_pot
+dEQP-VK.texture.compressed.eac_r11g11_snorm_block_2d_pot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8_unorm_block_2d_npot
+dEQP-VK.texture.compressed.etc2_r8g8b8_unorm_block_2d_npot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8_srgb_block_2d_npot
+dEQP-VK.texture.compressed.etc2_r8g8b8_srgb_block_2d_npot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a1_unorm_block_2d_npot
+dEQP-VK.texture.compressed.etc2_r8g8b8a1_unorm_block_2d_npot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a1_srgb_block_2d_npot
+dEQP-VK.texture.compressed.etc2_r8g8b8a1_srgb_block_2d_npot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a8_unorm_block_2d_npot
+dEQP-VK.texture.compressed.etc2_r8g8b8a8_unorm_block_2d_npot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a8_srgb_block_2d_npot
+dEQP-VK.texture.compressed.etc2_r8g8b8a8_srgb_block_2d_npot_sparse
 dEQP-VK.texture.compressed.eac_r11_unorm_block_2d_npot
+dEQP-VK.texture.compressed.eac_r11_unorm_block_2d_npot_sparse
 dEQP-VK.texture.compressed.eac_r11_snorm_block_2d_npot
+dEQP-VK.texture.compressed.eac_r11_snorm_block_2d_npot_sparse
 dEQP-VK.texture.compressed.eac_r11g11_unorm_block_2d_npot
+dEQP-VK.texture.compressed.eac_r11g11_unorm_block_2d_npot_sparse
 dEQP-VK.texture.compressed.eac_r11g11_snorm_block_2d_npot
+dEQP-VK.texture.compressed.eac_r11g11_snorm_block_2d_npot_sparse
 dEQP-VK.geometry.input.basic_primitive.points
 dEQP-VK.geometry.input.basic_primitive.lines
 dEQP-VK.geometry.input.basic_primitive.line_strip
index ce399279b935f8b061e19363dd26ae2b2d739fc4..12e88fa57bd6b7194b839cb3918b4fc646cfcce4 100644 (file)
@@ -54,8 +54,15 @@ using tcu::TestLog;
 
 struct Compressed2DTestParameters : public Texture2DTestCaseParameters
 {
+                                                                               Compressed2DTestParameters      (void);
+       TextureBinding::ImageBackingMode        backingMode;
 };
 
+Compressed2DTestParameters::Compressed2DTestParameters (void)
+       : backingMode(TextureBinding::IMAGE_BACKING_MODE_REGULAR)
+{
+}
+
 class Compressed2DTestInstance : public TestInstance
 {
 public:
@@ -83,7 +90,7 @@ Compressed2DTestInstance::Compressed2DTestInstance (Context&                          context,
        , m_texture                             (TestTexture2DSp(new pipeline::TestTexture2D(m_compressedFormat, testParameters.width, testParameters.height)))
        , m_renderer                    (context, testParameters.sampleCount, testParameters.width, testParameters.height)
 {
-       m_renderer.add2DTexture(m_texture);
+       m_renderer.add2DTexture(m_texture, testParameters.backingMode);
 }
 
 tcu::TestStatus Compressed2DTestInstance::iterate (void)
@@ -128,7 +135,7 @@ void populateTextureCompressedFormatTests (tcu::TestCaseGroup* compressedTexture
        tcu::TestContext&       testCtx = compressedTextureTests->getTestContext();
 
        // ETC2 and EAC compressed formats.
-       const struct {
+       static const struct {
                const VkFormat  format;
        } etc2Formats[] =
        {
@@ -145,7 +152,7 @@ void populateTextureCompressedFormatTests (tcu::TestCaseGroup* compressedTexture
                { VK_FORMAT_EAC_R11G11_SNORM_BLOCK              },
        };
 
-       const struct {
+       static const struct {
                const int       width;
                const int       height;
                const char*     name;
@@ -155,21 +162,32 @@ void populateTextureCompressedFormatTests (tcu::TestCaseGroup* compressedTexture
                { 51,  65, "npot" },
        };
 
+       static const struct {
+               const char*                                                             name;
+               const TextureBinding::ImageBackingMode  backingMode;
+       } backingModes[] =
+       {
+               { "",                   TextureBinding::IMAGE_BACKING_MODE_REGULAR      },
+               { "_sparse",    TextureBinding::IMAGE_BACKING_MODE_SPARSE       }
+       };
+
        for (int sizeNdx = 0; sizeNdx < DE_LENGTH_OF_ARRAY(sizes); sizeNdx++)
        for (int formatNdx = 0; formatNdx < DE_LENGTH_OF_ARRAY(etc2Formats); formatNdx++)
+       for (int backingNdx = 0; backingNdx < DE_LENGTH_OF_ARRAY(backingModes); backingNdx++)
        {
                const string    formatStr       = de::toString(getFormatStr(etc2Formats[formatNdx].format));
                const string    nameBase        = de::toLower(formatStr.substr(10));
 
                Compressed2DTestParameters      testParameters;
                testParameters.format           = etc2Formats[formatNdx].format;
+               testParameters.backingMode      = backingModes[backingNdx].backingMode;
                testParameters.width            = sizes[sizeNdx].width;
                testParameters.height           = sizes[sizeNdx].height;
                testParameters.minFilter        = tcu::Sampler::NEAREST;
                testParameters.magFilter        = tcu::Sampler::NEAREST;
                testParameters.programs.push_back(PROGRAM_2D_FLOAT);
 
-               compressedTextureTests->addChild(new TextureTestCase<Compressed2DTestInstance>(testCtx, (nameBase + "_2d_" + sizes[sizeNdx].name).c_str(), (formatStr + ", TEXTURETYPE_2D").c_str(), testParameters));
+               compressedTextureTests->addChild(new TextureTestCase<Compressed2DTestInstance>(testCtx, (nameBase + "_2d_" + sizes[sizeNdx].name + backingModes[backingNdx].name).c_str(), (formatStr + ", TEXTURETYPE_2D").c_str(), testParameters));
        }
 }
 
index 2e2adf708ff59c71aa4512c98ba399d075c4b7aa..d00224e8106f8bb8404840c5f682828dbaf2c80f 100644 (file)
@@ -274272,25 +274272,45 @@ dEQP-VK.texture.filtering_anisotropy.mipmap.anisotropy_max.mag_linear_min_linear
 dEQP-VK.texture.filtering_anisotropy.mipmap.anisotropy_max.mag_nearest_min_linear_mipmap_linear
 dEQP-VK.texture.filtering_anisotropy.mipmap.anisotropy_max.mag_linear_min_linear_mipmap_linear
 dEQP-VK.texture.compressed.etc2_r8g8b8_unorm_block_2d_pot
+dEQP-VK.texture.compressed.etc2_r8g8b8_unorm_block_2d_pot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8_srgb_block_2d_pot
+dEQP-VK.texture.compressed.etc2_r8g8b8_srgb_block_2d_pot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a1_unorm_block_2d_pot
+dEQP-VK.texture.compressed.etc2_r8g8b8a1_unorm_block_2d_pot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a1_srgb_block_2d_pot
+dEQP-VK.texture.compressed.etc2_r8g8b8a1_srgb_block_2d_pot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a8_unorm_block_2d_pot
+dEQP-VK.texture.compressed.etc2_r8g8b8a8_unorm_block_2d_pot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a8_srgb_block_2d_pot
+dEQP-VK.texture.compressed.etc2_r8g8b8a8_srgb_block_2d_pot_sparse
 dEQP-VK.texture.compressed.eac_r11_unorm_block_2d_pot
+dEQP-VK.texture.compressed.eac_r11_unorm_block_2d_pot_sparse
 dEQP-VK.texture.compressed.eac_r11_snorm_block_2d_pot
+dEQP-VK.texture.compressed.eac_r11_snorm_block_2d_pot_sparse
 dEQP-VK.texture.compressed.eac_r11g11_unorm_block_2d_pot
+dEQP-VK.texture.compressed.eac_r11g11_unorm_block_2d_pot_sparse
 dEQP-VK.texture.compressed.eac_r11g11_snorm_block_2d_pot
+dEQP-VK.texture.compressed.eac_r11g11_snorm_block_2d_pot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8_unorm_block_2d_npot
+dEQP-VK.texture.compressed.etc2_r8g8b8_unorm_block_2d_npot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8_srgb_block_2d_npot
+dEQP-VK.texture.compressed.etc2_r8g8b8_srgb_block_2d_npot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a1_unorm_block_2d_npot
+dEQP-VK.texture.compressed.etc2_r8g8b8a1_unorm_block_2d_npot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a1_srgb_block_2d_npot
+dEQP-VK.texture.compressed.etc2_r8g8b8a1_srgb_block_2d_npot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a8_unorm_block_2d_npot
+dEQP-VK.texture.compressed.etc2_r8g8b8a8_unorm_block_2d_npot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a8_srgb_block_2d_npot
+dEQP-VK.texture.compressed.etc2_r8g8b8a8_srgb_block_2d_npot_sparse
 dEQP-VK.texture.compressed.eac_r11_unorm_block_2d_npot
+dEQP-VK.texture.compressed.eac_r11_unorm_block_2d_npot_sparse
 dEQP-VK.texture.compressed.eac_r11_snorm_block_2d_npot
+dEQP-VK.texture.compressed.eac_r11_snorm_block_2d_npot_sparse
 dEQP-VK.texture.compressed.eac_r11g11_unorm_block_2d_npot
+dEQP-VK.texture.compressed.eac_r11g11_unorm_block_2d_npot_sparse
 dEQP-VK.texture.compressed.eac_r11g11_snorm_block_2d_npot
+dEQP-VK.texture.compressed.eac_r11g11_snorm_block_2d_npot_sparse
 dEQP-VK.geometry.input.basic_primitive.points
 dEQP-VK.geometry.input.basic_primitive.lines
 dEQP-VK.geometry.input.basic_primitive.line_strip
index e3ae9dadc9ecf53a836b4de52414c04ff1b2418c..aa1ecdf5db6797d242e55d9242d9611f67eac0f8 100644 (file)
@@ -274233,25 +274233,45 @@ dEQP-VK.texture.filtering_anisotropy.mipmap.anisotropy_max.mag_linear_min_linear
 dEQP-VK.texture.filtering_anisotropy.mipmap.anisotropy_max.mag_nearest_min_linear_mipmap_linear
 dEQP-VK.texture.filtering_anisotropy.mipmap.anisotropy_max.mag_linear_min_linear_mipmap_linear
 dEQP-VK.texture.compressed.etc2_r8g8b8_unorm_block_2d_pot
+dEQP-VK.texture.compressed.etc2_r8g8b8_unorm_block_2d_pot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8_srgb_block_2d_pot
+dEQP-VK.texture.compressed.etc2_r8g8b8_srgb_block_2d_pot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a1_unorm_block_2d_pot
+dEQP-VK.texture.compressed.etc2_r8g8b8a1_unorm_block_2d_pot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a1_srgb_block_2d_pot
+dEQP-VK.texture.compressed.etc2_r8g8b8a1_srgb_block_2d_pot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a8_unorm_block_2d_pot
+dEQP-VK.texture.compressed.etc2_r8g8b8a8_unorm_block_2d_pot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a8_srgb_block_2d_pot
+dEQP-VK.texture.compressed.etc2_r8g8b8a8_srgb_block_2d_pot_sparse
 dEQP-VK.texture.compressed.eac_r11_unorm_block_2d_pot
+dEQP-VK.texture.compressed.eac_r11_unorm_block_2d_pot_sparse
 dEQP-VK.texture.compressed.eac_r11_snorm_block_2d_pot
+dEQP-VK.texture.compressed.eac_r11_snorm_block_2d_pot_sparse
 dEQP-VK.texture.compressed.eac_r11g11_unorm_block_2d_pot
+dEQP-VK.texture.compressed.eac_r11g11_unorm_block_2d_pot_sparse
 dEQP-VK.texture.compressed.eac_r11g11_snorm_block_2d_pot
+dEQP-VK.texture.compressed.eac_r11g11_snorm_block_2d_pot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8_unorm_block_2d_npot
+dEQP-VK.texture.compressed.etc2_r8g8b8_unorm_block_2d_npot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8_srgb_block_2d_npot
+dEQP-VK.texture.compressed.etc2_r8g8b8_srgb_block_2d_npot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a1_unorm_block_2d_npot
+dEQP-VK.texture.compressed.etc2_r8g8b8a1_unorm_block_2d_npot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a1_srgb_block_2d_npot
+dEQP-VK.texture.compressed.etc2_r8g8b8a1_srgb_block_2d_npot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a8_unorm_block_2d_npot
+dEQP-VK.texture.compressed.etc2_r8g8b8a8_unorm_block_2d_npot_sparse
 dEQP-VK.texture.compressed.etc2_r8g8b8a8_srgb_block_2d_npot
+dEQP-VK.texture.compressed.etc2_r8g8b8a8_srgb_block_2d_npot_sparse
 dEQP-VK.texture.compressed.eac_r11_unorm_block_2d_npot
+dEQP-VK.texture.compressed.eac_r11_unorm_block_2d_npot_sparse
 dEQP-VK.texture.compressed.eac_r11_snorm_block_2d_npot
+dEQP-VK.texture.compressed.eac_r11_snorm_block_2d_npot_sparse
 dEQP-VK.texture.compressed.eac_r11g11_unorm_block_2d_npot
+dEQP-VK.texture.compressed.eac_r11g11_unorm_block_2d_npot_sparse
 dEQP-VK.texture.compressed.eac_r11g11_snorm_block_2d_npot
+dEQP-VK.texture.compressed.eac_r11g11_snorm_block_2d_npot_sparse
 dEQP-VK.geometry.input.basic_primitive.points
 dEQP-VK.geometry.input.basic_primitive.lines
 dEQP-VK.geometry.input.basic_primitive.line_strip