Unknown W. Brackets
48c39543af
GE Debugger: Normalize framebuffer texture preview.
...
Previously, we would show the render-to-texture with its original
dimensions. While useful, this skewed the preview coordinates and was
sometimes confusing. Additionally, depth texturing didn't preview.
This pads and subsets the texture preview so it's the right size.
2022-10-10 21:54:24 -07:00
Unknown W. Brackets
fc9f200224
GE Debugger: Centralize current fb tex fetch code.
2022-10-10 21:50:53 -07:00
Unknown W. Brackets
55d5dc3834
GPU: Rename readback and buffer write operations.
...
Avoid download/upload and pack, which don't have clear directions.
2022-10-09 13:49:41 -07:00
Henrik Rydgård
0c4935f336
Depal from dynamic CLUT: When detecting bounds, be more conservative.
...
Followup to #16188 .
Further fixes the lens flare.
It confused me before that there are two sections of the track on
Sunset Drive where the sun is visible, but only on the second is the
lens flare sprite actually shown, which is rather weird.
Verified that exactly the same thing happens on hardware, so it's not a
an emulation problem! Rather seems like a glitch in the game itself.
2022-10-09 20:57:06 +02:00
Henrik Rydgård
9422b05ee3
Fix depal bounds with dynamic CLUT. Fixes lens flare glitches in Ridge Racer
...
With this wrong, we ended up drawing pixels that came from a DONT_CARE
init of the depal temp buffer, which was a pile of garbage on Android
and blank on PC.
Now, we seem to end up not drawing anything because the depal operation
results in transparent black into whatever is actually intended, but at
least the screen isn't full of glitches when the sun is visible on Adreno.
See issue #16083
2022-10-09 20:27:45 +02:00
Henrik Rydgård
ed3cd1dc26
Merge pull request #16150 from unknownbrackets/vram-mirrors
...
GPU: Mask away unused bits in framebuf/zbuf ptr, cleanup
2022-10-03 11:56:24 +02:00
Herman Semenov
29b87e0c0b
Merge branch 'master' into master
2022-10-03 07:49:13 +00:00
Unknown W. Brackets
58a4376998
GPU: Normalize framebuf addresses.
...
In VRAM, always store without mirror. In RAM, always store without
cache/kernel bits.
2022-10-02 21:28:53 -07:00
Henrik Rydgård
9ec41436d1
ES2 crash fix: Don't draw depth if lacking fragment shader depth write.
2022-10-01 19:28:52 +02:00
lainon
fec708489a
Correct cleaning string and remove unused vars
2022-09-30 12:26:30 +03:00
Henrik Rydgård
70c5ca62e6
Remove debug log. Add some new debug log though, unrelated to this PR, for fb clut + fb texture. Plus a couple asserts.
2022-09-25 09:56:39 +02:00
Unknown W. Brackets
c76d31dfa8
GPU: Cleanup unused CheckAlpha() funcs.
2022-09-24 02:00:03 -07:00
Henrik Rydgård
ac7ca963db
Make valgrind happy
2022-09-23 12:24:43 +02:00
Henrik Rydgård
a6d6e0a3cc
Texture/Framebuffer match: Ignore stride if texHeight == 1. Fixes Ridge Racer lens flares.
2022-09-22 22:11:16 +02:00
Henrik Rydgård
078fa9beb2
Fix corruption of Ridge Racer speedometers with AutoMaxQuality enabled.
...
See #8509
2022-09-22 15:27:17 +02:00
Henrik Rydgård
c108db0e71
Merge pull request #16081 from hrydgard/zbuffer-upload-heuristic
...
Fix green flashes with Burnout Dominator lens flare
2022-09-22 11:02:27 +02:00
Henrik Rydgård
bd196f7a50
Preserve depth buffer on framebuffer resize, if has been used.
2022-09-22 09:59:49 +02:00
Henrik Rydgård
287e025978
Minor cleanups around dirtying of render state
2022-09-22 09:12:58 +02:00
Henrik Rydgård
a92aaf9311
Dirty more state after depal
2022-09-21 23:57:19 +02:00
Henrik Rydgård
8ed1694a2f
Don't try to replace or scale CLUT8-on-GPU textures.
...
See #8509
2022-09-21 23:50:03 +02:00
Henrik Rydgård
94ae0fabfa
CLUTs can be loaded from small rectangular textures. Need to linearize.
...
Fixes #8406 , although technically, we should wrap by bufw, not the
texture width.
2022-09-21 18:33:15 +02:00
Henrik Rydgård
355c18512f
Fix BGRA issue on D3D with GPU CLUT textures
2022-09-20 22:31:54 +02:00
Henrik Rydgård
85d1f28997
Throw in assorted warning fixes
2022-09-20 18:04:08 +02:00
Unknown W. Brackets
fddcbfc5fa
GE Debugger: Include rendered CLUTs in frame dumps.
...
Like with textures, this uses the VRAM address directly.
2022-09-19 12:01:34 -07:00
Henrik Rydgård
370a7304a6
Careful with min filtering of framebuffer textures only if auto max quality is on.
2022-09-16 19:19:42 +02:00
Henrik Rydgård
9ec35d1464
Logic op fix, min filter fix. Also remove some unnecessary indentation. Fixes the water on Adreno (no logic)
2022-09-16 12:39:37 +02:00
Henrik Rydgård
5d4075376d
Copy the texels directly in LoadCLUT
2022-09-15 17:09:03 +02:00
Henrik Rydgård
662126a0a1
Small simplification
2022-09-15 16:57:03 +02:00
Henrik Rydgård
36c98ab367
Address feedback, change roles of the two dynamic clut fbos to eliminate the need for state (see next commit)
2022-09-15 09:15:02 +02:00
Henrik Rydgård
9c2bfad749
Seems Need for Speed: Shift has exactly the same lens flare, enable the same compat settings.
2022-09-15 00:18:26 +02:00
Henrik Rydgård
85bb6786a1
Log improvements
2022-09-14 23:13:46 +02:00
Henrik Rydgård
1f6d27bd55
Ridge Racer fix
2022-09-14 22:46:17 +02:00
Henrik Rydgård
d6d7a15d25
Get depal-from-dynamic-CLUT working
2022-09-14 22:18:35 +02:00
Henrik Rydgård
51c97c7a7f
Set texcache entry status flag if CLUT needs to be dynamic
2022-09-14 22:18:35 +02:00
Henrik Rydgård
abd58199ce
Add way to bind cached textures to a DrawContext
2022-09-14 22:18:35 +02:00
Henrik Rydgård
f745e94899
Allow binding "native" texture objects to thin3d
2022-09-14 22:18:35 +02:00
Henrik Rydgård
9907957242
Start implementing ApplyTextureDepal
2022-09-14 22:18:35 +02:00
Henrik Rydgård
8d00df12a4
Detect the CLUT8/8888 situation
...
Implement CLUT8 depal from 8888 textures. Hard to tell if working
2022-09-14 22:18:34 +02:00
Henrik Rydgård
0ed1f3d461
Switch multiple bools as parameters to DecodeTextureLevel to a flags enum.
2022-09-14 18:40:08 +02:00
Henrik Rydgård
75efcd9dfd
Merge pull request #16000 from unknownbrackets/gedebugger
...
Cleanup some crashes in GE debugger or with large textures
2022-09-11 19:41:11 +02:00
Henrik Rydgård
cf959a8467
Remove CLUT matching case that shouldn't be there yet.
2022-09-11 19:33:31 +02:00
Henrik Rydgård
a30896e21f
Switch more texture matching calculations to use bytes for matching.
2022-09-11 16:52:30 +02:00
Henrik Rydgård
4491c480a6
Texture/framebuffer matching: Do margin check in bytes.
2022-09-11 16:18:04 +02:00
Henrik Rydgård
694dbe1271
Add ShaderDepalMode enum, use in shader ID. Replaces smoothed bit.
2022-09-11 14:40:01 +02:00
Henrik Rydgård
9bd8b11bf8
Implement shader depal for D3D11.
2022-09-11 13:41:17 +02:00
Henrik Rydgård
33a93e238a
CLUT download: Replace the broken block transfer check with a new compat flag.
...
This compat flag should be temporary until we've implemented
a readback-free path for CLUTs from framebuffers, both when texturing
from static textures and other framebuffers.
2022-09-11 10:27:21 +02:00
Unknown W. Brackets
3242bb8d66
TexCache: Allow valid bufw sizes.
...
These don't cause crashes anymore.
2022-09-10 20:15:43 -07:00
Henrik Rydgård
a2ca85bc87
Add logging for LoadCLUT from framebuffer. See #15923 . Logs nicely in Burnout Dominator.
2022-09-10 19:32:39 +02:00
Henrik Rydgård
befcfb470c
Fix shader caching.
2022-09-08 00:38:32 +02:00
Unknown W. Brackets
7c8f8817b8
GPU: Fix CanDepalettize() missing false paths.
...
Mismatched texformats didn't have a return.
2022-09-06 18:52:20 -07:00