Bug 102891 - [radv] glitches on rpcs3 emulator (green zones)
Summary: [radv] glitches on rpcs3 emulator (green zones)
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Vulkan/radeon (show other bugs)
Version: 17.3
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-20 07:24 UTC by jdruel
Modified: 2018-01-13 08:23 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Green zones with radv (400.38 KB, image/jpeg)
2017-09-20 07:24 UTC, jdruel
Details
Correct rendering with OpenGl on moving water (465.27 KB, image/jpeg)
2017-09-20 07:25 UTC, jdruel
Details
new qrenderdoc capture (218.51 KB, image/x-kde-raw)
2017-11-10 22:29 UTC, jdruel
Details
with zerovram on mesa-git (227.45 KB, image/x-kde-raw)
2017-11-14 10:08 UTC, jdruel
Details
Shovel Knight-Rpcs3-pb01 (223.08 KB, image/x-kde-raw)
2017-12-20 10:17 UTC, jdruel
Details
Shovel Knight-Rpcs3-pb02 (261.31 KB, image/x-kde-raw)
2017-12-20 10:19 UTC, jdruel
Details

Description jdruel 2017-09-20 07:24:48 UTC
Created attachment 134353 [details]
Green zones with radv

On rpcs3 emulator, the game shovel knight[npub31682] renders differently on opengl and vulkan. When there are zones with moving water, the radv driver displays only a green zone. OpenGl is fine.
I already reported the bug here
https://github.com/RPCS3/rpcs3/issues/2880
but it seems to be a driver bug as other vulkan/os systems render correctly.
Tested on ArchLinux, R9 Fury, mesa stable 17.2.0
Comment 1 jdruel 2017-09-20 07:25:45 UTC
Created attachment 134354 [details]
Correct rendering with OpenGl on moving water
Comment 2 Grazvydas Ignotas 2017-09-20 09:06:26 UTC
Can you make a renderdoc capture?
Comment 3 jdruel 2017-09-20 10:02:40 UTC
Hope that's fine (1st use of renderdoc here).
I captured the frame with vulkan.
With renderdoc, I'm seeing warning messages on the console
spirv/spirv_to_nir.c:2763 WARNING: Unsupported SPIR-V capability: SpvCapabilityImageMSArray
So, incomplete driver is probably the culprit.

The renderdoc file is big. I uploaded it here:
https://www.dropbox.com/s/096jt15fzvtlvif/rpcs3_2017.09.20_09.52.38_frame3641.rdc?dl=0
Comment 4 Ilia Mirkin 2017-09-20 12:17:04 UTC
(In reply to jdruel from comment #3)
> With renderdoc, I'm seeing warning messages on the console
> spirv/spirv_to_nir.c:2763 WARNING: Unsupported SPIR-V capability:
> SpvCapabilityImageMSArray
> So, incomplete driver is probably the culprit.

This capability is only supposed to be used if shaderStorageImageMultisample is set to true, which it is not for either radv or anv. It's an application bug to be passing it in.
Comment 5 Bas Nieuwenhuizen 2017-09-21 15:48:45 UTC
IIRC that SpvCapabilityImageMSArray warning is always there with renderdoc though, so probably a red herring.
Comment 6 Dave Airlie 2017-11-09 00:10:05 UTC
Did someone already try RADV_DEBUG=zerovram to see if it helps?

The trace replays badly on amdgpu-pro which suggests the bad stuff is in ram before recording.
Comment 7 Samuel Pitoiset 2017-11-09 08:01:52 UTC
Yeah, zerovram doesn't change anything.
Comment 8 Dave Airlie 2017-11-10 07:14:55 UTC
jdruel can you try the env var on the actual game?

The problem is the damage is capture in the trace, so Samuel's check didn't help.
Comment 9 jdruel 2017-11-10 22:29:51 UTC
Created attachment 135388 [details]
new qrenderdoc capture

I did an
export RADV_DEBUG=zerovram
before running qrenderdoc, but as I'm on mesa 17.2, I don't think this option is activated.
Let me know if this capture is enough for you, else I'll see if I can switch to mesa-git without too much pain (=breaking my system) (I'm on Arch).
Comment 10 Samuel Pitoiset 2017-11-13 09:30:49 UTC
yeah, zerovram is quite recent (mesa 17.3).
Comment 11 jdruel 2017-11-14 10:08:39 UTC
Created attachment 135446 [details]
with zerovram on mesa-git

I installed mesa-git+vulkan-radeon-git+xf86-video-amdgpu-git
My new test was done like this:
export RADV_DEBUG=zerovram
qrenderdoc

Please tell me if this file is correct for you.
Comment 12 jdruel 2017-12-20 10:17:59 UTC
Created attachment 136313 [details]
Shovel Knight-Rpcs3-pb01

Tested on mesa 17.3 with
RADV_DEBUG=zerovram qrenderdoc
Comment 13 jdruel 2017-12-20 10:19:07 UTC
Created attachment 136314 [details]
Shovel Knight-Rpcs3-pb02

Tested on mesa 17.3 with
RADV_DEBUG=zerovram qrenderdoc
It's in another stage: same behaviour
Comment 14 jdruel 2018-01-13 08:23:34 UTC
solved in 17.3.2


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.