Unknown W. Brackets
a259761262
samplerjit: Use nearest func in fast path too.
...
This uses the more optimal tex funcs.
2022-01-02 08:48:16 -08:00
Unknown W. Brackets
ba17f538d6
softjit: Avoid const temp registers.
...
Was trying to make sure register allocation was okay in the worst case.
2022-01-02 08:47:04 -08:00
Unknown W. Brackets
e93c709f5c
sofjit: Correctly poison memory.
...
Noticed this wasn't breakpoints when reviewing some assembly output.
2022-01-02 08:47:04 -08:00
Unknown W. Brackets
745c35f320
softjit: Small bloom optimization.
...
Another common case, src*dst + dst*0. Can skip the add.
2022-01-02 08:47:04 -08:00
Unknown W. Brackets
355bad666c
softjit: Optimize common case bloom blending.
...
Bloom often uses fixed ONE + ONE, which is a lot less work for us. And
bloom often runs over and over again on pixels, so saving work is good.
2022-01-02 08:47:04 -08:00
Henrik Rydgård
6fb5d82fe0
Merge pull request #15264 from unknownbrackets/samplerjit-vec
...
A couple more smaller samplerjit optimizations
2022-01-02 17:32:54 +01:00
Unknown W. Brackets
496545e55c
softgpu: Add code for tracking GPU writes.
...
Unfortunately, it has a pretty noticeable speed impact, even at the basic
"assume everything's written" level. Compiled off by default, but at
least it's there.
Doesn't account for tests (i.e. alpha test skipping write) so still not
perfectly accurate.
2022-01-02 08:28:30 -08:00
Unknown W. Brackets
0eec4e7e4d
samplerjit: Decode colors in parallel.
...
Not used in a ton of games, but a decent improvement where it is used.
2022-01-02 08:27:55 -08:00
Henrik Rydgård
cb1f26122d
Merge pull request #15269 from unknownbrackets/softgpu-opt
...
softgpu: Reduce interpolation if not needed
2022-01-02 09:47:19 +01:00
Henrik Rydgård
da38c027b5
Merge pull request #15268 from unknownbrackets/samplerjit-nearest
...
Implement nearest in samplerjit, like linear
2022-01-02 09:46:29 +01:00
Unknown W. Brackets
025ac99f2f
softgpu: Reduce interpolation if not needed.
...
About 3% gain in some areas.
2022-01-01 18:34:04 -08:00
Unknown W. Brackets
7060035303
samplerjit: Implement nearest in jit.
...
This uses the tex func and similar within jit.
2022-01-01 16:58:05 -08:00
Unknown W. Brackets
91c9343e87
samplerjit: Refactor and reuse constant pool.
...
It's just here to be rip accessible, the fixed values can be output just
once.
2022-01-01 16:58:05 -08:00
Unknown W. Brackets
40240be91c
samplerjit: Update nearest args, temp disable jit.
...
This temporarily disables jit for nearest, but refactors to use the new
arg structure. It now matches linear.
2022-01-01 16:58:05 -08:00
Unknown W. Brackets
5f84de7de7
softjit: Small optimizations.
2022-01-01 16:58:04 -08:00
Unknown W. Brackets
06e954fe2a
samplerjit: Create a separate fetch func.
...
This allows nearest to become more similar to linear, where it applies the
texture function.
2022-01-01 16:58:04 -08:00
Unknown W. Brackets
3bc6009158
samplerjit: Refactor sampler ID calculation.
...
Make it the same as pixel func IDs.
2022-01-01 16:58:04 -08:00
Unknown W. Brackets
d41e42d247
softgpu: Correct off-by-one scissor mask.
...
Fixes Brave Story in the software renderer. Was overwriting display list
data in the stride gap.
2022-01-01 16:42:36 -08:00
Unknown W. Brackets
b35ca3d472
softgpu: Cleanup min/max tri range handling.
...
The previous looked like it had off by one errors. This is simpler.
2022-01-01 16:42:36 -08:00
Unknown W. Brackets
e82fd3bd33
GPU: Avoid spline crashes on bad data.
...
If we get 0 prims, we can generate confusing index bounds and go out of
bounds. Similarly, if we get a crazy number of control points and fail to
allocate, we can crash.
2022-01-01 16:40:59 -08:00
Unknown W. Brackets
12405709f0
softgpu: Skip processing scissored triangles.
...
If only one side was scissored (common), we might even put it on a thread,
which ended up as a lot of overhead. Gives 3-4% improvement in some
places.
2022-01-01 16:40:34 -08:00
Unknown W. Brackets
6aec68aa5c
samplerjit: Correct wrong bufw at mip levels.
...
Oops, was always using the base bufw.
2022-01-01 16:40:02 -08:00
Unknown W. Brackets
dbb015f427
samplerjit: Oops, fix Linux mipmap handling.
2022-01-01 16:40:02 -08:00
Unknown W. Brackets
8c31f1bb38
softjit: Fix regcache error when clearing.
...
Happens for non-through clears.
2022-01-01 16:40:01 -08:00
Unknown W. Brackets
8ea67b571b
samplerjit: Tiny dependency optimizations.
...
This had a small but measureable impact (~0.3%.)
2021-12-31 08:11:57 -08:00