Skip to contentSkip to conversation

New: LLVM RV670 regression since R600: Packetize instructions

Bug 64193 [email protected] 1 participant 27 messages May 3, 2013 – May 21, 2013

lore
Share & tools
lore
#0 lore raw

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

Priority: medium
Bug ID: 64193
CC: [email protected]
Assignee: [email protected]
Summary: LLVM RV670 regression since R600: Packetize
instructions
Severity: normal
Classification: Unclassified
OS: Linux (All)
Reporter: [email protected]
Hardware: x86 (IA32)
Status: NEW
Version: git
Component: Drivers/Gallium/r600
Product: Mesa

My AGP rv670 box has been in pieces for a while so no testing until today.

It seems that it suffers from the same regression as my 790 -

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

but the fixes for that do not help.

With llvm set on -

commit 25f259cde28860ea76c2f5628010968945a28edb

Author: Vincent Lejeune <[email protected]>
Date:   Tue Apr 30 00:14:27 2013 +0000

R600: Packetize instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180760
91177308-0d34-0410-b5e6-96231b3b80d8

the issue is there, the commit before and rendering is OK.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

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

--- Comment #1 from vincent <[email protected]> ---
Can you post the output of glxgears with R600_DEBUG=vs,ps,fs environment variable, before and after this commit ?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

--- Comment #2 from Andy Furniss <[email protected]> --- Created attachment 78827
--> https://bugs.freedesktop.org/attachment.cgi?id=78827&action=edit
R600_DEBUG=vs,ps,fs glxgears working before packetize commit

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

--- Comment #3 from Andy Furniss <[email protected]> --- Created attachment 78828
--> https://bugs.freedesktop.org/attachment.cgi?id=78828&action=edit
R600_DEBUG=vs,ps,fs glxgears rendering dark on packetize commit

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

--- Comment #4 from vincent <[email protected]> ---
Can you cherry pick this patch :
https://bugs.freedesktop.org/attachment.cgi?id=78786 (from bugid 64096) on top of 25f259cde28860ea76c2f5628010968945a28edb and post the output of R600_DEBUG=vs,ps,fs again please ?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

--- Comment #5 from Andy Furniss <[email protected]> --- (In reply to comment #4)

Quoted 4 lines

Can you cherry pick this patch :
https://bugs.freedesktop.org/attachment.cgi?id=78786 (from bugid 64096) on top of 25f259cde28860ea76c2f5628010968945a28edb and post the output of R600_DEBUG=vs,ps,fs again please ?

glxgears looks normal with the patch, though it doesn't fix other demos/games eg.
nexuiz just hung and gloss renders almost OK but the sides are matt with no reflection.

I'll attach the debug as requested and one from heads I did this morning as well where it is rendering dark.

FWIW when llvm is on packetize mesa doesn't build on head so for these it's been (random choice) set on

e2b985dc0f93a195d984aa7c88669ab67160c6c4

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

--- Comment #6 from Andy Furniss <[email protected]> --- Created attachment 78854
--> https://bugs.freedesktop.org/attachment.cgi?id=78854&action=edit
R600_DEBUG=vs,ps,fs glxgears rendering OK on packetize with patch

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

--- Comment #7 from Andy Furniss <[email protected]> --- Created attachment 78855
--> https://bugs.freedesktop.org/attachment.cgi?id=78855&action=edit
R600_DEBUG=vs,ps,fs glxgears rendering dark on heads

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

--- Comment #8 from Marc Dietrich <[email protected]> ---
The suggested patch also fixes gears and 0ad for me. But I still see the problem in chromium browser with webgl enabled, where the map is not displayed.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#9 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

--- Comment #9 from Alex Deucher <[email protected]> ---
As mentioned by Vadim on IRC:
it seems many instructions in bytecode generated for RS880 have (incorrect) OMOD = 2, that is, ALU WORD1 bit 7 is set where it shouldn't be set

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

--- Comment #10 from Vadim Girlin <[email protected]> ---
I looked a bit more into it and AFAICS it's not just a single wrong bit, looks like r700 alu encoding is used for all r600 chips with llvm backend currently(In reply to comment #9)

Quoted 3 lines

As mentioned by Vadim on IRC:
it seems many instructions in bytecode generated for RS880 have (incorrect) OMOD = 2, that is, ALU WORD1 bit 7 is set where it shouldn't be set

I looked a bit more into it and AFAICS it's not just a single wrong bit, looks like r700 alu encoding is used for all r600 chips with llvm backend currently

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#11 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

--- Comment #11 from Tom Stellard <[email protected]> ---
It looks like the special handling for R600 encoding is missing from the backend. I think an earlier change to the code emitter made this code dead and then I deleted it in a more recent commit.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#12 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

--- Comment #12 from Marc Dietrich <[email protected]> ---
yes, there must be something else wrong because the patch seems to be applied in release_33 branch, but the problem somehow came back.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#13 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

--- Comment #13 from Tom Stellard <[email protected]> --- Created attachment 79304
--> https://bugs.freedesktop.org/attachment.cgi?id=79304&action=edit
Possible Fix - Patch 1

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#14 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

--- Comment #14 from Tom Stellard <[email protected]> --- Created attachment 79305
--> https://bugs.freedesktop.org/attachment.cgi?id=79305&action=edit
Possible Fix - Patch 2

Do these two patches fix the problem?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#15 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

Tom Stellard <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

  Attachment #79304|0                           |1

is patch| |

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#16 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

--- Comment #15 from Marc Dietrich <[email protected]> --- hard to say, because mesa is broken again:

CXX gallivm/lp_bld_debug.lo
gallivm/lp_bld_debug.cpp: In member function 'virtual void raw_debug_ostream::write_impl(const char*, size_t)':
gallivm/lp_bld_debug.cpp:116:40: warning: cast from type 'const char*' to type 'char*' casts away qualifiers [-Wcast-qual]
gallivm/lp_bld_debug.cpp: In function 'size_t disassemble(const void*, llvm::raw_ostream&)':
gallivm/lp_bld_debug.cpp:216:64: error: no matching function for call to 'llvm::Target::createMCAsmInfo(std::string&) const' gallivm/lp_bld_debug.cpp:216:64: note: candidate is:
In file included from gallivm/lp_bld_debug.cpp:38:0:
/usr/src/dri-project/llvm/Release-x86_64/include/llvm/Support/TargetRegistry.h:269:16:
note: llvm::MCAsmInfo* llvm::Target::createMCAsmInfo(const llvm::MCRegisterInfo&, llvm::StringRef) const /usr/src/dri-project/llvm/Release-x86_64/include/llvm/Support/TargetRegistry.h:269:16:
note: candidate expects 2 arguments, 1 provided
gmake[3]: *** [gallivm/lp_bld_debug.lo] Fehler 1

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#17 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

--- Comment #16 from Tom Stellard <[email protected]> --- (In reply to comment #15)

Quoted 2 lines

hard to say, because mesa is broken again:

Try again, this should be fixed now.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#18 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

--- Comment #17 from Marc Dietrich <[email protected]> --- Thanks, this fixes gears and 0ad for me again.

Chrome still doesn't show background with WebGL on maps.google.com (this worked before the R600: Packetize instructions commit).

At least GPU hangs with Chrome are fixed now (will close the bug).

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#19 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

--- Comment #18 from Marc Dietrich <[email protected]> --- Tom, can you please also update llvm 3.3 branch if you haven't done yet?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#20 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

--- Comment #19 from Andy Furniss <[email protected]> --- (In reply to comment #14)

Quoted 4 lines

Created attachment 79305 [details] [review]
Possible Fix - Patch 2

Do these two patches fix the problem?

Fixed for me - testing with nexuiz and etqw.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#21 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

--- Comment #20 from Marc Dietrich <[email protected]> --- Created attachment 79339
--> https://bugs.freedesktop.org/attachment.cgi?id=79339&action=edit
R600_DEBUG output with swimming dolphin

Regarding WebGL problem. Steps to reproduce: go to
http://www.ibiblio.org/e-notes/webgl/webgl.htm and click on the dophin. Before said commit, dolphin renders fine, after that, nothing is rendered at all.

Attached is the R600_DEBUG output with/without swimming dolphin.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#22 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

--- Comment #21 from Marc Dietrich <[email protected]> --- Created attachment 79340
--> https://bugs.freedesktop.org/attachment.cgi?id=79340&action=edit
R600_DEBUG output with only while water

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#23 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

--- Comment #22 from Marc Dietrich <[email protected]> ---
Note: this compares llvm/mesa state from ~29th Apr with llvm/release_33 and mesa from today.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#24 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

--- Comment #23 from vincent <[email protected]> ---
Marc, where is the dump without the dolphin ? Is this the "only while water" dump ?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#25 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

--- Comment #24 from Marc Dietrich <[email protected]> ---
sorry, this was a typo. I mean only *white* water (means only white background, nothing is shown)

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#26 lore raw

[Bug 64193] LLVM RV670 regression since R600: Packetize instructions

In reply to [email protected]

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

Marc Dietrich <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #25 from Marc Dietrich <[email protected]> ---
As of today, http://www.ibiblio.org/e-notes/webgl/webgl.htm works again with firefox. (Chrome has webgl init error, but maybe a chrome bug). So I guess this was fixed otherwise.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel