Commit Graph

1688 Commits

Author SHA1 Message Date
Unknown W. Brackets
48b597a1b9 Display: Move core counters/stats to HW file.
This separates things better, so not everything is pulling in HLE.
2022-01-30 11:53:48 -08:00
Unknown W. Brackets
a181c9f7c4 unittest: Correct failing unit test.
Was just an invalid flag combination.
2022-01-29 12:22:11 -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
eb95b99523 GE Debugger: Add option to auto flush.
This makes it easier to see what's happening in each draw.
2022-01-22 13:12:59 -08:00
Unknown W. Brackets
2797e035df softgpu: Precompute lighting parameters.
In many cases, games use lighting just for diffuse or something, this
helps skip what's not needed too.  Good improvement in a scene from a
Naruto game.
2022-01-16 11:27:53 -08:00
Unknown W. Brackets
8a00c2d233 GPU: Allow gcc/clang/icc runtime SSE4 usage.
All our builds before were only using SSE4 in jit...
2022-01-08 17:09:09 -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
Henrik Rydgård
80ae4b039c Vulkan: Be more restrictive about texture upscaling on "slow" devices.
Applies the same rules as for software upscaling in this case.

Should fix the stutters seen in #15109
2021-12-16 21:00:49 +01:00
Unknown W. Brackets
001d67b711
GPU: Remove explicit rect/line depth cull.
This appears to be breaking NFS (#15129) and isn't fully correct since
the triangles are still later checked anyway.
2021-12-13 23:07:26 -08:00
Henrik Rydgård
c07068f89b Fix text wrapping on PromptScreen by improving the layout 2021-12-13 22:42:03 +01:00
Henrik Rydgård
b85a7e9a46 Name uniform buffers, add more asserts. Used this to track down the bug fixed in the previous commit. 2021-12-10 21:01:01 +01:00
Henrik Rydgård
3e5ba249bf
Merge pull request #15217 from hrydgard/scissor-auto-clamp
Vulkan is strict about scissor rect, so let's clamp centrally.
2021-12-08 22:55:12 +01:00
Henrik Rydgård
45308a16c0 Vulkan is strict about scissor rect, so let's clamp centrally.
Better than spreading the logic all over.

Fixes #15207
2021-12-08 22:38:01 +01:00
Henrik Rydgård
44dc3555ad FramebufferManagerCommon: Fix some issues where currentRenderVfb_ could get out of sync.
It would get out of sync with draw_->GetCurrentFramebuffer(), which led
to checks for self-texturing not working, hitting an assert.

This caused problems when turning off "slow effects", and who knows what
else.

Fixes #15208
2021-12-08 22:01:23 +01:00
Unknown W. Brackets
0b6e7c421f softgpu: Make decal tex func more accurate.
Tested for all values of A * B + 0 * (255 - B), as well as A * 127 + B *
(255 - 127), and matches accurately.  Spot checked other values, but not
exhaustively.
2021-12-05 13:34:19 -08:00
Unknown W. Brackets
367cca96b4 vertexjit: Optimize 5551 read a bit on x86/x64. 2021-11-25 19:23:59 -08:00
Henrik Rydgård
6349704924 Switch texture scaling shaders to a fixed scale model, preparing for the next change. 2021-11-07 13:12:28 +01:00
Unknown W. Brackets
142db5d61e GLES: Explicitly enable ARB_cull_distance. 2021-11-06 11:33:41 -07:00
Unknown W. Brackets
ec1d980b30 GPU: Sort line verts to correct bias.
We want it to consistently go down and right.  This improves Persona 2 UI
significantly (see #3332.)
2021-11-02 21:57:00 -07:00
Unknown W. Brackets
76e1690646 GPU: Keep diagonal lines the same width. 2021-10-31 15:49:20 -07:00
Unknown W. Brackets
2718e81c0e GPU: Expand lines to triangles. 2021-10-31 14:46:46 -07:00
Unknown W. Brackets
ea6d0f07e4 GPU: Correct point width/height.
Oops, shouldn't be half in 3D transform.
2021-10-31 13:19:51 -07:00
Unknown W. Brackets
b3a8e013f6 GPU: Expand points into triangles for higher res. 2021-10-31 13:06:06 -07:00
Unknown W. Brackets
4fb09859fd GPU: Refactor out rectangle expansion.
Just so it's cleaner when the same is done for lines.
2021-10-31 11:09:04 -07:00
Unknown W. Brackets
9fc94a3494 GPU: Skip cull for lines and points.
These already always go through software transform, so make sure we handle
them consistently.  We'll eventually convert to triangles.
2021-10-31 10:54:50 -07:00
Henrik Rydgård
8a718a8202
Merge pull request #15072 from unknownbrackets/guardband
Implement depth culling in software transform
2021-10-31 17:29:41 +01:00
Unknown W. Brackets
bffa68a566 GPU: Cleanup comments on swtranform cull. 2021-10-31 07:22:59 -07:00
Henrik Rydgård
3245f54dc1 Optimize the rotation a bit (limit to VK/D3D11, mat2 instead of mat4) 2021-10-31 13:44:54 +01:00
Henrik Rydgård
3bf6b140c7 Don't forget to check for bufferedRendering before enabling screen rotation in the shader. 2021-10-31 13:35:13 +01:00
Unknown W. Brackets
5128480d74 GPU: Implement cull behavior in sw transform. 2021-10-30 21:04:16 -07:00
Unknown W. Brackets
7edfdd2cdd GPU: Rename pos/uv w for clarity. 2021-10-30 21:04:00 -07:00
Unknown W. Brackets
b4bc4c5c78 GPU: Remove buggy rectangle culling.
Transformed rectangles are uncommon, but culling them properly is a bit
trickier than this, so remove for now.
2021-10-30 18:26:23 -07:00
Unknown W. Brackets
b5a2afef76 D3D11: Fix fog in software transform. 2021-10-30 18:24:01 -07:00
Unknown W. Brackets
e688bb2cdf GPU: Correct software transform projection.
Now reading the new fog value.
2021-10-30 18:23:58 -07:00
Unknown W. Brackets
4ec75de0e7 GPU: Add fog separately for swtransform verts.
At this point, still being processed wrong, this just changes the
attribute structure.
2021-10-30 18:22:54 -07:00
Unknown W. Brackets
b87451de92 GPU: Restore rotation handling in sw transform. 2021-10-30 18:22:53 -07:00
Unknown W. Brackets
4e5ce403b5 GPU: Process proj matrix in sw transform.
Will need this to properly handle culling and clipping in software
transform.

Temporarily breaks display rotation handling (Vulkan/UWP.)
2021-10-30 18:22:53 -07:00
Unknown W. Brackets
159eab5141 GPU: Set projection matrix per backend.
There's a bit of variance, so this keeps the central code clean.
2021-10-30 18:20:36 -07:00
Unknown W. Brackets
3730460bc5 GPU: Move swtransform flippedY to params. 2021-10-30 18:17:22 -07:00
Unknown W. Brackets
030bfb1fb6
GPU: Fix missing newline in shader. 2021-10-26 06:54:03 -07:00
Henrik Rydgård
906a04f1fd Make sure to not leave cull distance uninitialized in other paths, if we do write to it in some path. 2021-10-26 09:56:38 +02:00
Unknown W. Brackets
09f0578a64 Replacement: Use a thread to load tex replacements. 2021-10-21 17:05:39 -07:00
Unknown W. Brackets
ee882d1861 Replacement: Avoid rebuild until ready. 2021-10-21 17:05:38 -07:00
Unknown W. Brackets
0721405628 Replacement: Avoid clash with X define. 2021-10-21 17:05:38 -07:00
Unknown W. Brackets
83b7b33cfd Replacement: Centralize lookup logic.
And make sure we don't change our minds about using a replacement during a
draw.
2021-10-21 17:05:38 -07:00
Unknown W. Brackets
36fc2c2628 Replacement: Purge old cached decoded textures.
Not actually decoding into the cache, just setup.
2021-10-21 17:05:38 -07:00
Unknown W. Brackets
2356280a9c Replacement: Add structure for delayed loading. 2021-10-21 17:05:38 -07:00
Henrik Rydgård
16bf5197e4
Merge pull request #14833 from unknownbrackets/guardband
Handle guardband clip/cull better for hardware backends
2021-10-19 12:00:01 +02:00