diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-08-21 15:25:58 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-08-21 15:25:58 +0300 |
commit | 2e630297afc19ef4e69b8afe79dfd337171dbd60 (patch) | |
tree | efdf43fd4c7b7369462dd0b231ceac94fbb30e5a /source/blender/gpu/opengl/gl_shader.hh | |
parent | 3a6e981bcd579b3fda039ff33f95d4baacc96465 (diff) |
GPUShader: Fix linking working even if one shader compilation failed
Linking without valid shaders works on some drivers. Avoid this case by
forcing linking step to return false.
Diffstat (limited to 'source/blender/gpu/opengl/gl_shader.hh')
-rw-r--r-- | source/blender/gpu/opengl/gl_shader.hh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/gpu/opengl/gl_shader.hh b/source/blender/gpu/opengl/gl_shader.hh index 37119b8b093..a686014f4c5 100644 --- a/source/blender/gpu/opengl/gl_shader.hh +++ b/source/blender/gpu/opengl/gl_shader.hh @@ -39,10 +39,12 @@ class GLShader : public Shader { private: /** Handle for full program (links shader stages below). */ GLuint shader_program_ = 0; - + /** Individual shader stages. */ GLuint vert_shader_ = 0; GLuint geom_shader_ = 0; GLuint frag_shader_ = 0; + /** True if any shader failed to compile. */ + bool compilation_failed_ = false; eGPUShaderTFBType transform_feedback_type_ = GPU_SHADER_TFB_NONE; |