Commit Graph

1358 Commits

Author SHA1 Message Date
Unknown W. Brackets
9e46a30c13 GPU: Correct some missing override specifiers. 2023-02-26 15:58:58 -08:00
Henrik Rydgård
72bed6f2b5 Some DeviceLost/DeviceRestore cleanup 2023-02-26 11:05:52 +01:00
Henrik Rydgård
3dc47c7fef Unify TextureCache ::StartFrame as much as possible.
Tiny optimization avoiding a Vulkan pool reset on most frames.
2023-02-25 23:20:41 +01:00
Henrik Rydgård
8fb75e0c12 Unify most of the DebugGetShader* functions 2023-02-25 16:42:09 +01:00
Henrik Rydgård
92ee6e6a75 Remove more redundant functions 2023-02-25 16:33:09 +01:00
Henrik Rydgård
c2c479b217 Remove function InitClear. Was only implemented for DX9, and only barely meaningful in non-buffered. 2023-02-25 16:32:50 +01:00
Henrik Rydgård
8ba665e258 More unification work 2023-02-25 16:12:24 +01:00
Henrik Rydgård
c74f5b2189 Prepare for unifying more stuff 2023-02-25 16:01:32 +01:00
Henrik Rydgård
e136ad795a Some slight unification 2023-02-25 15:15:34 +01:00
Henrik Rydgård
b6846646af Remove some uses of gfxCtx_ 2023-02-25 15:15:34 +01:00
Henrik Rydgård
285ffbaa52 Unify CopyDisplayToOutput 2023-02-25 14:42:15 +01:00
Henrik Rydgård
18999c3687 Create the GPUCommonHW class. 2023-02-25 14:42:10 +01:00
Henrik Rydgård
0d57f3beee Unify GPUCommon::DoState. 2023-02-25 12:21:03 +01:00
Henrik Rydgård
609a8f6d36 Unify ExecuteOp between the accelerated backends 2023-02-25 12:21:03 +01:00
Henrik Rydgård
ed03348c65 Unify PreExecuteOp, keep the soft GPU as a special case 2023-02-25 12:21:03 +01:00
Henrik Rydgård
da561aa9de Unify CheckFlushOp 2023-02-25 12:21:03 +01:00
Henrik Rydgård
30120560ab Include file cleanup in framebuffer managers 2023-02-25 12:21:00 +01:00
Henrik Rydgård
1b5148bb6c Remove kinda-duplicate function. 2023-02-24 23:54:04 +01:00
Henrik Rydgård
99e6fd62f7 Remove a baffling depth offset I don't quite get 2023-02-11 14:41:25 +01:00
Henrik Rydgård
a2c9491a06 Remove a division by 0 that I hadn't noticed before. 2023-02-11 13:27:44 +01:00
Henrik Rydgård
d65dae7185 Depth scale functions: Clean up the naming, add a failing test 2023-02-10 14:57:45 +01:00
Henrik Rydgård
d426ce5118 Clear depth buffers after changing depth rounding mode.
And thus change of depth buffer scale/offset.

Previously, old depth buffers with values that now are out of range
could stick around, causing #16941. This clears them to the expected 0
value, which helps Outrun. Ideally we should convert depth buffers to
the new format, but if we can get away without that, that's also nice.

This is enough for #16941.
2023-02-10 10:03:14 +01:00
Henrik Rydgård
937975000b Add a ReadbackMode parameter to more functions in the FramebufferManager 2023-02-05 13:57:45 +01:00
Henrik Rydgård
23c8a79473 Make depth readback through the "color path" work on all backends except D3D9 2023-02-03 20:59:58 +01:00
Henrik Rydgård
f2a6c744bc Add built-in stretch functionality to depth readback shader path 2023-02-03 19:06:40 +01:00
Henrik Rydgård
7635c4447c Oops, apply the alpha fix for D3D9 and OpenGL too.
See #16875
2023-02-03 08:51:35 +01:00
Henrik Rydgård
1c8e456c97 Also apply this to OpenGL and D3D9 2023-01-11 19:29:02 +01:00
Henrik Rydgård
c7c48abb37 Switch the 2x flag to a uniform 2023-01-10 12:36:28 +01:00
Henrik Rydgård
0a6d226ddc Remove the unused bool utilities 2023-01-10 10:25:41 +01:00
Henrik Rydgård
00c44ea799 Get rid of the bool, not worth it. 2023-01-10 10:23:29 +01:00
Henrik Rydgård
7df9545195 Fix D3D9 uniform update 2023-01-10 09:42:54 +01:00
Henrik Rydgård
d4ce134292 Shader generator: Move FS_TEX_ALPHA to a uniform bool.
Part of #16567
2023-01-10 09:42:54 +01:00
Unknown W. Brackets
0f92afb0c1 Replacement: Check replaceValid before load. 2023-01-08 10:20:52 -08:00
Unknown W. Brackets
5749b5a825 GPU: Clear shaders on use flag change. 2023-01-05 18:24:29 -08:00
Henrik Rydgård
85e6b4e592 Increment numFlushes near the other stat increments
Might be better for the cache, heh.
2023-01-04 17:10:56 +01:00
Henrik Rydgård
10dee90c83
Merge pull request #16628 from hrydgard/remove-fog-fshader-flag
Make fog-enable driven by uniform instead of fragment shader flag bit
2023-01-04 11:01:19 +01:00
Henrik Rydgård
5cae5615ea Use more unusual values as "fog-disabled". 2023-01-04 10:14:12 +01:00
Henrik Rydgård
26c748f959 Make fog-enable driven by uniform instead of fragment shader flag bit 2023-01-04 10:14:11 +01:00
Henrik Rydgård
f069de2dd2 Pass the vertex decoder into the vertex shader IDs generator
Instead of just the vertex type.

This will allow things like the vertex decoder supplying defaults, in
order to reduce the number of unique vertex shaders at the cost of
slightly larger vertex data.

This doesn't actually do that yet though, it's just a refactor that can
be done separately.

Part of #16567
2022-12-30 22:57:05 +01:00
Unknown W. Brackets
fdf5fefa91 GPU: Normalize CopyDisplayToOutput across backends. 2022-12-30 12:33:02 -08:00
Unknown W. Brackets
49f6c461ad Reporting: Fix some header includes.
Particularly in Common, avoid including Core/Reporting.h.
2022-12-27 14:58:20 -08:00
Unknown W. Brackets
0496ca32ff Global: Cleanup some minor includes and typos. 2022-12-27 08:33:07 -08:00
Unknown W. Brackets
f6980b9f9d D3D9: Avoid curve Z clip to be safe.
I think it does actually happen, but we don't do it in the shader, so
let's not do it here.
2022-12-18 12:01:28 -08:00
Unknown W. Brackets
3e77cb1475 D3D9: Support old-style user clip planes.
This fixes negative Z issues on D3D9 in many cases, such as #14168
and #16574, but only when clip planes are supported.
2022-12-18 11:04:33 -08:00
Unknown W. Brackets
e5dbdba638 GPU: Keep prevPrim_ set on flush.
For continuing previous verts, see #16612.  We still don't handle these
quite accurately (outside software rendering), but this should be better.
2022-12-18 07:14:19 -08:00
Henrik Rydgård
11366a2ded Don't refer directly to g_Config.iMultiSampleLevel, it can contain unsupported modes. 2022-12-14 16:43:37 +01:00
Henrik Rydgård
ee19db091f Add accessor for UseFlags 2022-12-13 18:27:45 +01:00
Unknown W. Brackets
a7b7bf7826 Global: Set many read-only params as const.
This makes what they do and which args to use clearer, if nothing else.
2022-12-10 21:13:36 -08:00
Unknown W. Brackets
f44852bb18 Global: Cleanup virtual/override specifiers.
Also missing virtual destructors, hidden non-overrides, etc.
2022-12-10 21:13:36 -08:00
Henrik Rydgård
238c9439e3
Merge pull request #16491 from unknownbrackets/cleanup
Quick cleanup
2022-12-03 16:38:32 +01:00