[Bf-blender-cvs] [4cd191aa295] master: EEVEE: Intel Shader Compiler Bug

Jeroen Bakker noreply at git.blender.org
Thu May 16 13:38:15 CEST 2019


Commit: 4cd191aa295fffa2649fb70a5bb77c721be9949c
Author: Jeroen Bakker
Date:   Thu May 16 13:35:02 2019 +0200
Branches: master
https://developer.blender.org/rB4cd191aa295fffa2649fb70a5bb77c721be9949c

EEVEE: Intel Shader Compiler Bug

When using Intel GPU EEVEE did not display anything. This was due to an
internal shader compilation bug inside the intel drivers. We had fixed
this for other vertex shaders. The same change we have to apply to other
vert shaders that want to limit the need of Matrix multiplications.

===================================================================

M	source/blender/draw/engines/eevee/shaders/prepass_vert.glsl
M	source/blender/draw/engines/eevee/shaders/shadow_vert.glsl

===================================================================

diff --git a/source/blender/draw/engines/eevee/shaders/prepass_vert.glsl b/source/blender/draw/engines/eevee/shaders/prepass_vert.glsl
index fe274f59167..d133889e725 100644
--- a/source/blender/draw/engines/eevee/shaders/prepass_vert.glsl
+++ b/source/blender/draw/engines/eevee/shaders/prepass_vert.glsl
@@ -13,6 +13,13 @@ in vec3 pos;
 
 void main()
 {
+#ifdef GPU_INTEL
+  /* Due to some shader compiler bug, we somewhat
+   * need to access gl_VertexID to make it work. even
+   * if it's actually dead code. */
+  gl_Position.x = float(gl_VertexID);
+#endif
+
 #ifdef HAIR_SHADER
   float time, thick_time, thickness;
   vec3 worldPosition, tan, binor;
diff --git a/source/blender/draw/engines/eevee/shaders/shadow_vert.glsl b/source/blender/draw/engines/eevee/shaders/shadow_vert.glsl
index 7dd9af310ed..6b06aab34d2 100644
--- a/source/blender/draw/engines/eevee/shaders/shadow_vert.glsl
+++ b/source/blender/draw/engines/eevee/shaders/shadow_vert.glsl
@@ -11,6 +11,13 @@ out vec3 viewNormal;
 
 void main()
 {
+#ifdef GPU_INTEL
+  /* Due to some shader compiler bug, we somewhat
+   * need to access gl_VertexID to make it work. even
+   * if it's actually dead code. */
+  gl_Position.x = float(gl_VertexID);
+#endif
+
   vec3 world_pos = point_object_to_world(pos);
   gl_Position = point_world_to_ndc(world_pos);
 #ifdef MESH_SHADER



More information about the Bf-blender-cvs mailing list