Commit graph

58 commits

Author SHA1 Message Date
kd-11 c325017675 rsx: Preserve the texcoord transform around destructive modifications 2023-07-11 04:09:30 +03:00
kd-11 e7ac84fca3 rsx: Fine-tune the subimage view bezel dimensions 2023-07-06 14:06:30 +03:00
kd-11 b9ea6be842 rsx: Fix AA factor calculation 2023-07-06 14:06:30 +03:00
kd-11 79e000f63d rsx: Fix virtual coordinate clamping 2023-07-04 09:31:51 +03:00
kd-11 aa06ac119f rsx: Fix sampled descriptor address corruption 2023-07-04 09:31:51 +03:00
kd-11 a37f786a37 rsx: Properly fill in the cyclic ref field for framebuffer references 2023-07-04 09:31:51 +03:00
kd-11 8f98e572e1 rsx: Use designated initializer for the dangerous copy_region_descriptor type
- We need to move more dangerous braced initializations to c++20
- Also adds a base address variable which will come in handy
2023-07-04 09:31:51 +03:00
kd-11 1d004f2788 rsx: Lower single-image-blit to a scaled coordinate fetch 2023-07-04 09:31:51 +03:00
kd-11 cef4ea786a rsx: Trivially detect single-image-blit transfer operations 2023-07-04 09:31:51 +03:00
kd-11 b788e05396 rsx: Implement GPU copy ellision through coordinate transform
- TODO: Some corner cases still exist where format may not be a match after a cache merge.
2023-07-04 09:31:51 +03:00
kd-11 793a21a825 rsx: Fix build after variable rename 2023-05-18 18:10:46 +03:00
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 2e504b2dac rsx: Silence some warnings 2022-08-19 14:29:20 +03:00
kd-11 bacf518189 rsx: Fix 2D intersection tests 2022-08-14 23:53:50 +03:00
Nekotekina 4b787b22c8 Implement FN (lambda shortener)
Useful for some higher order functions.
Allows to make short lambdas even shorter.
2022-07-08 14:47:41 +03:00
kd-11 2b42895bc7 rsx: Reduce log spam a bit 2022-03-28 19:55:34 +03:00
kd-11 bc7ed8eaab rsx/vk: Rework MSAA implementation 2022-03-17 22:02:20 +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 2f7d38bb81 rsx: Improve coverage checking logic to handle 3D and cubemap resources 2022-01-23 00:03:03 +03:00
kd-11 7f216f2581 rsx: Fix local slice height calculation 2022-01-23 00:03:03 +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 4df1a938b1 Unused var 2021-11-24 16:02:24 +03:00
kd-11 94a3b1cfe8 rsx: Roll back some optimizations
- Just use RGB565 for all blit targets. Avoids really dumb transforms done by GPU hw.
- When X16 is used, all the channels get written to R channel alone. CmdBlit does perform format conversion!
- gl: Force image copy when blit is requested with compatible targets. Avoids format conversion issues.
2021-11-24 16:02:24 +03:00
kd-11 a21c6c4628 rsx: Fix handling of scaling requests for packed formats
- One does not simply interpolate RGB565 components as U16 data!
2021-11-24 16:02:24 +03:00
kd-11 99b6963fab rsx: Improve unnormalized coordinate sampling
- Improve rounding when sampling nearest neighbour. This is mostly a problem with NVIDIA
- Implement unnormalized 3D sampling
2021-08-03 00:36:04 +03:00
kd-11 92d1534917 rsx: Set composite images upload context based on their actual contents 2021-07-27 10:52:21 +03:00
kd-11 ddbe496097 rsx: Fix depth/color mismatch resolve in texture cache
- Sometimes we need a depth texture but only a color texture is available.
2021-06-07 01:03:49 +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 87af905018 Enable -Wunused-parameter 2021-03-06 18:07:08 +03:00
Nekotekina ea5e837bd6 fixed_typemap.hpp: return reference 2021-03-02 16:08:14 +03:00
Nekotekina 8e6e57de86 Enable -Wunused-function warning 2021-02-15 14:39:53 +03:00
kd-11 bf66c36ba4 rsx/texture_cache: Add support for reusing dirty images if possible
- Avoids a silly situation where a texture is discarded and an identical copy created immediately afterward.
  Unfortunately allocating memory blocks is really slow so avoid it as much as possible.
2021-02-10 11:37:14 +03:00
Nekotekina db8e6fe7a7 Enable -Wunused-variable 2021-01-12 14:34:14 +03:00
Nekotekina 36c8654fb8 Remove HERE macro
Some cleanup.
Add location to some functions.
2020-12-10 12:30:22 +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 2aa5c437e8 rsx: Fix upscaled image reconstruction
- Base the upscaling on the real source and not the "attr" parameter.
- In case of reconstruction, the source is much larger than the subslice in "attr"
2020-11-30 01:20:17 +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
kd-11 9828d6146b rsx: Fix format matching when aggregating textures
- When copying depth-depth, prefer own format over depth int format
2020-08-27 12:52:28 +03:00
kd-11 65ead08880 rsx: Refactor and improve image memory manipulation routines 2020-08-27 12:52:28 +03:00
kd-11 794378d5e9 rsx: Do not create depth textures as blit engine targets. 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 acf51f0ead rsx: Fix transfer descriptors for partially overlapping slices in head
- Height must be corrected to skip the piece that exists before the current slice
2020-07-03 14:29:54 +03:00
kd-11 83d818d96f rsx: Improve mipmap gathering
- Account for source offsets when grabbing subregions
- Scale input accordingly when sourcing from fbo in all paths
2020-06-16 19:12:03 +03:00
Eladash ff74c241c7 rsx: Fix get_optimal_blit_target_properties for local memory 2020-04-11 21:21:15 +03:00
kd-11 a756c0679e rsx: Implement cross-aspect slice gathering
- Fixes a data leak that can happen when a surface is rejected due to aspect mismatch.
- Mismatch can lead to rejection due to area covered excluding the RTT and inevitable upload a texture from CPU at the same location.
- Overlapping fbo/shader_read resources are not allowed.
2020-03-15 16:51:23 +03:00
kd-11 12b73c8bdc rsx: Fix copypasta 2020-03-09 17:20:24 +03:00
kd-11 84a542fbce rsx: Blit engine improvements
- Detect writes to the display output memory and handle it specially.
  It already defines a known 2D region.
- Try and detect situations where raw transfers would be of benefit.
2020-03-08 10:30:13 +03:00
kd-11 b6422c9a33 rsx: Fixup
- Destination Y coordinate must be 'rebased' onto the current slice by subtracting its offset.
  Only the local path was affected this time
2020-02-05 18:18:09 +03:00