From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 30416] New: r300compiler: build_loop_info: expected conditional
Date: Tue, 28 Sep 2010 02:42:54 -0700 (PDT) [thread overview]
Message-ID: <bug-30416-502@http.bugs.freedesktop.org/> (raw)
https://bugs.freedesktop.org/show_bug.cgi?id=30416
Summary: r300compiler: build_loop_info: expected conditional
Product: Mesa
Version: git
Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/r300
AssignedTo: dri-devel@lists.freedesktop.org
ReportedBy: wixorpeek@gmail.com
CC: maraeo@gmail.com
Compilation of the following fragment shader fails:
uniform vec4 vecX, vecY;
uniform int iter;
void main() {
for(;;) {
bool b = (dot(gl_TexCoord[0], gl_TexCoord[0]) < 4.0);
gl_FragColor.z = iter == 0 ? vecX.z - vecY.z : 15.0;
if(b)
break;
gl_FragColor.x = 1.0;
}
}
r300: Initial fragment program
FRAG
DCL IN[0], GENERIC[0], PERSPECTIVE
DCL OUT[0], COLOR
DCL CONST[0..2]
DCL TEMP[0..2]
IMM FLT32 { 4.0000, 0.0000, 15.0000, 1.0000}
0: BGNLOOP :16
1: DP4 TEMP[0].x, IN[0], IN[0]
2: SLT TEMP[1].x, TEMP[0].xxxx, IMM[0].xxxx
3: MOV TEMP[0].x, TEMP[1].xxxx
4: SEQ TEMP[1].x, CONST[0].xxxx, IMM[0].yyyy
5: IF TEMP[1].xxxx :8
6: ADD TEMP[1].x, CONST[2].zzzz, -CONST[1].zzzz
7: MOV TEMP[2].x, TEMP[1].xxxx
8: ELSE :10
9: MOV TEMP[2].x, IMM[0].zzzz
10: ENDIF
11: MOV OUT[0].z, TEMP[2].xxxx
12: IF TEMP[0].xxxx :14
13: BRK
14: ENDIF
15: MOV OUT[0].x, IMM[0].wwww
16: ENDLOOP :0
17: END
Another example that fails is (maybe more common):
uniform vec4 vecX, vecY;
uniform int iter;
void main() {
for(;;) {
gl_FragColor.z = vecX.z - vecY.z;
if(dot(gl_TexCoord[0], gl_TexCoord[0]) < 4.0 && iter > 15)
break;
gl_FragColor.x = 1.0;
}
}
r300: Initial fragment program
FRAG
DCL IN[0], GENERIC[0], PERSPECTIVE
DCL OUT[0], COLOR
DCL CONST[0..2]
DCL TEMP[0..1]
IMM FLT32 { 4.0000, 15.0000, 0.0000, 1.0000}
0: BGNLOOP :15
1: ADD TEMP[0].x, CONST[2].zzzz, -CONST[1].zzzz
2: MOV OUT[0].z, TEMP[0].xxxx
3: DP4 TEMP[0].x, IN[0], IN[0]
4: SLT TEMP[1].x, TEMP[0].xxxx, IMM[0].xxxx
5: IF TEMP[1].xxxx :8
6: SGT TEMP[0].x, CONST[0].xxxx, IMM[0].yyyy
7: MOV TEMP[1].x, TEMP[0].xxxx
8: ELSE :10
9: MOV TEMP[1].x, IMM[0].zzzz
10: ENDIF
11: IF TEMP[1].xxxx :13
12: BRK
13: ENDIF
14: MOV OUT[0].x, IMM[0].wwww
15: ENDLOOP :0
16: END
The driver could cope with that by inserting something like
CMP x, -x, 1, 0
before the IF.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
next reply other threads:[~2010-09-28 9:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-28 9:42 bugzilla-daemon [this message]
2010-09-28 15:37 ` [Bug 30416] r300compiler: build_loop_info: expected conditional bugzilla-daemon
2010-09-28 16:57 ` bugzilla-daemon
2010-09-28 17:11 ` bugzilla-daemon
2010-09-28 17:18 ` bugzilla-daemon
2010-09-28 17:23 ` bugzilla-daemon
2010-09-29 5:05 ` bugzilla-daemon
2010-09-29 5:10 ` 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-30416-502@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