Commit graph

300 commits

Author SHA1 Message Date
Unknown W. Brackets
e3aabdc86c softgpu: Use region as a second scissor.
It's effectively a scissor in the common case of REGION1 being zero.
2022-02-20 12:01:35 -08:00
Unknown W. Brackets
6737d69f0a softgpu: Cleanup some now unused state. 2022-02-20 09:19:48 -08:00
Unknown W. Brackets
7cef06c191 softgpu: Track dirty vs really dirty per buffer.
When games draw and display with a frame lag, it becomes important that we
indicate really dirty for the correct buffer.  Since some triple buffer,
this attempts to track at the buffer level using 1024 byte granularity.
2022-02-12 15:27:18 -08:00
Unknown W. Brackets
80e054b797 Debugger: Avoid write tag lookup on small alloc. 2022-02-06 09:28:48 -08:00
Unknown W. Brackets
be8c74cabe softgpu: Avoid flush on END.
We only, but always, flush when exiting list interp in FinishDeferred.
It's not necessary at END, and hurts for simple signals that don't stop
list processing.
2022-01-31 19:32:46 -08:00
Unknown W. Brackets
ce775af76d softgpu: Skip new CLUT if identical.
Games often reupload CLUT data that is already there, this skips some
copying later in the bin manager.
2022-01-29 12:55:34 -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
9ea5367a8c softgpu: Add dirty flags for rasterization state. 2022-01-23 08:08:41 -08:00
Unknown W. Brackets
a27da25cd6 softgpu: Use dirty flags for render overlap checks. 2022-01-23 08:08:40 -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
dec0ba7b79 softgpu: Flush framebuf only on change.
Sometimes games are reasserting the same framebuf, which was causing
unnecessary flushing.
2022-01-20 17:02:23 -08:00
Henrik Rydgård
128e2fa14e
Merge pull request #15318 from unknownbrackets/softgpu-opt
softgpu: Heuristic to avoid over-draining
2022-01-17 07:43:34 +01:00
Unknown W. Brackets
206d586c1f softgpu: Fix block transfer flush detection.
Fixes video graphics in Gods Eater Burst.
2022-01-16 21:40:19 -08:00
Unknown W. Brackets
423ec76258 softgpu: Correct texsize flush annotation. 2022-01-16 21:09:43 -08:00
Unknown W. Brackets
d95475e021 softgpu: Expose flush reasons/times in debug stats. 2022-01-16 11:27:42 -08:00
Unknown W. Brackets
7e5f03eed1 softgpu: Reduce flushing for smaller textures. 2022-01-16 08:23:52 -08:00
Unknown W. Brackets
86749a3fe0 softgpu: Flush block xfer only on overlap too. 2022-01-16 08:23:17 -08:00
Unknown W. Brackets
2de7993dc5 softgpu: Decorate some stats for flushes. 2022-01-16 08:23:15 -08:00
Unknown W. Brackets
cc155ec460 softgpu: Avoid texture/CLUT flush unless overlap.
Only need to flush here if there's some overlap in the target.
2022-01-16 08:22:13 -08:00
Unknown W. Brackets
d6fa301ab1 softgpu: Track CLUTs as states for binning.
This way we can have multiple CLUTs in process at once, which helps.
2022-01-16 08:14:09 -08:00
Unknown W. Brackets
18f2a45a6a softgpu: Allow binning across prim calls. 2022-01-16 00:49:49 -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
2ef7dd6b03 softgpu: Correct tagging of vertexjit. 2021-11-25 19:21:56 -08:00
Unknown W. Brackets
09dc38080a softgpu: Move draw pixel code to separate file.
This separates things better anyway.  No major perf impact.
2021-11-21 08:23:32 -08:00
Unknown W. Brackets
3304814fd6 GPU: Minor cleanup duplicate header/conditions. 2021-05-08 09:12:22 -07:00
Unknown W. Brackets
de46b0998a GPU: Correctly initialize HW tessellation support.
Oops, shouldn't call a virtual in a constructor.
2021-05-08 09:10:23 -07:00
Unknown W. Brackets
8a8328c431 Common: Move ColorConv to a more appropriate place. 2021-05-01 11:20:05 -07:00
Unknown W. Brackets
ee749804fc Debugger: Note GPU block transfer src as well. 2021-04-03 18:11:44 -07:00
Unknown W. Brackets
f7740edc6d Debugger: Add more metadata for memory usage. 2021-02-15 15:01:21 -08:00
Henrik Rydgård
3f01cbb98c Initialize/Deinitialize the shader translation system once globally.
Fixes #13839.
2021-01-04 23:51:34 +01:00
Unknown W. Brackets
ed65bc2327 SoftGPU: Allow rendering with no backend at all. 2021-01-02 09:25:41 -08:00
Unknown W. Brackets
6a2b3f8f78 SoftGPU: Update PPGe draw context.
Oops, this was missing.
2021-01-02 09:23:25 -08:00
Henrik Rydgård
32c9728c0c Some cleanups in GL feature and shader language detection.
Gets rid of many wrong or bad checks for IsCoreContext.
2020-12-14 19:46:11 +01:00
Henrik Rydgård
766dbc5a9f Move ShaderTranslation.cpp/h to Common/GPU. 2020-11-09 11:18:43 +01:00
Henrik Rydgård
03e8eac6ef Merge the two ShaderLanguage enums. 2020-11-04 09:40:11 +01:00
Henrik Rydgård
b7d674411e Test parsing of generated OpenGL shaders too (by using glslang). 2020-10-31 18:32:43 +01:00
Henrik Rydgård
0e3a84b4a8 Move most GPU things to Common.
It works after the move, on Windows and Android at least.

Deletes the D3DX9 shader compiler loader, which was not used.
2020-10-04 23:39:02 +02:00
Henrik Rydgård
b7edf75437 Move Display.cpp/h to Common. 2020-10-04 11:42:16 +02:00
Henrik Rydgård
821817e6d4 Move the profiler to Common 2020-10-04 11:42:16 +02:00
Henrik Rydgård
defa8aa480 DarkStalkers: Handle the "normal" screen stretch too, not just "wide", to avoid a surprising performance drop. 2020-05-24 16:53:44 +02:00
Henrik Rydgård
fabe987c8f Add a name tag for all render steps (GL/Vulkan). Helps with debugging and should be cheap enough (a single pointer per "step"). 2020-05-21 11:24:05 +02:00
Unknown W. Brackets
b79ecc159f GPU: Update postshader uniforms for each. 2020-05-16 12:04:36 -07:00
Henrik Rydgård
864d138cd9 Fix DarkStalkers after the just-merged refactoring. 2020-05-14 23:28:37 +02:00
Unknown W. Brackets
7024a2877d GPU: Take A off RGB565 conversion funcs. 2020-05-13 18:17:58 -07:00
Unknown W. Brackets
03e3a935da GPU: Cleanup presentation flipping a bit. 2020-05-13 18:11:25 -07:00
Unknown W. Brackets
a41fbb9225 softgpu: Fix postshader on 5551.
This also fixes rendering on Windows 7 Direct3D 11.
2020-05-13 18:10:09 -07:00
Unknown W. Brackets
762b656ea2 GPU: Use a texture directly for MakePixelTexture.
This makes it easier to do things with it.
2020-05-13 18:10:09 -07:00
Unknown W. Brackets
2653e50200 softgpu: Avoid RB swizzle when using a postshader.
So that it can post-process correctly.
2020-05-13 18:10:09 -07:00