kd-11
4decad6f6b
rsx: Force compatibility checks when applying fast-path optimizations
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
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
90cf47cdce
rsx: Handle some corner cases in surface locking
2022-12-17 20:16:58 +03:00
kd-11
bf96cbe980
rsx: Fix const RTV/DSV cast from texture cache
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
kd-11
df46e5137c
gl: Fix texture reconstruction logic
...
- Use correct target types
- Fix key generation to apply differently for each target type
2022-10-07 11:53:34 +03:00
kd-11
82bac4173e
gl: Reuse scratch images
2022-07-18 18:58:22 +03:00
kd-11
e95084f138
gl: Use DSA for imageview configuration and avoid needless bind operations
2022-07-18 18:58:22 +03:00
kd-11
9fc6382909
gl: Finalize BGRA storage format internals
...
- Performance is terrible but it works properly now
2022-07-13 02:09:58 +03:00
kd-11
bb5ce67d57
gl: Handle corner cases for CopyBufferToImage
...
- Handle 3D textures and cubemaps
- Handle writing to mip > 0
2022-07-13 02:09:58 +03:00
kd-11
35ef19cfc8
gl: Refactor the rest of GLHelpers
2022-07-13 02:09:58 +03:00
kd-11
09824a718f
gl: Separate BGRA8 storage from RGBA8
2022-07-13 02:09:58 +03:00
kd-11
a421270c19
gl: Use new scratch buffer system
2022-06-03 11:54:09 +03:00
kd-11
74696d2e44
gl: Commit to a consistent global state
2022-05-31 23:34:14 +03:00
kd-11
78746fdb6f
gl: Commit to using DSA for internal buffer management
...
- Gets rid of spammy BindBuffer calls on every draw
2022-05-31 23:34:14 +03:00
kd-11
d0dc095c84
rsx: Silence some log spam
2022-05-20 16:29:27 +03:00
kd-11
e037b5c438
rsx: Handle in-place image swaps when locking data for WCB/WDB
...
- Rare, but possible if a surface address is switched from color to depth usage
- In such a case, deref the old image and ref the new one to avoid leaks
2022-03-29 12:35:32 +03:00
kd-11
d98d152d23
rsx: Fix leaking surface cache refs from texture cache
...
- Lock surfaces in use by texture cache to prevent complete deletion
- Remove discarded surfaces from the reprotect cache to avoid uaf
2022-03-28 19:55:34 +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
7ca15c60bb
rsx: Improve image aspect tests
...
- Replace old format-based detection with proper aspect test.
Explicit image aspect has been available for a long time, but older
code was not updated.
2021-12-08 23:58:32 +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
58f0fa3ca5
gl: Enable handling of X16 blit targets
2021-11-24 16:02:24 +03:00
kd-11
6781eb7c76
rsx: Avoid calling get_system_time() every draw call
2021-09-28 17:43:15 +03:00
kd-11
966aec7ad7
rsx: Resync excluded memory regions to avoid memory tests failing after flush events
...
- This is a mostly correct fix, but a corner case exists that can leak old data to the surface cache
2021-06-15 15:42:16 +03:00
kd-11
9e62e98f79
rsx: Minor refactoring ( #10358 )
...
- Fix some misnomers.
- Allow finer grained control over texture section creation routines.
2021-05-27 23:44:07 +01:00
Nekotekina
b3fb6d7d18
Add and fix -Wredundant-decls (GCC)
2021-03-23 22:48:57 +03:00
kd-11
bec91aab7b
rsx: Relax inheritance checks a bit
...
- It is not a fatal error for a texture to be defined where a framebuffer once existed.
2021-02-10 11:37:14 +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
kd-11
1bad9a939f
rsx: Refactor texture cache utils
...
- Also lays groundwork for optional hashed sections
2021-02-10 11:37:14 +03:00
Nekotekina
b7bf316c1a
Don't randomly include "stdafx.h"
...
It's file for precompiled headers.
Include what is used, don't rely on transitive includes.
2020-12-22 14:32:30 +03:00
Megamouse
066e53da55
minor cleanup
2020-12-19 08:33:53 +01:00
Nekotekina
eec11bfba9
Move align helpers to util/asm.hpp
...
Also add some files:
GLTextureCache.cpp
VKTextureCache.cpp
2020-12-18 18:07:42 +03:00
kd-11
0ef5743261
rsx: Fix sampler descriptor updates for framebuffer resources
...
- Each desc manages its own lifetime now instead of relying on global timestamp check
- Fixes situation where same object remains active without update for long
2020-12-16 10:10:06 +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
Nekotekina
605d57c541
sys_event: cleanup (replace vm::temporary_unlock)
...
Also made minor changes in sys_rsx.cpp.
Removed unused exception std headers.
2020-10-30 17:49:07 +03:00
kd-11
2e88924cb9
rsx/gl: Refactoring and cleanup
...
- Fix incorrect memory requirement calculation for D32FS8X24_PACK64 data type on GL
- Removes a lot of spaghetti code in GL backend from years of accumulation
- Retires several now-useless methods from RSX util toolbox
2020-09-08 13:53:06 +03:00
kd-11
85e5b077f7
gl: Overhaul upload and download routines for textures to go through shared image_to_buffer and buffer_to_image routines.
...
- This automatically adds support for depth float textures as well
2020-09-07 18:25:54 +03:00
kd-11
220e86bbd1
gl: Accelerate D24X8_UINT operations
...
- Adds compute decoding for D24X8_UINT on both download and upload routines
- Adds support for D24X8_UINT operations for typeless copy
2020-09-07 18:25: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
6850533b50
rsx: Unify composite texture creation and management
...
- Some texture accesses require image compositing steps to assemble the requested image from existing subresources.
Handle all the common routines in a unified manner to avoid having one broken path (e.g mipmap gather not supporting bitcast operations)
2020-08-10 13:31:22 +03:00
kd-11
7109fe9889
rsx: Improve swizzled layout detection
...
- Reset swizzle flag to false automatically on section reset.
- Detect render target payload and extract swizzle information from it.
2020-08-05 23:23:38 +03:00
kd-11
bd21930d1a
rsx: Decode swizzled GPU data on CPU readback
...
- Currently this conversion is being done on the CPU to reuse as much code as possible.
The expectation is that this almost never happens, so there is not point in increasing maintenance burden by adding compute paths
2020-08-02 16:14:11 +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
e992cbe01b
rsx: Support DRGB8 sampling of render targets
2020-06-22 20:12:41 +03:00
kd-11
2086e7f2e8
rsx: Account for subpixel precision when converting DST coordinates to
...
SRC coordinates
- When extracting a 1x1 texture from another texture of a different
format, width conversion can result in a dimension of 0 if the
extracted texel is not a full texel in SRC
2020-06-17 22:18:47 +03:00
kd-11
149d550f7e
gl: Restore commented out line
...
- Byte order step was disabled for debugging and not restored
2020-03-07 17:23:25 +03:00