[Bug 95085] Invalid sampling of second texture in fragment shader that have two samplers with different parameters.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Apr 24 16:23:04 UTC 2016


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

--- Comment #6 from Ilia Mirkin <imirkin at alum.mit.edu> ---
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.

-- 
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/20160424/3c1bbe50/attachment.html>


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