Commit graph

45 commits

Author SHA1 Message Date
Nekotekina 1c6c24f8ac Update GSL and yaml-cpp submodules 2018-08-25 01:15:47 +03:00
kd-11 0267221586 Minor optimizations and fixes
- FIFO: avoid multiline spam
- VK: Fix program setup counter
- FS: Precalculate fragment constants buffer size during analysis step
2018-08-18 16:14:30 +03:00
kd-11 19d808d378 rsx/gl: Minor cleanup and optimization
- Track register change status
- Remove unused gl classes
2018-07-22 17:19:59 +03:00
kd-11 e7f30640ef rsx: Async shader compilation
- Defer compilation process to worker threads
- vulkan: Fixup for graphics_pipeline_state.
  Never use struct assignment operator on vk** structs due to padding after sType member (4 bytes)
2018-07-14 15:19:56 +03:00
kd-11 fa55a8072c rsx: Improve vertex textures support
- Adds proper support for vertex textures, including dimensions other than 2D textures
- Minor analyser fixup, removes spurious 'analyser failed' errors
- Minor optimizations for program state tracking
2018-07-12 18:02:28 +03:00
kd-11 2ca935a26b vp: Improve vertex program analyser
- Adds dead code elimination
- Fix absolute branch target addresses to take base address into account
- Patch branch targets relative to base address to improve hash matching
- Bumps shader cache version
- Enables shader logging option to write out vertex program binary,
  helpful when debugging problems.
2018-07-07 16:20:33 +03:00
Dravonic 400079a006 Parallel shader cache loading (#4677)
* Parallel shader cache loading
2018-06-01 19:49:29 +03:00
kd-11 4836a03a7d rsx: Fix build 2018-05-13 14:44:14 +03:00
kd-11 a52ea7f870 rsx: Improve fragment and vertex program usage
- Introduces a gpu program analyser step to examine shader contents before attempting compilation or cache search
  - Avoids detecting shader as being different because of unused textures having state changes
  - Adds better program size detection for vertex programs
- Improved vertex program decompiler
  - Properly support CAL type instructions
  - Support jumping over instructions marked with a termination marker with BRA/CAL class opcodes
  - Fix SRC checks and abort
  - Fix CC register initialization
  - NOTE: Even unused SRC registers have to be valid (usually referencing in.POS)
2018-05-13 14:44:14 +03:00
kd-11 27552891ad rsx/fp: Improvements
- Export some debug information in the free texture register space components zw
  Very useful when analysing renderdoc captures
- Enable shadow comparison on depth as long as compare function is active and texture is uploaded for depth read
  Some engines (UE3) read all the components in the shader and use mul/mad with the result
2018-03-25 13:31:06 +03:00
kd-11 ffe6c9ba5a fix linux builds 2018-03-13 18:55:03 +03:00
kd-11 87741141f1 rsx/vulkan: Add post-compilation key validation and dynamically determine attachment write maks based on decompiled shader
- A new step is added between decompilation and pipeline object creation allowing for properties to be updated based on shader contents
- Allos masking off attachment writes that are unmodified in the shader
2018-03-13 18:55:03 +03:00
kd-11 705820c430 rsx: Nvidia driver compatibility workarounds
- Sanitize NaN values before they reach the driver. On nvidia (X * NaN = X)
2018-03-13 18:55:03 +03:00
Nekotekina 61de20a633 RSX: remove SSSE3 dependency 2017-12-20 00:04:08 +03:00
kd-11 90c2324e47 rsx: Program cache fixes
- Reorganize storage hash vs ucode hash
- Scan for actual fragment program start in case leading NOPed code precedes the actual instructions
-- e.g FEAR2 Demo has over 32k of padding before actual program code that messes up hashes
2017-12-04 18:22:18 +03:00
Zion Nimchuk 3a9ae2df9e silence warnings in RSX stuff 2017-11-30 18:07:19 +03:00
kd-11 12ab03b0b5 rsx/gl: Implement resolution scaling
rsx: Revise wpos calculation to take resolution scale into account
2017-10-09 20:25:41 +03:00
kd-11 47202d5839 rsx: Set up patch functionality for program coeffecients 2017-10-09 20:25:41 +03:00
kd-11 334327df67 rsx: Add a success message on program compile completion
- Should help users wondering if rpcs3 'froze' during shader compile
2017-08-16 23:58:30 +03:00
kd-11 00c6a589a5 rsx/util: Add simple consistent hash function
rsx/vk/shaders_cache: Move vp control mask to dynamic state

rsx/vk/gl: adds a shader cache for GL. Also Separates pipeline storage for each backend

rsx: Add more texture state variables to the cache
2017-08-16 23:58:30 +03:00
kd-11 c7dca1dbef rsx/vk: Implement shaders cache and fix broken pipeline_storage comparison and hash
- Fix pipeline state storage to uniquely store each pipeline variant
- Adds a progress bar to indicate loading is taking place
2017-08-16 23:58:30 +03:00
raven02 a270ac7f02 GL: re-use common fp/vp decompiler (#2100) 2016-08-26 22:23:23 +08:00
kd-11 9beb2d8ae0 vk/rsx: Bug fixes (#2092)
* vk: fix separate front and back lighting

* vk: Inlined arrays can have emulated primitives too!

* vk: Use float input attribs for better compatibility

* vk: Free resources during shutdown
2016-08-24 08:50:07 +08:00
Nekotekina 84d0d396ed EXPECTS usage removed 2016-08-15 16:29:38 +03:00
Nekotekina a7e808b35b EXCEPTION macro removed
fmt::throw_exception<> implemented
::narrow improved
Minor fixes
2016-08-08 19:19:32 +03:00
Nekotekina 266db1336d The rest 2016-05-23 16:22:25 +03:00
Ivan 75fe95eeb1 GSL moved from stdafx.h (#1676)
Added GSL.h helper for correct including
2016-04-20 02:32:27 +03:00
Nekotekina b85a68e8a1 Partial commit: RSX 2016-04-15 19:22:36 +03:00
Vincent Lejeune 149fa9d750 rsx/common: Make RSXFragmentProgram key and not just pointer. 2016-01-27 23:16:06 +01:00
Nekotekina 7417033d7f GLGSRender fix 2016-01-27 18:14:39 +03:00
Vincent Lejeune 4ce4cf5242 rsx: Add vertex input and output in RSXVertexProgram. 2016-01-22 01:24:54 +01:00
Vincent Lejeune 1ce49b60d9 rsx-debug/d3d12: Support all rtt formats. 2016-01-17 20:02:30 +01:00
Vincent Lejeune bab52c132d rsx/common/d3d12/gl: Clean ProgramStateCache
Use a_b_c format.
Use using =
Use tuple as output
Use RAII to delete program safely
Ensure const correctness.
2016-01-11 19:21:57 +01:00
Vincent Lejeune 3586c7613a rsx/common: Fix program state cache Shader program comparaison.
Comparaison was not taking the last instruction of shader into account.
Also remove "constant masking" since it wasn't actually usefull.

Fix DBZ: Burst Limits, SH3 and likely much more games.
2016-01-02 00:47:51 +01:00
Nekotekina 3ed603074c Changes done by [DH] rewritten
Added rsx_program_decompiler submodule
Added fs::dir iterator
Added fmt::match
2015-12-22 23:11:20 +03:00
Nekotekina aa811b6eef Cleanup (noexcept, unreachable)
%x formatting fixes
2015-12-20 15:41:07 +03:00
Vincent Lejeune c86cfef58e rsx/common: Remove getFragmentConstantOffsetsCache 2015-11-28 20:58:00 +01:00
Vincent Lejeune b9d8d9383a rsx/d3d12: dump program content when capturing frame 2015-11-24 23:34:03 +01:00
Vincent Lejeune 2a9895b7f0 rsx/d3d12: Move fragment constants filling code to ProgramStateCache 2015-11-06 20:08:45 +01:00
Nekotekina a974ee009e vm::var improved, cleanup
Mostly vm::var initialization introduced.
Added vm::make_var function.
2015-10-14 18:17:37 +03:00
DH 4a55ba3067 OpenGL renderer improvements
Flush program cache at thread exit
Use cached locations
2015-10-14 03:16:39 +03:00
Vincent Lejeune 095c8fa19b RSX/D3D12: Improve shader lookup performance 2015-08-26 18:45:57 +02:00
vlj 6a408301d7 d3d12: Another fix 2015-08-12 00:28:35 +02:00
Nekotekina 8c00dcd02d Bugfix 2015-07-10 04:31:21 +03:00
vlj 145f411324 RSX: Add a template class that helps caching programs. 2015-05-19 17:26:05 +02:00