diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-05-04 20:03:29 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-05-04 20:03:29 +0000 |
commit | 7992d5f63d15512cce546aba4602ab2f1be97121 (patch) | |
tree | 017fb1e40d1ac86b4385c21370aa73f318fd1edd | |
parent | 23eb3a5d0a9c29625e548827c45a87e8b6578faa (diff) | |
parent | b0c9ab36a00610ae4815acb3b37d01e3c77c90a5 (diff) | |
download | deqp-7992d5f63d15512cce546aba4602ab2f1be97121.tar.gz |
Snap for 10061583 from b0c9ab36a00610ae4815acb3b37d01e3c77c90a5 to android12-tests-releaseandroid-vts-12.0_r9android-cts-12.0_r9
Change-Id: I84b7db7ab96614be76461e9b91fcf39eb2dfa8ba
-rw-r--r-- | modules/gles2/functional/es2fFboCompletenessTests.cpp | 8 | ||||
-rw-r--r-- | modules/gles3/functional/es3fFboCompletenessTests.cpp | 27 | ||||
-rw-r--r-- | modules/glshared/glsFboUtil.cpp | 6 | ||||
-rw-r--r-- | modules/glshared/glsFboUtil.hpp | 5 |
4 files changed, 31 insertions, 15 deletions
diff --git a/modules/gles2/functional/es2fFboCompletenessTests.cpp b/modules/gles2/functional/es2fFboCompletenessTests.cpp index f1333b577..5e8dc7df9 100644 --- a/modules/gles2/functional/es2fFboCompletenessTests.cpp +++ b/modules/gles2/functional/es2fFboCompletenessTests.cpp @@ -230,7 +230,7 @@ static const FormatExtEntry s_es2ExtFormats[] = class ES2Checker : public Checker { public: - ES2Checker (const glu::RenderContext& ctx); + ES2Checker (const glu::RenderContext& ctx, const FormatDB& formats); void check (GLenum attPoint, const Attachment& att, const Image* image); private: @@ -238,8 +238,8 @@ private: GLsizei m_height; //< The common height of images }; -ES2Checker::ES2Checker (const glu::RenderContext& ctx)\ - : Checker (ctx) +ES2Checker::ES2Checker (const glu::RenderContext& ctx, const FormatDB& formats)\ + : Checker (ctx, formats) , m_width (-1) , m_height (-1) { @@ -373,7 +373,7 @@ IterateResult SupportedCombinationTest::iterate (void) class ES2CheckerFactory : public CheckerFactory { public: - Checker* createChecker (const glu::RenderContext& ctx) { return new ES2Checker(ctx); } + Checker* createChecker (const glu::RenderContext& ctx, const FormatDB& formats) { return new ES2Checker(ctx, formats); } }; class TestGroup : public TestCaseGroup diff --git a/modules/gles3/functional/es3fFboCompletenessTests.cpp b/modules/gles3/functional/es3fFboCompletenessTests.cpp index 3a65a0084..2e6b35150 100644 --- a/modules/gles3/functional/es3fFboCompletenessTests.cpp +++ b/modules/gles3/functional/es3fFboCompletenessTests.cpp @@ -24,6 +24,7 @@ #include "es3fFboCompletenessTests.hpp" #include "glsFboCompletenessTests.hpp" +#include "deUniquePtr.hpp" #include <sstream> using namespace glw; @@ -187,20 +188,24 @@ static const FormatExtEntry s_es3ExtFormats[] = class ES3Checker : public Checker { public: - ES3Checker (const glu::RenderContext& ctx) - : Checker (ctx) + ES3Checker (const glu::RenderContext& ctx, const FormatDB& formats) + : Checker (ctx, formats) + , m_ctxInfo (glu::ContextInfo::create(ctx)) , m_numSamples (-1) , m_depthStencilImage (0) , m_depthStencilType (GL_NONE) {} void check (GLenum attPoint, const Attachment& att, const Image* image); private: + de::UniquePtr<glu::ContextInfo> m_ctxInfo; + //! The common number of samples of images. GLsizei m_numSamples; //! The common image for depth and stencil attachments. GLuint m_depthStencilImage; GLenum m_depthStencilType; + ImageFormat m_depthStencilFormat; }; void ES3Checker::check (GLenum attPoint, const Attachment& att, const Image* image) @@ -237,18 +242,28 @@ void ES3Checker::check (GLenum attPoint, const Attachment& att, const Image* ima addPotentialFBOStatus(GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE, "Number of samples differ"); } - // "Depth and stencil attachments, if present, are the same image." if (attPoint == GL_DEPTH_ATTACHMENT || attPoint == GL_STENCIL_ATTACHMENT) { if (m_depthStencilImage == 0) { m_depthStencilImage = att.imageName; m_depthStencilType = attachmentType(att); + m_depthStencilFormat = image->internalFormat; } - else + else if (m_depthStencilImage != att.imageName || m_depthStencilType != attachmentType(att)) { - if (m_depthStencilImage != att.imageName || m_depthStencilType != attachmentType(att)) + // "Depth and stencil attachments, if present, are the same image." + if (!m_ctxInfo->isExtensionSupported("GL_EXT_separate_depth_stencil")) addFBOStatus(GL_FRAMEBUFFER_UNSUPPORTED, "Depth and stencil attachments are not the same image"); + + // "The combination of internal formats of the attached images does not violate + // an implementation-dependent set of restrictions." + ImageFormat depthFormat = attPoint == GL_DEPTH_ATTACHMENT ? image->internalFormat : m_depthStencilFormat; + ImageFormat stencilFormat = attPoint == GL_STENCIL_ATTACHMENT ? image->internalFormat : m_depthStencilFormat; + if (m_formats.getFormatInfo(depthFormat) & STENCIL_RENDERABLE) + addPotentialFBOStatus(GL_FRAMEBUFFER_UNSUPPORTED, "Separate depth attachment has combined depth and stencil format"); + if (m_formats.getFormatInfo(stencilFormat) & DEPTH_RENDERABLE) + addPotentialFBOStatus(GL_FRAMEBUFFER_UNSUPPORTED, "Separate stencil attachment has combined depth and stencil format"); } } } @@ -448,7 +463,7 @@ IterateResult NumSamplesTest::build (FboBuilder& builder) class ES3CheckerFactory : public CheckerFactory { public: - Checker* createChecker (const glu::RenderContext& ctx) { return new ES3Checker(ctx); } + Checker* createChecker (const glu::RenderContext& ctx, const FormatDB& formats) { return new ES3Checker(ctx, formats); } }; class TestGroup : public TestCaseGroup diff --git a/modules/glshared/glsFboUtil.cpp b/modules/glshared/glsFboUtil.cpp index 0c2767006..e7284109e 100644 --- a/modules/glshared/glsFboUtil.cpp +++ b/modules/glshared/glsFboUtil.cpp @@ -518,8 +518,8 @@ static void checkAttachmentCompleteness (Checker& cctx, const Attachment& attach using namespace config; -Checker::Checker (const glu::RenderContext& ctx) - : m_renderCtx(ctx) +Checker::Checker (const glu::RenderContext& ctx, const FormatDB& formats) + : m_renderCtx(ctx), m_formats(formats) { m_statusCodes.setAllowComplete(true); } @@ -573,7 +573,7 @@ FboVerifier::FboVerifier (const FormatDB& formats, CheckerFactory& factory, cons ValidStatusCodes FboVerifier::validStatusCodes (const Framebuffer& fboConfig) const { const AttachmentMap& atts = fboConfig.attachments; - const UniquePtr<Checker> cctx(m_factory.createChecker(m_renderCtx)); + const UniquePtr<Checker> cctx(m_factory.createChecker(m_renderCtx, m_formats)); for (TextureMap::const_iterator it = fboConfig.textures.begin(); it != fboConfig.textures.end(); it++) diff --git a/modules/glshared/glsFboUtil.hpp b/modules/glshared/glsFboUtil.hpp index 6affa6816..58ecb29ec 100644 --- a/modules/glshared/glsFboUtil.hpp +++ b/modules/glshared/glsFboUtil.hpp @@ -393,7 +393,7 @@ void logFramebufferConfig (const config::Framebuffer& cfg, tcu::TestLog& log); class Checker { public: - Checker (const glu::RenderContext&); + Checker (const glu::RenderContext&, const FormatDB&); virtual ~Checker (void) {} void addGLError (glw::GLenum error, const char* description); @@ -409,6 +409,7 @@ public: protected: const glu::RenderContext& m_renderCtx; + const FormatDB& m_formats; private: ValidStatusCodes m_statusCodes; //< Allowed return values for glCheckFramebufferStatus. @@ -417,7 +418,7 @@ private: class CheckerFactory { public: - virtual Checker* createChecker (const glu::RenderContext&) = 0; + virtual Checker* createChecker (const glu::RenderContext&, const FormatDB&) = 0; }; typedef std::set<glw::GLenum> AttachmentPoints; |