Unknown W. Brackets
9d6de98ed9
softgpu: Correct drawing outside TL of rectangle.
...
If the start coordinate was something like 51.75, we were incorrectly
drawing to 51. This can be seen in the Metal Slug intro (#15755.)
2022-10-16 18:46:38 -07:00
Unknown W. Brackets
dc90a5a851
softgpu: Avoid projecting textures in common case.
...
Several games appear to intentionally set the matrix flat.
2022-09-29 22:31:49 -07:00
Unknown W. Brackets
23af9be9f4
softgpu: Handle rectangle texture projection.
2022-09-26 18:44:39 -07:00
Unknown W. Brackets
faa6c2d461
softgpu: Implement triangle texture projection.
2022-09-26 18:12:20 -07:00
Unknown W. Brackets
6282f8b05f
softgpu: Expand texture coords to include q.
...
We'll need this to correctly project.
2022-09-26 17:13:14 -07:00
Unknown W. Brackets
8376176b2f
softgpu: Split clippos out of rasterization vert.
...
We don't use it, except w, at all in rasterization, so no need to keep it
in the bin queue.
2022-09-26 16:50:40 -07:00
Unknown W. Brackets
b3c0f177e2
softgpu: Save last tc/normal in vertex reading.
...
Matches PSP behavior, reusing last set values.
2022-09-26 15:11:11 -07:00
Unknown W. Brackets
c47d7eab38
softgpu: Simply 5551 blending fast path.
...
Since it only supports multiply and add, let's just stick with that.
2022-09-24 18:55:45 -07:00
Unknown W. Brackets
a4c3718431
softgpu: Optimize rectangle sampling/blending.
...
Sometimes the vertex color or alpha can allow us to optimize away some
multiplication.
2022-09-24 02:00:03 -07: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
Unknown W. Brackets
7d4aa3eb2d
softgpu: Correct line early z checks.
...
Was looking at completely wrong pixels, hadn't removed subpixels yet.
2022-09-18 11:44:01 -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
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
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
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
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
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
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
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
3d52b445f1
softgpu: Restrict CLUT to proper size.
...
We had 15 KB more space than needed before.
2022-08-20 17:36:15 -07:00
Henrik Rydgård
e6403d7157
Split GetPointer into two versions, to help with const correctness
2022-07-24 13:26:19 +02:00
Unknown W. Brackets
7389a36fad
softgpu: Avoid unnecessary clearMode checks.
...
Already baked into the flag.
2022-03-20 12:05:31 -07:00
Unknown W. Brackets
da4b9e82f3
softgpu: Fix build with basic logging.
2022-03-05 00:08:09 -08:00
Henrik Rydgård
eb765a80f8
Merge pull request #15411 from unknownbrackets/softgpu-range
...
softgpu: Apply region x2/y2 as a scissor
2022-02-20 21:42:00 +01:00
Unknown W. Brackets
1d0936ea79
Debugger: Improve drawing range in softgpu.
...
We don't always want all of region, particularly if scissor is a regular
screen size. This improves debugging in GoW.
2022-02-20 12:21:48 -08:00
Unknown W. Brackets
ff5edb2bbc
softgpu: Correct accounting for pixel center.
...
Filtering is still not perfect but this makes different orientations
better.
2022-02-20 10:50:59 -08:00
Unknown W. Brackets
e1eb4ba94a
softgpu: Directly implement rectangle drawing.
2022-02-20 09:58:01 -08:00
Unknown W. Brackets
cc6491342e
softgpu: Prepare dedicated rectangle path.
...
We're still sometimes using the slow rect-as-triangles path, let's do
something faster. As a first step, just handle binning.
2022-02-20 09:38:51 -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
85cb4101dc
softgpu: Cleanup todos on perspective correctness.
...
Only the texture appears to be perspective corrected. Color is simply
linear.
2022-02-12 10:55:53 -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
Henrik Rydgård
fbc965fb59
Merge pull request #15343 from unknownbrackets/gpu-region
...
GPU: Log and report when region1 is non-zero
2022-01-24 09:18:17 +01:00
Unknown W. Brackets
8efb99801e
GPU: Log and report when region1 is non-zero.
2022-01-23 19:38:51 -08:00
Unknown W. Brackets
76f9103e97
softgpu: Add a table and initial dirty flags.
...
Not actually using the dirty flags to skip state, but have moved to
Execute_* functions and everything else like other graphics backends.
2022-01-23 08:08:40 -08:00
Unknown W. Brackets
c0c3f7284a
softgpu: Avoid flush texturing from stride.
...
This generally detects overlap more accurately using a dirty rectangles
approach. Also detects render to self much more accurately, including
with depth.
2022-01-20 18:39:01 -08:00
Unknown W. Brackets
653c036ac8
Debugger: Fix crash in software renderer.
...
The clut isn't set by sampler state, it's set normally by the binner.
2022-01-16 21:53:55 -08:00
Unknown W. Brackets
2ad7d8ed29
softgpu: Fix alpha blend with one/zero.
...
Wasn't setting the fixed value constants in these cases, so need to handle
in the C++ version.
2022-01-16 00:38:49 -08:00
Unknown W. Brackets
6896a7a64e
softgpu: Use cached state for screen offset.
2022-01-15 18:20:25 -08:00
Unknown W. Brackets
bf2e060735
softgpu: Move c++ tex func to sampler.
...
It's not used anywhere else now.
2022-01-15 15:28:07 -08:00
Unknown W. Brackets
a228b2ab6c
softgpu: Use cached sampler state outside jit.
2022-01-15 15:26:26 -08:00
Unknown W. Brackets
a2abf9402b
softgpu: Cache line drawing state.
2022-01-15 13:17:40 -08:00
Unknown W. Brackets
58455c8cf1
softgpu: Use cached state for clear write mask.
2022-01-15 13:03:11 -08:00
Unknown W. Brackets
092b03bd67
softgpu: Move fixed blend factor to draw pix state.
...
This is the last of the gstate.
2022-01-15 13:03:11 -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
Unknown W. Brackets
48ef4a18b1
softgpu: Handle scissor/range in BinManager.
2022-01-13 19:07:41 -08:00