[Bf-blender-cvs] [e6fff42] master: OpenGL: set geometry shader input length implicitly
Mike Erwin
noreply at git.blender.org
Wed Nov 25 08:43:04 CET 2015
Commit: e6fff424dbcd02c3fed25036a7feb7f59d427843
Author: Mike Erwin
Date: Wed Nov 25 01:49:07 2015 -0500
Branches: master
https://developer.blender.org/rBe6fff424dbcd02c3fed25036a7feb7f59d427843
OpenGL: set geometry shader input length implicitly
Input array length is implicitly set at link time, based on the geometry
shader's layout. Specifying the wrong value here is an error; specifying
no value is the same as getting it right. (inspired by a recent codegen
change)
===================================================================
M intern/opensubdiv/gpu_shader_opensubd_display.glsl
M source/blender/gpu/shaders/gpu_shader_fx_dof_hq_geo.glsl
M source/blender/gpu/shaders/gpu_shader_geometry.glsl
===================================================================
diff --git a/intern/opensubdiv/gpu_shader_opensubd_display.glsl b/intern/opensubdiv/gpu_shader_opensubd_display.glsl
index d32a178..57bbfa8 100644
--- a/intern/opensubdiv/gpu_shader_opensubd_display.glsl
+++ b/intern/opensubdiv/gpu_shader_opensubd_display.glsl
@@ -81,7 +81,7 @@ uniform int osd_active_uv_offset;
in block {
VertexData v;
-} inpt[4];
+} inpt[];
#define INTERP_FACE_VARYING_2(result, fvarOffset, tessCoord) \
{ \
diff --git a/source/blender/gpu/shaders/gpu_shader_fx_dof_hq_geo.glsl b/source/blender/gpu/shaders/gpu_shader_fx_dof_hq_geo.glsl
index 5ca8159..4c650e7 100644
--- a/source/blender/gpu/shaders/gpu_shader_fx_dof_hq_geo.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_fx_dof_hq_geo.glsl
@@ -17,12 +17,12 @@ uniform sampler2D cocbuffer;
/* initial uv coordinate */
#if __VERSION__ < 130
- varying in vec2 uvcoord[1];
+ varying in vec2 uvcoord[];
varying out vec2 particlecoord;
varying out vec4 color;
#define textureLod texture2DLod
#else
- in vec2 uvcoord[1];
+ in vec2 uvcoord[];
out vec2 particlecoord;
out vec4 color;
#endif
diff --git a/source/blender/gpu/shaders/gpu_shader_geometry.glsl b/source/blender/gpu/shaders/gpu_shader_geometry.glsl
index 2e4d8f9..16fba0d 100644
--- a/source/blender/gpu/shaders/gpu_shader_geometry.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_geometry.glsl
@@ -8,7 +8,7 @@ uniform int osd_active_uv_offset;
in block {
VertexData v;
-} inpt[4];
+} inpt[];
/* compatibility */
out vec3 varnormal;
More information about the Bf-blender-cvs
mailing list