BZLZHH
4532cae175
[Feat] (MG_Impl, MG_Util): STENCIL_INDEX8 renderbuffers; report distinct D/S renderbuffers unsupported
...
GL_STENCIL_INDEX8 becomes a first-class internal format (VK_FORMAT_S8_UINT
backing, metrics, classifiers, converters), so glRenderbufferStorage
accepts it instead of leaving GL_INVALID_ENUM behind. Framebuffer
completeness now also mirrors the renderer's gate for renderbuffers:
distinct depth/stencil renderbuffer attachments (or a renderbuffer
paired with a texture) report GL_FRAMEBUFFER_UNSUPPORTED - the spec only
requires the same-image case - instead of passing completeness and then
failing at draw/clear (verify_mixed_attachments.* now passes).
2026-08-01 01:50:34 -04:00
BZLZHH
282dd69230
[Feat] (DirectVulkan, MG_Impl): depth-stencil ReadPixels and combined-attachment queries
...
glReadPixels now serves GL_DEPTH_COMPONENT, GL_DEPTH_STENCIL and
GL_STENCIL_INDEX from the read framebuffer's depth/stencil attachment:
per-aspect vkCmdCopyImageToBuffer copies (4-byte-aligned stencil region)
with CPU repacking into GL_FLOAT / GL_UNSIGNED_SHORT / GL_UNSIGNED_INT /
GL_UNSIGNED_INT_24_8 / GL_FLOAT_32_UNSIGNED_INT_24_8_REV /
GL_UNSIGNED_BYTE layouts, honoring pack state and pixel-pack buffers.
GL_DEPTH_STENCIL_ATTACHMENT parameter queries follow the spec's combined
rules: differing depth/stencil attachment images (or a lone half) fail
with GL_INVALID_OPERATION, as does GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE
on the combined name. packed_depth_stencil.verify_parameters.* and
verify_read_pixels.depth24_stencil8 now pass.
2026-07-31 18:41:08 -04:00
BZLZHH
47dd8cdc05
[Feat] (MG_Impl): answer format-derived framebuffer attachment queries
...
glGetFramebufferAttachmentParameteriv (and the DSA variant) now answer
GL_FRAMEBUFFER_ATTACHMENT_RED/GREEN/BLUE/ALPHA/DEPTH/STENCIL_SIZE,
COMPONENT_TYPE and COLOR_ENCODING from the attached image's internal
format, and accept the default-framebuffer attachment names (GL_DEPTH,
GL_STENCIL, GL_FRONT/GL_BACK variants). Querying them with no image
attached reports GL_INVALID_OPERATION per spec instead of
GL_INVALID_ENUM.
2026-07-31 18:21:28 -04:00
swung0x48
b8a8a660e1
[Refactor] (Lifecycle): own MobileGL's lifecycle from the EGL layer instead of ELF static ctor/dtor - the first EGL/WGL entry point lazily initializes via a thread-safe, re-init-capable EnsureInitialized (AutoInit is gone), the last eglTerminate with no initialized display and nothing current tears the whole library down deterministically inside the EGL lifecycle, and the global singletons move to leak-at-exit heap storage so process exit runs no backend destructors at all (AutoDestroy and the Windows DllMain abandon hook are gone); fixes the exit-time SIGABRT from undefined static-destruction order - the DirectGLES buffer-pool mutex abort on Android clean exits, and the pre-existing macOS QueryTest/ProgramTest 'Subprocess aborted' gtest failures now pass (ctest 411/411)
2026-07-26 10:59:14 -04:00
swung0x48
c30bd0fabb
[Fix] (MG_Backend/DirectGLES, MG_Impl/GLImpl): draw/read-buffer state could land on the wrong FBO (glDrawBuffer's static-array latch; SyncToBackend emitting glDrawBuffers/glReadBuffer for the non-bound target; no resync on bound-FBO attachment/drawbuffer edits) leaving MC 26.3's OIT color clears as no-ops; apply per bound target and track the FBO object version
2026-07-17 11:45:54 -04:00
swung0x48
5cd82f2002
Merge origin/dev ( efd7b473) into readback overhaul - unify DirectGLES 2D-array target support under MapToBackendTextureTarget, keep canonical UNorm8 shadows for RGBA4/RGB565 (supersedes packed-word transfer types; GL_RGB565 aliases RGB5), keep upstream GLSL 330 normalization, anisotropy params, error-count semantics and VK clear/scissor fixes
2026-07-16 23:17:37 -04:00
swung0x48
870d882fef
[Fix] (MG_Backend/DirectGLES, MG_Impl/GLImpl, MG_Util): GL CTS packed_pixels + texture_swizzle readback overhaul - canonical shadow layouts for legacy sized/unsized/packed internal formats (RGB5->RGB565, RGB10/12->RGB16, RGBA2->RGBA4, RGB10_A2(UI)/RGB9_E5/R11F_G11F_B10F packed-word shadows with per-texel encode/decode incl. 5_9_9_9_REV and 10F_11F_11F_REV client types), GL_UNSIGNED_INT_10_10_10_2 pixel type mapping, conversion-first GetTexImage with CPU-shadow fallback for non-attachable formats and stale-temp-FBO detach, narrow implementation read pairs + SNORM read candidates + 2_10_10_10_REV wide-read decode with RGBA expansion, PACK image/skip and SWAP_BYTES honored on the CPU repack (never in ES), state-reset conformance (default-texture TexParameter/TexImage/TexBuffer no-ops, renderbuffer 0 unbind, vertex attrib 0 current value, ActiveTexture up to combined units, UBO binding count clamp), FramebufferTexture3D/TextureLayer slice attachments via glFramebufferTextureLayer, capability-driven FBO UNSUPPORTED for non-renderable colors, ReadPixels integer-ness mismatch error, single-value texture swizzle validation, and DirectGLES 1D/1D-array/2D-array texture emulation (2D/2D-array backend targets matching SPIRV-Cross ES 1D-as-2D shaders)
2026-07-16 22:41:54 -04:00
swung0x48
a08669df72
[Fix] (MG_Impl/GLImpl): stop recording GL errors on the delete/query paths of every object family - glDeleteBuffers/VertexArrays/Renderbuffers/Framebuffers must silently ignore unknown names and glIsTexture must never raise, while glBindSampler now reports INVALID_OPERATION like the other bind entry points
2026-07-16 22:11:43 -04:00
swung0x48
a1a8a18575
[Fix] (MG_Backend/DirectGLES, MG_Impl/GLImpl): ReadPixels - fall back to wide-format conversion when the ES driver rejects a legacy native read combo (Adreno errors on e.g. GL_RED/GL_UNSIGNED_INT and leaves the buffer untouched), and enforce packed-type/format pairing at the state layer via shared ValidateClientFormatTypePairing (GL_RED + GL_UNSIGNED_SHORT_5_6_5 now raises GL_INVALID_OPERATION)
2026-07-16 06:11:53 -04:00
swung0x48
bae222227a
[Fix] (MG_Backend/DirectGLES, MG_Impl/GLImpl): ReadPixels - fall back to wide-format conversion when the ES driver rejects a legacy native read combo (Adreno errors on e.g. GL_RED/GL_UNSIGNED_INT and leaves the buffer untouched), and enforce packed-type/format pairing at the state layer via shared ValidateClientFormatTypePairing (GL_RED + GL_UNSIGNED_SHORT_5_6_5 now raises GL_INVALID_OPERATION)
2026-07-16 06:11:53 -04:00
swung0x48
940ab5fd8e
[Fix] (MG_State/GLState, MG_Backend): track layered framebuffer textures
2026-07-03 10:38:51 +08:00
swung0x48
1cd75f7f54
[Fix] (MG_Impl/GLImpl): validate named renderbuffer storage [skip ci]
2026-07-02 20:03:16 +08:00
swung0x48
1c84422f8e
[Fix] (MG_Impl/GLImpl, MG_Backend/DirectVulkan): allow color renderbuffer framebuffers [skip ci]
2026-07-02 19:59:48 +08:00
swung0x48
ba330cd70a
[Fix] (MG_Impl/GLImpl): validate read framebuffer buffers [skip ci]
2026-07-02 19:33:10 +08:00
swung0x48
e2e4b6e579
[Fix] (MG_Impl/GLImpl): attach depth-stencil renderbuffers [skip ci]
2026-07-02 18:41:08 +08:00
swung0x48
37255523b1
[Fix] (MG_Impl/GLImpl): report incomplete framebuffer attachments [skip ci]
2026-07-02 18:29:26 +08:00
swung0x48
3c643d943a
[Fix] (MG_Impl/GLImpl): fix more OpenGL 3.x piglit cases
2026-07-02 12:36:58 +08:00
swung0x48
e7bb46e819
[Fix] (MG_Backend/DirectGLES): support Sundial Lite shader pack
2026-06-17 10:58:12 +08:00
BZLZHH
c499480692
[Feat] (MG_Impl/Texture, MG_State/TextureState, MG_Impl/Framebuffer, MG_Test/Texture): implement multisample frontend state
2026-06-10 01:37:59 +08:00
BZLZHH
df90753d85
[Fix] (MG_Impl/Framebuffer, MG_Test/Framebuffer): avoid duplicate glFramebufferTexture attach
2026-06-09 22:18:28 +08:00
BZLZHH
83a6f24f93
Merge remote-tracking branch 'origin/Feat/Backend-Direct-Vulkan' into Agent/CodexAudit
...
# Conflicts:
# MobileGL/MG_Backend/BackendObject.h
# MobileGL/MG_Backend/DirectGLES/Managers.cpp
# MobileGL/MG_Backend/DirectVulkan/BackendObject_DirectVulkan.cpp
# MobileGL/MG_Backend/DirectVulkan/Renderer/FrameContext.cpp
# MobileGL/MG_Backend/DirectVulkan/Renderer/VkTextureManager.cpp
# MobileGL/MG_Backend/DirectVulkan/Renderer/VulkanRenderer.cpp
# MobileGL/MG_Impl/GLImpl/Buffer/GL_Buffer.cpp
# MobileGL/MG_Impl/GLImpl/Exporting/Definitions.cpp
# MobileGL/MG_Impl/GLImpl/Framebuffer/GL_Framebuffer.cpp
# MobileGL/MG_Impl/GLImpl/Getter/GL_Getter.cpp
# MobileGL/MG_Impl/GLImpl/Getter/GL_Getter.h
# MobileGL/MG_Impl/GLImpl/Program/GL_Program.cpp
# MobileGL/MG_Impl/GLImpl/Program/GL_Program.h
# MobileGL/MG_Impl/GLImpl/Sync/GL_Sync.cpp
# MobileGL/MG_Impl/GLImpl/Sync/GL_Sync.h
# MobileGL/MG_Impl/GLImpl/Texture/GL_Texture.cpp
# MobileGL/MG_Impl/GLImpl/VertexArray/GL_VertexArray.cpp
# MobileGL/MG_Impl/GLImpl/VertexArray/GL_VertexArray.h
# MobileGL/MG_State/GLState/BufferState/BufferObject.cpp
# MobileGL/MG_State/GLState/BufferState/BufferObject.h
# MobileGL/MG_Util/BackendLoaders/Vulkan/Loader.cpp
# MobileGL/MG_Util/BackendLoaders/Vulkan/Loader.h
2026-06-09 21:18:12 +08:00
BZLZHH
727939af5b
[Fix] (MG_Impl, MG_State, MG_Backend, MG_Util): Do source audit by Codex.
2026-06-09 15:34:19 +08:00
swung0x48
cf165c0db5
[Fix] (MG_Backend/DirectVulkan): support Voxy rendering
...
Implemented:
- Advertise Voxy-required DirectVulkan extensions without raising the reported OpenGL version.
- Add DirectVulkan compute, indirect draw count, DSA, readback, and buffer state paths needed by Voxy.
Fixed:
- Enable Vulkan shaderInt64 and drawIndirectFirstInstance so Voxy baseInstance-driven LOD draws address the correct section data.
- Fix DirectVulkan synchronization, framebuffer, texture readback, and shader interface handling used by Voxy and Minecraft screenshots.
Tests:
- Add MG_Test coverage for DirectVulkan extension advertising, DSA buffer/texture/framebuffer/vertex-array behavior, persistent mapped readback, and shader/program paths.
2026-06-09 00:37:37 +08:00
swung0x48
633b3d3b0a
[Feat] (MG_State/RenderState, MG_Backend/DirectVulkan): make Distant
...
Horizon work
- Implement BlendEquation/CullFaceMode/PointSize/PolygonMode
- Implement GetFramebufferAttachmentParameter*
- Downgrade some color attachment resolve failure
- Downgrade some overly-strict shader stage linkage check (don't check
on unused input var)
2026-05-12 12:38:19 +08:00
BZLZHH
15e24cda78
[Perf|Improvement] (All): Improve performance & optimize code.
2026-02-23 16:00:38 +08:00
BZLZHH
8413874e82
[Feat|Refactor] (MG_Backend|MG_Impl): Implement BackendObject, replacing previous methods.
2026-02-18 10:36:56 +08:00
BZLZHH
a7d8e90600
[Feat] (MG_Backend/DirectGLES|MG_Impl): Initial implementions of GetTexImage and ReadPixels.
2026-02-06 20:14:18 +08:00
swung0x48
6823b1e46a
[Feat] (MG_Impl/Framebuffer): implement glReadBuffer
2026-02-03 12:59:11 +08:00
swung0x48
edff307782
[Chore] (MG_Impl/Framebuffer, MG_Impl/RenderState): move ReadBuffer to the right place
2026-02-03 10:23:20 +08:00
BZLZHH
20fbfc2956
[Chore] (LICENSE): Switch project license to LGPLv3.
2026-01-18 09:33:33 +08:00
swung0x48
2657edc003
[Feat] (MG_Impl/Framebuffer): implement glDrawBuffer
2026-01-04 23:21:19 +08:00
BZLZHH
3714e275ab
[Chore] (All): Update copyright year in source code files.
2026-01-01 00:42:06 +08:00
BZLZHH
e7d9da42dc
[Chore] (All): Adjust copyright declaration.
2025-12-31 21:49:54 +08:00
BZLZHH
2c214affbe
[Fix] (MG_Impl/Framebuffer): Correctly set internal format for RBO.
2025-12-31 19:45:11 +08:00
BZLZHH
8ed8efe347
[Chore] (All): Add standardized source file header and update script.
2025-12-31 15:45:34 +08:00
BZLZHH
5071a98e00
[Feat] (MG_Impl/Framebuffer): Add ClearBuffer*.
2025-12-14 11:37:15 +08:00
BZLZHH
9ab001bf75
[Feat] (MG_Impl/Framebuffer): Implement renderbuffer funcs.
2025-12-14 11:28:02 +08:00
swung0x48
55db06bf5c
[Feat] (MG_Backend/DirectGLES): implement glGenerateMipmap
2025-11-17 17:36:42 +08:00
BZLZHH
e944944e7c
[Misc] (MG_Impl/Getter): GL_MAX_COLOR_ATTACHMENTS in GetIntegerv.
2025-11-15 22:41:30 +08:00
swung0x48
0d3236c3cc
[Feat] (MG_State/Framebuffer, MG_Impl/Framebuffer): implement glDrawBuffers in the state machine
2025-11-14 15:41:25 +08:00
BZLZHH
6959405518
[Fix] (MG_Impl/TextureImpl|FramebufferImpl): Handle texture 0.
2025-10-31 14:13:38 +08:00
BZLZHH
d982928a23
[Improvement] (...): Optimize code.
2025-10-31 13:29:48 +08:00
swung0x48
6927f81754
[Feat] (MG_Backend/DirectGLES): properly implement BlitFramebuffer
2025-10-28 21:48:46 +08:00
BZLZHH
bd1056f9c9
[Feat|Fix] (...): Add/Fix lots of stuff, being able not to crash in MC.
2025-10-06 16:08:35 +08:00
BZLZHH
4a303184e4
[Feat] (MG_Impl/Framebuffer): Implement essential framebuffer functions.
2025-10-02 23:42:14 +08:00