[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
Sat Apr 23 13:36:56 UTC 2016
https://bugs.freedesktop.org/show_bug.cgi?id=95085
Bug ID: 95085
Summary: Invalid sampling of second texture in fragment shader
that have two samplers with different parameters.
Product: Mesa
Version: 11.2
Hardware: All
OS: Linux (All)
Status: NEW
Severity: major
Priority: medium
Component: glsl-compiler
Assignee: idr at freedesktop.org
Reporter: leonmaxx at gmail.com
QA Contact: intel-3d-bugs at lists.freedesktop.org
Created attachment 123183
--> https://bugs.freedesktop.org/attachment.cgi?id=123183&action=edit
apitrace
This is long standing bug of Mesa's GLSL shader compiler (4-years ago I got it
for first time).
Fragment shader is like this:
--------------------------------------
#version 330 core
smooth in vec2 vTex2C;
smooth in vec4 vFiltColor;
flat in uint nModeOut;
out vec4 fragColor;
uniform sampler2D tNinepatch;
uniform sampler2D tFonttex;
void main() {
if (nModeOut == 0U) {
fragColor = texture(tNinepatch, vTex2C.xy) * vFiltColor;
}
else {
float fAlpha = texture(tFonttex, vTex2C.xy).r;
fragColor = vec4(1.0, 1.0, 1.0, fAlpha) * vFiltColor;
}
}
--------------------------------------
First texture format is RGBA8 with linear filtering, second is R8 with nearest
filtering.
Sampling from first texture is correct, but from second it's invalid and it
looks like it uses sampling parameters for first texture to sample second
texture.
I have tested this shader on different OSes/drivers:
Ubuntu/Mesa/Intel Works
Ubuntu/Mesa/Noveau Invalid
Ubuntu/Mesa/R600g Invalid
Ubuntu/Mesa/Radeonsi Invalid
Ubuntu/AMD_Catalyst Works
Ubuntu/Nvidia Works
Windows/* Works
Mac Os X/* Works
(* - means any driver/hardware)
Ubuntu versions 14.04.4 and 16.04 both tested - results is same.
Mesa versions tested are distribution default versions (10.1.3 in Ubuntu
14.04.4, and 11.2.0 in Ubuntu 16.04).
Later I'll test with Mesa-git (from Padoka PPA) and will post the results here
too.
Apitrace file attached to message shows the problem (black boxes should be a
text).
--
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/20160423/7b7ceb34/attachment.html>
More information about the intel-3d-bugs
mailing list