From 887547c70754d7c3ede8e5ad23c69aedf885fd54 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Tue, 6 Oct 2026 17:01:56 -0400 Subject: [PATCH] [Test] (P13 W6): the cube-map view readback case skips where GL_ARB_texture_view is not advertised. --- .../Scenarios/CubeFaceReadbackScenario.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/MobileGL/MG_IntegrationTest/Scenarios/CubeFaceReadbackScenario.cpp b/MobileGL/MG_IntegrationTest/Scenarios/CubeFaceReadbackScenario.cpp index c12765d3..9a593bd1 100644 --- a/MobileGL/MG_IntegrationTest/Scenarios/CubeFaceReadbackScenario.cpp +++ b/MobileGL/MG_IntegrationTest/Scenarios/CubeFaceReadbackScenario.cpp @@ -22,6 +22,7 @@ // which one answered instead of merely failing. #include +#include #include #include "../Harness/HeadlessGL.h" @@ -73,6 +74,16 @@ namespace MGITest { return buffer; } + static bool HasExtension(const char* name) { + GLint count = 0; + glGetIntegerv(GL_NUM_EXTENSIONS, &count); + for (GLint i = 0; i < count; ++i) { + const auto* ext = reinterpret_cast(glGetStringi(GL_EXTENSIONS, static_cast(i))); + if (ext != nullptr && std::strcmp(ext, name) == 0) return true; + } + return false; + } + static void DrainErrors() { for (int i = 0; i < 16 && glGetError() != GL_NO_ERROR; ++i) { } @@ -122,6 +133,12 @@ namespace MGITest { constexpr GLint kLayers = 8; constexpr GLint kViewMinLayer = 2; + // Espryt mints views through the ES driver's texture-view extension and, without it, + // refuses glTextureView with INVALID_OPERATION and withholds GL_ARB_texture_view rather + // than emulate by copying (TextureViewScenario's header) - no view to read through. + if (!HasExtension("GL_ARB_texture_view")) { + GTEST_SKIP() << "GL_ARB_texture_view is not advertised on backend " << Gl().BackendName(); + } const GLuint storage = NewTexture(); glBindTexture(GL_TEXTURE_2D_ARRAY, storage); glTexStorage3D(GL_TEXTURE_2D_ARRAY, 1, GL_RGBA8, 1, 1, kLayers);