kd-11
f745971cc8
rsx: Fix coordinate scaling for shadow access ( #10668 )
...
- For shadow2DProj the 3rd coordinate is actually the depth value, do not scale
2021-08-06 22:49:50 +01: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
6a9d1edee1
vk: Fix use-after-free hazard by checking if we're faulting from within the texture cache
...
- If we're using the texture cache, DO NOT delete resources.
2021-07-25 20:55:09 +03:00
kd-11
2524c35638
vk: Improve handling of texture cache temporary resources
...
- Temp resources from the texture cache are used to hold composite objects being sent to the GPU and can waste a lot of memory.
- Remove them if we run out of memory as they can linger around for a long time.
2021-07-15 18:05:35 +03:00
kd-11
a2f93b0696
rsx: Implement a simple cache eviction routine
...
- Can remove all non-essential textures from the cache except those passed as an exclusion list
2021-07-15 18:05:35 +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
568af756cc
rsx: Fix expired sampler descriptors
...
- Rebuilding when strict mode is enabled was incomplete.
The copy has to be redone if the source has been updated.
2021-06-06 15:37:47 +03:00
Ani
a49446c9e9
Replace gsl::span for std::span (c++20) ( #7531 )
...
* Replace gsl::span for std::span (c++20)
* Replace gsl::byte with std::byte
Co-authored-by: Bevan Weiss <bevan.weiss@gmail.com>
2021-05-30 17:10:46 +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
2491aad6f2
types.hpp: implement min_v<>, max_v<>, SignedInt, UnsignedInt, FPInt concepts
...
Restrict smax to only work with signed values for consistency.
Cleanup <climits> includes.
Cleanup <limits> includes.
2021-05-23 19:43:51 +03:00
Nekotekina
160b131de3
types.hpp: implement smin, smax, amin, amax
...
Rewritten the following global utility constants:
`umax` returns max number, restricted to unsigned.
`smax` returns max signed number, restricted to integrals.
`smin` returns min signed number, restricted to signed.
`amin` returns smin or zero, less restricted.
`amax` returns smax or umax, less restricted.
Fix operators == and <=> for synthesized rel-ops.
2021-05-22 12:10:57 +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
Megamouse
a16d8ba3ea
More random changes
2021-04-11 14:01:51 +03:00
Nekotekina
b3fb6d7d18
Add and fix -Wredundant-decls (GCC)
2021-03-23 22:48:57 +03:00
Nekotekina
53af2dbb3f
Add/fix warning -Wignored-qualifiers (GCC/clang)
...
Fix simple_array::const_iterator as a part of it.
2021-03-09 03:09:50 +03:00
Nekotekina
87af905018
Enable -Wunused-parameter
2021-03-06 18:07:08 +03:00
Nekotekina
038148bf06
Fix almost all GCC warnings
2021-02-17 22:59:04 +03:00
kd-11
eba7d3b172
rsx: Add duplicate section detection when there are too many sections in the surface cache
...
- Check for useless sections.
Helps in games that create a bunch of sections randomly for one-time use
2021-02-14 20:42:34 +03:00
kd-11
195fb1cf66
rsx: Improve texture cache invalidate
...
- Bunch of improvements
- Properly signal renderer to rebind textures!
- TODO: Range checks, should be pretty easy
2021-02-10 11:37:14 +03:00
kd-11
52acc23ecf
rsx: Fix protection bug
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
8a2a76da1e
texture_cache: fix some warnings in AUDIT
2021-01-18 13:49:59 +03:00
Nekotekina
db8e6fe7a7
Enable -Wunused-variable
2021-01-12 14:34:14 +03:00
Nekotekina
a8e0d261b7
types.hpp: more cleanup
...
Also fix compilation.
2020-12-22 19:08:09 +03:00
Nekotekina
fb29933d3d
Add usz alias for std::size_t
2020-12-18 12:23:53 +03:00
kd-11
035a76f26d
Fix build
2020-12-16 10:10:06 +03:00
kd-11
d3686dbb75
rsx: Add some texture upload statistics to the texture cache
2020-12-16 10:10:06 +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
kd-11
f83c2f0b6b
rsx: Restructure and simplify some header include chains
2020-12-13 15:38:35 +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
Nekotekina
eb66302907
atomic.hpp: replace std::atomic with atomic_t
...
Dual dependency is nothing good.
2020-12-07 17:13:12 +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
Eladash
fefab50e06
Fix vm::range_lock, imporve vm::check_addr
2020-11-11 10:30:09 +03:00
kd-11
7ed82c0791
rsx: Always force typeless copy if memory is crossing aspect boundary
2020-09-22 12:19:54 +03:00
kd-11
9db97278f3
rsx: Lower error message to warning
...
- Mismatched texture handling is a TODO that will be handled with texturing rewrites
2020-09-19 01:55:59 +03:00
kd-11
d3898fda57
rsx: Release misconfigured texture memory before attempting reupload
2020-09-19 01:55:59 +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
b0c7ca6d1f
vk: Improve video memory manager to attempt recovery in out of memory situations
2020-07-25 14:48:11 +03:00
kd-11
42a9ac9e6c
rsx: Brute-force removal of superseded surfaces
2020-07-16 19:11:26 +03:00
kd-11
632af8d723
rsx: Support partial texture descriptors
...
- It is safe to declare w > pitch and it works as long as sampling inside the legal 2D area is obeyed.
2020-07-10 15:26:07 +03:00
kd-11
bd41a108d8
nv3089: Account for subpixel addressing
...
- Those strange offsets noted in some games seem to match to subpixel addressing.
For example, when scaling down by a factor of 4, a pixel offset of 2 will end up inside pixel 0 of the output
2020-05-24 11:31:37 +03:00
Mrlinkwii
c22d778143
Spelling fix in texture_cache.h ( #8219 )
...
heurestic_end -> heuristic_end
2020-05-14 21:42:21 +03:00
kd-11
310f367fb1
rsx: Improve blit engine memory validation ( #8215 )
...
- In blit engine logic there is a tendancy to over-allocate so as to avoid having to sticth together textures later
- Sometimes this can lead to out of bounds access and crash applications, so memory must be validated
2020-05-14 12:57:58 +01:00
scribam
2e397e38a4
Typos
2020-04-14 17:06:58 +03:00
scribam
f37adc4188
Add fallthrough attribute
2020-04-14 17:06:58 +03:00