Skip to contentSkip to conversation

Cemu Shader Cache Corruption Displaying Solid Color After commit 11e16ca7ce0

Bug 111010 [email protected] 1 participant 6 messages Jun 27, 2019 – Jul 11, 2019

lore
Share & tools
lore
#0 lore raw

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

Bug ID: 111010
Summary: Cemu Shader Cache Corruption Displaying Solid Color
After commit 11e16ca7ce0
Product: Mesa
Version: git
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/radeonsi
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]

Created attachment 144651
--> https://bugs.freedesktop.org/attachment.cgi?id=144651&action=edit
shader cache corruption

Background:
Using Cemu emulator with shader cache functionality breaks after commit 11e16ca7ce0. Screen display only solid colors with very low fps.

System:
AMD Ryzen 2600
RX580
Linux 5.0.9, amdgpu, mesa master

How to reproduce the issue:
1. Run Cemu, enable shader cache functionality
2. Play a game then let shader cahce be generated. Game can be played normally and shader can be built normally. No graphical issue is found at this stage.
3. Quit Cemu
4. Play the same game again utilizing the generated shader cache
5. Game display shows flickering solid colors as shown in this ticket attachment.

Expected result:
Playing the same game with previously generated shader cache should display the correct graphic instead of flickering solid colors.

Can you address this issue?

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

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

#1 lore raw

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

--- Comment #1 from Timothy Arceri <[email protected]> --- Thanks for the top quality bug report!

Just to be clear before 11e16ca7ce0 Cemu wasn't actually making use of the cache as it was disabled for core profiles (which Cemu uses). Enabling it uncovered a bug with the interaction of our cache implementation and the separate shader objects extension.

Anyway the following patch should fix the issue.

https://patchwork.freedesktop.org/patch/315016/

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

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

#2 lore raw
In reply to [email protected]

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

--- Comment #2 from Timothy Arceri <[email protected]> --- (In reply to Timothy Arceri from comment #1)

Quoted 4 lines

Thanks for the top quality bug report!

Just to be clear before 11e16ca7ce0 Cemu wasn't actually making use of the cache as it was disabled for core profiles (which Cemu uses).

Sorry that should have been "it was disabled for compatibility profiles"

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

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

#3 lore raw
In reply to [email protected]

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

--- Comment #3 from e88z4 <[email protected]> ---
I applied your patch to the latest mesa git-2042f22e28. Your patch fixed the issue. You can close this bug. Thank for responding so quickly.

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

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

#4 lore raw
In reply to [email protected]

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

e88z4 <[email protected]> changed:

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

         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

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

author Reviewed-by Jordan Justen
#5 lore raw
In reply to [email protected]

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

--- Comment #4 from Timothy Arceri <[email protected]> --- Fixed by:

commit 3043908ccb9c7030add1f34f9a947a787949a399

Author: Timothy Arceri <[email protected]>
Date:   Mon Jul 1 12:25:19 2019 +1000

mesa: save/restore SSO flag when using ARB_get_program_binary

Without this the restored program will fail the pipeline validation checks when we attempt to use an SSO program.

Fixes c20fd744fef1 ("mesa: Add Mesa ARB_get_program_binary helper

functions")

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

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

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