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

rsx: Texturing improvements #5675

Merged
merged 17 commits into from Mar 10, 2019

Conversation

Projects
None yet
@kd-11
Copy link
Contributor

commented Feb 20, 2019

Improves texture search logic by attempting to 'merge' the surface store data and the texture cache data whenever overlaps are encountered. A full data collapse would be infeasible due to performance concerns, but since the two sources are optionally data locked, this should almost always resolve correctly especially when WCB is enabled.

This PR is still very WIP and has been made available for testing. Please look out for significant graphical or performance regressions. Optimizations are still ongoing.

Glitched:

  • Motorstorm
  • Rio
  • Resistance 3 (OGL)
  • GOW3 (GPU blit)
  • GOW3 (WCB)
  • SC4 Bloom
@MarioSonic2987

This comment has been minimized.

Copy link

commented Feb 20, 2019

Fixes these graphical issues in the following games:

Brain Challenge - Broken effects in Stress Test (waving or blur)

image
image

Dark Souls II - White textures when you get into interiors

image
image

Kingdom Hearts II Final Mix - Broken glow in screen after defeating bosses

image
image

Rayman Legends - Missing bloom and blurred background


image
image

Resident Evil 6 - Broken special effects in menus and black textures

image
image

image
image

Saints Row: The Third - Black graphics

image
image

Saints Row IV - Black graphics in Vulkan, LSD graphics in OpenGL

image
image

Improvements discovered by users:

  • Cars 2 (Yellow/Green graphics with GPU blit) - uaqlover
  • Cars 3: Driven to Win (Yellow/Green graphics with GPU blit) - uaqlover
  • Gran Turismo HD Concept (Broken reflections in cars) - AxelBogda
  • Gran Turismo 5 Prologue (Broken reflections) - Jenci
  • Gran Turismo 5 (Broken reflections) - Jenci
  • Kingdom Hearts Final Mix (Broken effect in Atlantica/Jafar battle) - Most users in issue #4303
  • Ratchet & Clank: A Crack In Time (Broken water reflections) - stride21
  • Ratchet & Clank: Tools of Destruction (Broken trails) - stride21
  • Resident Evil Revelations 2 (Missing textures) - zombie167
  • Resident Evil: The Darkside Chronicles (Red shadows) - zombie167
  • Surf's Up (Flickering screen) - uaqlover
@Ghostotakoi

This comment has been minimized.

Copy link

commented Feb 20, 2019

Does this increase/decrease performance in any way or just increase accuracy???

@stride21

This comment has been minimized.

Copy link

commented Feb 21, 2019

Motorstorm crashes when using Vulkan while trying to select a vehicle to use.
rpcs3log.zip

OpenGL Master:
motorstorm master
OpenGL PR:
motorstorm opengl

Resistance 3
Vulkan Master:
master resistance aiming
Vulkan PR:
vulkan rs3 after
OpenGL Master:
capture
OpenGL PR:
open resistances new

PR fixes black screen when having low hp and using Vulkan.
Vulkan Master:
vulkan master black
Vulkan PR:
vulkan black pr
OpenGL Master:
resistance black opengl master
OpenGL PR:
opengl pr black

OpenGL is working correctly with commit c13221d:
c13221dd prev one

@hyperspeedgx

This comment has been minimized.

Copy link

commented Feb 21, 2019

can't go ingame in both ninja gaiden sigma 1 and 2

F {RSX [0x0388c98]} RSX: class std::runtime_error thrown: Verification failed (e=0x7f):
(in file c:\projects\rpcs3\rpcs3\emu\rsx\vk\vktexturecache.h:53)

RPCS3.log.gz

master build rpcs3-v0.0.0.6-7792-8b475303_win64 doesn't has the issue.

edit: lastest fbo, rpcs3-v0.0.6-3262dd76_win64, build still has the issue.

@legend800

This comment has been minimized.

Copy link

commented Feb 21, 2019

Backbreaker has flashing/glossy uniforms now (field textures on vk still broken):
2019-02-20 22_27_48-fps_ 27 19 _ vulkan _ 0 0 6-7901b261-fbo_fixes _ backbreaker vengeance npeb0059

Motorstorm crashes for me too (noted above).

Motorstorm Pacific Rift: Broken gfx, crashes on game start.
2019-02-20 22_32_40- very wip rsx_ texturing improvements by kd-11 pull request 5675 rpcs3_rpc

F {RSX [0x001004c]} RSX: class std::runtime_error thrown: Assertion Failed! Vulkan API call failed with unrecoverable error: Device lost (Driver crashed with unspecified error or stopped responding and recovered) (VK_ERROR_DEVICE_LOST)(in file c:\projects\rpcs3\rpcs3\emu\rsx\vk\vkhelpers.h:1278)

Split Second also crashes when launching gameplay with the same kind of error.

Conan is darker (first time I've seen any change on this game):
2019-02-20 22_34_42-fps_ 30 06 _ vulkan _ 0 0 6-7901b261-fbo_fixes _ conan blus30069

@kd-11 kd-11 force-pushed the kd-11:fbo_fixes branch from 7e7568a to dc00a18 Feb 21, 2019

@kd-11

This comment has been minimized.

Copy link
Contributor Author

commented Feb 21, 2019

Broken data cast should be fixed, although I wouldn't be surprised if there are now new bugs introduced.

@zombie167

This comment has been minimized.

Copy link

commented Feb 21, 2019

Resident Evil 6
The QTE flashing graphic glitch is fixed
FIX missing textures

sshot-2
sshot-9

Resident Evil Revelations 2
FIX missing textures

sshot-4
sshot-3

Resident Evil: The Umbrella Chronicles playable now
sshot-1

@micaelis72

This comment has been minimized.

Copy link

commented Feb 21, 2019

MGS2 in MGS HD Collection didn't improved as I hoped. No previously missing effects are showing. I was putting some hope on this PR. Let's see in the future...

Macross 30 segfaults after the intro movie is played.

Follows the logs, I hope it helps...

RPCS3.log.gz

@MarioSonic2987

This comment has been minimized.

Copy link

commented Feb 21, 2019

SRTT and SRIV no longer have broken garbage overlay:
image
image

Rayman Legends has correct colors:
image
image

@zombie167 I confirm that fixes black textures in Resident Evil 6.
image
image

@MarioSonic2987

This comment has been minimized.

Copy link

commented Feb 21, 2019

Now GTA V renders the same as master.
image

@stride21

This comment has been minimized.

Copy link

commented Feb 21, 2019

Motorstorm goes ingame with vulkan again but now it has a new issue where it can randomly look like the pictures I posted below.
Vulkan PR:
motorstorm vulkan
OpenGL PR:
motorstorm pr
RPCS3.log.gz

@kd-11

This comment has been minimized.

Copy link
Contributor Author

commented Feb 21, 2019

@MarioSonic2987 You mean its now darker again? I'm interested in seeing the log for that since it should contain a bad data cast ("Format incompatibility detected...") which is likely the cause of the problem.
As for the motorstorm ingame I'm investigating the cause.

@MarioSonic2987

This comment has been minimized.

Copy link

commented Feb 21, 2019

Yes. Spams in log with:

·W 0:00:54.961531 {RSX [0x00dcca8]} RSX: Format incompatibility detected, reporting failure to force data copy (VK_FORMAT=0x7C, GCM_FORMAT=0x94)
E {RSX [0x017aba8]} RSX: Unsupported depth conversion (0x94)

Log GTA V 21-2-19 VK PR.gz

@jenci8888

This comment has been minimized.

Copy link

commented Feb 21, 2019

The spam RSX error "Couldn't gather all slices [blah blah]" is gone, the performance is improvement GT5 when goes up 17-27fps to 20-41fps (untested GT6, once Elad PR gets merged later)
But, still appearing random rainbow car and flicker shadow (at distance view) also night has car rainbow flicker when passing and next the lamps. (problem lightmap)

Day
image
Night
image
RPCS3.log.gz

But, NFS Rivals throws error F {RSX [0x8dc010c]} RSX: class std::runtime_error thrown: Verification failed (e=0x7f): (in file c:\projects\rpcs3\rpcs3\emu\rsx\vk\vkgsrender.cpp:3313)
RPCS3_NFS_Rivals.log.gz

@Krusher97

This comment has been minimized.

Copy link

commented Feb 21, 2019

I don't know if this is supposed touch #5526 but it doesn't change anything for it.

RPCS3.log.gz

@kd-11 kd-11 force-pushed the kd-11:fbo_fixes branch from dc00a18 to 02ede06 Feb 21, 2019

@kd-11

This comment has been minimized.

Copy link
Contributor Author

commented Feb 21, 2019

@MarioSonic2987 GTA-V should be fixed now.

@kd-11 kd-11 force-pushed the kd-11:fbo_fixes branch from 02ede06 to 8f627f4 Feb 21, 2019

@MarioSonic2987

This comment has been minimized.

Copy link

commented Feb 21, 2019

No change with the newest commit.
image

@kd-11

This comment has been minimized.

Copy link
Contributor Author

commented Feb 21, 2019

Need new log file.

@MarioSonic2987

This comment has been minimized.

Copy link

commented Feb 21, 2019

@Parthorisian

This comment has been minimized.

Copy link

commented Feb 22, 2019

Conan [BLUS30069] - just a white screen (WCB required to get ingame image similar to legend800 screenshot

@kd-11

This comment has been minimized.

Copy link
Contributor Author

commented Feb 22, 2019

@MarioSonic2987 Looks like there is another format conversion that needs changing, but I'm thinking it needs a separate PR since the hacky fix for it will likely break other games.

@arabek

This comment has been minimized.

Copy link

commented Feb 22, 2019

Motorstorm seems to be affected by some dynamic buffer scaling issues (NP2 textures?)

E {RSX [0x05033f0]} RSX: Could not blit depth/stencil image. src_fmt=0x0, src=1080x3684, dst=2160x3684
E {RSX [0x01833f0]} RSX: Could not blit depth/stencil image. src_fmt=0x0, src=1080x3723, dst=2160x3723
E {RSX [0x04e4a90]} RSX: Could not blit depth/stencil image. src_fmt=0x0, src=1080x3762, dst=2160x3762
E {RSX [0x0164a98]} RSX: Could not blit depth/stencil image. src_fmt=0x0, src=1080x3801, dst=2160x3801

Manifests itself in the log when using video resolution upscaling (in my case set to 300%).

@uaqlover

This comment has been minimized.

Copy link

commented Feb 22, 2019

Cars 2 [BLUS30725]

Master :

fps_ 13 52 _ vulkan _ 0 0 6-7802 _ cars 2 blus30725 2_22_2019 9_17_39 pm

PR:

fps_ 7 77 _ vulkan _ 0 0 6-3262dd76-fbo_fixes _ cars 2 blus30725 2_22_2019 9_16_09 pm

Cars 3: Driven to Win [NPUB31858]

Master :

fps_ 8 35 _ vulkan _ 0 0 6-7802 _ cars 3_ driven to win npub31858 2_22_2019 9_24_53 pm

PR:

fps_ 7 75 _ vulkan _ 0 0 6-3262dd76-fbo_fixes _ cars 3_ driven to win npub31858 2_22_2019 9_25_25 pm

broken games

Rio™ [BLUS30614]

Master :

fps_ 47 28 _ vulkan _ 0 0 6-7802 _ rio blus30614 2_22_2019 9_27_38 pm

PR:

fps_ 59 95 _ vulkan _ 0 0 6-3262dd76-fbo_fixes _ rio blus30614 2_22_2019 9_26_40 pm

Ben 10™ Galactic Racing [BLUS30822]

Master :

fps_ 29 95 _ opengl _ 0 0 6-7802 _ ben 10 galactic racing blus30822 2_22_2019 9_33_06 pm

PR:

OPENGL

F {RSX [0x0000000]} RSX: class std::runtime_error thrown: Verification failed (e=0x7f):
(in file c:\projects\rpcs3\rpcs3\emu\rsx\gl\glhelpers.h:899)

Vulkan

F {RSX [0x01902b4]} RSX: class std::runtime_error thrown: Assertion Failed! Vulkan API call failed with unrecoverable error: Device lost (Driver crashed with unspecified error or stopped responding and recovered) (VK_ERROR_DEVICE_LOST)
(in file c:\projects\rpcs3\rpcs3\emu\rsx\vk\vkhelpers.h:1278)

@kd-11 kd-11 force-pushed the kd-11:fbo_fixes branch from 8f627f4 to 52ba462 Feb 22, 2019

@jenci8888

This comment has been minimized.

Copy link

commented Feb 22, 2019

Fixed shadow (at distance view)
but quite drop performance, the performance almost same as master build. (still no RSX errors, yet.)
image

RPCS3.log.gz

Regression the broken Sonic All Star Racing Transform, unable to see the render view
image

RPCS3_Sonic_transformed_Racing.log.gz

@uaqlover

This comment has been minimized.

Copy link

commented Feb 23, 2019

0.0.6-5fa96219

I confirm that fixes black textures in

Ben 10™ Galactic Racing [BLUS30822]

Master
fps_ 29 95 _ opengl _ 0 0 6-7802 _ ben 10 galactic racing blus30822 2_22_2019 9_32_41 pm

fps_ 29 98 _ opengl _ 0 0 6-7802 _ ben 10 galactic racing blus30822 2_23_2019 8_07_09 am

PR:
fps_ 29 97 _ opengl _ 0 0 6-5fa96219-fbo_fixes _ ben 10 galactic racing blus30822 2_23_2019 7_38_56 am

fps_ 29 97 _ opengl _ 0 0 6-5fa96219-fbo_fixes _ ben 10 galactic racing blus30822 2_23_2019 7_38_47 am

rio is same

fps_ 60 00 _ vulkan _ 0 0 6-5fa96219-fbo_fixes _ rio blus30614 2_23_2019 8_10_04 am

kd-11 added some commits Feb 28, 2019

rsx: Implement proper pitch compatibility lookup
- When a single row is required or is all that is available, pitch has
no meaning as the coordinate space changed to 1D
rsx: Reimplement render target intersection tests when using hw accel…
…erated blit engine

- Properly collapse memory tree when scanning in case of overlaps!
rsx: Properly resolve data for upload when needed.
- Avoids blindly reusing blit dst sections as they may contain garbage.
  If a section was unlocked for a flush, just discard it as its reuse introduces potential data corruption.
  Since the data needs to be reuploaded anyway (for now), its better to start afresh
- In case of format mismatch, reset the calculated dst block
- Add a bounds check to determine if data contained in an atlas is good enough for sampling the cache.
  If not enough data is provided, fall back to full upload
rsx: Properly generate render target data with all parameters provided
- Build-up to variable-sized framebuffers and AA implementation
- Also allows accurate range calculation for our hit testing

@kd-11 kd-11 force-pushed the kd-11:fbo_fixes branch from c109181 to 002aa33 Mar 9, 2019

@kd-11 kd-11 changed the title [VERY WIP] rsx: Texturing improvements rsx: Texturing improvements Mar 9, 2019

@kd-11

This comment has been minimized.

Copy link
Contributor Author

commented Mar 9, 2019

After looking at some pseudo-regressions like genji, it has become obvious that they cannot be fixed in this PR as they require features that are yet to be implemented (e.g blit engine rotations). The old way worked because it was so broken that the wrong data was getting to the GPU. Rolling back the commits and enforcing strict memory management rules shows the same issues on master. Most of the noted regressions simply disappear when using WCB+CPU blit for this reason.
As such, this PR will be merged as-is for now and a follow-up PR will be done to address the missing features.

@stride21

This comment has been minimized.

Copy link

commented Mar 9, 2019

PR Vulkan:
pr ratchet and clank a crank in time
PR OpenGL:
PR opengl
Master Vulkan:
ratchet and clank future master
OpenGL Master:
Opengl Master

@stride21

This comment has been minimized.

Copy link

commented Mar 9, 2019

OpenGL Ratchet and Clank Future: A Crack In Time looks to have regressed when aiming, it can still look correct occasionally depending on where your looking.
OpenGL PR:
ratchet pr new
Vulkan PR:
vulkan aiming pr
OpenGL Master:
master ratchet and clank
RPCS3.log.gz

@legend800

This comment has been minimized.

Copy link

commented Mar 10, 2019

Decided to do a full pass on my collection (~40 games). Only found two more regressions to note:

Burnout Crash:
No longer playable - mad flickering of objects in levels following by a crash within a min or so (2/2 repro). GFX/stability perfect on Master. Happens with/w/o WCB+Blit.
2019-03-09 15_19_50-FPS_ 29 98 _ Vulkan _ 0 0 6-800909d0-fbo_fixes _ Burnout™ CRASH!  NPUB30464

S {RSX Decompiler Thread} RSX: New program compiled successfully x6
F {RSX [0x025d690]} RSX: class std::runtime_error thrown: Verification failed:
(in file c:\projects\rpcs3\rpcs3\emu\rsx\common\texture_cache.h:2101)

Motorstorm Apoc.
Does a weird thing now, where it shows a discolored edge that moves itself to the edge of screen and makes the black border bigger than normal. Strange.

Master:
2019-03-09 17_51_04-FPS_ 12 12 _ Vulkan _ 0 0 6-7840 _ MOTORSTORM™_ APOCALYPSE Digital Edition  NPUA

PR:
2019-03-09 17_53_30-FPS_ 14 35 _ Vulkan _ 0 0 6-800909d0-fbo_fixes _ MOTORSTORM™_ APOCALYPSE Digital

Then transitions to this....
2019-03-09 17_53_45-FPS_ 13 45 _ Vulkan _ 0 0 6-800909d0-fbo_fixes _ MOTORSTORM™_ APOCALYPSE Digital

@kd-11 kd-11 referenced this pull request Mar 10, 2019

Closed

Regressions from #5675 #5708

13 of 13 tasks complete
@kd-11

This comment has been minimized.

Copy link
Contributor Author

commented Mar 10, 2019

Regression tracker at #5708

@kd-11 kd-11 merged commit 1875dc3 into RPCS3:master Mar 10, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@arcadee1977

This comment has been minimized.

Copy link

commented Mar 12, 2019

regression: GOW3 image trembling without FCB

@kd-11

This comment has been minimized.

Copy link
Contributor Author

commented Mar 12, 2019

Stop commenting here, comment at #5708 instead. The GOW3 issue has already been raised there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.