Commit graph

64 commits

Author SHA1 Message Date
Eladash cb14805d78 rsx fp/vp analyzers: Fix strict type aliasing and improve codegen 2020-04-12 16:48:43 +03:00
kd-11 2985a39d2e rsx: Rewrite async decompiler 2020-03-09 14:59:25 +03:00
Nekotekina e4a81b1d13 Move Log.h to util/logs.hpp 2020-03-07 12:29:23 +03:00
Nekotekina 92e3eaf3ff Fix signed-unsigned comparisons and mark warning as error (part 2). 2020-02-19 22:54:58 +03:00
Silent 7f4e546f19 Protect m_storage.find(key) to fix a race 2020-02-02 22:28:14 +03:00
Nekotekina 15391f45d0 Modernize RSX logging (rsx_log variable) 2020-02-01 11:52:22 +03:00
Dravonic 94d2f97f27 Multithreaded shader compliation follow-up (#7190)
* Multithreaded load pipeline entries shader compliation stage

Co-authored-by: kd-11 <15904127+kd-11@users.noreply.github.com>
2020-01-06 21:59:59 +03:00
Nekotekina 28eacc616a C-style cast cleanup III 2019-12-01 00:32:44 +03:00
Emmanuel Gil Peyrot 56f82d2701 rsx: Wrap gsl::span definition into Utilities/span.h 2019-11-09 20:00:50 +01:00
Emmanuel Gil Peyrot 72cdf0b04c Replace gsl::span’s implementation with tcbrindle’s
This implementation optimises correctly on all relevant compilers,
unlike GSL’s which gave extremely slow code on any compiler other than
MSVC.

Supersedes #6948.
2019-11-09 19:30:06 +01:00
kd-11 401bd9112a rsx/prog: Warnings cleanup 2019-09-01 18:59:50 +03:00
Lassi Hämäläinen c963c51a60 Remove unnecessary header includes
- Manually removed lot of unneeded #includes to clean code and reduce
  compilation time
- Reordered some of the #includes to be in more logical order
2019-06-25 17:11:10 +03:00
Lassi Hämäläinen e9e87b8bd9 Add missing #includes to header files
- Multiple header files where missing #includes to other headers that
  where used in the header. Correct header was included in correct
  order in source files which caused everything to compile.
- Added missing #includes so header files correctly include all their
  dependencies and fixes problems with IDEs being unable to parse
  headers correctly due to missing symbols
2019-06-25 17:11:10 +03:00
scribam 44265aa27d rsx: Apply Clang-Tidy fix "modernize-use-equals-default" 2019-06-12 15:11:52 +03:00
scribam cba828384d rsx: Apply Clang-Tidy fix "modernize-pass-by-value" 2019-06-12 15:11:52 +03:00
Nekotekina dfd50d0185 Implement std::bit_cast<>
Partial implementation of std::bit_cast from C++20.
Also fix most strict-aliasing rule break warnings (gcc).
2019-06-02 23:22:16 +03:00
scribam 09c9996f31 Use empty() instead of comparing size() with 0
Recommendation from Clang-Tidy: https://clang.llvm.org/extra/clang-tidy/checks/readability-container-size-empty.html
2019-06-01 22:59:23 +03:00
scribam 6c5ea068c9 Remove redundant semicolons
Fix "-Wextra-semi" warnings
2019-05-12 18:32:11 +03:00
Nekotekina ca5158a03e Cleanup semaphore<> (sema.h) and mutex.h (shared_mutex)
Remove semaphore_lock and writer_lock classes, replace with std::lock_guard
Change semaphore<> interface to Lockable (+ exotic try_unlock method)
2018-09-03 23:00:36 +03:00
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