From d7b15b83b9f7f7c0cf576481e3e9c0a70922e88c Mon Sep 17 00:00:00 2001 From: Michael Hadley Date: Mon, 13 Feb 2017 16:53:38 +0000 Subject: [PATCH] Add srgb_r8 internal format tests Added srgb_r8 tests to the following: - dEQP-GLES31.functional.texture.format.sized.cube_array - dEQP-GLES31.functional.texture.filtering.cube_array.formats Change-Id: Ib3f46ea66b1cef284a13205ee009470aa6e7337d --- android/cts/master/gles3-master.txt | 32 +++ android/cts/master/gles31-master.txt | 8 + .../functional/es3fTextureFilteringTests.cpp | 25 ++ .../functional/es3fTextureFormatTests.cpp | 265 ++++++++++-------- .../functional/es31fTextureFilteringTests.cpp | 4 + .../functional/es31fTextureFormatTests.cpp | 40 ++- 6 files changed, 251 insertions(+), 123 deletions(-) diff --git a/android/cts/master/gles3-master.txt b/android/cts/master/gles3-master.txt index 37e6728f6..ef5a7f775 100644 --- a/android/cts/master/gles3-master.txt +++ b/android/cts/master/gles3-master.txt @@ -19827,6 +19827,8 @@ dEQP-GLES3.functional.texture.format.sized.2d.rgba8ui_pot dEQP-GLES3.functional.texture.format.sized.2d.rgba8ui_npot dEQP-GLES3.functional.texture.format.sized.2d.srgb8_alpha8_pot dEQP-GLES3.functional.texture.format.sized.2d.srgb8_alpha8_npot +dEQP-GLES3.functional.texture.format.sized.2d.srgb_r8_pot +dEQP-GLES3.functional.texture.format.sized.2d.srgb_r8_npot dEQP-GLES3.functional.texture.format.sized.2d.rgb10_a2_pot dEQP-GLES3.functional.texture.format.sized.2d.rgb10_a2_npot dEQP-GLES3.functional.texture.format.sized.2d.rgb10_a2ui_pot @@ -19935,6 +19937,8 @@ dEQP-GLES3.functional.texture.format.sized.cube.rgba8ui_pot dEQP-GLES3.functional.texture.format.sized.cube.rgba8ui_npot dEQP-GLES3.functional.texture.format.sized.cube.srgb8_alpha8_pot dEQP-GLES3.functional.texture.format.sized.cube.srgb8_alpha8_npot +dEQP-GLES3.functional.texture.format.sized.cube.srgb_r8_pot +dEQP-GLES3.functional.texture.format.sized.cube.srgb_r8_npot dEQP-GLES3.functional.texture.format.sized.cube.rgb10_a2_pot dEQP-GLES3.functional.texture.format.sized.cube.rgb10_a2_npot dEQP-GLES3.functional.texture.format.sized.cube.rgb10_a2ui_pot @@ -20043,6 +20047,8 @@ dEQP-GLES3.functional.texture.format.sized.2d_array.rgba8ui_pot dEQP-GLES3.functional.texture.format.sized.2d_array.rgba8ui_npot dEQP-GLES3.functional.texture.format.sized.2d_array.srgb8_alpha8_pot dEQP-GLES3.functional.texture.format.sized.2d_array.srgb8_alpha8_npot +dEQP-GLES3.functional.texture.format.sized.2d_array.srgb_r8_pot +dEQP-GLES3.functional.texture.format.sized.2d_array.srgb_r8_npot dEQP-GLES3.functional.texture.format.sized.2d_array.rgb10_a2_pot dEQP-GLES3.functional.texture.format.sized.2d_array.rgb10_a2_npot dEQP-GLES3.functional.texture.format.sized.2d_array.rgb10_a2ui_pot @@ -20151,6 +20157,8 @@ dEQP-GLES3.functional.texture.format.sized.3d.rgba8ui_pot dEQP-GLES3.functional.texture.format.sized.3d.rgba8ui_npot dEQP-GLES3.functional.texture.format.sized.3d.srgb8_alpha8_pot dEQP-GLES3.functional.texture.format.sized.3d.srgb8_alpha8_npot +dEQP-GLES3.functional.texture.format.sized.3d.srgb_r8_pot +dEQP-GLES3.functional.texture.format.sized.3d.srgb_r8_npot dEQP-GLES3.functional.texture.format.sized.3d.rgb10_a2_pot dEQP-GLES3.functional.texture.format.sized.3d.rgb10_a2_npot dEQP-GLES3.functional.texture.format.sized.3d.rgb10_a2ui_pot @@ -21845,6 +21853,12 @@ dEQP-GLES3.functional.texture.filtering.2d.formats.srgb8_alpha8_nearest_mipmap_n dEQP-GLES3.functional.texture.filtering.2d.formats.srgb8_alpha8_linear_mipmap_nearest dEQP-GLES3.functional.texture.filtering.2d.formats.srgb8_alpha8_nearest_mipmap_linear dEQP-GLES3.functional.texture.filtering.2d.formats.srgb8_alpha8_linear_mipmap_linear +dEQP-GLES3.functional.texture.filtering.2d.formats.srgb_r8_nearest +dEQP-GLES3.functional.texture.filtering.2d.formats.srgb_r8_linear +dEQP-GLES3.functional.texture.filtering.2d.formats.srgb_r8_nearest_mipmap_nearest +dEQP-GLES3.functional.texture.filtering.2d.formats.srgb_r8_linear_mipmap_nearest +dEQP-GLES3.functional.texture.filtering.2d.formats.srgb_r8_nearest_mipmap_linear +dEQP-GLES3.functional.texture.filtering.2d.formats.srgb_r8_linear_mipmap_linear dEQP-GLES3.functional.texture.filtering.2d.formats.rgb10_a2_nearest dEQP-GLES3.functional.texture.filtering.2d.formats.rgb10_a2_linear dEQP-GLES3.functional.texture.filtering.2d.formats.rgb10_a2_nearest_mipmap_nearest @@ -21957,6 +21971,12 @@ dEQP-GLES3.functional.texture.filtering.cube.formats.srgb8_alpha8_nearest_mipmap dEQP-GLES3.functional.texture.filtering.cube.formats.srgb8_alpha8_linear_mipmap_nearest dEQP-GLES3.functional.texture.filtering.cube.formats.srgb8_alpha8_nearest_mipmap_linear dEQP-GLES3.functional.texture.filtering.cube.formats.srgb8_alpha8_linear_mipmap_linear +dEQP-GLES3.functional.texture.filtering.cube.formats.srgb_r8_nearest +dEQP-GLES3.functional.texture.filtering.cube.formats.srgb_r8_linear +dEQP-GLES3.functional.texture.filtering.cube.formats.srgb_r8_nearest_mipmap_nearest +dEQP-GLES3.functional.texture.filtering.cube.formats.srgb_r8_linear_mipmap_nearest +dEQP-GLES3.functional.texture.filtering.cube.formats.srgb_r8_nearest_mipmap_linear +dEQP-GLES3.functional.texture.filtering.cube.formats.srgb_r8_linear_mipmap_linear dEQP-GLES3.functional.texture.filtering.cube.formats.rgb10_a2_nearest dEQP-GLES3.functional.texture.filtering.cube.formats.rgb10_a2_linear dEQP-GLES3.functional.texture.filtering.cube.formats.rgb10_a2_nearest_mipmap_nearest @@ -22069,6 +22089,12 @@ dEQP-GLES3.functional.texture.filtering.2d_array.formats.srgb8_alpha8_nearest_mi dEQP-GLES3.functional.texture.filtering.2d_array.formats.srgb8_alpha8_linear_mipmap_nearest dEQP-GLES3.functional.texture.filtering.2d_array.formats.srgb8_alpha8_nearest_mipmap_linear dEQP-GLES3.functional.texture.filtering.2d_array.formats.srgb8_alpha8_linear_mipmap_linear +dEQP-GLES3.functional.texture.filtering.2d_array.formats.srgb_r8_nearest +dEQP-GLES3.functional.texture.filtering.2d_array.formats.srgb_r8_linear +dEQP-GLES3.functional.texture.filtering.2d_array.formats.srgb_r8_nearest_mipmap_nearest +dEQP-GLES3.functional.texture.filtering.2d_array.formats.srgb_r8_linear_mipmap_nearest +dEQP-GLES3.functional.texture.filtering.2d_array.formats.srgb_r8_nearest_mipmap_linear +dEQP-GLES3.functional.texture.filtering.2d_array.formats.srgb_r8_linear_mipmap_linear dEQP-GLES3.functional.texture.filtering.2d_array.formats.rgb10_a2_nearest dEQP-GLES3.functional.texture.filtering.2d_array.formats.rgb10_a2_linear dEQP-GLES3.functional.texture.filtering.2d_array.formats.rgb10_a2_nearest_mipmap_nearest @@ -22178,6 +22204,12 @@ dEQP-GLES3.functional.texture.filtering.3d.formats.srgb8_alpha8_nearest_mipmap_n dEQP-GLES3.functional.texture.filtering.3d.formats.srgb8_alpha8_linear_mipmap_nearest dEQP-GLES3.functional.texture.filtering.3d.formats.srgb8_alpha8_nearest_mipmap_linear dEQP-GLES3.functional.texture.filtering.3d.formats.srgb8_alpha8_linear_mipmap_linear +dEQP-GLES3.functional.texture.filtering.3d.formats.srgb_r8_nearest +dEQP-GLES3.functional.texture.filtering.3d.formats.srgb_r8_linear +dEQP-GLES3.functional.texture.filtering.3d.formats.srgb_r8_nearest_mipmap_nearest +dEQP-GLES3.functional.texture.filtering.3d.formats.srgb_r8_linear_mipmap_nearest +dEQP-GLES3.functional.texture.filtering.3d.formats.srgb_r8_nearest_mipmap_linear +dEQP-GLES3.functional.texture.filtering.3d.formats.srgb_r8_linear_mipmap_linear dEQP-GLES3.functional.texture.filtering.3d.formats.rgb10_a2_nearest dEQP-GLES3.functional.texture.filtering.3d.formats.rgb10_a2_linear dEQP-GLES3.functional.texture.filtering.3d.formats.rgb10_a2_nearest_mipmap_nearest diff --git a/android/cts/master/gles31-master.txt b/android/cts/master/gles31-master.txt index 0832801eb..4676ff821 100644 --- a/android/cts/master/gles31-master.txt +++ b/android/cts/master/gles31-master.txt @@ -12125,6 +12125,12 @@ dEQP-GLES31.functional.texture.filtering.cube_array.formats.rgb5_a1_nearest_mipm dEQP-GLES31.functional.texture.filtering.cube_array.formats.rgb5_a1_linear_mipmap_nearest dEQP-GLES31.functional.texture.filtering.cube_array.formats.rgb5_a1_nearest_mipmap_linear dEQP-GLES31.functional.texture.filtering.cube_array.formats.rgb5_a1_linear_mipmap_linear +dEQP-GLES31.functional.texture.filtering.cube_array.formats.sr8_nearest +dEQP-GLES31.functional.texture.filtering.cube_array.formats.sr8_linear +dEQP-GLES31.functional.texture.filtering.cube_array.formats.sr8_nearest_mipmap_nearest +dEQP-GLES31.functional.texture.filtering.cube_array.formats.sr8_linear_mipmap_nearest +dEQP-GLES31.functional.texture.filtering.cube_array.formats.sr8_nearest_mipmap_linear +dEQP-GLES31.functional.texture.filtering.cube_array.formats.sr8_linear_mipmap_linear dEQP-GLES31.functional.texture.filtering.cube_array.formats.srgb8_alpha8_nearest dEQP-GLES31.functional.texture.filtering.cube_array.formats.srgb8_alpha8_linear dEQP-GLES31.functional.texture.filtering.cube_array.formats.srgb8_alpha8_nearest_mipmap_nearest @@ -12311,6 +12317,8 @@ dEQP-GLES31.functional.texture.format.sized.cube_array.rgba8i_pot dEQP-GLES31.functional.texture.format.sized.cube_array.rgba8i_npot dEQP-GLES31.functional.texture.format.sized.cube_array.rgba8ui_pot dEQP-GLES31.functional.texture.format.sized.cube_array.rgba8ui_npot +dEQP-GLES31.functional.texture.format.sized.cube_array.srgb_r8_pot +dEQP-GLES31.functional.texture.format.sized.cube_array.srgb_r8_npot dEQP-GLES31.functional.texture.format.sized.cube_array.srgb8_alpha8_pot dEQP-GLES31.functional.texture.format.sized.cube_array.srgb8_alpha8_npot dEQP-GLES31.functional.texture.format.sized.cube_array.rgb10_a2_pot diff --git a/modules/gles3/functional/es3fTextureFilteringTests.cpp b/modules/gles3/functional/es3fTextureFilteringTests.cpp index 3c6293685..2f10367d6 100644 --- a/modules/gles3/functional/es3fTextureFilteringTests.cpp +++ b/modules/gles3/functional/es3fTextureFilteringTests.cpp @@ -34,6 +34,11 @@ #include "deString.h" #include "glwFunctions.hpp" #include "glwEnums.hpp" +#include "gluContextInfo.hpp" +#include "deUniquePtr.hpp" + +using de::MovePtr; +using glu::ContextInfo; namespace deqp { @@ -61,6 +66,17 @@ enum TEX3D_MIN_VIEWPORT_HEIGHT = 64 }; +namespace +{ + +void checkSupport (const glu::ContextInfo& info, deUint32 internalFormat) +{ + if (internalFormat == GL_SR8_EXT && !info.isExtensionSupported("GL_EXT_texture_sRGB_R8")) + TCU_THROW(NotSupportedError, "GL_EXT_texture_sRGB_decode is not supported."); +} + +} // anonymous + class Texture2DFilteringCase : public tcu::TestCase { public: @@ -157,6 +173,8 @@ Texture2DFilteringCase::~Texture2DFilteringCase (void) void Texture2DFilteringCase::init (void) { + checkSupport(m_renderCtxInfo, m_internalFormat); + try { if (!m_filenames.empty()) @@ -436,6 +454,8 @@ TextureCubeFilteringCase::~TextureCubeFilteringCase (void) void TextureCubeFilteringCase::init (void) { + checkSupport(m_renderCtxInfo, m_internalFormat); + try { if (!m_filenames.empty()) @@ -731,6 +751,8 @@ Texture2DArrayFilteringCase::~Texture2DArrayFilteringCase (void) void Texture2DArrayFilteringCase::init (void) { + checkSupport(m_context.getContextInfo(), m_internalFormat); + try { const tcu::TextureFormat texFmt = glu::mapGLInternalFormat(m_internalFormat); @@ -996,6 +1018,8 @@ Texture3DFilteringCase::~Texture3DFilteringCase (void) void Texture3DFilteringCase::init (void) { + checkSupport(m_context.getContextInfo(), m_internalFormat); + try { const tcu::TextureFormat texFmt = glu::mapGLInternalFormat(m_internalFormat); @@ -1274,6 +1298,7 @@ void TextureFilteringTests::init (void) { "rgba4", GL_RGBA4 }, { "rgb5_a1", GL_RGB5_A1 }, { "srgb8_alpha8", GL_SRGB8_ALPHA8 }, + { "srgb_r8", GL_SR8_EXT }, { "rgb10_a2", GL_RGB10_A2 } }; diff --git a/modules/gles3/functional/es3fTextureFormatTests.cpp b/modules/gles3/functional/es3fTextureFormatTests.cpp index 41200141c..0bcfe84ee 100644 --- a/modules/gles3/functional/es3fTextureFormatTests.cpp +++ b/modules/gles3/functional/es3fTextureFormatTests.cpp @@ -44,11 +44,16 @@ #include "deRandom.hpp" #include "glwEnums.hpp" #include "glwFunctions.hpp" +#include "gluContextInfo.hpp" +#include "deUniquePtr.hpp" using std::vector; using std::string; using tcu::TestLog; +using de::MovePtr; +using glu::ContextInfo; + namespace deqp { namespace gles3 @@ -61,13 +66,24 @@ using namespace deqp::gls::TextureTestUtil; using namespace glu::TextureTestUtil; using tcu::Sampler; +namespace +{ + +void checkSupport (const glu::ContextInfo& info, deUint32 internalFormat) +{ + if (internalFormat == GL_SR8_EXT && !info.isExtensionSupported("GL_EXT_texture_sRGB_R8")) + TCU_THROW(NotSupportedError, "GL_EXT_texture_sRGB_decode is not supported."); +} + +} // anonymous + // Texture2DFormatCase class Texture2DFormatCase : public tcu::TestCase { public: - Texture2DFormatCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, deUint32 format, deUint32 dataType, int width, int height); - Texture2DFormatCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, deUint32 internalFormat, int width, int height); + Texture2DFormatCase (tcu::TestContext& testCtx, Context& context, const char* name, const char* description, deUint32 format, deUint32 dataType, int width, int height); + Texture2DFormatCase (tcu::TestContext& testCtx, Context& context, const char* name, const char* description, deUint32 internalFormat, int width, int height); ~Texture2DFormatCase (void); void init (void); @@ -79,6 +95,7 @@ private: Texture2DFormatCase& operator= (const Texture2DFormatCase& other); glu::RenderContext& m_renderCtx; + const glu::ContextInfo& m_renderCtxInfo; deUint32 m_format; deUint32 m_dataType; @@ -89,27 +106,29 @@ private: TextureRenderer m_renderer; }; -Texture2DFormatCase::Texture2DFormatCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, deUint32 format, deUint32 dataType, int width, int height) - : TestCase (testCtx, name, description) - , m_renderCtx (renderCtx) - , m_format (format) - , m_dataType (dataType) - , m_width (width) - , m_height (height) - , m_texture (DE_NULL) - , m_renderer (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP) +Texture2DFormatCase::Texture2DFormatCase (tcu::TestContext& testCtx, Context& context, const char* name, const char* description, deUint32 format, deUint32 dataType, int width, int height) + : TestCase (testCtx, name, description) + , m_renderCtx (context.getRenderContext()) + , m_renderCtxInfo (context.getContextInfo()) + , m_format (format) + , m_dataType (dataType) + , m_width (width) + , m_height (height) + , m_texture (DE_NULL) + , m_renderer (context.getRenderContext(), testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP) { } -Texture2DFormatCase::Texture2DFormatCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, deUint32 internalFormat, int width, int height) - : TestCase (testCtx, name, description) - , m_renderCtx (renderCtx) - , m_format (internalFormat) - , m_dataType (GL_NONE) - , m_width (width) - , m_height (height) - , m_texture (DE_NULL) - , m_renderer (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP) +Texture2DFormatCase::Texture2DFormatCase (tcu::TestContext& testCtx, Context& context, const char* name, const char* description, deUint32 internalFormat, int width, int height) + : TestCase (testCtx, name, description) + , m_renderCtx (context.getRenderContext()) + , m_renderCtxInfo (context.getContextInfo()) + , m_format (internalFormat) + , m_dataType (GL_NONE) + , m_width (width) + , m_height (height) + , m_texture (DE_NULL) + , m_renderer (context.getRenderContext(), testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP) { } @@ -120,6 +139,8 @@ Texture2DFormatCase::~Texture2DFormatCase (void) void Texture2DFormatCase::init (void) { + checkSupport(m_renderCtxInfo, m_format); + TestLog& log = m_testCtx.getLog(); tcu::TextureFormat fmt = m_dataType ? glu::mapGLTransferFormat(m_format, m_dataType) : glu::mapGLInternalFormat(m_format); tcu::TextureFormatInfo spec = tcu::getTextureFormatInfo(fmt); @@ -222,8 +243,8 @@ Texture2DFormatCase::IterateResult Texture2DFormatCase::iterate (void) class TextureCubeFormatCase : public tcu::TestCase { public: - TextureCubeFormatCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, deUint32 format, deUint32 dataType, int width, int height); - TextureCubeFormatCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, deUint32 internalFormat, int width, int height); + TextureCubeFormatCase (tcu::TestContext& testCtx, Context& context, const char* name, const char* description, deUint32 format, deUint32 dataType, int width, int height); + TextureCubeFormatCase (tcu::TestContext& testCtx, Context& context, const char* name, const char* description, deUint32 internalFormat, int width, int height); ~TextureCubeFormatCase (void); void init (void); @@ -237,6 +258,7 @@ private: bool testFace (tcu::CubeFace face); glu::RenderContext& m_renderCtx; + const glu::ContextInfo& m_renderCtxInfo; deUint32 m_format; deUint32 m_dataType; @@ -250,31 +272,33 @@ private: bool m_isOk; }; -TextureCubeFormatCase::TextureCubeFormatCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, deUint32 format, deUint32 dataType, int width, int height) - : TestCase (testCtx, name, description) - , m_renderCtx (renderCtx) - , m_format (format) - , m_dataType (dataType) - , m_width (width) - , m_height (height) - , m_texture (DE_NULL) - , m_renderer (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP) - , m_curFace (0) - , m_isOk (false) +TextureCubeFormatCase::TextureCubeFormatCase (tcu::TestContext& testCtx, Context& context, const char* name, const char* description, deUint32 format, deUint32 dataType, int width, int height) + : TestCase (testCtx, name, description) + , m_renderCtx (context.getRenderContext()) + , m_renderCtxInfo (context.getContextInfo()) + , m_format (format) + , m_dataType (dataType) + , m_width (width) + , m_height (height) + , m_texture (DE_NULL) + , m_renderer (context.getRenderContext(), testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP) + , m_curFace (0) + , m_isOk (false) { } -TextureCubeFormatCase::TextureCubeFormatCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, deUint32 internalFormat, int width, int height) - : TestCase (testCtx, name, description) - , m_renderCtx (renderCtx) - , m_format (internalFormat) - , m_dataType (GL_NONE) - , m_width (width) - , m_height (height) - , m_texture (DE_NULL) - , m_renderer (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP) - , m_curFace (0) - , m_isOk (false) +TextureCubeFormatCase::TextureCubeFormatCase (tcu::TestContext& testCtx, Context& context, const char* name, const char* description, deUint32 internalFormat, int width, int height) + : TestCase (testCtx, name, description) + , m_renderCtx (context.getRenderContext()) + , m_renderCtxInfo (context.getContextInfo()) + , m_format (internalFormat) + , m_dataType (GL_NONE) + , m_width (width) + , m_height (height) + , m_texture (DE_NULL) + , m_renderer (context.getRenderContext(), testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP) + , m_curFace (0) + , m_isOk (false) { } @@ -285,6 +309,8 @@ TextureCubeFormatCase::~TextureCubeFormatCase (void) void TextureCubeFormatCase::init (void) { + checkSupport(m_renderCtxInfo, m_format); + TestLog& log = m_testCtx.getLog(); tcu::TextureFormat fmt = m_dataType ? glu::mapGLTransferFormat(m_format, m_dataType) : glu::mapGLInternalFormat(m_format); tcu::TextureFormatInfo spec = tcu::getTextureFormatInfo(fmt); @@ -417,8 +443,8 @@ TextureCubeFormatCase::IterateResult TextureCubeFormatCase::iterate (void) class Texture2DArrayFormatCase : public tcu::TestCase { public: - Texture2DArrayFormatCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, deUint32 format, deUint32 dataType, int width, int height, int numLayers); - Texture2DArrayFormatCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, deUint32 internalFormat, int width, int height, int numLayers); + Texture2DArrayFormatCase (tcu::TestContext& testCtx, Context& context, const char* name, const char* description, deUint32 format, deUint32 dataType, int width, int height, int numLayers); + Texture2DArrayFormatCase (tcu::TestContext& testCtx, Context& context, const char* name, const char* description, deUint32 internalFormat, int width, int height, int numLayers); ~Texture2DArrayFormatCase (void); void init (void); @@ -432,6 +458,7 @@ private: bool testLayer (int layerNdx); glu::RenderContext& m_renderCtx; + const glu::ContextInfo& m_renderCtxInfo; deUint32 m_format; deUint32 m_dataType; @@ -445,31 +472,33 @@ private: int m_curLayer; }; -Texture2DArrayFormatCase::Texture2DArrayFormatCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, deUint32 format, deUint32 dataType, int width, int height, int numLayers) - : TestCase (testCtx, name, description) - , m_renderCtx (renderCtx) - , m_format (format) - , m_dataType (dataType) - , m_width (width) - , m_height (height) - , m_numLayers (numLayers) - , m_texture (DE_NULL) - , m_renderer (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP) - , m_curLayer (0) +Texture2DArrayFormatCase::Texture2DArrayFormatCase (tcu::TestContext& testCtx, Context& context, const char* name, const char* description, deUint32 format, deUint32 dataType, int width, int height, int numLayers) + : TestCase (testCtx, name, description) + , m_renderCtx (context.getRenderContext()) + , m_renderCtxInfo (context.getContextInfo()) + , m_format (format) + , m_dataType (dataType) + , m_width (width) + , m_height (height) + , m_numLayers (numLayers) + , m_texture (DE_NULL) + , m_renderer (context.getRenderContext(), testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP) + , m_curLayer (0) { } -Texture2DArrayFormatCase::Texture2DArrayFormatCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, deUint32 internalFormat, int width, int height, int numLayers) - : TestCase (testCtx, name, description) - , m_renderCtx (renderCtx) - , m_format (internalFormat) - , m_dataType (GL_NONE) - , m_width (width) - , m_height (height) - , m_numLayers (numLayers) - , m_texture (DE_NULL) - , m_renderer (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP) - , m_curLayer (0) +Texture2DArrayFormatCase::Texture2DArrayFormatCase (tcu::TestContext& testCtx, Context& context, const char* name, const char* description, deUint32 internalFormat, int width, int height, int numLayers) + : TestCase (testCtx, name, description) + , m_renderCtx (context.getRenderContext()) + , m_renderCtxInfo (context.getContextInfo()) + , m_format (internalFormat) + , m_dataType (GL_NONE) + , m_width (width) + , m_height (height) + , m_numLayers (numLayers) + , m_texture (DE_NULL) + , m_renderer (context.getRenderContext(), testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP) + , m_curLayer (0) { } @@ -480,6 +509,8 @@ Texture2DArrayFormatCase::~Texture2DArrayFormatCase (void) void Texture2DArrayFormatCase::init (void) { + checkSupport(m_renderCtxInfo, m_format); + m_texture = m_dataType != GL_NONE ? new glu::Texture2DArray(m_renderCtx, m_format, m_dataType, m_width, m_height, m_numLayers) // Implicit internal format. : new glu::Texture2DArray(m_renderCtx, m_format, m_width, m_height, m_numLayers); // Explicit internal format. @@ -569,8 +600,8 @@ Texture2DArrayFormatCase::IterateResult Texture2DArrayFormatCase::iterate (void) class Texture3DFormatCase : public tcu::TestCase { public: - Texture3DFormatCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, deUint32 format, deUint32 dataType, int width, int height, int depth); - Texture3DFormatCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, deUint32 internalFormat, int width, int height, int depth); + Texture3DFormatCase (tcu::TestContext& testCtx, Context& context, const char* name, const char* description, deUint32 format, deUint32 dataType, int width, int height, int depth); + Texture3DFormatCase (tcu::TestContext& testCtx, Context& context, const char* name, const char* description, deUint32 internalFormat, int width, int height, int depth); ~Texture3DFormatCase (void); void init (void); @@ -584,6 +615,7 @@ private: bool testSlice (int sliceNdx); glu::RenderContext& m_renderCtx; + const glu::ContextInfo& m_renderCtxInfo; deUint32 m_format; deUint32 m_dataType; @@ -597,31 +629,33 @@ private: int m_curSlice; }; -Texture3DFormatCase::Texture3DFormatCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, deUint32 format, deUint32 dataType, int width, int height, int depth) - : TestCase (testCtx, name, description) - , m_renderCtx (renderCtx) - , m_format (format) - , m_dataType (dataType) - , m_width (width) - , m_height (height) - , m_depth (depth) - , m_texture (DE_NULL) - , m_renderer (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP) - , m_curSlice (0) +Texture3DFormatCase::Texture3DFormatCase (tcu::TestContext& testCtx, Context& context, const char* name, const char* description, deUint32 format, deUint32 dataType, int width, int height, int depth) + : TestCase (testCtx, name, description) + , m_renderCtx (context.getRenderContext()) + , m_renderCtxInfo (context.getContextInfo()) + , m_format (format) + , m_dataType (dataType) + , m_width (width) + , m_height (height) + , m_depth (depth) + , m_texture (DE_NULL) + , m_renderer (context.getRenderContext(), testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP) + , m_curSlice (0) { } -Texture3DFormatCase::Texture3DFormatCase (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, deUint32 internalFormat, int width, int height, int depth) - : TestCase (testCtx, name, description) - , m_renderCtx (renderCtx) - , m_format (internalFormat) - , m_dataType (GL_NONE) - , m_width (width) - , m_height (height) - , m_depth (depth) - , m_texture (DE_NULL) - , m_renderer (renderCtx, testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP) - , m_curSlice (0) +Texture3DFormatCase::Texture3DFormatCase (tcu::TestContext& testCtx, Context& context, const char* name, const char* description, deUint32 internalFormat, int width, int height, int depth) + : TestCase (testCtx, name, description) + , m_renderCtx (context.getRenderContext()) + , m_renderCtxInfo (context.getContextInfo()) + , m_format (internalFormat) + , m_dataType (GL_NONE) + , m_width (width) + , m_height (height) + , m_depth (depth) + , m_texture (DE_NULL) + , m_renderer (context.getRenderContext(), testCtx.getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP) + , m_curSlice (0) { } @@ -632,6 +666,8 @@ Texture3DFormatCase::~Texture3DFormatCase (void) void Texture3DFormatCase::init (void) { + checkSupport(m_renderCtxInfo, m_format); + m_texture = m_dataType != GL_NONE ? new glu::Texture3D(m_renderCtx, m_format, m_dataType, m_width, m_height, m_depth) // Implicit internal format. : new glu::Texture3D(m_renderCtx, m_format, m_width, m_height, m_depth); // Explicit internal format. @@ -1305,14 +1341,14 @@ void TextureFormatTests::init (void) string nameBase = texFormats[formatNdx].name; string descriptionBase = string(glu::getTextureFormatName(format)) + ", " + glu::getTypeName(dataType); - unsizedGroup->addChild(new Texture2DFormatCase (m_testCtx, m_context.getRenderContext(), (nameBase + "_2d_pot").c_str(), (descriptionBase + ", GL_TEXTURE_2D").c_str(), format, dataType, 128, 128)); - unsizedGroup->addChild(new Texture2DFormatCase (m_testCtx, m_context.getRenderContext(), (nameBase + "_2d_npot").c_str(), (descriptionBase + ", GL_TEXTURE_2D").c_str(), format, dataType, 63, 112)); - unsizedGroup->addChild(new TextureCubeFormatCase (m_testCtx, m_context.getRenderContext(), (nameBase + "_cube_pot").c_str(), (descriptionBase + ", GL_TEXTURE_CUBE_MAP").c_str(), format, dataType, 64, 64)); - unsizedGroup->addChild(new TextureCubeFormatCase (m_testCtx, m_context.getRenderContext(), (nameBase + "_cube_npot").c_str(), (descriptionBase + ", GL_TEXTURE_CUBE_MAP").c_str(), format, dataType, 57, 57)); - unsizedGroup->addChild(new Texture2DArrayFormatCase (m_testCtx, m_context.getRenderContext(), (nameBase + "_2d_array_pot").c_str(), (descriptionBase + ", GL_TEXTURE_2D_ARRAY").c_str(), format, dataType, 64, 64, 8)); - unsizedGroup->addChild(new Texture2DArrayFormatCase (m_testCtx, m_context.getRenderContext(), (nameBase + "_2d_array_npot").c_str(), (descriptionBase + ", GL_TEXTURE_2D_ARRAY").c_str(), format, dataType, 63, 57, 7)); - unsizedGroup->addChild(new Texture3DFormatCase (m_testCtx, m_context.getRenderContext(), (nameBase + "_3d_pot").c_str(), (descriptionBase + ", GL_TEXTURE_3D").c_str(), format, dataType, 8, 32, 16)); - unsizedGroup->addChild(new Texture3DFormatCase (m_testCtx, m_context.getRenderContext(), (nameBase + "_3d_npot").c_str(), (descriptionBase + ", GL_TEXTURE_3D").c_str(), format, dataType, 11, 31, 7)); + unsizedGroup->addChild(new Texture2DFormatCase (m_testCtx, m_context, (nameBase + "_2d_pot").c_str(), (descriptionBase + ", GL_TEXTURE_2D").c_str(), format, dataType, 128, 128)); + unsizedGroup->addChild(new Texture2DFormatCase (m_testCtx, m_context, (nameBase + "_2d_npot").c_str(), (descriptionBase + ", GL_TEXTURE_2D").c_str(), format, dataType, 63, 112)); + unsizedGroup->addChild(new TextureCubeFormatCase (m_testCtx, m_context, (nameBase + "_cube_pot").c_str(), (descriptionBase + ", GL_TEXTURE_CUBE_MAP").c_str(), format, dataType, 64, 64)); + unsizedGroup->addChild(new TextureCubeFormatCase (m_testCtx, m_context, (nameBase + "_cube_npot").c_str(), (descriptionBase + ", GL_TEXTURE_CUBE_MAP").c_str(), format, dataType, 57, 57)); + unsizedGroup->addChild(new Texture2DArrayFormatCase (m_testCtx, m_context, (nameBase + "_2d_array_pot").c_str(), (descriptionBase + ", GL_TEXTURE_2D_ARRAY").c_str(), format, dataType, 64, 64, 8)); + unsizedGroup->addChild(new Texture2DArrayFormatCase (m_testCtx, m_context, (nameBase + "_2d_array_npot").c_str(), (descriptionBase + ", GL_TEXTURE_2D_ARRAY").c_str(), format, dataType, 63, 57, 7)); + unsizedGroup->addChild(new Texture3DFormatCase (m_testCtx, m_context, (nameBase + "_3d_pot").c_str(), (descriptionBase + ", GL_TEXTURE_3D").c_str(), format, dataType, 8, 32, 16)); + unsizedGroup->addChild(new Texture3DFormatCase (m_testCtx, m_context, (nameBase + "_3d_npot").c_str(), (descriptionBase + ", GL_TEXTURE_3D").c_str(), format, dataType, 11, 31, 7)); } struct @@ -1331,6 +1367,7 @@ void TextureFormatTests::init (void) { "rgba8i", GL_RGBA8I, }, { "rgba8ui", GL_RGBA8UI, }, { "srgb8_alpha8", GL_SRGB8_ALPHA8, }, + { "srgb_r8", GL_SR8_EXT, }, { "rgb10_a2", GL_RGB10_A2, }, { "rgb10_a2ui", GL_RGB10_A2UI, }, { "rgba4", GL_RGBA4, }, @@ -1392,14 +1429,14 @@ void TextureFormatTests::init (void) string nameBase = sizedColorFormats[formatNdx].name; string descriptionBase = glu::getTextureFormatName(internalFormat); - sized2DGroup->addChild (new Texture2DFormatCase (m_testCtx, m_context.getRenderContext(), (nameBase + "_pot").c_str(), (descriptionBase + ", GL_TEXTURE_2D").c_str(), internalFormat, 128, 128)); - sized2DGroup->addChild (new Texture2DFormatCase (m_testCtx, m_context.getRenderContext(), (nameBase + "_npot").c_str(), (descriptionBase + ", GL_TEXTURE_2D").c_str(), internalFormat, 63, 112)); - sizedCubeGroup->addChild (new TextureCubeFormatCase (m_testCtx, m_context.getRenderContext(), (nameBase + "_pot").c_str(), (descriptionBase + ", GL_TEXTURE_CUBE_MAP").c_str(), internalFormat, 64, 64)); - sizedCubeGroup->addChild (new TextureCubeFormatCase (m_testCtx, m_context.getRenderContext(), (nameBase + "_npot").c_str(), (descriptionBase + ", GL_TEXTURE_CUBE_MAP").c_str(), internalFormat, 57, 57)); - sized2DArrayGroup->addChild (new Texture2DArrayFormatCase (m_testCtx, m_context.getRenderContext(), (nameBase + "_pot").c_str(), (descriptionBase + ", GL_TEXTURE_2D_ARRAY").c_str(), internalFormat, 64, 64, 8)); - sized2DArrayGroup->addChild (new Texture2DArrayFormatCase (m_testCtx, m_context.getRenderContext(), (nameBase + "_npot").c_str(), (descriptionBase + ", GL_TEXTURE_2D_ARRAY").c_str(), internalFormat, 63, 57, 7)); - sized3DGroup->addChild (new Texture3DFormatCase (m_testCtx, m_context.getRenderContext(), (nameBase + "_pot").c_str(), (descriptionBase + ", GL_TEXTURE_3D").c_str(), internalFormat, 8, 32, 16)); - sized3DGroup->addChild (new Texture3DFormatCase (m_testCtx, m_context.getRenderContext(), (nameBase + "_npot").c_str(), (descriptionBase + ", GL_TEXTURE_3D").c_str(), internalFormat, 11, 31, 7)); + sized2DGroup->addChild (new Texture2DFormatCase (m_testCtx, m_context, (nameBase + "_pot").c_str(), (descriptionBase + ", GL_TEXTURE_2D").c_str(), internalFormat, 128, 128)); + sized2DGroup->addChild (new Texture2DFormatCase (m_testCtx, m_context, (nameBase + "_npot").c_str(), (descriptionBase + ", GL_TEXTURE_2D").c_str(), internalFormat, 63, 112)); + sizedCubeGroup->addChild (new TextureCubeFormatCase (m_testCtx, m_context, (nameBase + "_pot").c_str(), (descriptionBase + ", GL_TEXTURE_CUBE_MAP").c_str(), internalFormat, 64, 64)); + sizedCubeGroup->addChild (new TextureCubeFormatCase (m_testCtx, m_context, (nameBase + "_npot").c_str(), (descriptionBase + ", GL_TEXTURE_CUBE_MAP").c_str(), internalFormat, 57, 57)); + sized2DArrayGroup->addChild (new Texture2DArrayFormatCase (m_testCtx, m_context, (nameBase + "_pot").c_str(), (descriptionBase + ", GL_TEXTURE_2D_ARRAY").c_str(), internalFormat, 64, 64, 8)); + sized2DArrayGroup->addChild (new Texture2DArrayFormatCase (m_testCtx, m_context, (nameBase + "_npot").c_str(), (descriptionBase + ", GL_TEXTURE_2D_ARRAY").c_str(), internalFormat, 63, 57, 7)); + sized3DGroup->addChild (new Texture3DFormatCase (m_testCtx, m_context, (nameBase + "_pot").c_str(), (descriptionBase + ", GL_TEXTURE_3D").c_str(), internalFormat, 8, 32, 16)); + sized3DGroup->addChild (new Texture3DFormatCase (m_testCtx, m_context, (nameBase + "_npot").c_str(), (descriptionBase + ", GL_TEXTURE_3D").c_str(), internalFormat, 11, 31, 7)); } for (int formatNdx = 0; formatNdx < DE_LENGTH_OF_ARRAY(sizedDepthStencilFormats); formatNdx++) @@ -1408,12 +1445,12 @@ void TextureFormatTests::init (void) string nameBase = sizedDepthStencilFormats[formatNdx].name; string descriptionBase = glu::getTextureFormatName(internalFormat); - sized2DGroup->addChild (new Texture2DFormatCase (m_testCtx, m_context.getRenderContext(), (nameBase + "_pot").c_str(), (descriptionBase + ", GL_TEXTURE_2D").c_str(), internalFormat, 128, 128)); - sized2DGroup->addChild (new Texture2DFormatCase (m_testCtx, m_context.getRenderContext(), (nameBase + "_npot").c_str(), (descriptionBase + ", GL_TEXTURE_2D").c_str(), internalFormat, 63, 112)); - sizedCubeGroup->addChild (new TextureCubeFormatCase (m_testCtx, m_context.getRenderContext(), (nameBase + "_pot").c_str(), (descriptionBase + ", GL_TEXTURE_CUBE_MAP").c_str(), internalFormat, 64, 64)); - sizedCubeGroup->addChild (new TextureCubeFormatCase (m_testCtx, m_context.getRenderContext(), (nameBase + "_npot").c_str(), (descriptionBase + ", GL_TEXTURE_CUBE_MAP").c_str(), internalFormat, 57, 57)); - sized2DArrayGroup->addChild (new Texture2DArrayFormatCase (m_testCtx, m_context.getRenderContext(), (nameBase + "_pot").c_str(), (descriptionBase + ", GL_TEXTURE_2D_ARRAY").c_str(), internalFormat, 64, 64, 8)); - sized2DArrayGroup->addChild (new Texture2DArrayFormatCase (m_testCtx, m_context.getRenderContext(), (nameBase + "_npot").c_str(), (descriptionBase + ", GL_TEXTURE_2D_ARRAY").c_str(), internalFormat, 63, 57, 7)); + sized2DGroup->addChild (new Texture2DFormatCase (m_testCtx, m_context, (nameBase + "_pot").c_str(), (descriptionBase + ", GL_TEXTURE_2D").c_str(), internalFormat, 128, 128)); + sized2DGroup->addChild (new Texture2DFormatCase (m_testCtx, m_context, (nameBase + "_npot").c_str(), (descriptionBase + ", GL_TEXTURE_2D").c_str(), internalFormat, 63, 112)); + sizedCubeGroup->addChild (new TextureCubeFormatCase (m_testCtx, m_context, (nameBase + "_pot").c_str(), (descriptionBase + ", GL_TEXTURE_CUBE_MAP").c_str(), internalFormat, 64, 64)); + sizedCubeGroup->addChild (new TextureCubeFormatCase (m_testCtx, m_context, (nameBase + "_npot").c_str(), (descriptionBase + ", GL_TEXTURE_CUBE_MAP").c_str(), internalFormat, 57, 57)); + sized2DArrayGroup->addChild (new Texture2DArrayFormatCase (m_testCtx, m_context, (nameBase + "_pot").c_str(), (descriptionBase + ", GL_TEXTURE_2D_ARRAY").c_str(), internalFormat, 64, 64, 8)); + sized2DArrayGroup->addChild (new Texture2DArrayFormatCase (m_testCtx, m_context, (nameBase + "_npot").c_str(), (descriptionBase + ", GL_TEXTURE_2D_ARRAY").c_str(), internalFormat, 63, 57, 7)); } // ETC-1 compressed formats. diff --git a/modules/gles31/functional/es31fTextureFilteringTests.cpp b/modules/gles31/functional/es31fTextureFilteringTests.cpp index 5b5a86ad4..8c5e981ee 100644 --- a/modules/gles31/functional/es31fTextureFilteringTests.cpp +++ b/modules/gles31/functional/es31fTextureFilteringTests.cpp @@ -202,6 +202,9 @@ void TextureCubeArrayFilteringCase::init (void) if (!supportsES32 && !m_context.getContextInfo().isExtensionSupported("GL_EXT_texture_cube_map_array")) throw tcu::NotSupportedError("GL_EXT_texture_cube_map_array not supported"); + if (m_internalFormat == GL_SR8_EXT && !(m_context.getContextInfo().isExtensionSupported("GL_EXT_texture_sRGB_R8"))) + TCU_THROW(NotSupportedError, "GL_EXT_texture_sRGB_R8 not supported"); + try { const tcu::TextureFormat texFmt = glu::mapGLInternalFormat(m_internalFormat); @@ -490,6 +493,7 @@ void TextureFilteringTests::init (void) { "rgb565", GL_RGB565 }, { "rgba4", GL_RGBA4 }, { "rgb5_a1", GL_RGB5_A1 }, + { "sr8", GL_SR8_EXT }, { "srgb8_alpha8", GL_SRGB8_ALPHA8 }, { "rgb10_a2", GL_RGB10_A2 } }; diff --git a/modules/gles31/functional/es31fTextureFormatTests.cpp b/modules/gles31/functional/es31fTextureFormatTests.cpp index cac3e8220..8c0015c69 100644 --- a/modules/gles31/functional/es31fTextureFormatTests.cpp +++ b/modules/gles31/functional/es31fTextureFormatTests.cpp @@ -51,6 +51,12 @@ using namespace glu::TextureTestUtil; using tcu::Sampler; +struct SupportedExtensions +{ + bool cubeMapArray; + bool sRGBR8; +}; + static tcu::CubeFace getCubeFaceFromNdx (int ndx) { switch (ndx) @@ -67,6 +73,21 @@ static tcu::CubeFace getCubeFaceFromNdx (int ndx) } } +namespace +{ + +SupportedExtensions checkSupport (const glu::ContextInfo& renderCtxInfoid) +{ + SupportedExtensions supportedExtensions; + + supportedExtensions.cubeMapArray = renderCtxInfoid.isExtensionSupported("GL_EXT_texture_cube_map_array"); + supportedExtensions.sRGBR8 = renderCtxInfoid.isExtensionSupported("GL_EXT_texture_sRGB_R8"); + + return supportedExtensions; +} + +} // anonymous + // TextureCubeArrayFormatCase class TextureCubeArrayFormatCase : public tcu::TestCase @@ -84,7 +105,6 @@ private: TextureCubeArrayFormatCase (const TextureCubeArrayFormatCase& other); TextureCubeArrayFormatCase& operator= (const TextureCubeArrayFormatCase& other); - bool checkSupport (void); bool testLayerFace (int layerNdx); glu::RenderContext& m_renderCtx; @@ -136,7 +156,10 @@ TextureCubeArrayFormatCase::~TextureCubeArrayFormatCase (void) void TextureCubeArrayFormatCase::init (void) { - if (checkSupport()) + const SupportedExtensions supportedExtensions = checkSupport(m_renderCtxInfo); + + if ((supportedExtensions.cubeMapArray && m_format != GL_SR8_EXT) || + (supportedExtensions.cubeMapArray && m_format == GL_SR8_EXT && supportedExtensions.sRGBR8)) { m_texture = m_dataType != GL_NONE ? new glu::TextureCubeArray(m_renderCtx, m_format, m_dataType, m_size, m_depth) // Implicit internal format. @@ -154,7 +177,11 @@ void TextureCubeArrayFormatCase::init (void) } else { - m_testCtx.setTestResult(QP_TEST_RESULT_NOT_SUPPORTED, "Cube map arrays not supported"); + if (supportedExtensions.cubeMapArray == false) + m_testCtx.setTestResult(QP_TEST_RESULT_NOT_SUPPORTED, "Cube map arrays not supported"); + + if (supportedExtensions.sRGBR8 == false) + m_testCtx.setTestResult(QP_TEST_RESULT_NOT_SUPPORTED, "texture srgb r8 not supported"); } } @@ -166,12 +193,6 @@ void TextureCubeArrayFormatCase::deinit (void) m_renderer.clear(); } -bool TextureCubeArrayFormatCase::checkSupport (void) -{ - const bool supportsES32 = glu::contextSupports(m_renderCtx.getType(), glu::ApiType::es(3, 2)); - return supportsES32 || m_renderCtxInfo.isExtensionSupported("GL_EXT_texture_cube_map_array"); -} - bool TextureCubeArrayFormatCase::testLayerFace (int layerFaceNdx) { const glw::Functions& gl = m_renderCtx.getFunctions(); @@ -451,6 +472,7 @@ void TextureFormatTests::init (void) { "rgba8", GL_RGBA8, }, { "rgba8i", GL_RGBA8I, }, { "rgba8ui", GL_RGBA8UI, }, + { "srgb_r8", GL_SR8_EXT, }, { "srgb8_alpha8", GL_SRGB8_ALPHA8, }, { "rgb10_a2", GL_RGB10_A2, }, { "rgb10_a2ui", GL_RGB10_A2UI, }, -- 2.34.1