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: Bug fixes #2861

Merged
merged 26 commits into from Jun 22, 2017

Conversation

Projects
None yet
@kd-11
Contributor

kd-11 commented Jun 11, 2017

  • Fix stencil clear values - #2810
  • Fix some buffer misalignment crashes when using debuggers or faulty drivers
  • Fix an old regression with God of War I and II from the collection - #2626
  • Fix openGL clip space conversion (Z symmetry)
  • Add a workaround to fix shadow map generation
  • Add hardware PCF shadow support
  • Fix stencil buffer reset (Still a workaround atm)
  • Remove several hundred compilation warnings from rsx code
  • Improve SPIRV compilation speed by avoiding unnecessary SH context (re)creattion
  • Add a needed rsx method for wipeout HD
  • Fix index buffer generation when using a non-zero base offset
  • Drop vs user files from the repo
  • Added a toggle to ensure strict rendering mode. Currently only affects framebuffer feedback loops. When disabled, we ignore the feedback loop in vulkan and issue a texture barrier in ogl. When enabled, a duplicate texture is created to ensure this is not an issue but there is a tangible performance penalty. Defaults to OFF
  • Re-organized the graphics options tab a bit to separate main options from debugging options.

Current bugs

  • Crash compiling textureProj due to PCF samplers support
  • Crash when debug overlay is enabled (vulkan only)
@mention-bot

This comment has been minimized.

Show comment
Hide comment
@mention-bot

mention-bot Jun 11, 2017

@kd-11, thanks for your PR! By analyzing the history of the files in this pull request, we identified @vlj, @Nekotekina and @jarveson to be potential reviewers.

mention-bot commented Jun 11, 2017

@kd-11, thanks for your PR! By analyzing the history of the files in this pull request, we identified @vlj, @Nekotekina and @jarveson to be potential reviewers.

@kd-11 kd-11 referenced this pull request Jun 11, 2017

Closed

Regression: FEAR 2 Demo #2810

@MarioSonic2987

This comment has been minimized.

Show comment
Hide comment
@MarioSonic2987

MarioSonic2987 commented Jun 11, 2017

@kd-11
This PR:
image 1
Master:
image

@Xcedf

This comment has been minimized.

Show comment
Hide comment
@Xcedf

Xcedf Jun 11, 2017

Confirm GoW issue is fixed, also fixed same depth issue in Ni No Kuni Demo
thx for the awesome work

Xcedf commented Jun 11, 2017

Confirm GoW issue is fixed, also fixed same depth issue in Ni No Kuni Demo
thx for the awesome work

@kd-11 kd-11 changed the title from rsx: Bug fixes to [WIP] rsx: Bug fixes Jun 12, 2017

@kd-11

This comment has been minimized.

Show comment
Hide comment
@kd-11

kd-11 Jun 12, 2017

Contributor

Marking as WIP since touching this has uncovered alot of other issues.

Contributor

kd-11 commented Jun 12, 2017

Marking as WIP since touching this has uncovered alot of other issues.

@woj1993

This comment has been minimized.

Show comment
Hide comment
@woj1993

woj1993 Jun 13, 2017

@kd-11 What issues?
PS. Are you sure this is best option? I worry you fix might stay marked as WIP too long and will need another rewrite if it isn't merged now.

woj1993 commented Jun 13, 2017

@kd-11 What issues?
PS. Are you sure this is best option? I worry you fix might stay marked as WIP too long and will need another rewrite if it isn't merged now.

@AniLeo

This comment has been minimized.

Show comment
Hide comment
@AniLeo

AniLeo Jun 13, 2017

Contributor

@woj1993 no need to worry, it will get merged relatively soon. We're running internal tests.

Contributor

AniLeo commented Jun 13, 2017

@woj1993 no need to worry, it will get merged relatively soon. We're running internal tests.

@takhlaq

This comment has been minimized.

Show comment
Hide comment
@takhlaq

takhlaq Jun 20, 2017

Contributor

The Legend of Heroes: Trails of Cold Steel [BLUS31572]
looks good
Trails of Cold Steel

Contributor

takhlaq commented Jun 20, 2017

The Legend of Heroes: Trails of Cold Steel [BLUS31572]
looks good
Trails of Cold Steel

@Xcedf

This comment has been minimized.

Show comment
Hide comment
@Xcedf

Xcedf Jun 20, 2017

Magnificent changes, now have perfect shadows in Tekken6 and Soul Calibur IV
but i also have a slowdown in some games if compare to master
here's the example,
master
31
this pr
32
will try to find more specific commit later

Xcedf commented Jun 20, 2017

Magnificent changes, now have perfect shadows in Tekken6 and Soul Calibur IV
but i also have a slowdown in some games if compare to master
here's the example,
master
31
this pr
32
will try to find more specific commit later

@kd-11

This comment has been minimized.

Show comment
Hide comment
@kd-11

kd-11 Jun 20, 2017

Contributor

Disable the invalidate cache option. Should fix performance. Report if it does not.

Contributor

kd-11 commented Jun 20, 2017

Disable the invalidate cache option. Should fix performance. Report if it does not.

@Xcedf

This comment has been minimized.

Show comment
Hide comment
@Xcedf

Xcedf Jun 20, 2017

Unfortunately not, doesn't affect performance at all tried both on and off
another example of fps drop Heavy Rain Demo menu
master 18fps
this pr 14fps

Xcedf commented Jun 20, 2017

Unfortunately not, doesn't affect performance at all tried both on and off
another example of fps drop Heavy Rain Demo menu
master 18fps
this pr 14fps

@kd-11

This comment has been minimized.

Show comment
Hide comment
@kd-11

kd-11 Jun 20, 2017

Contributor

Odd. I'll look into it.

Contributor

kd-11 commented Jun 20, 2017

Odd. I'll look into it.

@SaltyCucumber

This comment has been minimized.

Show comment
Hide comment
@SaltyCucumber

SaltyCucumber Jun 20, 2017

Demon's souls reborn with this PR
before
after

SaltyCucumber commented Jun 20, 2017

Demon's souls reborn with this PR
before
after

@Xcedf

This comment has been minimized.

Show comment
Hide comment
@Xcedf

Xcedf Jun 20, 2017

Another issue
several games are fail to compile shaders
Army of Two
Lolipop Chainsaw
OGL:
F {rsx::thread} : class gl::glsl::link_exception thrown: linkage failed: 'Fragment info

0(115) : error C1031: swizzle mask element not present in operand "xyz"
0(128) : error C1031: swizzle mask element not present in operand "xyz"
0(130) : error C1031: swizzle mask element not present in operand "xyz"
0(133) : error C1031: swizzle mask element not present in operand "xyz"
(0) : error C2003: incompatible options for link
Vulkan:
E {rsx::thread} RSX: ERROR: 0:125: 'xyz' : vector swizzle selection out of range
ERROR: 0:125: 'assign' : cannot convert from ' global highp float' to ' temp highp 3-component vector of float'
ERROR: 0:125: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
E {rsx::thread} RSX:
F {rsx::thread} : class std::runtime_error thrown: Failed to compile fragment shader
(in file C:\rpcs3\rpcs3\Emu\RSX\VK\VKFragmentProgram.cpp:492)

Xcedf commented Jun 20, 2017

Another issue
several games are fail to compile shaders
Army of Two
Lolipop Chainsaw
OGL:
F {rsx::thread} : class gl::glsl::link_exception thrown: linkage failed: 'Fragment info

0(115) : error C1031: swizzle mask element not present in operand "xyz"
0(128) : error C1031: swizzle mask element not present in operand "xyz"
0(130) : error C1031: swizzle mask element not present in operand "xyz"
0(133) : error C1031: swizzle mask element not present in operand "xyz"
(0) : error C2003: incompatible options for link
Vulkan:
E {rsx::thread} RSX: ERROR: 0:125: 'xyz' : vector swizzle selection out of range
ERROR: 0:125: 'assign' : cannot convert from ' global highp float' to ' temp highp 3-component vector of float'
ERROR: 0:125: '' : compilation terminated
ERROR: 3 compilation errors. No code generated.
E {rsx::thread} RSX:
F {rsx::thread} : class std::runtime_error thrown: Failed to compile fragment shader
(in file C:\rpcs3\rpcs3\Emu\RSX\VK\VKFragmentProgram.cpp:492)

@kd-11

This comment has been minimized.

Show comment
Hide comment
@kd-11

kd-11 Jun 20, 2017

Contributor

Thats new with this build? If so, attach fragmentprogram.spirv here

Contributor

kd-11 commented Jun 20, 2017

Thats new with this build? If so, attach fragmentprogram.spirv here

@Xcedf

This comment has been minimized.

Show comment
Hide comment
@Xcedf

Xcedf Jun 20, 2017

Yes it's on this build, master is fine, here's the new files
https://mega.nz/#!rcZWmYrL!d01JENkZUAx514DmAB7hi7Xa1qL6HOBMZxpqngjJ9MQ

Xcedf commented Jun 20, 2017

Yes it's on this build, master is fine, here's the new files
https://mega.nz/#!rcZWmYrL!d01JENkZUAx514DmAB7hi7Xa1qL6HOBMZxpqngjJ9MQ

@Sora3100

This comment has been minimized.

Show comment
Hide comment
@Sora3100

Sora3100 Jun 20, 2017

OpenGL (the blue and normal textures seen below flicker along with the eyes):
y81wz 1

Vulkan:
g4uax 1

Also, the command menu in the bottom left seems to have a weird display bug
I can also confirm that Xillia 1/2 now displays shadows

Sora3100 commented Jun 20, 2017

OpenGL (the blue and normal textures seen below flicker along with the eyes):
y81wz 1

Vulkan:
g4uax 1

Also, the command menu in the bottom left seems to have a weird display bug
I can also confirm that Xillia 1/2 now displays shadows

@MarioSonic2987

This comment has been minimized.

Show comment
Hide comment
@MarioSonic2987

MarioSonic2987 Jun 21, 2017

Many games are improved with this PR:
gtav
nsunsr
ssbs
tekkenrevolution

MarioSonic2987 commented Jun 21, 2017

Many games are improved with this PR:
gtav
nsunsr
ssbs
tekkenrevolution

@Xcedf

This comment has been minimized.

Show comment
Hide comment
@Xcedf

Xcedf Jun 21, 2017

Some info about my issues:
performance regression caused by cd3d7ef or previous 86465e9(but it has compilation issues, so can't tell for sure now)

Xcedf commented Jun 21, 2017

Some info about my issues:
performance regression caused by cd3d7ef or previous 86465e9(but it has compilation issues, so can't tell for sure now)

@kd-11

This comment has been minimized.

Show comment
Hide comment
@kd-11

kd-11 Jun 21, 2017

Contributor

Thanks alot. Its probably the former since it copies a texture in GPU memory and spams the log. Not sure it should be disabled though as using a current render target as input is a spec violation. I need to check for a way around that.

Contributor

kd-11 commented Jun 21, 2017

Thanks alot. Its probably the former since it copies a texture in GPU memory and spams the log. Not sure it should be disabled though as using a current render target as input is a spec violation. I need to check for a way around that.

@Xcedf

This comment has been minimized.

Show comment
Hide comment
@Xcedf

Xcedf Jun 21, 2017

You're welcome
As for shader compilation issue: commit b31d937 is the cause
edited my pervious commit, gave wrong revision sorry
and slowdowns issue it's cd3d7ef for sure
tested only for vulkan, file VKTextureCache.h commenting out lines 492-497 fixes slowdowns, other code cause no slowdowns

Xcedf commented Jun 21, 2017

You're welcome
As for shader compilation issue: commit b31d937 is the cause
edited my pervious commit, gave wrong revision sorry
and slowdowns issue it's cd3d7ef for sure
tested only for vulkan, file VKTextureCache.h commenting out lines 492-497 fixes slowdowns, other code cause no slowdowns

@kd-11

This comment has been minimized.

Show comment
Hide comment
@kd-11

kd-11 Jun 22, 2017

Contributor

Disabling those lines allows for a pretty serious spec violation that causes heavy flickering and broken graphics in some cases. It needs some more work to prevent the slowdown.

Contributor

kd-11 commented Jun 22, 2017

Disabling those lines allows for a pretty serious spec violation that causes heavy flickering and broken graphics in some cases. It needs some more work to prevent the slowdown.

@Grima04

This comment has been minimized.

Show comment
Hide comment
@Grima04

Grima04 Jun 22, 2017

Grand Theft Auto V BLES01807

F 0:04:29.285507 {rsx::thread} class gl::glsl::link_exception thrown: linkage failed: 'Vertex info
0(77) : error C0000: syntax error, unexpected '.', expecting ')' at token "."
(0) : error C2003: incompatible options for link

LOG:
RPCS3_GTAV_22-06-2017.zip

Video:
https://www.youtube.com/watch?v=YUn41FgN6eE

Grima04 commented Jun 22, 2017

Grand Theft Auto V BLES01807

F 0:04:29.285507 {rsx::thread} class gl::glsl::link_exception thrown: linkage failed: 'Vertex info
0(77) : error C0000: syntax error, unexpected '.', expecting ')' at token "."
(0) : error C2003: incompatible options for link

LOG:
RPCS3_GTAV_22-06-2017.zip

Video:
https://www.youtube.com/watch?v=YUn41FgN6eE

@kd-11 kd-11 changed the title from [WIP] rsx: Bug fixes to rsx: Bug fixes Jun 22, 2017

@Xcedf

This comment has been minimized.

Show comment
Hide comment
@Xcedf

Xcedf Jun 22, 2017

Confirm, both issues i've reported are fixed now, great work as usual

Xcedf commented Jun 22, 2017

Confirm, both issues i've reported are fixed now, great work as usual

kd-11 added some commits Jun 12, 2017

gl: Fix clip-space -> depth conversion. Fixes remaining depth read is…
…sues

- Also set some default values for samplers in a cleaner way using their 'natural' float values
rsx: Discard surface store contents once per frame (temp workaround)
Need to find the proper command issued to discard all surfaces
vk/gl: Do not sample currently bound render targets
- Create temporary copies for use with the draw call instead
gl: Properly emulate signed normalized wide integers
Another fix for signed normalized formats; single component vectors are swizzled
rsx/gl/vk: Invert default stencil values
- Fixes stencil volume shadows in a few games. This is part of the surface invalidation workarounds
rsx: Handle non-zero base vertex better
- Vertex buffer contents treat the base vertex as vertex 0 so we do the same for indices

rsx: Fix vertex base indexing

rsx: Properly fix non-zero offset indexed rendering
rsx: Code cleanup. Fixes several dozen warnings
- Wrap unused parameters as comments to prevent C1400
- Fix sized variable conversions with explicit casts
rsx: Bug fixes
rsx: Give more info when ring buffer allocations fail

@kd-11 kd-11 merged commit 72edf26 into RPCS3:master Jun 22, 2017

2 checks passed

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

This comment has been minimized.

Show comment
Hide comment
@uvraj

uvraj Jul 19, 2017

unbenannt
having loadscreen issues

uvraj commented Jul 19, 2017

unbenannt
having loadscreen issues

@uvraj

This comment has been minimized.

Show comment
Hide comment
@uvraj

uvraj Jul 19, 2017

unbenannt
PR looks good so far

uvraj commented Jul 19, 2017

unbenannt
PR looks good so far

@uvraj

This comment has been minimized.

Show comment
Hide comment
@uvraj

uvraj Jul 19, 2017

F {rsx::thread} class std::runtime_error thrown: Unknown texture dimension 0
(in file C:\rpcs3\rpcs3\Emu\RSX\gcm_enums.cpp:137) getting this error

uvraj commented Jul 19, 2017

F {rsx::thread} class std::runtime_error thrown: Unknown texture dimension 0
(in file C:\rpcs3\rpcs3\Emu\RSX\gcm_enums.cpp:137) getting this error

@uvraj

This comment has been minimized.

Show comment
Hide comment
@uvraj

uvraj Jul 19, 2017

unbenannt
games like minecraft are running pretty well :)

uvraj commented Jul 19, 2017

unbenannt
games like minecraft are running pretty well :)

@kd-11

This comment has been minimized.

Show comment
Hide comment
@kd-11

kd-11 Jul 19, 2017

Contributor

This was merged and closed 2 weeks ago. Latest rsx PR is #3026

Contributor

kd-11 commented Jul 19, 2017

This was merged and closed 2 weeks ago. Latest rsx PR is #3026

@kd-11 kd-11 deleted the kd-11:vulkan branch Oct 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment