Unknown W. Brackets
ca248e1201
softgpu: Fix s8 primitives in throughmode.
...
Also always cull no-position verts, hardware too. Matches tests.
2022-09-18 07:46:18 -07:00
Unknown W. Brackets
97002692c4
softgpu: Correct secondary color on imm verts.
...
Only with through set, and we have to ignore position.
2022-09-18 06:16:26 -07:00
Unknown W. Brackets
6877ff1af2
softgpu: Fix state/continuation for imm prims.
2022-09-18 06:16:26 -07:00
Unknown W. Brackets
596b07bd2e
softgpu: Support fog and color1 on imm verts.
2022-09-18 06:16:26 -07:00
Unknown W. Brackets
35ba01e01f
softgpu: Refactor imm draws to bypass vert read.
2022-09-18 06:16:25 -07:00
Unknown W. Brackets
799a9ae95b
softgpu: Simplify vertex reading.
2022-09-18 06:16:25 -07:00
Unknown W. Brackets
de080e2594
softgpu: Simplify vertex range culling.
...
The previous logic was harder to understand and easier to get wrong.
Just drop them when clipping the primitive.
2022-09-18 06:16:25 -07:00
Unknown W. Brackets
028a341cc8
softgpu: Explicitly flush on sync and output.
...
We could in theory skip flush on FinishDeferred, and allow some CPU/GPU
overlap. If we did, we'd still want to flush at these times.
2022-09-18 06:16:25 -07:00
Unknown W. Brackets
f740fcdbe7
GPU: Minor cleanup of unnecessary virtual.
2022-09-18 06:16:25 -07:00
Unknown W. Brackets
9b01fce5b5
softgpu: Run early Z tests in fast rect path.
...
Needed for some 2D games, like Criminal Girls.
2022-09-17 13:37:54 -07:00
Unknown W. Brackets
8371091734
softgpu: Force correct alignment on 32-bit.
2022-09-12 22:15:02 -07:00
Unknown W. Brackets
1be5f1670c
softgpu: Remove mostly unused screen offset state.
...
This is now already cleaned up from coords, so no need to cache it.
2022-09-12 22:02:10 -07:00
Unknown W. Brackets
167213c746
softgpu: Cache texture bufws at 16 bit.
...
Reducing the size of state a bit.
2022-09-12 21:57:00 -07:00
Unknown W. Brackets
b2e6a086dc
softgpu: Reduce size of VertexData texture coords.
...
There's no real benefit to this with only two values.
Not much of a gain perf wise, but still good to transfer less data.
2022-09-12 21:10:46 -07:00
Henrik Rydgård
2791ab3226
Merge pull request #16011 from unknownbrackets/softgpu-rect
...
Detect more triangles as rectangles in softgpu
2022-09-12 08:35:13 +02:00
Unknown W. Brackets
3c9372fb75
softgpu: Ignore stencil test mask in ALWAYS mode.
...
Small codegen improvement since we can directly use ref and avoid loading
the unmasked reference.
2022-09-11 22:39:56 -07:00
Unknown W. Brackets
1f6870798b
softgpu: Include early Z in func description.
2022-09-11 22:39:32 -07:00
Unknown W. Brackets
151727ee01
softgpu: Detect longer strips of rectangles.
...
Could maybe even combine these into one large rectangle, but the main
benefit is avoiding triangles.
2022-09-11 22:39:32 -07:00
Unknown W. Brackets
288d18447d
softgpu: Detect full triangles as rectangles.
...
Seen in a dump from Infected, improves FPS ~25% there.
2022-09-11 22:39:32 -07:00
Unknown W. Brackets
ce4fee7373
softgpu: Refactor triangle cull processing.
2022-09-11 22:39:32 -07:00
Unknown W. Brackets
8a6e8066bf
softgpu: Store vertex colors as packed RGBA8.
...
No need to keep it expanded at 4x the space for both colors.
2022-09-11 18:41:06 -07:00
Unknown W. Brackets
8a2115be46
softgpu: Enable early Z tests a bit more often.
...
This helps in cases where sfail doesn't matter.
2022-09-11 18:39:39 -07:00
Unknown W. Brackets
5f2e20d8ca
softgpu: Reduce some minor bin item field sizes.
2022-09-11 18:39:14 -07:00
Unknown W. Brackets
8c55e18ea8
softgpu: Switch vert continue buffer to members.
...
Better this than static. May be easier to handle imm prims correctly.
2022-09-11 08:54:34 -07:00
Unknown W. Brackets
e72309745e
softjit: Implement accurate fog color blending.
2022-09-11 08:50:07 -07:00
Unknown W. Brackets
b90fc7137f
softgpu: Correct accuracy of fog calculation.
...
This matches values from a PSP exactly, with the help of immediate mode
vertex values (since this directly allows specifying the fog factor
without any floating point math.)
2022-09-11 08:24:40 -07:00
Unknown W. Brackets
2e3b73abaa
softgpu: Restrict sprite fast path to throughmode.
...
Its UV checks already should have generally, but let's be safe. It
doesn't validate state like fog, etc.
2022-09-11 08:22:37 -07:00
Henrik Rydgård
d86127ac5e
Merge pull request #15999 from unknownbrackets/softgpu-texsize
...
softgpu: Clamp/wrap textures at 512 pixels
2022-09-11 10:12:38 +02:00
Henrik Rydgård
04c02340f1
Merge pull request #15998 from unknownbrackets/softgpu-rect
...
softgpu: Allow almost flat rectangles to go fast
2022-09-11 08:54:04 +02:00
Unknown W. Brackets
15d5fa48f7
softgpu: Check depth test early on simple stencil.
...
If we don't need to write stencil on sfail/zfail, we can do the depthtest
early, which allows us to more often skip texture sampling.
This gives a good improvement in Chains of Olympus.
2022-09-10 21:24:19 -07:00
Unknown W. Brackets
90e009edb9
softgpu: Clamp/wrap textures at 512 pixels.
...
A texture larger than 512 is "valid", but simply wraps/clamps at 512.
Importantly, the texture coords are still calculated at the specified
size, which can be up to 32768.
2022-09-10 20:23:09 -07:00
Unknown W. Brackets
18c9a4d9c9
GE Debugger: Fix crash stepping with large tex.
...
Some math was overflowing in allocations, and it would allocate zero
bytes. Let's just refuse textures more actively.
2022-09-10 19:31:53 -07:00
Unknown W. Brackets
f5f5c9ea87
softgpu: Avoid calling unordered coords tl/br.
...
These are just corners, we don't know if they're top or not at this point.
2022-09-10 14:58:27 -07:00
Unknown W. Brackets
13ca08b235
softgpu: Avoid over-aggressive rect conversion.
...
The TL and BR have to match between UVs and pos, not enough for UV to be
in order. This was causing an artifact on Chains of Olympus' title.
2022-09-10 14:56:13 -07:00
Unknown W. Brackets
e7d49cd7d0
softgpu: Allow almost flat rectangles to go fast.
...
Improves transform rectangles used in Chains of Olympus, for example on
the title screen.
2022-09-10 13:29:40 -07:00
Unknown W. Brackets
6004d4a459
softgpu: Refactor duplicate rectangle compat check.
...
This just moves the logic to a single place for changes.
2022-09-10 13:28:35 -07:00
Unknown W. Brackets
7a83f8bab5
softgpu: Use vertType prim override for flags.
...
These parameters are a real shame, was so clean before...
2022-09-06 22:20:45 -07:00
Unknown W. Brackets
f274267143
GPU: Allow usage of texturing in immediate verts.
...
And respect the other flags that I can reproduce working in a test.
I can't seem to get the fog to work at all, or the shading mode, or the
secondary color. Maybe depends on other flags or bits in other regs...
2022-09-06 22:20:45 -07:00
Unknown W. Brackets
ceb2af369c
GPU: Handle immediate prims more accurately.
...
This allows for lines, points, textures, and similar things. Also
corrects offset handling. Still some flags on VAP that seemingly don't
work, and this doesn't consider the texture flag on it.
2022-09-06 22:20:45 -07:00
Unknown W. Brackets
23f61171f9
softgpu: Implement matrix data wrap-around.
...
Overflow writes to other matrices. Matches hardware tests.
2022-09-05 19:38:54 -07:00
Henrik Rydgård
a91219bebc
The Darkstalkers subpixel check should be == 0. Fixes #14953 again
2022-09-05 19:12:45 +02:00
Unknown W. Brackets
15b73b56bb
softgpu: Correct texture check in fastpath.
...
This is the no textures option, so we shouldn't check sampler state at
all. Presumably this was failing and reading uninitialized data...
2022-09-03 11:21:14 -07:00
Unknown W. Brackets
af004dd53d
softgpu: Validate alpha test properly for fastpath.
...
We don't want a weird LESS test being mishandled.
2022-09-03 11:19:24 -07:00
Unknown W. Brackets
ba1ced4992
softgpu: Avoid rect fast path with subpixel offset.
...
It doesn't handle it right, see #15876 . We still handle these with
DrawRectangle(), which gets it right.
2022-09-03 11:08:11 -07:00
Henrik Rydgård
ecb84987ef
Remove allocation from the heaviest MemBlockInfo path (BlockTransfer). Required some refactoring.
2022-09-01 11:59:35 +02:00
Henrik Rydgård
5f30c88e38
Merge pull request #15873 from unknownbrackets/softgpu-xfer-hazard
...
softgpu: Flush on transfer to pending tex read
2022-08-21 10:04:27 +02:00
Henrik Rydgård
5ad1301ee8
Merge pull request #15874 from unknownbrackets/softgpu-morph
...
softgpu: Correct morph weight updates
2022-08-21 10:03:47 +02:00
Unknown W. Brackets
e14ca87900
softgpu: Correct morph weight updates.
...
Broke LittleBigPlanet character's face, for example.
2022-08-21 00:27:31 -07:00
Unknown W. Brackets
88e8f95293
softgpu: Flush on transfer to pending tex read.
...
Potentially could use these for self-render, but so far we should be
detecting that so leaving it alone.
2022-08-20 23:22:21 -07:00
Unknown W. Brackets
3d52b445f1
softgpu: Restrict CLUT to proper size.
...
We had 15 KB more space than needed before.
2022-08-20 17:36:15 -07:00