<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Line rendering broken in Dolphin when using gl_ClipDistance"
href="https://bugs.freedesktop.org/show_bug.cgi?id=97232#c18">Comment # 18</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Line rendering broken in Dolphin when using gl_ClipDistance"
href="https://bugs.freedesktop.org/show_bug.cgi?id=97232">bug 97232</a>
from <span class="vcard"><a class="email" href="mailto:imirkin@alum.mit.edu" title="Ilia Mirkin <imirkin@alum.mit.edu>"> <span class="fn">Ilia Mirkin</span></a>
</span></b>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>