From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 31810] r600g: Sampling from an alpha texture in a fragment shader
Date: Sun, 21 Nov 2010 06:53:37 -0800 (PST) [thread overview]
Message-ID: <20101121145337.AE56713004E@annarchy.freedesktop.org> (raw)
In-Reply-To: <bug-31810-502@http.bugs.freedesktop.org/>
https://bugs.freedesktop.org/show_bug.cgi?id=31810
Owen Taylor <otaylor@redhat.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #40447|0 |1
is obsolete| |
--- Comment #1 from Owen Taylor <otaylor@redhat.com> 2010-11-21 06:53:37 PST ---
Created an attachment (id=40449)
View: https://bugs.freedesktop.org/attachment.cgi?id=40449
Review: https://bugs.freedesktop.org/review?bug=31810&attachment=40449
Slightly simpler version of Piglit test
Here's a slightly simpler version of the test (gets rid of multiplying by a
color)
I'm a little reluctant to provide any of the results of my experiments trying
to understand this, since I'm still confused and maybe will just confuse
anybody following on, but in the SQ_TEX_WORD1 generated from:
0: TEX TEMP[0], IN[0], SAMP[0], 2D
If I manually tweak the DST_SEL_X/DEST_SEL_Y/DEST_SEL_Z/DEST_SEL_W I see the
following results for the loaded stored into the temporary:
Sel Result
xyzw xyzw
---------
1000 1000
0100 0100
0010 0010
0001 0001
0w00 0000
0w01 0001
100w 1001
1w00 1100 (example A)
w000 w000
w001 w001
ww01 ww01 (example B)
w100 w100
w00w w00w
So, in the marked example A above, if I set DST_SEL_X to SQ_SEL_1 and DST_SEL_Y
to SQ_SEL_W and DST_SEL_Z and DST_SEL_W to SQ_SEL_0, then I end up with a value
that has 1's for x and y, and 0's for z and w.
Possibly wrong interpretation: In all the cases above what you an observe is
that the value of a component is the same as if you first replaced w with the
value selected by DST_SEL_X and then applied the actual selector.
So, DST_SEL_Y=SQ_SEL_W in example A gave us 1 because DST_SEL_X=SQ_SEL_1, but
in example B it gave us w because DST_SEL_X=SQ_SEL_1.
This might have something to do with the interaction with the swizzle inherent
to the A8 texture format that sets X,Y,Z=0 and W=X. That would match up with
this only occurring for A8 textures and not for RGBA textures. but I don't
understand why a swizzle at texture load time would cause the selectors from
INST_TEX to have a double effect. Anyways, I'm still confused. I don't really
have time to work on this more, but if it isn't obvious, then one possible
approach would be to compare the bytecode and texture setup of the classic
driver (which works for this) to what the gallium driver is doing.
Oh, and I should mention that I did my testing on an RV710, in case it's a
r6xx/r7xx difference.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
next prev parent reply other threads:[~2010-11-21 14:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-21 12:47 [Bug 31810] New: r600g: Sampling from an alpha texture in a fragment shader bugzilla-daemon
2010-11-21 14:53 ` bugzilla-daemon [this message]
2010-11-22 5:56 ` [Bug 31810] " bugzilla-daemon
2010-11-22 6:05 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101121145337.AE56713004E@annarchy.freedesktop.org \
--to=bugzilla-daemon@freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox