From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 93594] Flickering Shadows in The Talos Principle
Date: Wed, 17 Feb 2016 01:17:50 +0000 [thread overview]
Message-ID: <bug-93594-502-1LN2ZN3Sv6@http.bugs.freedesktop.org/> (raw)
In-Reply-To: <bug-93594-502@http.bugs.freedesktop.org/>
[-- Attachment #1.1: Type: text/plain, Size: 2040 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=93594
--- Comment #8 from Marek Olšák <maraeo@gmail.com> ---
I've captured one of the problematic draw calls, which used this fragment
shader:
FRAG
DCL IN[0], GENERIC[9], PERSPECTIVE
DCL OUT[0], COLOR
DCL SAMP[0]
DCL SVIEW[0], 2D, FLOAT
DCL CONST[0..13]
DCL CONST[15]
DCL TEMP[0..3], LOCAL
IMM[0] FLT32 { 1.0000, 0.0000, 0.2500, 4.0000}
0: MOV TEMP[0].xy, IN[0].xyyy
1: TEX TEMP[0].w, TEMP[0], SAMP[0], 2D
2: MUL TEMP[0].x, TEMP[0].wwww, IN[0].wwww
3: MAD TEMP[1].x, TEMP[0].xxxx, CONST[1].xxxx, CONST[1].yyyy
4: MOV_SAT TEMP[1].x, TEMP[1].xxxx
5: MOV TEMP[0].w, TEMP[1].xxxx
6: FSLT TEMP[1].x, TEMP[1].xxxx, CONST[0].xxxx
7: AND TEMP[1].x, TEMP[1].xxxx, IMM[0].xxxx
8: KILL_IF -TEMP[1].xxxx
9: MAD TEMP[0].x, IN[0].zzzz, CONST[0].zzzz, CONST[0].yyyy
10: MOV_SAT TEMP[1].x, TEMP[0].xxxx
11: DDX TEMP[2].x, TEMP[1].xxxx
12: ABS TEMP[2].x, TEMP[2].xxxx
13: MUL TEMP[3], CONST[15].xxxx, TEMP[1].xxxx
14: DDY TEMP[3].x, TEMP[3]
15: ABS TEMP[3].x, TEMP[3].xxxx
16: ADD TEMP[2].x, TEMP[2].xxxx, TEMP[3].xxxx
17: MAD TEMP[0].x, TEMP[2].xxxx, IMM[0].zzzz, TEMP[1].xxxx
18: MUL TEMP[1].x, TEMP[0].xxxx, TEMP[0].xxxx
19: ADD TEMP[1].x, TEMP[0].xxxx, -TEMP[1].xxxx
20: MUL TEMP[1].x, IMM[0].wwww, TEMP[1].xxxx
21: ADD TEMP[1].x, IMM[0].xxxx, -TEMP[1].xxxx
22: MOV TEMP[0].y, TEMP[1].xxxx
23: MOV TEMP[0].z, IMM[0].yyyy
24: MOV OUT[0], TEMP[0]
25: END
If KILL_IF masks out some but not all invocations in a 2x2 quad, the subsequent
DDX and DDY opcodes can result in undefined values, resulting in garbage on the
output.
The simple solution is to move KILL_IF to the end of the shader. I've verified
that it works, but it's inefficient. The best solution would be to:
- save the resulting EXEC mask after KILL_IF
- use S_WQM on the exec mask to get a whole-quad mask
- execute DDX and DDY
- restore the EXEC mask (this must be done after both DDX & DDY but before PS
exports)
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 2791 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
next prev parent reply other threads:[~2016-02-17 1:17 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-05 15:16 [Bug 93594] Flickering Shadows in The Talos Principle bugzilla-daemon
2016-01-06 3:01 ` bugzilla-daemon
2016-01-06 18:59 ` bugzilla-daemon
2016-01-06 19:08 ` bugzilla-daemon
2016-01-07 8:58 ` bugzilla-daemon
2016-01-07 23:45 ` bugzilla-daemon
2016-01-07 23:50 ` bugzilla-daemon
2016-02-14 4:21 ` bugzilla-daemon
2016-02-17 1:17 ` bugzilla-daemon [this message]
2016-02-17 1:55 ` bugzilla-daemon
2016-02-17 16:51 ` bugzilla-daemon
2016-02-17 17:21 ` bugzilla-daemon
2016-02-17 21:12 ` bugzilla-daemon
2016-02-17 23:20 ` bugzilla-daemon
2016-02-18 1:17 ` bugzilla-daemon
2016-02-18 15:07 ` bugzilla-daemon
2016-02-18 15:25 ` bugzilla-daemon
2016-02-18 16:06 ` bugzilla-daemon
2016-02-19 10:17 ` bugzilla-daemon
2016-02-19 16:41 ` bugzilla-daemon
2016-02-19 20:05 ` bugzilla-daemon
2016-02-20 0:34 ` bugzilla-daemon
2016-02-20 10:17 ` bugzilla-daemon
2016-02-20 21:22 ` bugzilla-daemon
2016-02-22 1:00 ` bugzilla-daemon
2016-02-23 0:06 ` bugzilla-daemon
2016-02-25 21:46 ` bugzilla-daemon
2016-02-26 10:34 ` 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=bug-93594-502-1LN2ZN3Sv6@http.bugs.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;
as well as URLs for NNTP newsgroup(s).