Erro GPUShader (Too many geometry shader invocations) #71955

Closed
opened 2019-11-27 02:20:27 +01:00 by Daniel · 4 comments

System Information
macOS - High Sierra (10.13.6)
Operating system: Darwin-17.7.0-x86_64-i386-64bit 64 Bits
Graphics card: Intel HD Graphics 3000 OpenGL Engine Intel Inc. 3.3 INTEL-10.4.14

Blender Version
Broken: version: 2.82 (sub 1), branch: master, commit date: 2019-11-26 05:28, hash: 75e85f1c9f

Short description of error
I noticed that in version 2.8 runs perfect.
But in final version 2.81 and version 2.82 (Alpha),
my initial viewport just a cube in the scene
great slowness occurs for navigation and rotation etc.

--debug

GPUShader: linking error:
===== shader string 1 ====
 1  #define COMMON_VIEW_LIB
 2  #define DRW_RESOURCE_CHUNK_LEN 512
 3  
 4  /* keep in sync with DRWManager.view_data */
 5  layout(std140) uniform viewBlock
 6  {
 7    /* Same order as DRWViewportMatrixType */
 8    mat4 ViewProjectionMatrix;
 9    mat4 ViewProjectionMatrixInverse;
10    mat4 ViewMatrix;
11    mat4 ViewMatrixInverse;
12    mat4 ProjectionMatrix;
13    mat4 ProjectionMatrixInverse;
14  
15    vec4 clipPlanes[6];
16  
17    /* TODO move it elsewhere. */
18    vec4 CameraTexCoFactors;
19  };
20  
21  #ifdef world_clip_planes_calc_clip_distance
22  #  undef world_clip_planes_calc_clip_distance
23  #  define world_clip_planes_calc_clip_distance(p) \
24      _world_clip_planes_calc_clip_distance(p, clipPlanes)
25  #endif
26  
27  uniform int resourceChunk;
28  
29  #ifdef GPU_VERTEX_SHADER
30  #  ifdef GL_ARB_shader_draw_parameters
31  #    define baseInstance gl_BaseInstanceARB
32  #  else /* no ARB_shader_draw_parameters */
33  uniform int baseInstance;
34  #  endif
35  
36  #  ifdef IN_PLACE_INSTANCES
37  /* When drawing instances of an object at the same position. */
38  #    define instanceId 0
39  #  elif defined(GPU_DEPRECATED_AMD_DRIVER)
40  /* A driver bug make it so that when using an attribute with GL_INT_2_10_10_10_REV as format,
41   * the gl_InstanceID is incremented by the 2 bit component of the attrib.
42   * Ignore gl_InstanceID then. */
43  #    define instanceId 0
44  #  else
45  #    define instanceId gl_InstanceID
46  #  endif
47  
48  #  define resource_id (baseInstance + instanceId)
49  
50  /* Use this to declare and pass the value if
51   * the fragment shader uses the resource_id. */
52  #  define RESOURCE_ID_VARYING flat out int resourceIDFrag;
53  #  define RESOURCE_ID_VARYING_GEOM flat out int resourceIDGeom;
54  #  define PASS_RESOURCE_ID resourceIDFrag = resource_id;
55  #  define PASS_RESOURCE_ID_GEOM resourceIDGeom = resource_id;
56  #endif
57  
58  /* If used in a fragment / geometry shader, we pass
59   * resource_id as varying. */
60  #ifdef GPU_GEOMETRY_SHADER
61  #  define RESOURCE_ID_VARYING \
62      flat out int resourceIDFrag; \
63      flat in int resourceIDGeom[];
64  
65  #  define resource_id resourceIDGeom
66  #  define PASS_RESOURCE_ID(i) resourceIDFrag = resource_id[i];
67  #endif
68  
69  #ifdef GPU_FRAGMENT_SHADER
70  flat in int resourceIDFrag;
71  #  define resource_id resourceIDFrag
72  #endif
73  
74  #if !defined(GPU_INTEL) && !defined(GPU_DEPRECATED_AMD_DRIVER) && !defined(OS_MAC)
75  struct ObjectMatrices {
76    mat4 drw_modelMatrix;
77    mat4 drw_modelMatrixInverse;
78  };
79  
80  layout(std140) uniform modelBlock
81  {
82    ObjectMatrices drw_matrices[DRW_RESOURCE_CHUNK_LEN];
83  };
84  
85  #  define ModelMatrix (drw_matrices[resource_id].drw_modelMatrix)
86  #  define ModelMatrixInverse (drw_matrices[resource_id].drw_modelMatrixInverse)
87  
88  #else /* GPU_INTEL */
89  /* Intel GPU seems to suffer performance impact when the model matrix is in UBO storage.
90   * So for now we just force using the legacy path. */
91  /* Note that this is also a workaround of a problem on osx (amd or nvidia)
92   * and older amd driver on windows. */
93  uniform mat4 ModelMatrix;
94  uniform mat4 ModelMatrixInverse;
95  #endif
96  
97  #define resource_handle (resourceChunk * DRW_RESOURCE_CHUNK_LEN + resource_id)
98  
99  /** Transform shortcuts. */
100  /* Rule of thumb: Try to reuse world positions and normals because converting though viewspace
101   * will always be decomposed in at least 2 matrix operation. */
102  
103  /**
104   * Some clarification:
105   * Usually Normal matrix is transpose(inverse(ViewMatrix * ModelMatrix))
106   *
107   * But since it is slow to multiply matrices we decompose it. Decomposing
108   * inversion and transposition both invert the product order leaving us with
109   * the same original order:
110   * transpose(ViewMatrixInverse) * transpose(ModelMatrixInverse)
111   *
112   * Knowing that the view matrix is orthogonal, the transpose is also the inverse.
113   * Note: This is only valid because we are only using the mat3 of the ViewMatrixInverse.
114   * ViewMatrix * transpose(ModelMatrixInverse)
115   **/
116  #define normal_object_to_view(n) (mat3(ViewMatrix) * (transpose(mat3(ModelMatrixInverse)) * n))
117  #define normal_object_to_world(n) (transpose(mat3(ModelMatrixInverse)) * n)
118  #define normal_world_to_object(n) (transpose(mat3(ModelMatrix)) * n)
119  #define normal_world_to_view(n) (mat3(ViewMatrix) * n)
120  
121  #define point_object_to_ndc(p) (ViewProjectionMatrix * vec4((ModelMatrix * vec4(p, 1.0)).xyz, 1.0))
122  #define point_object_to_view(p) ((ViewMatrix * vec4((ModelMatrix * vec4(p, 1.0)).xyz, 1.0)).xyz)
123  #define point_object_to_world(p) ((ModelMatrix * vec4(p, 1.0)).xyz)
124  #define point_view_to_ndc(p) (ProjectionMatrix * vec4(p, 1.0))
125  #define point_view_to_object(p) ((ModelMatrixInverse * (ViewMatrixInverse * vec4(p, 1.0))).xyz)
126  #define point_view_to_world(p) ((ViewMatrixInverse * vec4(p, 1.0)).xyz)
127  #define point_world_to_ndc(p) (ViewProjectionMatrix * vec4(p, 1.0))
128  #define point_world_to_object(p) ((ModelMatrixInverse * vec4(p, 1.0)).xyz)
129  #define point_world_to_view(p) ((ViewMatrix * vec4(p, 1.0)).xyz)
130  
131  /* Due to some shader compiler bug, we somewhat need to access gl_VertexID
132   * to make vertex shaders work. even if it's actually dead code. */
133  #ifdef GPU_INTEL
134  #  define GPU_INTEL_VERTEX_SHADER_WORKAROUND gl_Position.x = float(gl_VertexID);
135  #else
136  #  define GPU_INTEL_VERTEX_SHADER_WORKAROUND
137  #endif
138  #define INFINITE 1000.0
139  
140  uniform vec3 lightDirection = vec3(0.57, 0.57, -0.57);
141  uniform float lightDistance = 1e4;
142  
143  in vec3 pos;
144  
145  out VertexData
146  {
147    vec3 pos;           /* local position */
148    vec4 frontPosition; /* final ndc position */
149    vec4 backPosition;
150  }
151  vData;
152  
153  void main()
154  {
155    vData.pos = pos;
156    vData.frontPosition = point_object_to_ndc(pos);
157    vData.backPosition = point_object_to_ndc(pos + lightDirection * lightDistance);
158  }
ERROR: Too many geometry shader invocations
GPUShader: linking error:
===== shader string 1 ====
 1  #define COMMON_VIEW_LIB
 2  #define DRW_RESOURCE_CHUNK_LEN 512
 3  
 4  /* keep in sync with DRWManager.view_data */
 5  layout(std140) uniform viewBlock
 6  {
 7    /* Same order as DRWViewportMatrixType */
 8    mat4 ViewProjectionMatrix;
 9    mat4 ViewProjectionMatrixInverse;
10    mat4 ViewMatrix;
11    mat4 ViewMatrixInverse;
12    mat4 ProjectionMatrix;
13    mat4 ProjectionMatrixInverse;
14  
15    vec4 clipPlanes[6];
16  
17    /* TODO move it elsewhere. */
18    vec4 CameraTexCoFactors;
19  };
20  
21  #ifdef world_clip_planes_calc_clip_distance
22  #  undef world_clip_planes_calc_clip_distance
23  #  define world_clip_planes_calc_clip_distance(p) \
24      _world_clip_planes_calc_clip_distance(p, clipPlanes)
25  #endif
26  
27  uniform int resourceChunk;
28  
29  #ifdef GPU_VERTEX_SHADER
30  #  ifdef GL_ARB_shader_draw_parameters
31  #    define baseInstance gl_BaseInstanceARB
32  #  else /* no ARB_shader_draw_parameters */
33  uniform int baseInstance;
34  #  endif
35  
36  #  ifdef IN_PLACE_INSTANCES
37  /* When drawing instances of an object at the same position. */
38  #    define instanceId 0
39  #  elif defined(GPU_DEPRECATED_AMD_DRIVER)
40  /* A driver bug make it so that when using an attribute with GL_INT_2_10_10_10_REV as format,
41   * the gl_InstanceID is incremented by the 2 bit component of the attrib.
42   * Ignore gl_InstanceID then. */
43  #    define instanceId 0
44  #  else
45  #    define instanceId gl_InstanceID
46  #  endif
47  
48  #  define resource_id (baseInstance + instanceId)
49  
50  /* Use this to declare and pass the value if
51   * the fragment shader uses the resource_id. */
52  #  define RESOURCE_ID_VARYING flat out int resourceIDFrag;
53  #  define RESOURCE_ID_VARYING_GEOM flat out int resourceIDGeom;
54  #  define PASS_RESOURCE_ID resourceIDFrag = resource_id;
55  #  define PASS_RESOURCE_ID_GEOM resourceIDGeom = resource_id;
56  #endif
57  
58  /* If used in a fragment / geometry shader, we pass
59   * resource_id as varying. */
60  #ifdef GPU_GEOMETRY_SHADER
61  #  define RESOURCE_ID_VARYING \
62      flat out int resourceIDFrag; \
63      flat in int resourceIDGeom[];
64  
65  #  define resource_id resourceIDGeom
66  #  define PASS_RESOURCE_ID(i) resourceIDFrag = resource_id[i];
67  #endif
68  
69  #ifdef GPU_FRAGMENT_SHADER
70  flat in int resourceIDFrag;
71  #  define resource_id resourceIDFrag
72  #endif
73  
74  #if !defined(GPU_INTEL) && !defined(GPU_DEPRECATED_AMD_DRIVER) && !defined(OS_MAC)
75  struct ObjectMatrices {
76    mat4 drw_modelMatrix;
77    mat4 drw_modelMatrixInverse;
78  };
79  
80  layout(std140) uniform modelBlock
81  {
82    ObjectMatrices drw_matrices[DRW_RESOURCE_CHUNK_LEN];
83  };
84  
85  #  define ModelMatrix (drw_matrices[resource_id].drw_modelMatrix)
86  #  define ModelMatrixInverse (drw_matrices[resource_id].drw_modelMatrixInverse)
87  
88  #else /* GPU_INTEL */
89  /* Intel GPU seems to suffer performance impact when the model matrix is in UBO storage.
90   * So for now we just force using the legacy path. */
91  /* Note that this is also a workaround of a problem on osx (amd or nvidia)
92   * and older amd driver on windows. */
93  uniform mat4 ModelMatrix;
94  uniform mat4 ModelMatrixInverse;
95  #endif
96  
97  #define resource_handle (resourceChunk * DRW_RESOURCE_CHUNK_LEN + resource_id)
98  
99  /** Transform shortcuts. */
100  /* Rule of thumb: Try to reuse world positions and normals because converting though viewspace
101   * will always be decomposed in at least 2 matrix operation. */
102  
103  /**
104   * Some clarification:
105   * Usually Normal matrix is transpose(inverse(ViewMatrix * ModelMatrix))
106   *
107   * But since it is slow to multiply matrices we decompose it. Decomposing
108   * inversion and transposition both invert the product order leaving us with
109   * the same original order:
110   * transpose(ViewMatrixInverse) * transpose(ModelMatrixInverse)
111   *
112   * Knowing that the view matrix is orthogonal, the transpose is also the inverse.
113   * Note: This is only valid because we are only using the mat3 of the ViewMatrixInverse.
114   * ViewMatrix * transpose(ModelMatrixInverse)
115   **/
116  #define normal_object_to_view(n) (mat3(ViewMatrix) * (transpose(mat3(ModelMatrixInverse)) * n))
117  #define normal_object_to_world(n) (transpose(mat3(ModelMatrixInverse)) * n)
118  #define normal_world_to_object(n) (transpose(mat3(ModelMatrix)) * n)
119  #define normal_world_to_view(n) (mat3(ViewMatrix) * n)
120  
121  #define point_object_to_ndc(p) (ViewProjectionMatrix * vec4((ModelMatrix * vec4(p, 1.0)).xyz, 1.0))
122  #define point_object_to_view(p) ((ViewMatrix * vec4((ModelMatrix * vec4(p, 1.0)).xyz, 1.0)).xyz)
123  #define point_object_to_world(p) ((ModelMatrix * vec4(p, 1.0)).xyz)
124  #define point_view_to_ndc(p) (ProjectionMatrix * vec4(p, 1.0))
125  #define point_view_to_object(p) ((ModelMatrixInverse * (ViewMatrixInverse * vec4(p, 1.0))).xyz)
126  #define point_view_to_world(p) ((ViewMatrixInverse * vec4(p, 1.0)).xyz)
127  #define point_world_to_ndc(p) (ViewProjectionMatrix * vec4(p, 1.0))
128  #define point_world_to_object(p) ((ModelMatrixInverse * vec4(p, 1.0)).xyz)
129  #define point_world_to_view(p) ((ViewMatrix * vec4(p, 1.0)).xyz)
130  
131  /* Due to some shader compiler bug, we somewhat need to access gl_VertexID
132   * to make vertex shaders work. even if it's actually dead code. */
133  #ifdef GPU_INTEL
134  #  define GPU_INTEL_VERTEX_SHADER_WORKAROUND gl_Position.x = float(gl_VertexID);
135  #else
136  #  define GPU_INTEL_VERTEX_SHADER_WORKAROUND
137  #endif
138  #define INFINITE 1000.0
139  
140  uniform vec3 lightDirection = vec3(0.57, 0.57, -0.57);
141  uniform float lightDistance = 1e4;
142  
143  in vec3 pos;
144  
145  out VertexData
146  {
147    vec3 pos;           /* local position */
148    vec4 frontPosition; /* final ndc position */
149    vec4 backPosition;
150  }
151  vData;
152  
153  void main()
154  {
155    vData.pos = pos;
156    vData.frontPosition = point_object_to_ndc(pos);
157    vData.backPosition = point_object_to_ndc(pos + lightDirection * lightDistance);
158  }
ERROR: Too many geometry shader invocations

GPUShader: linking error:
===== shader string 1 ====
 1  
 2  void main()
 3  {
 4    // no color output, only depth (line below is implicit)
 5    // gl_FragDepth = gl_FragCoord.z;
 6  }
ERROR: Too many geometry shader invocations

**System Information** macOS - High Sierra (10.13.6) Operating system: Darwin-17.7.0-x86_64-i386-64bit 64 Bits Graphics card: Intel HD Graphics 3000 OpenGL Engine Intel Inc. 3.3 INTEL-10.4.14 **Blender Version** Broken: version: 2.82 (sub 1), branch: master, commit date: 2019-11-26 05:28, hash: `75e85f1c9f` **Short description of error** I noticed that in version 2.8 runs perfect. But in final version 2.81 and version 2.82 (Alpha), my initial viewport just a cube in the scene great slowness occurs for navigation and rotation etc. **--debug** ``` GPUShader: linking error: ===== shader string 1 ==== 1 #define COMMON_VIEW_LIB 2 #define DRW_RESOURCE_CHUNK_LEN 512 3 4 /* keep in sync with DRWManager.view_data */ 5 layout(std140) uniform viewBlock 6 { 7 /* Same order as DRWViewportMatrixType */ 8 mat4 ViewProjectionMatrix; 9 mat4 ViewProjectionMatrixInverse; 10 mat4 ViewMatrix; 11 mat4 ViewMatrixInverse; 12 mat4 ProjectionMatrix; 13 mat4 ProjectionMatrixInverse; 14 15 vec4 clipPlanes[6]; 16 17 /* TODO move it elsewhere. */ 18 vec4 CameraTexCoFactors; 19 }; 20 21 #ifdef world_clip_planes_calc_clip_distance 22 # undef world_clip_planes_calc_clip_distance 23 # define world_clip_planes_calc_clip_distance(p) \ 24 _world_clip_planes_calc_clip_distance(p, clipPlanes) 25 #endif 26 27 uniform int resourceChunk; 28 29 #ifdef GPU_VERTEX_SHADER 30 # ifdef GL_ARB_shader_draw_parameters 31 # define baseInstance gl_BaseInstanceARB 32 # else /* no ARB_shader_draw_parameters */ 33 uniform int baseInstance; 34 # endif 35 36 # ifdef IN_PLACE_INSTANCES 37 /* When drawing instances of an object at the same position. */ 38 # define instanceId 0 39 # elif defined(GPU_DEPRECATED_AMD_DRIVER) 40 /* A driver bug make it so that when using an attribute with GL_INT_2_10_10_10_REV as format, 41 * the gl_InstanceID is incremented by the 2 bit component of the attrib. 42 * Ignore gl_InstanceID then. */ 43 # define instanceId 0 44 # else 45 # define instanceId gl_InstanceID 46 # endif 47 48 # define resource_id (baseInstance + instanceId) 49 50 /* Use this to declare and pass the value if 51 * the fragment shader uses the resource_id. */ 52 # define RESOURCE_ID_VARYING flat out int resourceIDFrag; 53 # define RESOURCE_ID_VARYING_GEOM flat out int resourceIDGeom; 54 # define PASS_RESOURCE_ID resourceIDFrag = resource_id; 55 # define PASS_RESOURCE_ID_GEOM resourceIDGeom = resource_id; 56 #endif 57 58 /* If used in a fragment / geometry shader, we pass 59 * resource_id as varying. */ 60 #ifdef GPU_GEOMETRY_SHADER 61 # define RESOURCE_ID_VARYING \ 62 flat out int resourceIDFrag; \ 63 flat in int resourceIDGeom[]; 64 65 # define resource_id resourceIDGeom 66 # define PASS_RESOURCE_ID(i) resourceIDFrag = resource_id[i]; 67 #endif 68 69 #ifdef GPU_FRAGMENT_SHADER 70 flat in int resourceIDFrag; 71 # define resource_id resourceIDFrag 72 #endif 73 74 #if !defined(GPU_INTEL) && !defined(GPU_DEPRECATED_AMD_DRIVER) && !defined(OS_MAC) 75 struct ObjectMatrices { 76 mat4 drw_modelMatrix; 77 mat4 drw_modelMatrixInverse; 78 }; 79 80 layout(std140) uniform modelBlock 81 { 82 ObjectMatrices drw_matrices[DRW_RESOURCE_CHUNK_LEN]; 83 }; 84 85 # define ModelMatrix (drw_matrices[resource_id].drw_modelMatrix) 86 # define ModelMatrixInverse (drw_matrices[resource_id].drw_modelMatrixInverse) 87 88 #else /* GPU_INTEL */ 89 /* Intel GPU seems to suffer performance impact when the model matrix is in UBO storage. 90 * So for now we just force using the legacy path. */ 91 /* Note that this is also a workaround of a problem on osx (amd or nvidia) 92 * and older amd driver on windows. */ 93 uniform mat4 ModelMatrix; 94 uniform mat4 ModelMatrixInverse; 95 #endif 96 97 #define resource_handle (resourceChunk * DRW_RESOURCE_CHUNK_LEN + resource_id) 98 99 /** Transform shortcuts. */ 100 /* Rule of thumb: Try to reuse world positions and normals because converting though viewspace 101 * will always be decomposed in at least 2 matrix operation. */ 102 103 /** 104 * Some clarification: 105 * Usually Normal matrix is transpose(inverse(ViewMatrix * ModelMatrix)) 106 * 107 * But since it is slow to multiply matrices we decompose it. Decomposing 108 * inversion and transposition both invert the product order leaving us with 109 * the same original order: 110 * transpose(ViewMatrixInverse) * transpose(ModelMatrixInverse) 111 * 112 * Knowing that the view matrix is orthogonal, the transpose is also the inverse. 113 * Note: This is only valid because we are only using the mat3 of the ViewMatrixInverse. 114 * ViewMatrix * transpose(ModelMatrixInverse) 115 **/ 116 #define normal_object_to_view(n) (mat3(ViewMatrix) * (transpose(mat3(ModelMatrixInverse)) * n)) 117 #define normal_object_to_world(n) (transpose(mat3(ModelMatrixInverse)) * n) 118 #define normal_world_to_object(n) (transpose(mat3(ModelMatrix)) * n) 119 #define normal_world_to_view(n) (mat3(ViewMatrix) * n) 120 121 #define point_object_to_ndc(p) (ViewProjectionMatrix * vec4((ModelMatrix * vec4(p, 1.0)).xyz, 1.0)) 122 #define point_object_to_view(p) ((ViewMatrix * vec4((ModelMatrix * vec4(p, 1.0)).xyz, 1.0)).xyz) 123 #define point_object_to_world(p) ((ModelMatrix * vec4(p, 1.0)).xyz) 124 #define point_view_to_ndc(p) (ProjectionMatrix * vec4(p, 1.0)) 125 #define point_view_to_object(p) ((ModelMatrixInverse * (ViewMatrixInverse * vec4(p, 1.0))).xyz) 126 #define point_view_to_world(p) ((ViewMatrixInverse * vec4(p, 1.0)).xyz) 127 #define point_world_to_ndc(p) (ViewProjectionMatrix * vec4(p, 1.0)) 128 #define point_world_to_object(p) ((ModelMatrixInverse * vec4(p, 1.0)).xyz) 129 #define point_world_to_view(p) ((ViewMatrix * vec4(p, 1.0)).xyz) 130 131 /* Due to some shader compiler bug, we somewhat need to access gl_VertexID 132 * to make vertex shaders work. even if it's actually dead code. */ 133 #ifdef GPU_INTEL 134 # define GPU_INTEL_VERTEX_SHADER_WORKAROUND gl_Position.x = float(gl_VertexID); 135 #else 136 # define GPU_INTEL_VERTEX_SHADER_WORKAROUND 137 #endif 138 #define INFINITE 1000.0 139 140 uniform vec3 lightDirection = vec3(0.57, 0.57, -0.57); 141 uniform float lightDistance = 1e4; 142 143 in vec3 pos; 144 145 out VertexData 146 { 147 vec3 pos; /* local position */ 148 vec4 frontPosition; /* final ndc position */ 149 vec4 backPosition; 150 } 151 vData; 152 153 void main() 154 { 155 vData.pos = pos; 156 vData.frontPosition = point_object_to_ndc(pos); 157 vData.backPosition = point_object_to_ndc(pos + lightDirection * lightDistance); 158 } ERROR: Too many geometry shader invocations GPUShader: linking error: ===== shader string 1 ==== 1 #define COMMON_VIEW_LIB 2 #define DRW_RESOURCE_CHUNK_LEN 512 3 4 /* keep in sync with DRWManager.view_data */ 5 layout(std140) uniform viewBlock 6 { 7 /* Same order as DRWViewportMatrixType */ 8 mat4 ViewProjectionMatrix; 9 mat4 ViewProjectionMatrixInverse; 10 mat4 ViewMatrix; 11 mat4 ViewMatrixInverse; 12 mat4 ProjectionMatrix; 13 mat4 ProjectionMatrixInverse; 14 15 vec4 clipPlanes[6]; 16 17 /* TODO move it elsewhere. */ 18 vec4 CameraTexCoFactors; 19 }; 20 21 #ifdef world_clip_planes_calc_clip_distance 22 # undef world_clip_planes_calc_clip_distance 23 # define world_clip_planes_calc_clip_distance(p) \ 24 _world_clip_planes_calc_clip_distance(p, clipPlanes) 25 #endif 26 27 uniform int resourceChunk; 28 29 #ifdef GPU_VERTEX_SHADER 30 # ifdef GL_ARB_shader_draw_parameters 31 # define baseInstance gl_BaseInstanceARB 32 # else /* no ARB_shader_draw_parameters */ 33 uniform int baseInstance; 34 # endif 35 36 # ifdef IN_PLACE_INSTANCES 37 /* When drawing instances of an object at the same position. */ 38 # define instanceId 0 39 # elif defined(GPU_DEPRECATED_AMD_DRIVER) 40 /* A driver bug make it so that when using an attribute with GL_INT_2_10_10_10_REV as format, 41 * the gl_InstanceID is incremented by the 2 bit component of the attrib. 42 * Ignore gl_InstanceID then. */ 43 # define instanceId 0 44 # else 45 # define instanceId gl_InstanceID 46 # endif 47 48 # define resource_id (baseInstance + instanceId) 49 50 /* Use this to declare and pass the value if 51 * the fragment shader uses the resource_id. */ 52 # define RESOURCE_ID_VARYING flat out int resourceIDFrag; 53 # define RESOURCE_ID_VARYING_GEOM flat out int resourceIDGeom; 54 # define PASS_RESOURCE_ID resourceIDFrag = resource_id; 55 # define PASS_RESOURCE_ID_GEOM resourceIDGeom = resource_id; 56 #endif 57 58 /* If used in a fragment / geometry shader, we pass 59 * resource_id as varying. */ 60 #ifdef GPU_GEOMETRY_SHADER 61 # define RESOURCE_ID_VARYING \ 62 flat out int resourceIDFrag; \ 63 flat in int resourceIDGeom[]; 64 65 # define resource_id resourceIDGeom 66 # define PASS_RESOURCE_ID(i) resourceIDFrag = resource_id[i]; 67 #endif 68 69 #ifdef GPU_FRAGMENT_SHADER 70 flat in int resourceIDFrag; 71 # define resource_id resourceIDFrag 72 #endif 73 74 #if !defined(GPU_INTEL) && !defined(GPU_DEPRECATED_AMD_DRIVER) && !defined(OS_MAC) 75 struct ObjectMatrices { 76 mat4 drw_modelMatrix; 77 mat4 drw_modelMatrixInverse; 78 }; 79 80 layout(std140) uniform modelBlock 81 { 82 ObjectMatrices drw_matrices[DRW_RESOURCE_CHUNK_LEN]; 83 }; 84 85 # define ModelMatrix (drw_matrices[resource_id].drw_modelMatrix) 86 # define ModelMatrixInverse (drw_matrices[resource_id].drw_modelMatrixInverse) 87 88 #else /* GPU_INTEL */ 89 /* Intel GPU seems to suffer performance impact when the model matrix is in UBO storage. 90 * So for now we just force using the legacy path. */ 91 /* Note that this is also a workaround of a problem on osx (amd or nvidia) 92 * and older amd driver on windows. */ 93 uniform mat4 ModelMatrix; 94 uniform mat4 ModelMatrixInverse; 95 #endif 96 97 #define resource_handle (resourceChunk * DRW_RESOURCE_CHUNK_LEN + resource_id) 98 99 /** Transform shortcuts. */ 100 /* Rule of thumb: Try to reuse world positions and normals because converting though viewspace 101 * will always be decomposed in at least 2 matrix operation. */ 102 103 /** 104 * Some clarification: 105 * Usually Normal matrix is transpose(inverse(ViewMatrix * ModelMatrix)) 106 * 107 * But since it is slow to multiply matrices we decompose it. Decomposing 108 * inversion and transposition both invert the product order leaving us with 109 * the same original order: 110 * transpose(ViewMatrixInverse) * transpose(ModelMatrixInverse) 111 * 112 * Knowing that the view matrix is orthogonal, the transpose is also the inverse. 113 * Note: This is only valid because we are only using the mat3 of the ViewMatrixInverse. 114 * ViewMatrix * transpose(ModelMatrixInverse) 115 **/ 116 #define normal_object_to_view(n) (mat3(ViewMatrix) * (transpose(mat3(ModelMatrixInverse)) * n)) 117 #define normal_object_to_world(n) (transpose(mat3(ModelMatrixInverse)) * n) 118 #define normal_world_to_object(n) (transpose(mat3(ModelMatrix)) * n) 119 #define normal_world_to_view(n) (mat3(ViewMatrix) * n) 120 121 #define point_object_to_ndc(p) (ViewProjectionMatrix * vec4((ModelMatrix * vec4(p, 1.0)).xyz, 1.0)) 122 #define point_object_to_view(p) ((ViewMatrix * vec4((ModelMatrix * vec4(p, 1.0)).xyz, 1.0)).xyz) 123 #define point_object_to_world(p) ((ModelMatrix * vec4(p, 1.0)).xyz) 124 #define point_view_to_ndc(p) (ProjectionMatrix * vec4(p, 1.0)) 125 #define point_view_to_object(p) ((ModelMatrixInverse * (ViewMatrixInverse * vec4(p, 1.0))).xyz) 126 #define point_view_to_world(p) ((ViewMatrixInverse * vec4(p, 1.0)).xyz) 127 #define point_world_to_ndc(p) (ViewProjectionMatrix * vec4(p, 1.0)) 128 #define point_world_to_object(p) ((ModelMatrixInverse * vec4(p, 1.0)).xyz) 129 #define point_world_to_view(p) ((ViewMatrix * vec4(p, 1.0)).xyz) 130 131 /* Due to some shader compiler bug, we somewhat need to access gl_VertexID 132 * to make vertex shaders work. even if it's actually dead code. */ 133 #ifdef GPU_INTEL 134 # define GPU_INTEL_VERTEX_SHADER_WORKAROUND gl_Position.x = float(gl_VertexID); 135 #else 136 # define GPU_INTEL_VERTEX_SHADER_WORKAROUND 137 #endif 138 #define INFINITE 1000.0 139 140 uniform vec3 lightDirection = vec3(0.57, 0.57, -0.57); 141 uniform float lightDistance = 1e4; 142 143 in vec3 pos; 144 145 out VertexData 146 { 147 vec3 pos; /* local position */ 148 vec4 frontPosition; /* final ndc position */ 149 vec4 backPosition; 150 } 151 vData; 152 153 void main() 154 { 155 vData.pos = pos; 156 vData.frontPosition = point_object_to_ndc(pos); 157 vData.backPosition = point_object_to_ndc(pos + lightDirection * lightDistance); 158 } ERROR: Too many geometry shader invocations GPUShader: linking error: ===== shader string 1 ==== 1 2 void main() 3 { 4 // no color output, only depth (line below is implicit) 5 // gl_FragDepth = gl_FragCoord.z; 6 } ERROR: Too many geometry shader invocations ```
Author

Added subscriber: @DanielPaiva

Added subscriber: @DanielPaiva

Added subscriber: @MaciejJutrzenka

Added subscriber: @MaciejJutrzenka

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Maciej Jutrzenka self-assigned this 2019-11-27 02:49:45 +01:00

my tip would be don't use eevee switch to cycles u might be able to use blender still without bigger or smaller problems.

Unsupported graphics card

Thanks for the report. This GPU is below the minimum requirements for Blender, so we no longer provide support for it. https://www.blender.org/download/requirements/

Installing the latest graphics driver sometimes helps to make such GPUs work, see here for more information. https://docs.blender.org/manual/en/dev/troubleshooting/gpu/index.html

If that doesn't help, you can use Blender 2.79: https://www.blender.org/download/previous-versions/

my tip would be don't use eevee switch to cycles u might be able to use blender still without bigger or smaller problems. > Unsupported graphics card > > Thanks for the report. This GPU is below the minimum requirements for Blender, so we no longer provide support for it. https://www.blender.org/download/requirements/ > > Installing the latest graphics driver sometimes helps to make such GPUs work, see here for more information. https://docs.blender.org/manual/en/dev/troubleshooting/gpu/index.html > > If that doesn't help, you can use Blender 2.79: https://www.blender.org/download/previous-versions/
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#71955
No description provided.