Commit graph

52 commits

Author SHA1 Message Date
kd-11 edb2b60f2f rsx: Perform region clipping in a normalized coordinate space
- Depending on what the caller wants to do, the scaling will be different for src vs dst calculations.
  We cannot reliably handle this in the callee
2023-05-18 18:10:46 +03:00
kd-11 04fb86556a rsx: Fix surface metadata life-cycle
- Beware of clone operations. Blindly inheriting the parent's metadata is wrong.
- It is possible, especially when reusing a pre-existing slice, that the parent and child info has diverged
2022-12-17 20:16:58 +03:00
kd-11 90cf47cdce rsx: Handle some corner cases in surface locking 2022-12-17 20:16:58 +03:00
kd-11 a05e3f02b8 rsx: Avoid expensive protection scan by sharing some data between surface and texture cache 2022-12-17 20:16:58 +03:00
Nekotekina ae809ad320 Unexpected bugfixes
Mostly unaligned memory access.
Also includes workarounds for ubsan execution.
2022-10-31 14:20:02 +03:00
Nekotekina c4db65cc08 Fix one more warning 2022-09-18 18:35:17 +03:00
kd-11 1fc0191311 Fix build 2022-08-23 23:49:46 +03:00
kd-11 bacf518189 rsx: Fix 2D intersection tests 2022-08-14 23:53:50 +03:00
kd-11 78b8bd80e4 rsx: Unconditionally set MSAA flags if MSAA is active 2022-03-11 01:15:13 +03:00
kd-11 1943d9819f rsx: Clean up surface cache routines around RTT invalidate 2022-03-10 20:43:58 +03:00
kd-11 3e4faf602a rsx: Fix clang build 2022-03-08 22:06:26 +03:00
kd-11 cfecbb24ca rsx: Avoid calling slow functions every draw call
- Use TSC for timing where interval duration matters.
- Use atomic counter for ordering timestamps otherwise.
2022-03-08 22:06:26 +03:00
kd-11 8d3d290e33 rsx: Fix build 2022-03-08 22:06:26 +03:00
kd-11 0df903090d rsx: Optimize metrics a bit
- For some reason this has a massive impact on performance above some arbitrary threshold of calls
  Shows up under surface_cache::get_merged_memory_region when doing gathers.
2022-03-08 22:06:26 +03:00
kd-11 6812fa4764 rsx: Fix surface write coherency when MSAA is active 2022-03-08 22:06:26 +03:00
kd-11 6d737e61fd rsx: Use 32 bit integers for pitch
- RSX max pitch = 65536 which requires 17 bits
2022-01-10 12:27:30 +03:00
kd-11 78972cd611 rsx: Refactor surface inheritance logic 2021-06-15 15:42:16 +03:00
kd-11 e3944bc67f rsx: Handle transfer_read differently from transfer_write
- Transfer writes are expected to clobber surface cache contents. Do NOT reload from CPU memory for writes.
- TODO: During transfer write to surface cache objects, lock memory if it was unlocked to avoid silly problems.
2021-05-09 13:07:47 +03:00
Nekotekina fb29933d3d Add usz alias for std::size_t 2020-12-18 12:23:53 +03:00
Nekotekina b59f142d4e Move types.h to util/types.hpp 2020-12-12 15:12:01 +03:00
Nekotekina e055d16b2c Replace verify() with ensure() with auto src location.
Expression ensure(x) returns x.
Using comma operator removed.
2020-12-09 15:43:38 +03:00
RipleyTom af8c661a64 Remove BOM markers 2020-12-06 15:30:12 +03:00
kd-11 0e7a705254 rsx: Resolution scaling overhaul
- Enforce square pixels instead of per-axis scaling
2020-11-18 09:29:34 +03:00
Megamouse a3eb5c2d63 More Header cleanup 2020-11-06 22:14:05 +01:00
kd-11 a50ea09053 rsx: Properly pass format_class information during RTV/DSV resource barrier
- Also takes the opportunity to remove repeating code in a minor refactor.
2020-09-22 12:19:54 +03:00
kd-11 65ead08880 rsx: Refactor and improve image memory manipulation routines 2020-08-27 12:52:28 +03:00
kd-11 a5ac5a9861 rsx: Separate uint depth formats from float depth formats 2020-08-27 12:52:28 +03:00
kd-11 4df933275b rsx: Propagate raster type of fbo sourced data throughout the pipeline.
- Tracks which kind of raster was done (Z-ordered vs linear) throughout the application.
- This allows to identify if data is in the expected format or not.
2020-08-02 16:14:11 +03:00
kd-11 569e1c2df6 rsx: Fix typo. Noted by github user @gamerforEA 2020-02-26 19:40:35 +03:00
Nekotekina 92e3eaf3ff Fix signed-unsigned comparisons and mark warning as error (part 2). 2020-02-19 22:54:58 +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
Nekotekina 185c067d5b C-style cast cleanup V 2019-12-03 17:23:00 +03:00
kd-11 4a19a2dd24 rsx: Explicity describe transfer regions for both source and destination blocks 2019-10-04 18:10:46 +03:00
kd-11 858014b718 rsx: Experiments with nul sink 2019-09-12 23:32:21 +03:00
kd-11 412c620b9d rsx: Allow sampling from shader_read resources for blit engine
- With harmonization between all texture types implemented, there is no difference between blit_engine_src and shader_read for supported formats
- Adds extra format filtering to ensure no conflicts when copying data
2019-09-10 16:54:02 +03:00
kd-11 e334a43169 rsx: Fix surface cache hit tests
- Avoid silly broken tests due to queue_tag being called before pitch is initialized.
- Return actual memory range covered and exclude trailing padding.
- Coordinates in src are to be calculated with src_pitch, not required_pitch.
2019-08-28 14:54:51 +03:00
kd-11 f9aea076ae rsx: Implement depth_buffer_float support.
- Since this is transparent to the application at all time, it only becomes a problem when doing memory transfer or DEPTH->RGBA conversion in shaders.
2019-08-26 20:03:31 +03:00
kd-11 9cd5325962 rsx: Free memory 'held hostage' by storage sections in the surface cache
- Once the memory has been captured by another surface, release the allocation
2019-08-21 21:17:15 +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
kd-11 ea2f4d57fa rsx: Fixups 2019-07-17 13:29:42 +03:00
kd-11 113a49e00c rsx: Handle cyclic references when doing memory inheritance 2019-07-17 13:29:42 +03:00
kd-11 34b06453f9 rsx: Handle lost data due to unused data sections
- After splitting, the sections may not be referenced at all for anything other than just pixel storage
- In such cases, either merge down or sample from the upstream source instead
2019-07-17 13:29:42 +03:00
kd-11 009e01a347 rsx: Set up for multi-section inheritance 2019-07-17 13:29:42 +03:00
kd-11 9d166c5bed rsx: Force invalidate of children by issuing a resolve notification whenever the parent is written to
- Fixes successive reads of an antialiased surface that is still bound between reads
2019-06-14 16:19:52 +03:00
kd-11 8a1cf2c913 rsx: Attempt to reduce stencil load overhead for nvidia cards 2019-06-14 16:19:52 +03:00
kd-11 bca5f94b3f rsx: Add option to toggle MSAA 2019-06-14 16:19:52 +03:00
kd-11 acb14320da rsx: Fixup for resolution scaling support 2019-06-14 16:19:52 +03:00
kd-11 4a5bbba277 rsx: Enable MSAA
- vk: Enable depth buffer resolve+unresolve
- vk: Add AMD stenciling extension support
- rsx: Temporarily disables MSAA-compatible hacks such as transparency AA
- TODO: Add paths to optionally disable MSAA
2019-06-14 16:19:52 +03:00
kd-11 f6f3b40ecc rsx: Fix AA coordinate transforms
- Requires native_pitch value to take samples into account
2019-06-14 16:19:52 +03:00