[Fix, Docs] (MG_Backend/DirectGLES): drain the attachment-format probe, and document the depth/stencil readback emulation switch

This commit is contained in:
Swung0x48
2026-08-12 12:09:45 -04:00
parent ed6578954e
commit eaba4ac1dc
2 changed files with 6 additions and 1 deletions
@@ -6074,8 +6074,12 @@ namespace MobileGL::MG_Backend::DirectGLES {
if (!isDefault) {
// A real object: ask it directly. That answer is certainly blit-compatible,
// so it is used on its own.
// so it is used on its own. The query binds the attachment as GL_TEXTURE_2D,
// which an array or cube attachment refuses - it answers 0, the size-derived
// guesses below take over, and the refusal must not be left on the error
// queue for the caller's next glGetError to pick up as its own.
const GLenum exact = ReplicateBlitImpl::QueryAttachmentSizedFormat(point);
ClearGLErrors();
if (exact != 0) {
out->Push(exact);
return true;
+1
View File
@@ -164,6 +164,7 @@ MobileGL supports runtime configuration via environment variables.
| `MOBILEGL_MAGMA_FRAMESINFLIGHT` | Set Magma frames in flight. | Integer `1``64` | `3` |
| `MOBILEGL_AVOID_SAMPLER_MIPMAP_MIN_FILTER` | Avoid sampler mipmap minification filters. | `0`, `1` | `0` |
| `MOBILEGL_COHERENT_AS_FLUSH` | Treat persistent `GL_MAP_FLUSH_EXPLICIT_BIT` maps as coherent (app-compat for engines like Flywheel that never flush them). | `0`, `1` | `0` |
| `MOBILEGL_ESPRYT_FORCE_DS_READBACK_EMULATION` | Always emulate depth/stencil `glReadPixels`/`glGetTexImage` by shader sampling on Espryt, instead of using the driver's own depth/stencil readback where it has one. | `0`, `1` | `0` |
| `VK_ICD_FILENAMES` | Select the Vulkan ICD used by the Vulkan loader. | Path to an ICD JSON file | Loader default |
## License