Commit graph

487 commits

Author SHA1 Message Date
scribam 2e397e38a4 Typos 2020-04-14 17:06:58 +03:00
scribam f37adc4188 Add fallthrough attribute 2020-04-14 17:06:58 +03:00
kd-11 b301fecfd8 gl: Fix async shader compiler
- Removes glFinish hack.
- Adds proper server-side synchronization.
- Adds primary context detection to allow worker threads to be identified.
2020-04-05 16:35:20 +03:00
kd-11 4965bf7d7a gl/vk: Refactor draw call handling and stub shader interpreter
- Refactors backend draw call management to make it easier to extend
  functionality.
- Stubs shader interpreter functionality.
2020-03-23 14:47:28 +03:00
kd-11 2985a39d2e rsx: Rewrite async decompiler 2020-03-09 14:59:25 +03:00
Megamouse ee46ad1ca9 move overlays code to headers 2020-02-26 23:43:18 +01:00
Megamouse fe75311be2 move config structs to own files and clean up some headers 2020-02-17 15:08:17 +03:00
Eladash b7043ce000 Make rsx::get_address report caller location 2020-02-08 22:18:56 +03:00
Nekotekina c0f80cfe7a Use attributes for LIKELY/UNLIKELY
Remove LIKELY/UNLIKELY macro.
2020-02-05 10:42:34 +03:00
Nekotekina 15391f45d0 Modernize RSX logging (rsx_log variable) 2020-02-01 11:52:22 +03:00
kd-11 7453e46a7c rsx: Refactor out complex present code into separate files
- Also restructures present code to have image lookup in a separate
re-usable function.
2020-01-18 19:52:52 +03:00
Megamouse 5e7d25ad35 overlays: refactor shader loading dialogs 2020-01-03 14:22:40 +01:00
Megamouse c4b4ce46b8 cellSaveData: don't pause apps during dialogs 2019-12-29 14:22:58 +01:00
kd-11 e1b734fd12 rsx: Fix linux build 2019-12-29 13:49:46 +03:00
kd-11 5be7f08965 rsx: Restructure ZCULL report retirement
- Prefer lazy retire model. Sync commands are sent out and the reports will be
  retired when they are available without forcing.

- To make this work with conditional rendering, hardware support is
  required where the backend will automatically determine visibility by
  itself during rendering.
2019-12-29 13:49:46 +03:00
kd-11 8dfea032f2 rsx: Remove deprecated do_method path that has been superceded by c++ inheritance for many years 2019-12-29 13:49:46 +03:00
Nekotekina 377e7d2a73 C-style cast cleanup VI 2019-12-04 17:56:22 +03:00
Emmanuel Gil Peyrot f76720ceb0 Remove extraneous ::narrow<int>() calls
GSL’s gsl::span didn’t use the correct type for its index_type, which is
why they were needed.
2019-11-09 19:30:06 +01:00
kd-11 63bbf11a76 vk: Add video out calibration pass
- Adds gamma correction and RGB range filters to output to match PS3
2019-10-31 14:43:24 +03:00
kd-11 35794dc3f2 vk: Add checks for alphaToOne support
- This feature is very rarely used, as alphaToCoverage is commonly used as a replacement for blending, not in addition to it.
2019-10-30 01:06:28 +03:00
kd-11 f7842b765f rsx: Implement packed format renormalization
- Renormalizes arbitrary N-bit values as 8-bit normalized.
- NV hardware performs integer normalization at 8 bits if the size is less than 8.
- This can cause significant arithmetic drift because the error is multiplied by a huge number when sampling.
2019-10-22 13:44:49 +03:00
kd-11 eee2237e19 rsx: Track uncached cache resources
- Uncacheable resources can be reused as soon as they're made visible to the draw call.
- Since they're likely to be reused every draw call until the shader changes, it is important to reuse as much as possible
2019-10-18 14:46:37 +03:00
kd-11 27f48fbc06 gl: Rewrite image transfer operations to support image subregions
- Working exclusively with full sized images is very expensive
2019-10-13 19:00:05 +03:00
kd-11 105d4b51e6 gl: Use compute shaders for typeless texture decode 2019-10-13 19:00:05 +03:00
kd-11 7a6e2e716f gl: Add a framework for compute shaders 2019-10-13 19:00:05 +03:00
kd-11 2275259bf5 rsx: Properly scale overlay passes to match drawable area 2019-09-28 13:24:14 +03:00
kd-11 e0005ec347 rsx: Refactoring and improvement
- Separate displayed statistics from actual backend statistics.
  Allows asynchronous flipping to work correctly as it just uses display stats.
  The real stats are used by the frame scope marker to determine behavior like engaging the FIFO optimizer or skipping draw calls correctly.
2019-09-19 23:10:09 +03:00
kd-11 2962e05f26 rsx: Implement per-RTT color masks
- Also refactors and simplifies some common code in surface store and rsx core
2019-08-27 21:59:02 +03:00
kd-11 27aeaf66bc gl: Restructure buffer objects to give more control over usage
- This allows creating buffers with no MAP bits set which should ensure they are created for VRAM usage only
- TODO: Implement compute kernels to avoid software fallback mode for pack/unpack operations
2019-08-27 21:59:02 +03:00
Nekotekina d2eba2387b Use g_fxo for display_manager 2019-08-27 03:50:15 +03:00
Nekotekina 928719b658 Use g_fxo for rsx::avconf 2019-08-27 03:50:15 +03:00
kd-11 3317e13b64 rsx: Hotfix for semaphore timeout bug
- Add pending flip requests as a reason to invoke the RSX local task handler and release the vblank semaphore
2019-08-26 22:33:29 +03:00
kd-11 3e28e4b1e0 rsx/decompiler: Restructure program register behavior
- Fix reading of varying registers in FP
  Different registers have different behavior
- Always write to varying registers. If a register is not written to, it is initialized to (0, 0, 0, 1)
- Reimplements two-sided lighting correctly without hacks
- Also bumps shader cache version
2019-08-26 20:03:31 +03:00
kd-11 9d981de96d rsx: Fix offloader deadlock
- Do not allow offloader to handle its own faults. Serialize them on RSX instead.
  This approach introduces a GPU race condition that should be avoided with improved synchronization.
- TODO: Use proper GPU-side synchronization to avoid this situation
2019-08-25 22:09:20 +03:00
kd-11 ca8b0da141 gl: Invalidate range before reading to prevent deadlock 2019-08-21 21:17:15 +03:00
kd-11 5e299111cc rsx/vk: Restructure surface access barriers and implement RCB/RDB
- Implements render target data load (aka Read Color Buffer/Read Depth Buffer)
- Refactors vulkan surface barrier to be much cleaner.
- Removes redundant surface barrier invocations after doing a merged load
  from surface cache.
- Adds explicit access modes when gathering surfaces from cache.
2019-08-18 20:45:48 +03:00
kd-11 dfe709d464 rsx: Surface cache restructuring
- Further improve aliased data preservation by unconditionally scanning.
  Its is possible for cache aliasing to occur when doing memory split.
- Also sets up for RCB/RDB implementation
2019-08-18 20:45:48 +03:00
RipleyTom 87bf0386c4 Screenshot function 2019-08-14 19:24:42 +02:00
kd-11 9a7c2784f0 rsx: Do not clip scissor to viewport when doing buffer clear 2019-07-20 16:39:32 +03:00
kd-11 e2574ff100 rsx: Support CSAA transparency without multiple rasterization samples enabled 2019-07-19 15:49:08 +03:00
kd-11 b5a2f0df68 rsx: Implement separate viewport raster clipping
- Merge viewport raster window and scissor into one clipping region
- Viewport raster clip is different from viewport geometry clipping in
hardware as the latter is configurable separately
2019-07-19 14:21:19 +03:00
kd-11 009e01a347 rsx: Set up for multi-section inheritance 2019-07-17 13:29:42 +03:00
kd-11 d26b25816d rsx: Improve profiling setup
- Avoid spamming QPC when not needed
- Free performance when debug overlay is not enabled
2019-06-25 20:50:54 +03:00
kd-11 59ee74a275 rsx: Disable vertex cache if multithreaded memory access is enabled
- When multithreaded RSX is enabled, the vertex cache just lowers performance
- The small cost of upload is paid by the asynchronous thread, allowing RSX to work optimally
2019-06-25 20:50:54 +03:00
kd-11 655eff29e8 rsx: Refactoring and cleanup after d3d12 separation
- Remove deprecated functionality
- Refactor to share code between common routines
2019-06-14 16:19:52 +03:00
kd-11 0d906d6974 rsx: Remove surface aa_mode hacks 2019-06-14 16:19:52 +03:00
scribam a02a8642b0 rsx: Apply Clang-Tidy fix "modernize-make-unique" 2019-06-12 15:11:52 +03:00
scribam b91bcdbbca rsx: Apply Clang-Tidy fix "modernize-use-bool-literals" 2019-06-12 15:11:52 +03:00
kd-11 d361eedbec rsx: Clean up window management code
- Removes a lot of wm_event code that was used to perform window management and is no longer needed.
- Significantly simplifies the vulkan code.
- Implements resource management when vulkan window is minimized to allow resources to be freed.
2019-06-10 14:57:03 +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