[Mesa-dev] [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 30 01:11:16 UTC 2016
https://bugs.freedesktop.org/show_bug.cgi?id=95085
--- Comment #15 from Roland Scheidegger <sroland at vmware.com> ---
(In reply to Nicolai Hähnle from comment #14)
> The trace uses glVertexAttribPointer instead of glVertexAttribIPointer to
> set up a vertex element that will consumed by an uint GLSL variable. I kind
> of suspect that that should be undefined behaviour, but I haven't found a
> corresponding spec reference.
I can't see how that could work (I don't understand how that could work with
some drivers even). glVertexAttribPointer() means the data is really floats -
if you'd use a non-float type to specify it, it will implicitly get converted
to floats. So ok you could cheat there which would leave the data untouched (I
haven't looked at the trace), and rely on the uint input to just read that data
as-is maybe. Not sure if that could work even if you could trick the
implementation to do this - integers as floats have some bad habits, namely all
your negative numbers tend to change their value (as they are NaNs), and your
positive numbers may have some attraction to zero (as they are denorms...).
In any case, just don't do this - these different attrib pointers exist for a
reason. Also see
http://stackoverflow.com/questions/28014864/why-different-variations-of-glvertexattribpointer-do-exist
--
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/mesa-dev/attachments/20160430/cb41ed75/attachment.html>
More information about the mesa-dev
mailing list