Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gl: Support depth texel transformations using compute shaders #8842

Merged
merged 3 commits into from Sep 7, 2020

Conversation

kd-11
Copy link
Contributor

@kd-11 kd-11 commented Sep 5, 2020

Implements texel transformation required for upload and download of depth formats. The memory ordering and endianness of PS3 depth formats makes it so that it does not map correctly to any OpenGL pack/unpack options and manual intervention is required. Also adds support for depth float transport bringing things up to par with vulkan when it comes to general feature support.

Implements #8714

@AniLeo
Copy link
Member

AniLeo commented Sep 6, 2020

Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz | 8 Threads | 15.52 GiB RAM | TSC: 2.592GHz | AVX+ | FMA3 | TSX-FA

POSIX, Name: Linux, Release: 5.8.6-1-MANJARO

Using mesa-git 20.3.0_devel.127615.83139aca59a-1 with the iris driver on Intel HD 530


Yakuza 3 Demo - Hangs when starting a new game
F {RSX [0x0448220]} SIG: Thread terminated due to fatal error: Unsupported format
image

Persona 5 - Works, tested School Building and the end-game last boss map
image

@xddxd
Copy link
Contributor

xddxd commented Sep 6, 2020

GTA IV just fatals with F {RSX [0x008ef90]} SIG: Thread terminated due to fatal error: Unsupported format
Log: RPCS3.zip

It works on master, but very poorly and spams RSX: Undefined format class for depth texture is not allowed
Log: master.log.gz
image

Windows 10 2004
R7 2700
RX 580 20.8.3

@xddxd
Copy link
Contributor

xddxd commented Sep 6, 2020

GTA V fatals with F 0:01:11.570702 {RSX [0x01166cc]} SIG: Thread terminated due to fatal error: Unsupported format, while on master I can't even go in-game because the GL driver would just crash.

Windows 10 2004
R7 2700
RX 580 20.8.3

@kd-11
Copy link
Contributor Author

kd-11 commented Sep 6, 2020

Unsupported format error should be fixed now. Retesting is needed. GTA4 looks good now on OpenGL:
image

@AniLeo
Copy link
Member

AniLeo commented Sep 6, 2020

Not compiling

https://dev.azure.com/nekotekina/nekotekina/_build/results?buildId=3426&view=logs&j=f96cee46-76df-5e9b-533e-3bbb32f028c2&t=8fe0a607-2451-5d21-4bf8-7fbc14996860&l=2259

../rpcs3/Emu/RSX/GL/GLTexture.cpp:752:32: error: no matching function for call to 'max'
    compute_scratch_mem.create(std::max(512ull, staging_buffer.size() * 3), nullptr, buffer::memory_type::local, 0x88E6);

@xddxd
Copy link
Contributor

xddxd commented Sep 6, 2020

TLoU spams RSX: Undefined format class for depth texture is not allowed
Screenshot_10
RPCS3.log.gz
can add rsx capture if needed.
Master:
image
RPCS3.log.gz

@xddxd
Copy link
Contributor

xddxd commented Sep 6, 2020

RDR doesn't seem to differ visually from master on this PR, though it spams RSX: Undefined format class for depth texture is not allowed
RPCS3.log.gz

@kd-11 kd-11 force-pushed the fixes branch 2 times, most recently from 1cd9921 to 030707e Compare September 6, 2020 15:15
- Adds compute decoding for D24X8_UINT on both download and upload routines
- Adds support for D24X8_UINT operations for typeless copy
- Fix compilation bug caused by typo
- Invert to/from for consistent declarations
- Fix dst_swap when From == 2
…shared image_to_buffer and buffer_to_image routines.

- This automatically adds support for depth float textures as well
@kd-11
Copy link
Contributor Author

kd-11 commented Sep 6, 2020

Fixed a bunch of problems, retest.

@MarioSonic2987
Copy link
Contributor

GTA IV has now fixed graphics in OpenGL, same as Vulkan.
image
image

@AniLeo
Copy link
Member

AniLeo commented Sep 7, 2020

It's working fine on iris now for Yakuza 3 Demo

@woj1993
Copy link

woj1993 commented Sep 7, 2020

How to download it? I wanted to test Sly Cooper.

@kd-11 kd-11 changed the title [WIP] gl: Support depth texel transformations using compute shaders gl: Support depth texel transformations using compute shaders Sep 7, 2020
@kd-11
Copy link
Contributor Author

kd-11 commented Sep 7, 2020

Swizzle/deswizzle will be handled in a separate PR.

@kd-11 kd-11 merged commit 85e5b07 into RPCS3:master Sep 7, 2020
@CoolEmuGuy

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants