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
Unknown W. Brackets
e50eae1bfb
GPU: Cleanup some bounds checks, assignments.
2022-12-03 07:17:12 -08:00
Henrik Rydgård
0f12d44e59
Remove some unused/unnecessary code
2022-12-03 12:05:10 +01:00
Henrik Rydgård
92df6b832c
Safer and simpler alternative to cbfa4bf
.
...
See #16483
2022-12-03 12:05:08 +01:00
Henrik Rydgård
02b8bf33fb
Merge pull request #16458 from hrydgard/desktop-friendly-msaa
...
Implement MSAA support for desktop GPUs in Vulkan
2022-12-03 11:22:41 +01:00
Lubos
b41a782fcd
Revert "Centralize ClearCacheNextFrame"
...
This reverts commit cbfa4bfc8e
.
2022-12-02 14:32:27 +01:00
Henrik Rydgård
cd0acec3f0
Crashfix the other backends
2022-12-02 13:49:28 +01:00
Henrik Rydgård
331d024a8c
Add a flags parameter to InvalidateCachedState and rename it Invalidate.
...
Also rename the old InvalidationFlags enum to InvalidateCallbackFlags.
2022-12-01 19:15:38 +01:00
Henrik Rydgård
70d1d8fa07
Replace the "GetCurrentStepId"-based state invalidation with callbacks
2022-11-24 10:52:42 +01:00
Henrik Rydgård
cbfa4bfc8e
Centralize ClearCacheNextFrame
2022-11-21 18:13:13 +01:00
Henrik Rydgård
ce5a1b8b7e
Some minor "centralization"
2022-11-21 17:55:30 +01:00
Henrik Rydgård
37ec31dedd
Fix resizing issue. Took some refactoring.
2022-11-20 12:57:32 +01:00
Unknown W. Brackets
4a367148e6
GPU: Centralize more GPU_USE flags, like depth.
2022-11-13 08:04:47 -08:00
Unknown W. Brackets
70c3205564
GPU: Correct equal depth checks.
2022-11-09 20:34:29 -08:00
Unknown W. Brackets
1c0a37f252
GPU: Correct vertex decoder in software transform.
...
It was meant to flip to skin in decode.
2022-11-09 07:07:39 -08:00
Unknown W. Brackets
745d9ad320
GPU: Avoid enabling depth test pointlessly.
...
See #16015 . Attempting to avoid a driver bug.
2022-11-08 20:06:08 -08:00
Unknown W. Brackets
3333f2a5aa
GPU: Avoid clears for non-simple depth values.
...
Some drivers don't round depth the same way for a clear vs for drawing,
which can cause mismatches. We only do this if we see equals-style depth
comparison funcs used in drawing.
2022-11-08 20:06:08 -08:00
Unknown W. Brackets
3de2557ecb
GPU: Always skin in decode for software transform.
2022-11-06 08:55:07 -08:00
Unknown W. Brackets
6c36f03a0d
GPU: Purify vertTypeIsSkinningEnabled().
2022-11-06 08:40:54 -08:00