diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-08-06 02:09:07 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-08-06 02:09:07 +0300 |
commit | 89edddb26c813478de9f7df9efd52b2e2ca8f6e7 (patch) | |
tree | 04582d5835451b73e53239dee5e96853d1f6b607 /source | |
parent | 868d3605ee336895dffb2e80bc92d56a1c035719 (diff) |
Fix T45691 crash on material view
Call glProgramUniform1i only when OpenSubdiv is requested and only when
the GPU supports it.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/gpu/intern/gpu_extensions.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index 17d2b64d7b1..c6bee77f451 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -1850,7 +1850,7 @@ GPUShader *GPU_shader_create(const char *vertexcode, const char *fragcode, const #ifdef WITH_OPENSUBDIV /* TODO(sergey): Find a better place for this. */ - { + if (use_opensubdiv && GLEW_VERSION_4_1) { glProgramUniform1i(shader->object, glGetUniformLocation(shader->object, "FVarDataBuffer"), 31); /* GL_TEXTURE31 */ |