GLShader: Fix buffer overflow caused by workaround uniform

In order to use a workaround builtin uniform, we need to count it
just like other uniforms and give it some space in the name buffer.

This also fixes extensions being added after the uniform declaration.
All `#extension` directives are now part of the gl backend.
This commit is contained in:
2022-01-25 18:48:40 +01:00
parent 3e2591c83e
commit 2637f94358
6 changed files with 38 additions and 18 deletions

View File

@@ -887,10 +887,7 @@ struct GPUShader *EEVEE_shaders_volumes_integration_sh_get()
datatoc_volumetric_geom_glsl,
datatoc_volumetric_integration_frag_glsl,
e_data.lib,
USE_VOLUME_OPTI ? "#extension GL_ARB_shader_image_load_store: enable\n"
"#extension GL_ARB_shading_language_420pack: enable\n"
"#define USE_VOLUME_OPTI\n" SHADER_DEFINES :
SHADER_DEFINES);
USE_VOLUME_OPTI ? "#define USE_VOLUME_OPTI\n" SHADER_DEFINES : SHADER_DEFINES);
}
return e_data.volumetric_integration_sh;
}