diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-01-25 20:48:40 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-01-25 20:48:58 +0300 |
commit | 2637f94358329e1a8fce59dd036c577459e5a847 (patch) | |
tree | b8a434b788565700694b4722e2f2a9cf6f2d5a41 /source/blender/draw/engines/eevee | |
parent | 3e2591c83ed6c4eb8adecfe06c976717f161cd23 (diff) |
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.
Diffstat (limited to 'source/blender/draw/engines/eevee')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_shaders.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_shaders.c b/source/blender/draw/engines/eevee/eevee_shaders.c index e56097df6b7..c4108969c99 100644 --- a/source/blender/draw/engines/eevee/eevee_shaders.c +++ b/source/blender/draw/engines/eevee/eevee_shaders.c @@ -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; } |