Commit Graph

65 Commits

Author SHA1 Message Date
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
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
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
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
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
Unknown W. Brackets
6737d69f0a softgpu: Cleanup some now unused state. 2022-02-20 09:19:48 -08:00
Unknown W. Brackets
1bc3acf2ed softgpu: Use a const for subpixel screenpos factor. 2022-02-19 21:03:49 -08:00
Unknown W. Brackets
a66377fdf1 softgpu: Remove offset from screenpos.
This simplifies tighter calculations, and reduces the common magnitudes
we'll be dealing with.
2022-02-19 20:38:44 -08:00
Unknown W. Brackets
3d4c1548b6 softgpu: Allow tri -> rect in transform. 2022-02-12 12:03:55 -08:00
Unknown W. Brackets
259b10d42a softgpu: Turn more tri strips into rects.
This catches a common case in Valkyrie Profile.
Rotation is resolved by just always using tl/br.
2022-02-12 11:33:42 -08:00
Unknown W. Brackets
2381f355c2 softgpu: Combine tris to rects with ignored z too. 2022-02-12 11:33:36 -08:00
Unknown W. Brackets
2479d52202 Global: Reduce includes of common headers.
In many places, string, map, or Common.h were included but not needed.
2022-01-30 16:35:33 -08:00
Unknown W. Brackets
3010cd56d1 softgpu: Correct simple rectangles with mipmaps.
Might be used for fonts, we could potentially check for bias/slope, but
mipmaps are uncommon in direct through draws anyway.
2022-01-23 12:26:58 -08:00
Unknown W. Brackets
6896a7a64e softgpu: Use cached state for screen offset. 2022-01-15 18:20:25 -08:00
Unknown W. Brackets
02c5559393 softgpu: Remove z from DrawingCoords.
It's not really used much of anywhere, anyway.
2022-01-15 15:38:56 -08:00
Unknown W. Brackets
a228b2ab6c softgpu: Use cached sampler state outside jit. 2022-01-15 15:26:26 -08:00
Unknown W. Brackets
0b3f096c01 softgpu: Cache strides in draw pixel state. 2022-01-15 13:03:10 -08:00
Unknown W. Brackets
970e9c2f51 softgpu: Move threading into BinManager.
This threads much more effectively, across entire prim call.
2022-01-13 22:45:23 -08:00