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: Major Fixes #4469

Merged
merged 17 commits into from Apr 25, 2018
Merged

rsx: Major Fixes #4469

merged 17 commits into from Apr 25, 2018

Conversation

kd-11
Copy link
Contributor

@kd-11 kd-11 commented Apr 21, 2018

Contains several major improvements

  • OpenGL textures reimplemented. Texture images store byte data only and texture views now define how to interpret the data storage. This makes emulation easier and more accurate.
  • OpenGL - implement untyped memory transfer when using blit engine. This allows arbitrary typecasts including completely unrelated formats. Fixes some games needing cpu blit. Vulkan implementation to follow when current implementation is more complete.
  • Vulkan - Fix WCB paths for multibyte formats. They were completely broken.
  • Vulkan - Many spec compliance fixes
  • Fix a section leak in texture cache. This could cause lockups, crashes and performance degrading over time.
  • Implement G8B8 framebuffer write and clear mask decoding remap.
  • Fix an ancient bug with CLEAR_SURFACE color mask decoding.

Other

  • Fix performance counters. Some applications use a jump-to-self to make RSX idle when waiting for Cell.
  • Many other minor texture cache fixes

@MarioSonic2987
Copy link
Contributor

MarioSonic2987 commented Apr 21, 2018

image
Shadow in R&C 3 is a bit broken.

Edit: In OpenGL, shadow is fine.
image

@Xcedf
Copy link

Xcedf commented Apr 21, 2018

fixes the remaining part of #3031
UFC 2009 OGL had Yellow filter and Vulkan had blackscreen
now both renders are fixed
1
same for Simpsons The game
2
Haze
3
Perhaps Others too
Great Job as usual

@MarioSonic2987
Copy link
Contributor

Fixes yellow filter with OpenGL and blackscreen with Vulkan in Grid:

OpenGL:
image
image

Vulkan:
image
image

@MarioSonic2987
Copy link
Contributor

Also affects Tekken Tag Tournament 2:

image
image

@JusicP
Copy link

JusicP commented Apr 21, 2018

Fixes #4189

const u16 src_w = (const u16)((f32)dst.clip_width / scale_x);
const u16 src_h = (const u16)((f32)dst.clip_height / scale_y);
u16 src_w = (const u16)((f32)dst.clip_width / scale_x);
u16 src_h = (const u16)((f32)dst.clip_height / scale_y);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for the cast to remain const.

alpha = false;
}

inline color4f decode_border_color(u32 colorref)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why it's not static like the rest?

@MarioSonic2987
Copy link
Contributor

There's a dark shadow around the character's one in Vulkan:
image

But with OpenGL, crashes before going to main menu (after creating your profile):
Log OpenGL

@stride21
Copy link

ico 1
ico 2
ICO no longer has an issue with yellow filter in OpenGL and black screen in Vulkan.

@JMC47
Copy link

JMC47 commented Apr 21, 2018

I can confirm an issue with shadows in Vulkan with NHL09, much akin to the grid demo shown above.

image

The issue is not present in OpenGL

@kd-11
Copy link
Contributor Author

kd-11 commented Apr 21, 2018

Issue is because vulkan does not support custom border color like opengl. You have to pick from 3 presets. Dont worry too much about it, we'll improve the preset selection code.

@stride21
Copy link

capture
inFamous 2 no longer has a white screen while using Vulkan, it now looks just like OpenGL.

@isshininu
Copy link
Contributor

Blocky lighting in Silent Hill 2 (from Silent Hill: HD Collection) on Vulkan.
542
RPCS3.log.gz

@kd-11
Copy link
Contributor Author

kd-11 commented Apr 21, 2018

I already said not to post more border color issues. You can clearly see the shadow border breaks at the character's feet.

@isshininu
Copy link
Contributor

oops, didn't see that

m_flush_always_cache[memory_address] = memory_size;

//Test for invalidated sections from surface cache occupying same address range
auto &overlapped = find_texture_from_range(memory_address, memory_size);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const auto &overlapped?

@Illynir
Copy link

Illynir commented Apr 21, 2018

Nier is too white now:

sans titre

@kd-11
Copy link
Contributor Author

kd-11 commented Apr 21, 2018

Potential fix for the shadow borders has been added. Check if shadow regressions have been fixed.

@hbzlmx
Copy link

hbzlmx commented Apr 21, 2018

Where to download rpcs3 rsx_wip?

@MarioSonic2987
Copy link
Contributor

image
Still the same.

@Illynir
Copy link

Illynir commented Apr 21, 2018

Or too black also:

sans titre

@isshininu
Copy link
Contributor

Aww, is shadow border fix for my issue?
RPCS3.log.gz
543

@kd-11
Copy link
Contributor Author

kd-11 commented Apr 21, 2018

Need opengl RDC (I know it works fine with OGL but vulkan has no notion of a border color)

@jon-reid
Copy link

RDR - Gets much further into the game now, very impressive
Crashed at this point https://prnt.sc/j89lty
Crashed after i made Chrome the active window, perhaps that caused it/coincidence

RPCS3.log.gz

@MarioSonic2987
Copy link
Contributor

RenderDoc OpenGL (R&C3)

@kd-11
Copy link
Contributor Author

kd-11 commented Apr 21, 2018

I think grid would have been better or at least something where the shadow clearly occupied space it shouldn't be. Not sure whats up with R&C3 but there doesnt seem to be any problem with the border (its <1,1,1,1> which will resolve correctly). Probably unrelated to the others but I'm not sure yet.

@toccata10
Copy link
Contributor

Can't compile on ArchLinux:

[ 59%] Building CXX object rpcs3/CMakeFiles/rpcs3.dir/Emu/RSX/GL/GLRenderTargets.cpp.o
cc1plus: warning: /home/jo/tmp/rpcs3/kd11/rpcs3_build/rpcs3/cotire/rpcs3_CXX_prefix.hxx.gch : non utilisé parce que « __STDC_CONSTANT_MACROS » est défini [-Winvalid-pch]
In file included from /home/jo/tmp/rpcs3/kd11/rpcs3/rpcs3/Emu/RSX/GL/GLTextureCache.h:19:0,
                 from /home/jo/tmp/rpcs3/kd11/rpcs3/rpcs3/Emu/RSX/GL/GLGSRender.h:5,
                 from /home/jo/tmp/rpcs3/kd11/rpcs3/rpcs3/Emu/RSX/GL/GLRenderTargets.cpp:3:
/home/jo/tmp/rpcs3/kd11/rpcs3/rpcs3/Emu/RSX/GL/../Common/texture_cache.h: Dans l'instanciation de « void rsx::texture_cache<commandbuffer_type, section_storage_type, image_resource_type, image_view_type, image_storage_type, texture_format>::lock_memory_region(image_storage_type*, u32, u32, u32, u32, u32, Args&& ...) [avec Args = {gl::texture::format&, gl::texture::type&, bool&}; commandbuffer_type = void*; section_storage_type = gl::cached_texture_section; image_resource_type = gl::texture*; image_view_type = gl::texture_view*; image_storage_type = gl::texture; texture_format = gl::texture::format; u32 = unsigned int] » :
/home/jo/tmp/rpcs3/kd11/rpcs3/rpcs3/Emu/RSX/GL/GLRenderTargets.cpp:498:67:   requis depuis ici
/home/jo/tmp/rpcs3/kd11/rpcs3/rpcs3/Emu/RSX/GL/../Common/texture_cache.h:970:10: error: impossible de lier la référence d'une l-valeur non constante de type « std::vector<gl::cached_texture_section*, std::allocator<gl::cached_texture_section*> >& » à une r-valeur de type « std::vector<gl::cached_texture_section*, std::allocator<gl::cached_texture_section*> > »
    auto &overlapped = find_texture_from_range(memory_address, memory_size);
          ^~~~~~~~~~
/home/jo/tmp/rpcs3/kd11/rpcs3/rpcs3/Emu/RSX/GL/../Common/texture_cache.h: Dans l'instanciation de « void rsx::texture_cache<commandbuffer_type, section_storage_type, image_resource_type, image_view_type, image_storage_type, texture_format>::lock_memory_region(image_storage_type*, u32, u32, u32, u32, u32, Args&& ...) [avec Args = {gl::texture::format&, gl::texture::type&, bool}; commandbuffer_type = void*; section_storage_type = gl::cached_texture_section; image_resource_type = gl::texture*; image_view_type = gl::texture_view*; image_storage_type = gl::texture; texture_format = gl::texture::format; u32 = unsigned int] » :
/home/jo/tmp/rpcs3/kd11/rpcs3/rpcs3/Emu/RSX/GL/GLRenderTargets.cpp:513:55:   requis depuis ici
/home/jo/tmp/rpcs3/kd11/rpcs3/rpcs3/Emu/RSX/GL/../Common/texture_cache.h:970:10: error: impossible de lier la référence d'une l-valeur non constante de type « std::vector<gl::cached_texture_section*, std::allocator<gl::cached_texture_section*> >& » à une r-valeur de type « std::vector<gl::cached_texture_section*, std::allocator<gl::cached_texture_section*> > »
cc1plus: warning: option « -Wno-unused-command-line-argument » non reconnue sur la ligne de commande
make[2]: *** [rpcs3/CMakeFiles/rpcs3.dir/build.make:5327: rpcs3/CMakeFiles/rpcs3.dir/Emu/RSX/GL/GLRenderTargets.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:240: rpcs3/CMakeFiles/rpcs3.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

@makotech222
Copy link

Getting about a 10 fps increase in Unnamed game 5. This is with latest artifact build. Nice job!

@MSuih
Copy link
Member

MSuih commented Apr 21, 2018

I guess this is better for you kd? Yakuza 4 OGL renderdoc

Looks like this on Vulkan

@kd-11
Copy link
Contributor Author

kd-11 commented Apr 21, 2018

Good capture but unfortunately renderdoc wont open it on my system (consumes all available system memory and kills windows). Maybe you can try a simpler scene? As long as memory consumption when loading does not eat more than ~7GB will be fine.

@AniLeo
Copy link
Member

AniLeo commented Apr 23, 2018

I went off AMD's website, it says OpenGL 4.1 Support
It could be outdated though

@bigol83
Copy link

bigol83 commented Apr 23, 2018

I checked i already have crimson 16.2.1. I know my graphic card has opengl 4.1.

@AniLeo
Copy link
Member

AniLeo commented Apr 23, 2018

RPCS3 requires OpenGL 4.3. Let's not spam the PR any further.

@kd-11
Copy link
Contributor Author

kd-11 commented Apr 24, 2018

https://community.amd.com/message/2858634.
GCN1-4 AMD bug reported, will add a workaround before merging this but I'm afraid pre-GCN will likely still not work as it seems to have another separate bug.

@jobs-git
Copy link

Experiences out of memory issue in D3 even when there is enough vram and ram on Nvidia gtx 1060 and 24 Gb ram

@kd-11
Copy link
Contributor Author

kd-11 commented Apr 24, 2018

If using vulkan on D3 try cpu blit + wcb - theres some stuff I disabled in there and only fixed properly on opengl for now.

@isshininu
Copy link
Contributor

Vulkan blocky shadow fixed!
RPCS3.log.gz
546

@kd-11 kd-11 changed the title [WIP] rsx: Major Fixes rsx: Major Fixes Apr 25, 2018
@kd-11 kd-11 merged commit 98b715d into RPCS3:master Apr 25, 2018
@kd-11
Copy link
Contributor Author

kd-11 commented Apr 25, 2018

Open tickets for any regressions. Follow-up patches should be available in the next few days.

@LuismaSP89
Copy link

This is marked as closed and merged to master. But I can´t find the build ¿? the last build merged is #4422 3 days ago

@Relsig
Copy link

Relsig commented Apr 25, 2018

@LuismaSP89 this commit was merged ~2hrs ago, have some patience.

Every message sent here dings every dev subscribed to this topic.

your question is related to builds and their speed/schedule, not this particular commit so it doesn't really fit here. Please use the forums for questions/comments that aren't related directly to testing/debugging the commit.

@LuismaSP89
Copy link

@Relsig I only wanted to help and report a possible problem with the builds since normally takes only a few minutes between the merge and the download link in the "downloads" section. And I know what's the use of this commit section, I'm not a rookie in this.

@Relsig
Copy link

Relsig commented Apr 25, 2018 via email

@Dokman
Copy link

Dokman commented Apr 25, 2018

i am getting Occlusion Overflow with Infamous

E {rsx::thread} RSX: Occlusion pool overflow x33295

@Dizziex
Copy link

Dizziex commented Apr 26, 2018

Wipeout seems a bit more playable after the last release, I can actually get about 20fps ingame, without graphic issues

@BryanAM7
Copy link

Hi, GOW 2 HD just run worse, after this ver it runs at 40, 60+ FPS.
In this ver its runs at 16 -40 fps with short picks of 60.
Just that.
Thx for the great work!!!

@FlatDudeInVR
Copy link

Got from straight new game up to that point (see screenshot) in RDR (BLES01294) then crash.
FPS ranging from 5-10 in gameplay sections (can be 25 max when "locking" player camera top-down or down-top perspective) and 15-30 in cutscenes.

rpcs3_0 05-6692_rdr-bles01294

@legend800
Copy link

Do not spam a closed PR. Why did you post that @FlatDudeInVR? Are you blaming this PR for that crash?

If you are certain it's a regression, you can file a Git Issue as instructed and not comment in a 'merged' PR. To be certain you need to test the build right before the merge and then the build with this PR merged and confirm it does not crash here in the previous build and you can reproduce it easily on the PR build.

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