BZLZHH
b9ecfef0b6
[Fix] (DirectVulkan): handle renderbuffer attachments in color blit clears
...
BlitFramebuffer's color path asserted that the read framebuffer's source
attachment is a texture; a renderbuffer source (packed_depth_stencil.blit
color checks) aborted the process. Materialize pending clears through the
renderbuffer path for both source and destination, as ReadPixels already
does.
2026-07-31 16:15:50 -04:00
BZLZHH
fba26ea169
[Fix] (DirectVulkan): round renderbuffer MSAA requests to supported counts
...
glRenderbufferStorageMultisample accepts any sample count up to MAX_SAMPLES
(including non-powers-of-two like 3) and promises at-least allocation, but
the renderbuffer path required an exact Vulkan sample-count match and failed
on devices like llvmpipe that expose 1x/4x only. Round the request up to a
power of two and then to the nearest count the device supports for the
format, cached per format so per-draw resolution does not re-query the
physical device.
Un-crashes KHR-GL33.packed_depth_stencil.blit.* (2x/3x MSAA renderbuffers).
2026-07-31 16:15:50 -04:00
BZLZHH
93a3b55907
[Feat] (DirectVulkan): upload combined depth-stencil texture data
...
UploadDirtyMipLevels used to skip D24S8/D32FS8 textures outright, leaving
glTexImage-supplied depth-stencil data unuploaded (KHR-GL33
texture_repeat_mode depth24_stencil8 and texture_swizzle depth-stencil
cases all sampled zeros). De-interleave the shadow's GL wire format into a
depth plane (X8_D24 word / float) and a stencil byte plane and record one
copy per aspect, with cross-conversion when the device backs the texture
with the other depth-stencil format.
Depth32FStencil8's shadow byte size also claimed 16 bytes/texel while the
stored wire format (GL_FLOAT_32_UNSIGNED_INT_24_8_REV) is 8; that mismatch
truncated every upload of it.
Also route a multisample-texture sample-count request through the device's
supported counts (round up, GL promises at-least semantics).
2026-07-31 16:15:50 -04:00
BZLZHH
d1487bedf0
[Fix] (DirectVulkan): address array layers in mip upload copies
...
UploadDirtyMipLevels encoded a texture's GL depth into VkBufferImageCopy
imageExtent.depth with layerCount = 1. For array textures the layers live in
the image's arrayLayers, and extent.depth > 1 is invalid for 2D images - in
practice every layer past the first never received its data.
Route the third dimension into layerCount for 1D/2D/cube array images and
keep imageExtent.depth for genuine 3D images.
Fixes the KHR-GL33.pixelstoragemodes.teximage3d.* failures (110 cases) on
lavapipe.
2026-07-31 16:01:41 -04:00
BZLZHH
1bb736c57e
[Fix] (ShaderTranspiler): keep arrays-of-arrays illegal below GLSL 430
...
The legacy-shader retry that retargets a failed parse to #version 460 also
re-legalized multidimensional arrays, which every desktop driver rejects
below 430 and KHR-GL33.shaders.arrays.invalid.* requires to fail. Skip the
retry when the original failure is glslang's arrays-of-arrays error; other
legacy rescues (e.g. layout(binding=...)) keep working.
KHR-GL33.shaders.arrays.invalid.multidimensional_array* now report the
required compile failure (4 cases).
2026-07-31 15:51:40 -04:00
BZLZHH
eb76686c1e
[Fix] (DirectVulkan): stop replaying consumed renderbuffer clears mid-pass
...
A cached RenderPassEntry bakes renderbuffer clear payloads inline into its
pendingClearAttachments, and that list outlives the clear's consumption at
pass begin (loadOp CLEAR). Every subsequent draw that reused the entry while
its pass was still active replayed the stale clear through
vkCmdClearAttachments, wiping the color and depth of everything drawn so far
in the pass.
Texture-keyed clears already re-checked the clear manager before clearing;
do the same for inline renderbuffer payloads: only clear while the
renderbuffer clear is still actually pending, and take the live payload so a
newer glClear's values win.
On lavapipe this takes KHR-GL33.shaders.fragdepth.* from 0/18 to 18/18; the
same defect hit any renderbuffer-FBO case with several draws per pass.
2026-07-31 15:51:40 -04:00
BZLZHH
1a04fb8c0c
[Fix] (DirectVulkan): support client-memory indices in DrawElements
...
With no GL_ELEMENT_ARRAY_BUFFER bound, the IndexBufferView byte offset is a
raw client pointer (desktop drivers accept client-memory indices and the GL
CTS relies on this even in core contexts). UploadAndBindIndexBuffer used to
assert-crash the process there; it now snapshots the client index data into
a transient per-frame slice and binds that, matching how client-memory
vertex attributes are already streamed.
Fixes the process abort in KHR-GL33.transform_feedback.capture_* and every
other mustpass case that draws with client-side index arrays.
2026-07-31 15:10:01 -04:00
BZLZHH
306790ee7c
[Feat] (tools/cts): add crash-resuming local-host glcts runner
...
Local counterpart of run_cts.py for desktop Linux runs: re-invokes glcts
with the not-yet-measured cases after a crash, quarantines timed-out cases
with the dEQP watchdog enabled, and records crashed/hung/unrun lists so a
partial run cannot read as a complete one.
2026-07-31 14:52:38 -04:00
BZLZHH
170ccda3e7
[Feat] (tools/cts): port dEQP MobileGL platform to desktop Linux
...
Guard the AImageReader window path behind __ANDROID__ and add a
mobilegl-desktop DEQP target so glcts can run against libMobileGL.so on a
Linux host via pbuffer surfaces (VK_EXT_headless_surface).
2026-07-31 14:50:18 -04:00
BZLZHH
d091d9c460
[Misc] (...): Remove SOURCE_AUDIT.md
2026-06-10 09:57:07 +08:00
BZLZHH
d3a2e2e666
[Chore] (...): Disable debug log.
2026-06-10 09:52:30 +08:00
BZLZHH
a4261f8b19
[Fix] (MG_Backend/DirectVulkan, MG_State/TextureState, MG_Test): harden default-fbo clear lifetime tracking
2026-06-10 09:49:16 +08:00
BZLZHH
6051588458
[Feat] (MG_Backend/DirectVulkan): implement multisample texture backend
2026-06-10 01:56:37 +08:00
BZLZHH
5c1fd733da
[Feat] (MG_Backend/DirectGLES): implement multisample texture backend
2026-06-10 01:41:44 +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
3da0b1dfd4
[Fix] (MG_Backend/DirectVulkan, MG_Impl/Texture, MG_Test/Texture): fill advertised extension gaps
2026-06-10 01:09:39 +08:00
BZLZHH
720919455f
[Fix] (MG_Backend/DirectGLES, MG_Impl/Texture, MG_Test/Texture): fix Voxy base-instance and bound texStorage2D
2026-06-10 00:07:20 +08:00
BZLZHH
df90753d85
[Fix] (MG_Impl/Framebuffer, MG_Test/Framebuffer): avoid duplicate glFramebufferTexture attach
2026-06-09 22:18:28 +08:00
BZLZHH
7bee645b9a
[Fix] (MG_Util/Texture): remove duplicate depth-stencil normalize case
2026-06-09 21:33:27 +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
8d35be14a0
[Fix] (MG_Backend/DirectGLES, MG_Util/BackendLoader): stop treating partial EGL/GLES symbol load as fatal
2026-06-09 19:57:30 +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
BZLZHH
d1a5a4e39c
[Fix] (MG_Util/BackendLoader): Add /usr/lib64 and /lib64 to library search paths for Fedora/RHEL compatibility.
2026-06-07 20:28:19 +08:00
BZLZHH
be533994e5
Merge branch 'dev' into Feat/Backend-Direct-Vulkan
2026-05-09 08:32:33 +08:00
BZLZHH
368c089172
Merge branch 'Perf/Improvement1' into dev
2026-05-09 08:31:36 +08:00
BZLZHH
30c6f55c2d
[Fix] (MG_Backend/DirectVulkan): Add namespace qualifier to Version type.
2026-05-09 08:28:46 +08:00
BZLZHH
b373535d6e
[Fix] (MG_Impl/Texture): Fix proxy texture object handling.
2026-04-06 02:35:04 +08:00
BZLZHH
3504fca8da
Merge branch 'dev' into Perf/Improvement1
2026-02-24 22:48:23 +08:00
BZLZHH
e61817ff6a
[Fix] (MG_Backend/DirectGLES): Improve iteration safety in CollectGarbage.
2026-02-24 22:47:18 +08:00
BZLZHH
fff00e65c4
[Perf] (Texture|State): Replace dynamic_cast hot paths with static_cast.
2026-02-24 15:40:06 +08:00
BZLZHH
8320b4f456
[Feat|Fix] (MG_Backend/DirectGLES): Unify state-backend registries with weak-ref GC.
2026-02-24 15:27:28 +08:00
BZLZHH
15e24cda78
[Perf|Improvement] (All): Improve performance & optimize code.
2026-02-23 16:00:38 +08:00
BZLZHH
d22d2d64f2
[Feat|Fix] (MG_State/EGLState|MG_Backend|MG_Impl/EGLImpl): Initial implemention of EGL API.
2026-02-22 18:22:21 +08:00
BZLZHH
bd8bc1e251
[Improvement] (MG_ConfigLoader): Destroy map after init.
2026-02-21 22:30:50 +08:00
BZLZHH
22416cf2f0
[Docs] (README): Introduce environment variables.
2026-02-21 22:29:23 +08:00
BZLZHH
8bdf990810
[Fix] (MG_Test|MG_Bench): Fix compilation.
2026-02-21 22:25:59 +08:00
BZLZHH
9e90d9508b
[Feat] (Core): Add env config loader and refactor initialization entrypoints.
2026-02-21 22:08:55 +08:00
BZLZHH
7ccf858181
Merge branch 'Feat/Backend-Direct-Vulkan' of github.com:MobileGL-Dev/MobileGL into Feat/Backend-Direct-Vulkan
2026-02-21 20:55:18 +08:00
BZLZHH
3c66016489
[Refactor] (MG_Backend/DirectVulkan): Move renderpass/framebuffer vk management out of VulkanRenderer.
2026-02-21 20:53:33 +08:00
BZLZHH
d5940f40be
Merge branch 'Feat/Backend-Direct-Vulkan' of github.com:MobileGL-Dev/MobileGL into Feat/Backend-Direct-Vulkan
2026-02-21 19:53:02 +08:00
BZLZHH
033ba16aff
[Refactor] (MG_Backend/DirectVulkan): Decouple default render pass management from VulkanRenderer.
2026-02-21 19:50:26 +08:00
BZLZHH
d84b4da766
[Feat|Fix] (MG_Backend/DirectVulkan): Impl (Multi)DrawElementsBaseVertex. Fix Blitframebuffer.
2026-02-21 17:37:50 +08:00
BZLZHH
07b7f7eba5
[Feat] (MG_Backend/DirectVulkan): Add optional device extension. Impl MultiDrawElements.
2026-02-21 16:16:07 +08:00
BZLZHH
7f9953fdee
[Fix] (MG_Backend/DirectVulkan): Handle shader position transform.
2026-02-21 15:36:28 +08:00
BZLZHH
ccd51bf2d3
Merge branch 'dev' into Feat/Backend-Direct-Vulkan
2026-02-21 15:02:59 +08:00
BZLZHH
60f06d1b8d
[Improvement] (MG_Backend): Separate Initialize and InitCapabilities.
2026-02-20 15:26:46 +08:00
BZLZHH
e34f3d915c
[Fix] (MG_Impl/EGLImpl): Fix GetProcAddress.
2026-02-18 22:31:27 +08:00
BZLZHH
8413874e82
[Feat|Refactor] (MG_Backend|MG_Impl): Implement BackendObject, replacing previous methods.
2026-02-18 10:36:56 +08:00
BZLZHH
fe89dc82dc
[Chore] (clang-tidy): Update .clang-tidy
2026-02-18 10:35:29 +08:00
BZLZHH
5938a18131
[Chore] (Scripts): Upgrade clang-format
2026-02-18 10:35:04 +08:00
BZLZHH
c4e40c2eb2
[Chore] (format): Update .clang-format
2026-02-17 17:11:52 +08:00
BZLZHH
8bd6c9719f
Merge branch 'Feat/Backend-Direct-GLES' into dev
2026-02-16 18:32:52 +08:00
BZLZHH
1a91e48219
[Improvement] (MG_Backend/DirectVulkan): Do not crash when validation layers are unavailable.
2026-02-15 20:20:16 +08:00
BZLZHH
37f26d1bb1
[Misc] (gitignore): Ignore /build_*
2026-02-09 18:22:20 +08:00
BZLZHH
2abdebcd96
[Fix] (MG_Backend/DirectVulkan): Acquire next frame image only at the start of frame.
2026-02-08 18:56:25 +08:00
BZLZHH
e39af3b940
[Fix|Refactor] (MG_Backend/DirectVulkan): Fix incorrect vkAcquireNextImageKHR call. MOBILEGL_ASSERT_VK -> VK_VERIFY.
2026-02-08 16:28:12 +08:00
BZLZHH
3b2c2028b9
[Feat] (MG_Backend/DirectVulkan): Present frame in eglSwapBuffers.
2026-02-08 14:58:42 +08:00
BZLZHH
55020a1e86
[Improvement] (MG_Backend/DirectVulkan): Unify error handling.
2026-02-08 14:48:04 +08:00
BZLZHH
56c98041e3
[Misc] (MG_Backend/DirectVulkan): Prioritize MAILBOX/IMMEDIATE present modes.
2026-02-08 01:09:12 +08:00
BZLZHH
6eeb67f08b
Merge branch 'dev' into Feat/Backend-Direct-Vulkan
2026-02-07 12:32:16 +08:00
BZLZHH
155aaa0d4b
[Docs] (README): Improve accuracy.
2026-02-07 12:32:03 +08:00
BZLZHH
9a6cf7fc7f
Merge branch 'dev' into Feat/Backend-Direct-Vulkan
2026-02-07 11:41:11 +08:00
BZLZHH
aaeb2711ff
Merge branch 'Feat/Backend-Direct-GLES' into dev
2026-02-07 11:25:28 +08:00
BZLZHH
d4d0407a1c
[Fix] (MG_Backend/DirectGLES): Fix GetTexImage.
2026-02-06 21:42:07 +08:00
BZLZHH
eb3621cb3c
Revert "[Misc] (MG_Backend/DirectGLES): Handle GL_BGRA as GL_RGBA in ReadPixels and GetTexImage."
...
This reverts commit 2ad7e2da40 .
2026-02-06 20:48:01 +08:00
BZLZHH
2ad7e2da40
[Misc] (MG_Backend/DirectGLES): Handle GL_BGRA as GL_RGBA in ReadPixels and GetTexImage.
2026-02-06 20:21:10 +08:00
BZLZHH
a7d8e90600
[Feat] (MG_Backend/DirectGLES|MG_Impl): Initial implementions of GetTexImage and ReadPixels.
2026-02-06 20:14:18 +08:00
BZLZHH
e8f385820a
Merge branch 'Feat/Backend-Direct-GLES' into dev
2026-02-06 01:11:55 +08:00
BZLZHH
07927dc4a3
[Feat] (MG_Backend/DirectGLES): Sync indexed blend states.
2026-02-06 01:05:18 +08:00
BZLZHH
91eb75a95d
[Feat] (MG_Impl/RenderState): Implement Enablei, Disablei, BlendFuncSeparatei, IsEnabled, IsEnabledi.
2026-02-06 01:03:51 +08:00
BZLZHH
a109675f1f
[Feat] (MG_State/RenderState): Support indexed blend states.
2026-02-06 00:41:30 +08:00
BZLZHH
78f42b5cd0
Merge branch 'Feat/Backend-Direct-GLES' into dev
2026-02-05 22:00:49 +08:00
BZLZHH
68bdea41d2
[Fix] (*/Texture*): Correctly handle the format in CopyTexImage2D.
2026-02-05 21:50:14 +08:00
BZLZHH
00eb158196
[Feat] (MG_Util/Converters): Add ConvertInternalFormatToUnsized.
2026-02-05 18:06:26 +08:00
BZLZHH
3b27533793
[Fix] (MG_Backend/DirectGLES): Bind current texture in CopyTexImage2D.
2026-02-05 16:50:56 +08:00
BZLZHH
cd3936666d
[Fix] (MG_Backend/DirectGLES): Bind current read FBO in CopyTexImage2D.
2026-02-05 15:27:55 +08:00
BZLZHH
41c8850846
[Feat] (MG_Backend/DirectGLES): Try to handle CopyTex*Image2D for depth textures.
2026-02-05 15:16:10 +08:00
BZLZHH
8fe266e027
[Fix] (MG_Test/BufferObject): Migrate to the new API for dirty ranges.
2026-02-05 14:00:23 +08:00
BZLZHH
9af964de67
[Fix] (MG_Backend/DirectGLES): Remove the use of glVertexAttribFormat.
2026-02-05 13:30:30 +08:00
BZLZHH
9f4c9b61a0
[Fix] (MG_Backend/DirectGLES): Correctly sync attrib.Divisor when attrib.Buffer changes.
2026-02-05 12:54:22 +08:00
BZLZHH
7fd9eb15d3
Merge remote-tracking branch 'refs/remotes/origin/Feat/Backend-Direct-GLES' into Feat/Backend-Direct-GLES
2026-02-05 02:48:58 +08:00
BZLZHH
319806c48a
[Chore] (CMake): Support using check_c*_compiler_flag to detect LTO capability.
2026-02-05 00:55:42 +08:00
BZLZHH
07638b8577
[Fix] (MG_Backend/DirectGLES): Fix incorrect active texture unit when binding not dirty.
2026-02-04 17:51:56 +08:00
BZLZHH
74509ae0a3
[Perf] (MG_Backend/DirectGLES): No need to use shared_ptr for g_boundVertexBufferObject.
2026-02-03 21:07:14 +08:00
BZLZHH
f0ab82ea2a
[Fix] (MG_Backend/DirectGLES): Fix VBO binding state leakage.
2026-02-03 21:02:54 +08:00
BZLZHH
d251bd3a91
Merge remote-tracking branch 'origin/dev' into Feat/Backend-Direct-GLES
2026-02-03 20:35:06 +08:00
BZLZHH
5addbb3bdd
[Perf] (MG_Backend/DirectGLES): Add RenderState sync cache.
2026-02-03 18:42:05 +08:00
BZLZHH
8e3bbda2f2
[Fix] (MG_State/RenderState): Versioning for SetColorMask.
2026-02-03 18:24:26 +08:00
BZLZHH
eb4a81b55f
Merge remote-tracking branch 'refs/remotes/origin/Feat/Backend-Direct-GLES' into Feat/Backend-Direct-GLES
2026-02-03 17:51:19 +08:00
BZLZHH
ea098c0409
[Feat|Refactor] (MG_State/RenderState): Versioning for RenderStateParameters.
2026-02-03 17:50:46 +08:00
BZLZHH
fc9653f460
Merge remote-tracking branch 'refs/remotes/origin/Feat/Backend-Direct-GLES' into Feat/Backend-Direct-GLES
2026-02-03 17:30:47 +08:00
BZLZHH
afa89772e7
[Refactor] (MG_State/RenderState): Separate RenderStateParameters from RenderState.
2026-02-03 17:29:55 +08:00
BZLZHH
4db0fe58c0
Merge remote-tracking branch 'origin/Feat/Backend-Direct-GLES' into Feat/Backend-Direct-GLES
2026-02-03 16:44:21 +08:00
BZLZHH
5eff8b2e30
[Perf] (MG_Backend/DirectGLES): Add cache for Texture and Sampler binding.
2026-02-03 16:44:00 +08:00
BZLZHH
b966ef8b5e
[Chore] (CMake): DO not link static lib for Android.
2026-02-03 16:36:40 +08:00
BZLZHH
207b746273
[Perf] (MG_Backend/DirectGLES): Avoid redunant VBO binding.
2026-02-03 11:41:23 +08:00
BZLZHH
1143c961b6
[Perf] (MG_Backend/DirectGLES): Use glVertexAttribFormat to avoid redunant buffer binding.
2026-02-03 02:52:34 +08:00
BZLZHH
2fab6c5b0b
[Fix] (MG_Backend/DirectGLES): Always bind VBO before glVertexAttribPointer.
2026-02-03 02:38:50 +08:00
BZLZHH
42ad1634bf
[Perf] (MG_State|MG_Util): Do not bump resource version when nothing changes.
2026-02-03 02:17:09 +08:00
BZLZHH
8e897d54a2
[Perf] (MG_Backend/DirectGLES): Skip IBO binding for VA when not dirty.
2026-02-03 01:52:24 +08:00