All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 101224] texelFetch(usampler) returns black color
@ 2017-05-29  6:21 bugzilla-daemon
  2017-06-12 14:14 ` bugzilla-daemon
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: bugzilla-daemon @ 2017-05-29  6:21 UTC (permalink / raw
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 1623 bytes --]

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

            Bug ID: 101224
           Summary: texelFetch(usampler) returns black color
           Product: Mesa
           Version: 17.1
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/Gallium/radeonsi
          Assignee: dri-devel@lists.freedesktop.org
          Reporter: pmjobin@gmail.com
        QA Contact: dri-devel@lists.freedesktop.org

Created attachment 131561
  --> https://bugs.freedesktop.org/attachment.cgi?id=131561&action=edit
texint.c test case + reference images

I isolated the issue in the provided texint.c test case which attempts to draw
two identical bars by sampling a ramp pattern stored inside the red channel of
a texture. The top bar is drawn using sampler1D ('tex' in the code). The bottom
one is drawn using usampler1D and an integer texture ('texint' in the code).

Running the test under Mesa 17.1.1 (Fedora 26) yields a solid black bar for the
usampler1D case (bottom) rather than the expected ramp pattern (ref: bad.png).
Running the same code on the same hardware in Windows 10 + Radeon Crimson
ReLive Edition 17.5.2 yields two identical red ramps (ref: good.png).

Relevant lines from glxinfo:

OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD POLARIS10 (DRM 3.10.0 /
4.11.3-300.fc26.x86_64, LLVM 4.0.0)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.1.1

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 3154 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug 101224] texelFetch(usampler) returns black color
  2017-05-29  6:21 [Bug 101224] texelFetch(usampler) returns black color bugzilla-daemon
@ 2017-06-12 14:14 ` bugzilla-daemon
  2017-06-12 14:42 ` bugzilla-daemon
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: bugzilla-daemon @ 2017-06-12 14:14 UTC (permalink / raw
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 263 bytes --]

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

--- Comment #1 from Nicolai Hähnle <nhaehnle@gmail.com> ---
Thanks for the report. I can reproduce this, and I'll investigate.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1030 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug 101224] texelFetch(usampler) returns black color
  2017-05-29  6:21 [Bug 101224] texelFetch(usampler) returns black color bugzilla-daemon
  2017-06-12 14:14 ` bugzilla-daemon
@ 2017-06-12 14:42 ` bugzilla-daemon
  2017-06-13  6:17 ` bugzilla-daemon
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: bugzilla-daemon @ 2017-06-12 14:42 UTC (permalink / raw
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 774 bytes --]

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

Nicolai Hähnle <nhaehnle@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |NOTOURBUG

--- Comment #2 from Nicolai Hähnle <nhaehnle@gmail.com> ---
Your texture is incomplete, because you left Min/Mag filters at GL_LINEAR /
GL_LINEAR_MIPMAP_NEAREST, which is an incorrect setting for integer textures.
You need to switch both to GL_NEAREST instead.

It's a bug in the Windows driver that this condition isn't flagged.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2263 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug 101224] texelFetch(usampler) returns black color
  2017-05-29  6:21 [Bug 101224] texelFetch(usampler) returns black color bugzilla-daemon
  2017-06-12 14:14 ` bugzilla-daemon
  2017-06-12 14:42 ` bugzilla-daemon
@ 2017-06-13  6:17 ` bugzilla-daemon
  2017-06-13  7:56 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: bugzilla-daemon @ 2017-06-13  6:17 UTC (permalink / raw
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 1216 bytes --]

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

--- Comment #3 from Pierre-Marc Jobin <pmjobin@gmail.com> ---
Nicolai,

First and foremost, I wish to thank you for your time and support.

I applied the fix you recommended and now, the testcase behaves as expected.
You mention the incompatible filtering parameter "condition being flagged" but
prior to filling a bug report, I did run the testcase against a debug context
(as well as under apitrace) and obtained no diagnostic information whatsoever
about the texture lack of completeness.

I understand that integer textures are incompatible with filtering settings
other than GL_NEAREST but I did expect glTextureStorage to take care of that as
it receives the internal format argument. It does take care of mipmap settings
afaik.

As a suggestion, would it be possible for the driver to at least generate a
ARB_debug_output message when linear filtering is applied to an integer
texture? (especially since this is a default setting) I wouldn't have suspected
a driver bug if I had been made aware of my mistake in some shape or form.

Thank you again,
PM

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2054 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug 101224] texelFetch(usampler) returns black color
  2017-05-29  6:21 [Bug 101224] texelFetch(usampler) returns black color bugzilla-daemon
                   ` (2 preceding siblings ...)
  2017-06-13  6:17 ` bugzilla-daemon
@ 2017-06-13  7:56 ` bugzilla-daemon
  2017-06-14 15:08 ` bugzilla-daemon
  2017-06-18 21:19 ` bugzilla-daemon
  5 siblings, 0 replies; 7+ messages in thread
From: bugzilla-daemon @ 2017-06-13  7:56 UTC (permalink / raw
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 458 bytes --]

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

--- Comment #4 from Nicolai Hähnle <nhaehnle@gmail.com> ---
Hi Pierre-Marc! Conceptually, glTextureStorage can't take care of the sampler
settings unfortuantely because of the possibility of having separate sampler
objects.

I agree with you though that having a debug message on incomplete textures
would be useful.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1285 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug 101224] texelFetch(usampler) returns black color
  2017-05-29  6:21 [Bug 101224] texelFetch(usampler) returns black color bugzilla-daemon
                   ` (3 preceding siblings ...)
  2017-06-13  7:56 ` bugzilla-daemon
@ 2017-06-14 15:08 ` bugzilla-daemon
  2017-06-18 21:19 ` bugzilla-daemon
  5 siblings, 0 replies; 7+ messages in thread
From: bugzilla-daemon @ 2017-06-14 15:08 UTC (permalink / raw
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 428 bytes --]

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

--- Comment #5 from Nicolai Hähnle <nhaehnle@gmail.com> ---
FWIW, in Mesa debug builds, you can set the environment variable
MESA_DEBUG=incomplete_tex, and it will print out information about incomplete
textures. Might be a nice project for somebody to hook that up with
ARB_debug_output.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1255 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug 101224] texelFetch(usampler) returns black color
  2017-05-29  6:21 [Bug 101224] texelFetch(usampler) returns black color bugzilla-daemon
                   ` (4 preceding siblings ...)
  2017-06-14 15:08 ` bugzilla-daemon
@ 2017-06-18 21:19 ` bugzilla-daemon
  5 siblings, 0 replies; 7+ messages in thread
From: bugzilla-daemon @ 2017-06-18 21:19 UTC (permalink / raw
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 867 bytes --]

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

--- Comment #6 from Roland Scheidegger <sroland@vmware.com> ---
This is certainly not the first time it came up fwiw, especially since there's
binary drivers which will just ignore the incomplete texture since obviously
that sampler state isn't needed at all for texture fetch (yes technically they
are wrong). It is also very easy to miss since it's really not obvious you have
to worry about it for texel fetches (it is logical given how the incomplete
texture is defined, but still sort of surprising, especially when you might
have experience with d3d10 which doesn't have sampler state at all for just
fetches (loads)).
So I think everybody agrees hooking that detection up with ARB_debug_output
would be a good idea.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1697 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-06-18 21:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-29  6:21 [Bug 101224] texelFetch(usampler) returns black color bugzilla-daemon
2017-06-12 14:14 ` bugzilla-daemon
2017-06-12 14:42 ` bugzilla-daemon
2017-06-13  6:17 ` bugzilla-daemon
2017-06-13  7:56 ` bugzilla-daemon
2017-06-14 15:08 ` bugzilla-daemon
2017-06-18 21:19 ` bugzilla-daemon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.