Skip to contentSkip to conversation

New: [BISECTED] Serious Sam 3 crashes with R600_LLVM=1 (CAYMAN)

Bug 73110 [email protected] 1 participant 19 messages Dec 29, 2013 – Feb 3, 2014

lore
Share & tools
lore
#0 lore raw

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

Priority: medium
Bug ID: 73110
Assignee: [email protected]
Summary: [BISECTED] Serious Sam 3 crashes with R600_LLVM=1
(CAYMAN)
Severity: normal
Classification: Unclassified
OS: All
Reporter: [email protected]
Hardware: All
Status: NEW
Version: git
Component: Drivers/Gallium/r600
Product: Mesa

More than a week ago, after updating mesa, I began experiencing trouble launching Serious Sam 3. Bisecting gave me the following:

696229523d919de15ebc25d0f475bf56d7dad4a9 is the first bad commit commit 696229523d919de15ebc25d0f475bf56d7dad4a9

Author: Marek Olšák <[email protected]>
Date:   Thu Dec 12 18:09:08 2013 +0100

r600g: use shader-based MSAA resolving when hw-based one cannot be used

This fixes some MSAA integer tests.

:040000 040000 b04b89764c5edee6dd685e22d47e36a11060583f
147827de9fe4e00bae5cc5844052b4fc45bb396c M src

However, setting R600_LLVM=0 prevent the crash.

Using an HD6950 (Cayman) on kernel 3.13-rc5 with latest drm and ddx from git on ArchLinux 64bit.

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 73110] [BISECTED] commit "r600g: use shader-based MSAA resolving when hw-based one cannot be used" crashes some games with R600_LLVM=1

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

Alexandre Demers <[email protected]> changed:

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

            Summary|[BISECTED] Serious Sam 3    |[BISECTED] commit "r600g:
                   |crashes with R600_LLVM=1    |use shader-based MSAA
                   |(CAYMAN)                    |resolving when hw-based one
                   |                            |cannot be used" crashes
                   |                            |some games with R600_LLVM=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

#2 lore raw

[Bug 73110] [BISECTED] commit "r600g: use shader-based MSAA resolving when hw-based one cannot be used" crashes some games with R600_LLVM=1

In reply to [email protected]

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

--- Comment #1 from Alexandre Demers <[email protected]> --- This also affects Awesomenauts, Bastion and Trine 2 in the games I own.

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 73110] [BISECTED] commit "r600g: use shader-based MSAA resolving when hw-based one cannot be used" crashes some games with R600_LLVM=1

In reply to [email protected]

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

--- Comment #2 from Alexandre Demers <[email protected]> --- A bit more info. Serious Sam 3 will launch and begin to load. However, once it has loaded, it crashes when the menu is about to appear and I can even hear a fraction of music before it happens.

Marek, can I provide you with something specific? Anything about the shaders I could try to get (with and without R600_LLVM)?

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 73110] [BISECTED] commit "r600g: use shader-based MSAA resolving when hw-based one cannot be used" crashes some games with R600_LLVM=1

In reply to [email protected]

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

Alex Deucher <[email protected]> changed:

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

                 CC|                            |[email protected],
                   |                            |[email protected]

--- Comment #3 from Alex Deucher <[email protected]> ---
I suspect the llvm support for r600 class hardware needs to add support for some additional instructions, etc. that that patch uses. Vincent or Tom may be able to identify what's missing.

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 73110] [BISECTED] commit "r600g: use shader-based MSAA resolving when hw-based one cannot be used" crashes some games with R600_LLVM=1

In reply to [email protected]

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

--- Comment #4 from Marek Olšák <[email protected]> --- The shaders are generated by this code:

http://cgit.freedesktop.org/mesa/mesa/diff/src/gallium/auxiliary/util/u_simple_shaders.c?id=fc21098a95c8f7d0aadbfcc90cb2e9e78d1e2ef3
http://cgit.freedesktop.org/mesa/mesa/diff/src/gallium/auxiliary/util/u_simple_shaders.c?id=5a609fbcb5459fc5cac2e0361a405ea4b884325f

There is nothing special except for the texel fetch instructions which read from MSAA textures. The shaders also contain float<->int and float<->unsigned conversions. I think the latter is not used with GLSL very often.

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 73110] [BISECTED] commit "r600g: use shader-based MSAA resolving when hw-based one cannot be used" crashes some games with R600_LLVM=1

In reply to [email protected]

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

--- Comment #5 from Alexandre Demers <[email protected]> --- (In reply to comment #3)

Quoted 3 lines

I suspect the llvm support for r600 class hardware needs to add support for some additional instructions, etc. that that patch uses. Vincent or Tom may be able to identify what's missing.

I'm still using LLVM 3.3. I'll try with LLVM 3.4 later if possible just in case it works with that, since LLVM 3.4 has landed in the testing repositories of ArchLinux last night.

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 73110] [BISECTED] commit "r600g: use shader-based MSAA resolving when hw-based one cannot be used" crashes some games with R600_LLVM=1

In reply to [email protected]

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

--- Comment #6 from Marek Olšák <[email protected]> ---
That might be it. I think LLVM 3.3 doesn't support MSAA texture fetches on R600.

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 73110] [BISECTED] commit "r600g: use shader-based MSAA resolving when hw-based one cannot be used" crashes some games with R600_LLVM=1

In reply to [email protected]

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

--- Comment #7 from Alexandre Demers <[email protected]> --- Tested with LLVM 3.4 and it does crash. So LLVM 3.4 is required to support correctly the shader-based MSAA. Would there be a way to work around this issue if a user is using LLVM < 3.4?

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 73110] [BISECTED] commit "r600g: use shader-based MSAA resolving when hw-based one cannot be used" crashes some games with R600_LLVM=1

In reply to [email protected]

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

--- Comment #8 from Marek Olšák <[email protected]> --- (In reply to comment #7)

Quoted 3 lines

Tested with LLVM 3.4 and it does crash. So LLVM 3.4 is required to support correctly the shader-based MSAA. Would there be a way to work around this issue if a user is using LLVM < 3.4?

Did you mean "it doesn't crash"?

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 73110] [BISECTED] commit "r600g: use shader-based MSAA resolving when hw-based one cannot be used" crashes some games with R600_LLVM=1

In reply to [email protected]

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

--- Comment #9 from Alexandre Demers <[email protected]> --- (In reply to comment #8)

Quoted 6 lines

(In reply to comment #7)

Quoted 3 lines

Tested with LLVM 3.4 and it does crash. So LLVM 3.4 is required to support correctly the shader-based MSAA. Would there be a way to work around this issue if a user is using LLVM < 3.4?

Did you mean "it doesn't crash"?

Yes, sorry. "... LLVM 3.4 and it doesn't crash."

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 73110] [BISECTED] commit "r600g: use shader-based MSAA resolving when hw-based one cannot be used" crashes some games with R600_LLVM=1

In reply to [email protected]

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

--- Comment #10 from Alexandre Demers <[email protected]> --- I've been testing with LLVM 3.4. While it doesn't crash anymore, there are some visual glitches. Do you want me to open a different bug about it?

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 73110] [BISECTED] commit "r600g: use shader-based MSAA resolving when hw-based one cannot be used" crashes some games when R600_LLVM=1 with LLVM < 3.4

In reply to [email protected]

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

Alexandre Demers <[email protected]> changed:

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

            Summary|[BISECTED] commit "r600g:   |[BISECTED] commit "r600g:
                   |use shader-based MSAA       |use shader-based MSAA
                   |resolving when hw-based one |resolving when hw-based one
                   |cannot be used" crashes     |cannot be used" crashes
                   |some games with R600_LLVM=1 |some games when R600_LLVM=1
                   |                            |with LLVM < 3.4
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 73110] [BISECTED] commit "r600g: use shader-based MSAA resolving when hw-based one cannot be used" crashes some games when R600_LLVM=1 with LLVM < 3.4

In reply to [email protected]

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

--- Comment #11 from Alexandre Demers <[email protected]> --- I'm closing this bug since it is fixed by using LLVM 3.4. But my question in comment 7 is still pending.

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 73110] [BISECTED] commit "r600g: use shader-based MSAA resolving when hw-based one cannot be used" crashes some games when R600_LLVM=1 with LLVM < 3.4

In reply to [email protected]

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

Alexandre Demers <[email protected]> changed:

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

             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
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 73110] [BISECTED] commit "r600g: use shader-based MSAA resolving when hw-based one cannot be used" crashes some games when R600_LLVM=1 with LLVM < 3.4

In reply to [email protected]

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

--- Comment #12 from Marek Olšák <[email protected]> --- (In reply to comment #7)

Quoted 3 lines

Tested with LLVM 3.4 and it does crash. So LLVM 3.4 is required to support correctly the shader-based MSAA. Would there be a way to work around this issue if a user is using LLVM < 3.4?

The workaround would be to disable MSAA (and therefore GL 3 too) if the LLVM backend is enabled and the LLVM version is older than 3.4.

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 73110] [BISECTED] commit "r600g: use shader-based MSAA resolving when hw-based one cannot be used" crashes some games when R600_LLVM=1 with LLVM < 3.4

In reply to [email protected]

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

--- Comment #13 from Fabio Pedretti <[email protected]> --- Alternatively, LLVM 3.4 could be required as the minimum version on r600 and radeonsi, there are other bugs I remember only happens with 3.3.

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 73110] [BISECTED] commit "r600g: use shader-based MSAA resolving when hw-based one cannot be used" crashes some games when R600_LLVM=1 with LLVM < 3.4

In reply to [email protected]

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

--- Comment #14 from Alexandre Demers <[email protected]> --- (In reply to comment #13)

Quoted 2 lines

Alternatively, LLVM 3.4 could be required as the minimum version on r600 and radeonsi, there are other bugs I remember only happens with 3.3.

Since LLVM 3.4 is officially out, I would go with this solution. Otherwise, could we wrap 696229523d919de15ebc25d0f475bf56d7dad4a9 code in a if (LLVM >= 3.4) kind of condition?

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 73110] [BISECTED] commit "r600g: use shader-based MSAA resolving when hw-based one cannot be used" crashes some games when R600_LLVM=1 with LLVM < 3.4

In reply to [email protected]

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

--- Comment #15 from Marek Olšák <[email protected]> --- No, the code would be too complex.

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