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

AAA fixes #4973

Merged
merged 21 commits into from
Aug 18, 2018
Merged

AAA fixes #4973

merged 21 commits into from
Aug 18, 2018

Conversation

kd-11
Copy link
Contributor

@kd-11 kd-11 commented Aug 12, 2018

  • Separate texture read barrier from full pipeline barriers and avoids a lot of unnecessary sync/work caused by doing a full sync for texture read barriers. Applications tend to spam a lot of the texture read barriers so its better to let the cache deal with a raw miss than to try and optimize with a barrier hint.
  • ZCULL: Implement targeted synchronization to avoid stalling for too long gathering results that may be unused.
  • ZCULL: Defer conditional render evaluation to avoid a hard stall whenever a conditional render register is touched.
  • ZCULL: Change from arbitrary counters to microsecond counters to determine evaluation deadlines. The result is much more consistent throughput and latency.
  • Improve aliased memory contention evaluation. It is common for the same memory address to be used as both a color target and depth target in a draw, but configuration registers ultimately determine whether the hardware will write depth or color, or both and one overwrites the other.
  • Fix a vulkan regression (Regression: Castle Crashers after #4469 #4923)
  • Improve rsx timestamp accuracy to simulate nanosecond timing.
  • Fix blit engine writes to active rendertargets for vulkan.
  • Improve vm deadlock evasion; should avoid some situations that would cause the emulator to lock up and die (e.g prince of persia, warrior within)
  • Improve memory tracking so that writing to a large block of memory should reach any framebuffers that live in the disturbed range. Only basic invalidation has been done right now.
  • Enable swizzle formats for all textures unless proven otherwise. Tests have shown that Z scanning is valid for almost all formats except some special compressed ones like DXT.
  • vk/gl: Several minor optimizations to hash functions and resource management to squeeze out a few more frames in some applications.

@Kravickas
Copy link
Contributor

Kravickas commented Aug 12, 2018

Far Cry 2
Vulkan
Driver crash before menu
obrazek
RPCS3.log

OGL
PR
kd
Master
master

@paxsyr
Copy link
Contributor

paxsyr commented Aug 12, 2018

With this Pr, Infamous now has these weird boxes on the left side of the screen. (See pictures)

Pr:
infamous - aaa fixes pr
Infamous - AAA Fixes Pr.log.gz

v0.0.5-7177 (Master at time of writing):
infamous - v0 0 5-7177
Infamous - v0.0.5-7177.log.gz

Edit: Now Fixed

@legend800
Copy link

legend800 commented Aug 12, 2018

[Update]
Clearing the TSX regressions caused by SPU Realms commits.

For the AAA fixes PR, observations:

  • Flickering in Rayman Legends is NOT fixed either, despite that GH issue being closed (even with Strict on). Regressions caused by #3772 #3821
  • TMNT Reshelled - the pirate stage lighting/shadows are finally fixed, making this game virtually perfect in all aspects.
    2018-08-12 15_13_04-fps_ 61 66 _ vulkan _ 0 0 5-0a30c563-rsx_volatile _ tmnt_ turtles in time re-she

@Zangetsu38
Copy link
Contributor

@legend800 freeze for Wipeout HD no relate this PR, is old regression

@legend800
Copy link

legend800 commented Aug 13, 2018

@Zangetsu38 Wipeout HD has no stability issues for the past year. I test it almost every week. Rock solid for me. I finally traced it down to TSX and disabling it fixed the game and probably unrelated to this PR. I'll do a pass on everything again with this off and update the previous comments in the next hour.

@stride21
Copy link

stride21 commented Aug 13, 2018

Infamous 2
PR:
infams kd

Master:
main

This PR also fix an issue with the game hanging so now you can progress further in the story.

RPCS3.log.gz

@Kravickas
Copy link
Contributor

Kravickas commented Aug 13, 2018

GTA V
OGL
ogl kd

Vulkan - freeze emu after few second ingame
vulkan kd

Master
obrazek

@greentop
Copy link

GCC build on Ubuntu 16.04 (Travis is borked atm to get this far).

In file included from /home/green/rpcs3/rpcs3/Emu/RSX/Capture/rsx_capture.cpp:5:0:
/home/green/rpcs3/rpcs3/Emu/RSX/Common/surface_store.h: In lambda function:
/home/green/rpcs3/rpcs3/Emu/RSX/Common/surface_store.h:213:6: error: need ‘typename’ before ‘rsx::surface_hierachy_info<typename Traits::surface_type>::memory_overlap_t’ because ‘rsx::surface_hierachy_info<typename Traits::surface_type>’ is a dependent scope
      surface_hierachy_info<surface_type>::memory_overlap_t overlap;
      ^
/home/green/rpcs3/rpcs3/Emu/RSX/Common/surface_store.h:213:60: error: expected ‘;’ before ‘overlap’
      surface_hierachy_info<surface_type>::memory_overlap_t overlap;
                                                            ^
/home/green/rpcs3/rpcs3/Emu/RSX/Common/surface_store.h:214:6: error: ‘overlap’ was not declared in this scope
      overlap._ref = surface;
      ^
[ 87%] Building CXX object rpcs3/CMakeFiles/rpcs3.dir/Emu/RSX/Common/FragmentProgramDecompiler.cpp.o
[ 87%] Building CXX object rpcs3/CMakeFiles/rpcs3.dir/Emu/RSX/Common/ProgramStateCache.cpp.o
rpcs3/CMakeFiles/rpcs3.dir/build.make:4676: recipe for target 'rpcs3/CMakeFiles/rpcs3.dir/Emu/RSX/Capture/rsx_capture.cpp.o' failed
make[2]: *** [rpcs3/CMakeFiles/rpcs3.dir/Emu/RSX/Capture/rsx_capture.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:1563: recipe for target 'rpcs3/CMakeFiles/rpcs3.dir/all' failed
make[1]: *** [rpcs3/CMakeFiles/rpcs3.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

@JohnGodgames
Copy link

The last of us crashes when WCB is enabled.

tlou aaa

tlou RPCS3.log.gz

tlou shaderlog.zip

@Asinin3
Copy link
Contributor

Asinin3 commented Aug 13, 2018

@legend800 Very likely caused by #4920 same issue is seen with RDR if TSX is enabled you can't go ingame after SPU Realms merged. Delete comment if this is true, lets keep this PR clean of anything unrelated.

@spyropt
Copy link

spyropt commented Aug 13, 2018

@legend800 that problem happens without tsx also, it has happened to me alot of times testing Wipeout, so it's not related to this pr
This has been around well before spu realms got merged

@Lagahan
Copy link

Lagahan commented Aug 13, 2018

@Asinin3 Is #4920 included in this branch at the moment? Wipeout doesn't display graphics under SPU LLVM on this branch, which was something that was fixed in #4920.
I'm also getting the crash with TSX enabled though, haven't had any stability issues with it on master since around February.

@Dokman
Copy link

Dokman commented Aug 13, 2018

i am using ryzen and i don't have the problem of TSX so all games are displaying very good graphics Wipout is going okay with Little glitches but is working

@HerrHulaHoop
Copy link

@Lagahan while SPU realms has been merged into master, the xfloat accuracy has to be manually enabled in config.yml [Accurate xfloat: true]. Anyway, neither that or the TSX regression is related to this PR. For reporting on this PR, test against the latest master builds (after SPU realms merge).

@stride21
Copy link

stride21 commented Aug 13, 2018

Resistance 3 with this PR shows still transparent images over the gameplay which can frequently disappear and reappear during gameplay.
PR:
capture

Master:
master

RPCS3.log.gz

@MSuih
Copy link
Member

MSuih commented Aug 13, 2018

RDR no longer locks up the whole emulator for AMD cards, you can get past the title screen and into the game now. Still tends to desync and crash withing the first 20 seconds of gameplay, but at least there's some progress.

@dio-gh
Copy link
Contributor

dio-gh commented Aug 13, 2018

After fighting my way through #4974, now even with the optimal settings (that work on master) and caches built, GoW: Collection managed to regress in a third way now: GoW2 is now really prone to crashing in the menus, and the most likely offender is the full frame option in the game settings, that causes graphical glitches too.

Ah yeah, system is: i7 7700HQ, 16 gigs of ram, gtx1060m with 6 gigs of vram and on vulkan backend. Win10.

Logs:
gowc_crash.zip

Edit: Managed to have it stay in the menu without crashing. Now I can show you a log about it, and a pic:
image
RPCS3.log.gz

Edit 2: Tested with manual libs too (spurs_jq and libsre), to no avail. The graphical artifacts only occur if I turn on the "full frame mode" in the game settings.

Edit 3: Issue also exists with accurate xfloats enabled. Doesn't seem to have regressed with SPU Realms, especially as things were working fine on master. I managed to have it crash without pulling RPCS3 with itself, here's the log:
RPCS3.log.gz

Edit 4: Tested with accurate xfloats off, manual libs, and no full frame (still on vulkan). After the opening cutscene, it just goes black with the music playing in the background, wont let me play.
RPCS3.z01.zip
RPCS3.z02.zip
RPCS3.zip
I had to upload it in parts, remove the .zip from the end of the first two. Update: False alarm, with going back to loading liblv2.sprx only, this issue was gone.

Edit 5: The issue persists in a slightly different form on OpenGL as well.
Turning "full frame" on:
image
Turning it back off:
image
(after this, only the upper part showed the actual game, the lower half was static.)

@pauls-gh
Copy link
Contributor

I noticed last month when I was experimenting with zcull that the zcull sample report_to_main_memory does not work in RPCS3. It does not work with this PR either (build rpcs3-v0.0.5-0a30c563_win64).

@kd-11 - maybe you could take a look at this since you are currently improving zcull. If you prefer, I can open a new issue...let me know.

@kd-11 kd-11 force-pushed the rsx_volatile branch 2 times, most recently from 951799a to fa51306 Compare August 13, 2018 17:07
@marosis
Copy link

marosis commented Aug 13, 2018

How i see that pictures, in every picture is lower framerate over 2-3 fps

@sufianahmed2007
Copy link

Tekken tag 2 also got graphical errors in this PR like in some stages there is a green screen and in some stages characters are not rendered properly and in master build it works fine but there is a fps boost in this PR
Gameplay is very smooth and I tested using both SPU LLVM and SPU ASMJIT.
Hope I m helping
And thanks developers

@Xcedf
Copy link

Xcedf commented Aug 13, 2018

Among my games i've found GoW HD and Ninja Gaiden 3 demo regressed graphicaly the same way as on the screens above. found out both regressed from 23c74a3

@toccata10
Copy link
Contributor

i7 8700k, r9 fury, archlinux: there's a blue color on some games
Soulcalibur V:
selection_001
Master:
selection_004
UMVC3:
selection_002
selection_003

@Dokman
Copy link

Dokman commented Aug 13, 2018

tested i am having the same issue

@UltraStars3000
Copy link

CPU: Intel(R) Core(TM) i5-6300HQ 2.30GHz
GPU: Nvidia GeForce GTX 950M

Hyperdimension Neptunia [BLES01178] is having some graphical issues with characters during dialogs. Tested with all possible settings, and none seems to fix it.
PR:
image
Master:
image

Also a strange line is appearing at the top of the screen during loadings and 3D gameplay.
image

- A possible deadlock is still present if rsx is trying to get a super_ptr whilst the vm lock holder is in an access violation
  This patch makes this scenario very unlikely since each block need only be touched once
- Use proper time checking; depending on what is being done one 'tick' can
  be almost a millisecond long or several nanoseconds
- Avoid spamming the system timer unless necessary
- Some third party programs fall apart when multiple contexts are created
- Cascade memory writes by invalidating 'downstream' subsurfaces
- Fixup; always resolve for overlapping surfaces before sampling (force
  atlas gather test)
- Some formats are proven to ignore swizzle flag
  - DXT compressed textures
  - COMPRESSED_BG_GB class textures
- Some applications are using swizzled wide integer formats so those are confirmed to swizzle
- WIP optimizations for GL backend
- Tags framebuffer resources on first use (when on_write is called to verify memory)
- Texture cache now selects the best match and even sorts atlas writes with memory write order to avoid older data showing over newer one
- Some games overflow the program buffer e.g Resistance games
  The observed overflow is one instruction longer, likely an engine bug
with counting instructions
@ghost
Copy link

ghost commented Aug 18, 2018

Batman: Arkham Asylum
RPCS3.zip

@HenningJW
Copy link

HenningJW commented Aug 18, 2018

@EmulationChannel have you tested against master? I don't see a log for master. What is the error? What system do you use?

Your contributions are so often not helpful, because you are missing information and your tests are very superficial (missing comparisons with master etc.). People are making fun of you with emojis on Github and Discord, because of that. Please change that.

@kd-11
Copy link
Contributor Author

kd-11 commented Aug 18, 2018

Reported regressions remaining are likely caused by other changes already merged in master. I'm merging this as-is and if there are problems remaining please open an issue tracker.

@ihavenick
Copy link

ihavenick commented Aug 19, 2018

Prince of persia broken too. But i managed to boot the game by installing games update than copying files to main game then all other files to POP0 folder. But as you can see rendering is bugged
RPCS3.log.gz
princeof

old log https://github.com/RPCS3/rpcs3/files/2299920/RPCS3.log.gz

@13xforever
Copy link
Contributor

Fixes black knight in The Witch and the Hundred Knight with Write Color Buffers enabled.

Before

image

After

image

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

Successfully merging this pull request may close these issues.