[Bug 97232] Line rendering broken in Dolphin when using gl_ClipDistance

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Aug 17 18:25:04 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=97232

--- Comment #18 from Ilia Mirkin <imirkin at alum.mit.edu> ---
A curious observation:

tests/spec/glsl-1.50/execution/geometry/clip-distance-out-values.shader_test

passes on intel. With the following diff:

diff --git
a/tests/spec/glsl-1.50/execution/geometry/clip-distance-out-values.shader_test
b/tests/spec/glsl-1.50/execution/geometry/clip-distance-out-values.shader_test
index 26ea096..46b09be 100644
---
a/tests/spec/glsl-1.50/execution/geometry/clip-distance-out-values.shader_test
+++
b/tests/spec/glsl-1.50/execution/geometry/clip-distance-out-values.shader_test
@@ -11,8 +11,12 @@ GLSL >= 1.50
 [vertex shader]
 #version 150

+out vec4 c;
+
 void main()
 {
+  //gl_ClipDistance[0] = -1;
+  c = vec4(0,1,0,1);
 }

 [geometry shader]
@@ -20,7 +24,10 @@ void main()

 layout(points) in;
 layout(triangle_strip, max_vertices = 4) out;
-float gl_ClipDistance[8];
+out float gl_ClipDistance[8];
+
+in vec4 c[];
+out vec4 color;

 struct vertex_data {
   vec4 position;
@@ -43,16 +50,20 @@ void main()
   for (int i = 0; i < 4; i++) {
     gl_Position = vdata[i].position;
     gl_ClipDistance = vdata[i].clip_distance;
+    color = c[0];
     EmitVertex();
   }
+  EndPrimitive();
 }

 [fragment shader]
 #version 150

+in vec4 color;
+
 void main()
 {
-  gl_FragColor = vec4(1.0);
+  gl_FragColor = color;
 }

 [test]


it still passes. (Well, it fails, because I wrote in a different color, but
that's a side issue.)

However uncommenting the gl_ClipDistance[] in the vertex shader makes it render
all black. Using gl_ClipDistance[0] = 1 makes it render red. So the VUE map
somehow gets messed up when the vertex shader is emitting a clip distance, but
that clip distance isn't used due to there being a TES or GS stage in the
pipeline.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20160817/f9c6a988/attachment.html>


More information about the intel-3d-bugs mailing list