mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-09 04:38:30 +09:00
[Fix, Test] (ShaderTranspiler, DirectGLES): stop printing the default fragment-output colour index into ESSL
This commit is contained in:
@@ -5865,6 +5865,16 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
spvcSession.SetAtomicCounterBlockBindings(atomicCounterEsslBindingTop,
|
||||
outAtomicCounterGlBindings);
|
||||
|
||||
// `layout(index = 0)` is the GL default spelled out loud, and GLSL ES has no such
|
||||
// qualifier in core - a stage that prints it is refused with "index layout
|
||||
// qualifier requires EXT_blend_func_extended" and the whole program then draws
|
||||
// nothing. Drop the decoration when it carries the default; a REAL dual-source
|
||||
// index (1) is left alone, because that one genuinely needs the extension and the
|
||||
// driver has to see it. Fragment stage only: no other stage can carry it.
|
||||
if (glShaderType == GL_FRAGMENT_SHADER) {
|
||||
spvcSession.DropDefaultFragmentOutputColorIndex();
|
||||
}
|
||||
|
||||
const char* result = nullptr;
|
||||
spvcSession.Compile(&result);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user