From 27cdfbc0cabef50a49f60abeb449f80e43f0ae97 Mon Sep 17 00:00:00 2001 From: BZLZHH Date: Sat, 1 Aug 2026 08:09:35 -0400 Subject: [PATCH] [Fix] (DirectVulkan): advertise GL_ARB_explicit_attrib_location unconditionally layout(location=N) out qualifiers are fully supported (glslang parses them, SPIR-V expresses them natively), but the extension string was never advertised. KHR-GL3{0,1,2}.draw_buffers.draw_buffers_1 builds its MRT fragment shader with per-attachment layout(location=i) outputs only when GL_ARB_explicit_attrib_location is reported or the context is >=3.3; below that it fell back to a single non-indexed `out vec4`, which only ever targets location 0, leaving every draw buffer past slot 0 unwritten. --- .../MG_Backend/DirectVulkan/BackendObject_DirectVulkan.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MobileGL/MG_Backend/DirectVulkan/BackendObject_DirectVulkan.cpp b/MobileGL/MG_Backend/DirectVulkan/BackendObject_DirectVulkan.cpp index 036faa43..33adfa4e 100644 --- a/MobileGL/MG_Backend/DirectVulkan/BackendObject_DirectVulkan.cpp +++ b/MobileGL/MG_Backend/DirectVulkan/BackendObject_DirectVulkan.cpp @@ -529,7 +529,8 @@ namespace MobileGL::MG_Backend::DirectVulkan { E_GL_ARB_texture_multisample, E_GL_ARB_clear_texture, E_GL_ARB_direct_state_access, E_GL_ARB_shader_draw_parameters, E_GL_ARB_gpu_shader_int64, E_GL_KHR_debug, E_GL_ARB_gpu_shader5, E_GL_ARB_multi_bind, E_GL_ARB_shading_language_420pack, - E_GL_ARB_vertex_attrib_binding, E_GL_ARB_shader_image_size}; + E_GL_ARB_vertex_attrib_binding, E_GL_ARB_shader_image_size, + E_GL_ARB_explicit_attrib_location}; if (shaderSubgroupSupported && !MG_Config::Features.DisableSubgroup) { extensions.push_back(E_GL_KHR_shader_subgroup); }