<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Invalid sampling of second texture in fragment shader that have two samplers with different parameters."
href="https://bugs.freedesktop.org/show_bug.cgi?id=95085#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Invalid sampling of second texture in fragment shader that have two samplers with different parameters."
href="https://bugs.freedesktop.org/show_bug.cgi?id=95085">bug 95085</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>The geometry shader appear to be broken:
----------
#version 330 core
layout (points) in;
layout (triangle_strip, max_vertices = 4) out;
uniform mat4 mOrtho;
in vec4 vTexCoord[];
in vec4 vFilterColor[];
in uint nMode[];
smooth out vec2 vTex2C;
smooth out vec4 vFiltColor;
flat out uint nModeOut;
void main () {
vec4 vPos = gl_in[0].gl_Position;
vFiltColor = vFilterColor[0];
nModeOut = nMode[0];
gl_Position = mOrtho * vec4(vPos.x, vPos.y, 0, 1);
vTex2C = vec2(vTexCoord[0].x, vTexCoord[0].y);
EmitVertex();
gl_Position = mOrtho * vec4(vPos.x, vPos.w, 0, 1);
vTex2C = vec2(vTexCoord[0].x, vTexCoord[0].w);
EmitVertex();
gl_Position = mOrtho * vec4(vPos.z, vPos.y, 0, 1);
vTex2C = vec2(vTexCoord[0].z, vTexCoord[0].y);
EmitVertex();
gl_Position = mOrtho * vec4(vPos.z, vPos.w, 0, 1);
vTex2C = vec2(vTexCoord[0].z, vTexCoord[0].w);
EmitVertex();
}
---------------------
Note that it only sets vFiltColor and nModeOut once, at the top, thus are only
defined for the first EmitVertex(). However vFiltColor has to be set for every
vertex, and nModeOut has to be set for the provoking vertex, which is
GL_LAST_VERTEX_CONVENTION at the time of the draw @256 in the trace.
>From the spec, the definition of EmitVertex is:
"""
Emit the current values of output variables to the current output primitive.
On return from this call, the values of output variables are undefined.
"""
I believe that it happens to work out on i965 because it just happens to keep
the old value.</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>