[Feat] (MG_Backend, MG_Util): give a cube map array real storage on DirectGLES

TextureCubeMapArray was missing from every storage and upload switch in the
DirectGLES texture sync, so a cube map array reached the driver with no storage
at all - and from the glFramebufferTextureLayer branch, so attaching one of its
layers fell through to glFramebufferTexture2D and raised INVALID_ENUM. Every
GL_TEXTURE_CUBE_MAP_ARRAY colour check in
direct_state_access.framebuffers_texture_layer_attachment read nothing.

ES 3.2 has GL_TEXTURE_CUBE_MAP_ARRAY natively and it stores exactly like a 2D
array whose depth is six times the cube count, so each switch gains the case
beside Texture2DArray and nothing else changes. 1D arrays join the layer branch
for the same reason - their backend image is a 2D array.

Per the POST rule the new GLES dependency gets a capability
(SupportsTextureCubeMapArray, ES 3.2 core or EXT/OES_texture_cube_map_array) and
a DriverPost row saying what a user loses without it.

Takes framebuffers_texture_layer_attachment from failing to passing on Espryt. It
still fails on DirectVulkan, which declines a layered attachment outright.
This commit is contained in:
BZLZHH
2026-08-05 06:58:00 -04:00
parent 588ddba722
commit 5545d31c37
4 changed files with 29 additions and 1 deletions
+10
View File
@@ -309,6 +309,16 @@ namespace MobileGL::MG_Util::SelfTest {
"sampling outside a GL_CLAMP_TO_BORDER texture reads the driver's default "
"border instead of the requested colour");
}
if (caps.SupportsTextureCubeMapArray) {
builder.Pass("Texture cube map array",
"supported (GL_TEXTURE_CUBE_MAP_ARRAY textures get real storage and can be "
"attached to a framebuffer)");
} else {
builder.Warn("Texture cube map array",
"not supported (pre-ES 3.2 without GL_EXT/OES_texture_cube_map_array); a cube "
"map array texture gets no driver storage at all, so sampling one reads nothing "
"and rendering to one does not reach the screen");
}
if (glesFuncs.glPatchParameteri != nullptr) {
builder.Pass("Tessellation patch parameters",
"glPatchParameteri present (GL_PATCH_VERTICES reaches the driver)");