7684 Commits

Author SHA1 Message Date
Unknown W. Brackets
c3c5450b8f GE Debugger: Fix small tex/clut recopying.
If it's less than 256 bytes, we can't mark the entire VRAM area copied.
This still helps frame dumps avoid excessively slow VRAM recopying
situations, but fixes issues like missing trees in #12738.
2022-09-23 21:18:39 -07:00
Unknown W. Brackets
b56bd0d0fc
Merge pull request #16090 from hrydgard/more-vulkan-cleanup-work
Simplify synchronization in VulkanRenderManager
2022-09-23 17:24:34 -07:00
Henrik Rydgård
d743bfac93
Merge pull request #16085 from unknownbrackets/softgpu-vert
softgpu: Cache reused indexed verts
2022-09-24 00:00:26 +02:00
Henrik Rydgård
1259283c2e More tweaks, fix crash on exit (double-join thread) 2022-09-23 22:10:29 +02:00
Henrik Rydgård
7884e4ccb3 Another uninitialized variable (VAI minihash/hash) 2022-09-23 12:33:16 +02:00
Henrik Rydgård
ac7ca963db Make valgrind happy 2022-09-23 12:24:43 +02:00
Henrik Rydgård
bb6919ebcb
Merge pull request #16087 from unknownbrackets/depth-upload
GPU: Upload depth only on first usage
2022-09-23 09:07:33 +02:00
Unknown W. Brackets
93c909a88e GPU: Upload depth only on first usage.
Fixes various glitches in Kingdom Hearts, etc.
2022-09-23 00:04:14 -07:00
Unknown W. Brackets
66b6dfd0a5 softgpu: Fix self-render detect in Ridge Racer.
When we flush we mark all pending writes zero, but we rely on this being
set to detect self-render.

TRANSFORM_ALL was wrong as well, sometimes clearing BINNER_RANGE.
2022-09-22 20:36:15 -07:00
Unknown W. Brackets
88b3b26ed3 softgpu: Cache reused indexed verts.
This happens a lot for spline/bezier, so can significantly speed up curve
heavy scenes.  Isn't necessarily that common otherwise, though.
2022-09-22 18:27:59 -07:00
Unknown W. Brackets
067fac6817 softgpu: Skip matrix multiply for fog factor calc.
We can just use a dot product instead, and always skip viewpos.
2022-09-22 18:19:53 -07:00
Unknown W. Brackets
84a3f6de71 softgpu: Remove unnecessary state param.
Oops, meant to remove this when refactoring imm prims.
2022-09-22 18:18:49 -07: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
c3cbb68452
Merge pull request #16072 from hrydgard/depth-free-renderpass
Vulkan: Don't have renderpasses store/load depth buffers when we don't use them
2022-09-22 11:05:25 +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
a31c5c8239 Cleanup logic 2022-09-22 10:48:45 +02:00
Henrik Rydgård
8e30a7ccfc Vulkan: Don't have renderpasses store/load depth buffers when we don't use them 2022-09-22 10:06:05 +02:00
Henrik Rydgård
e9bcefb052
Merge pull request #16080 from unknownbrackets/softgpu-spline
softgpu: Avoid unnecessary flushing for curves
2022-09-22 10:05:23 +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
188ab67d6a More lenient heuristic for uploading depth buffers. Still behind compat flag. See #11100 2022-09-22 09:29:33 +02:00
Henrik Rydgård
287e025978 Minor cleanups around dirtying of render state 2022-09-22 09:12:58 +02:00
Unknown W. Brackets
fc39f042ae softgpu: Avoid unnecessary flushing for curves.
We don't need to flush all drawing between curves in softgpu, let them
queue up.
2022-09-22 00:08:38 -07:00
Henrik Rydgård
594139885e
Merge pull request #16077 from unknownbrackets/hwtess
GPU: Use hardware tess params for texgen
2022-09-22 08:58:30 +02:00
Unknown W. Brackets
a8eced4773 GLES: Avoid resizing tessellation data textures.
Just recreate when it needs to be larger.  Fixes Test Drive Unlimited
issues noted in #16069.
2022-09-21 23:30:00 -07:00
Unknown W. Brackets
1e78f3aa57 GPU: Correct neg normal for hwtess texgen. 2022-09-21 22:06:32 -07:00
Unknown W. Brackets
a681d149db GPU: Use hardware tess params for texgen.
Fixes field in Test Drive Unlimited with hardware tessellation.
2022-09-21 21:15:58 -07: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
78ab013914 Shouldn't 'floor' there 2022-09-21 18:37:40 +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
3ff400e40e
Merge pull request #16069 from unknownbrackets/depth-clamp
GPU: Simplify depth clamped clip planes
2022-09-21 10:01:49 +02:00
Henrik Rydgård
95ea0450fc
Merge pull request #16066 from unknownbrackets/softgpu-fastrect
softgpu: Narrow blend check for fast path further
2022-09-21 10:01:04 +02:00
Henrik Rydgård
7f0405b777
Merge pull request #16067 from unknownbrackets/lines
GPU: Account for w properly in lines, fixing width
2022-09-21 09:13:39 +02:00
Unknown W. Brackets
f8d29fdc1a GPU: Simplify depth clamped clip planes.
There's no need to think about the scaled Z if we're using w anyway, just
use the existing Z clipping.
2022-09-20 16:23:19 -07:00
Henrik Rydgård
a223e2a572
Merge pull request #16068 from unknownbrackets/depth-clamp
GPU: Clip clamped depth accounting for perspective
2022-09-21 01:15:12 +02:00
Unknown W. Brackets
2fc7f72d72 GPU: Clip clamped depth accounting for perspective. 2022-09-20 15:55:39 -07:00
Unknown W. Brackets
0a24004eac GPU: Account for w properly in lines, fixing width.
See #15756.
2022-09-20 15:12:16 -07:00
Unknown W. Brackets
cefef3b4f9 softgpu: Narrow blend check for fast path further.
See #15756, frame was largely black because of a full screen blend
rectangle intended to brighten the screen slighty (I assume.)
2022-09-20 14:29:33 -07:00
Henrik Rydgård
0c39c434d0
Merge pull request #16065 from unknownbrackets/softgpu-tests
Correct some minor issues shown in a few tests
2022-09-20 23:27:41 +02:00
Unknown W. Brackets
bf86f00df8 GPU: Correct display framebuffer reading.
The displayFramebuf_ might not be set yet, but that doesn't mean we want
an INVALID format and zero stride.  We might also be rendering to a
different target, but still want the display.
2022-09-20 14:01:36 -07:00
Unknown W. Brackets
78a3925198 softgpu: Fix display framebuffer read. 2022-09-20 13:43:19 -07:00
Henrik Rydgård
355c18512f Fix BGRA issue on D3D with GPU CLUT textures 2022-09-20 22:31:54 +02:00
Unknown W. Brackets
7483923d07 softgpu: Correct clear rect off by one issues. 2022-09-20 12:57:05 -07:00
Henrik Rydgård
85d1f28997 Throw in assorted warning fixes 2022-09-20 18:04:08 +02:00
Henrik Rydgård
aa19712fc3 Unify depth texture and framebuffer fetch checks 2022-09-20 10:47:49 +02:00
Henrik Rydgård
09bcf3ec13 Unify range culling detection 2022-09-20 10:15:04 +02:00
Henrik Rydgård
1ae7c0132c Start unifying setting of the GPU feature flags, now that thin3d has feature detection. 2022-09-20 10:07:01 +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
3e0b3ba1a8
Merge pull request #16054 from unknownbrackets/softgpu-flush
softgpu: Reduce some flushing / flushing cost
2022-09-19 17:56:44 +02:00