From 1fa3bd6148e9909527cf0882b201147fa819d835 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 16 Sep 2015 22:38:46 +0500 Subject: Fix T46128: High Quality DoF broken The issue was caused by some special tricks needed to compile OpenSubdiv shader which was using stupid check whether geometry shader is used or not. Now made it more explicit call whether special OpenSubdiv trickery is needed or not. Its not ideal solution, but it's not really easy to do a proper solution for this, because while we can do half of the work with if-defs in the shader code but we'll still need to somewhat define layout of the input blocks which isn't really doable with current shader version we're using. --- source/blender/gpu/GPU_extensions.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source/blender/gpu/GPU_extensions.h') diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h index f3927ba960b..0e8d204d224 100644 --- a/source/blender/gpu/GPU_extensions.h +++ b/source/blender/gpu/GPU_extensions.h @@ -204,6 +204,19 @@ void GPU_program_unbind(GPUProgram *); * - must call texture bind before setting a texture as uniform! */ GPUShader *GPU_shader_create(const char *vertexcode, const char *fragcode, const char *geocode, const char *libcode, const char *defines, int input, int output, int number); +enum { + GPU_SHADER_FLAGS_NONE = 0, + GPU_SHADER_FLAGS_SPECIAL_OPENSUBDIV = (1 << 0), +}; +GPUShader *GPU_shader_create_ex(const char *vertexcode, + const char *fragcode, + const char *geocode, + const char *libcode, + const char *defines, + int input, + int output, + int number, + const int flags); void GPU_shader_free(GPUShader *shader); void GPU_shader_bind(GPUShader *shader); -- cgit v1.2.3