Henrik Rydgård
9e687c3282
Make Description a member function of VShaderID / FShaderID. Assorted cleanup
2026-07-09 17:46:07 +02:00
Henrik Rydgård
32fa86f6aa
Simplify fog calculation in fragment shader slightly
2026-07-08 12:11:09 +02:00
Henrik Rydgård
90c48671d7
D3D11: Remove support for BGRA textures and preferred framebuffer formats
2026-07-03 16:20:22 +02:00
Henrik Rydgård
50970153c9
Minor cleanup
2026-07-03 12:55:23 +02:00
Henrik Rydgård
5676e90896
Rename some stencil enums
2026-06-14 13:33:13 +02:00
Henrik Rydgård
ea8a648737
Refactor UI shader presets, prepare for some updates to the ImGe debugger
2026-06-14 11:08:56 +02:00
Henrik Rydgård
87cc608df1
Add the necessary logic to use in-shader CLUT lookups for regular textures
2026-06-11 12:42:16 +02:00
Henrik Rydgård
73fbea4b3b
Make the shader compilation test for D3D happy
2026-06-11 00:24:21 +02:00
Henrik Rydgård
ef111c0297
FragmentShader: Add support for two more shader depal formats: CLUT8 and DEPTH16. Unused.. but maybe not for long.
2026-06-10 15:09:56 +02:00
Henrik Rydgård
83d82dcf66
Shader depal: Don't generate a big switch in the shader, generate specialized shaders instead.
2026-06-10 12:22:11 +02:00
Henrik Rydgård
5265422c0e
Remove the old "Fragment ubershader" setting. It's been on by default for years and is not really an ubershader.
2026-06-10 09:54:52 +02:00
Henrik Rydgård
a7f62d763a
Make the MaxZ test a bit more lenient to fix Taiko no Tatsujin. Debugger improvement
...
Fixes #21797
2026-06-07 13:47:42 +02:00
Henrik Rydgård
f8b153ba2b
Fix some issues with depth rounding, and depth clamp in D3D11
2026-05-30 19:07:59 +02:00
Henrik Rydgård
0e8ba0d6fe
Bugfixes, cleanup
2026-05-30 19:07:59 +02:00
Henrik Rydgård
0eede05f5f
Implement fragment shader depth clamp and min/max discard. Slow on some hardware, but it's a fallback.
2026-05-30 19:07:59 +02:00
Henrik Rydgård
ae98055cec
Delete a lot of legacy depth and viewport code, fix OpenGL
2026-05-30 19:07:58 +02:00
Chris Healy
6dae3327a6
GPU: Remove dead helper functions from fragment shader
...
Remove two unused helper functions that were left behind after refactoring:
1. unpackUVec3: Left over from commit 4329aaa31c ("GPU: Apply color
test mask as a uint") which refactored color test to use
roundAndScaleTo8x4 with direct uint comparison instead of unpacking
to uvec3 components.
2. packFloatsTo8x4: Left over from commit aec22491fe ("Don't expand
alphaColorRef to 128 bytes") which changed u_alphacolorref from vec4
to uint, making the float-to-uint packing function unnecessary.
Both functions were defined but never called, wasting shader compilation
time and binary size for shaders that enable color testing.
Signed-off-by: Chris Healy <cphealy@gmail.com >
2026-03-08 19:13:41 -07:00
Henrik Rydgård
6cfea96e58
Remove D3D9 support, to make future changes easier
2025-06-10 15:07:16 +02:00
Henrik Rydgård
1b769b61b1
Fragment shader: Don't error on bad blend eqs, instead use default eq (add)
2024-10-25 21:54:57 +02:00
Henrik Rydgård
6e0ec4a131
Slightly nudge down the multiplier used for float->u8 conversion in fragment shaders
...
Seems in lowp precision (as seen on some Android devices) this got
rounded up to 256 when multiplied by 1.0, causing the u8 to overflow, giving
us the wrong value instead of nicely rounding down to 255 with the floor
function.
Fixes #19235
2024-07-22 18:36:58 +02:00
Henrik Rydgård
138193a776
Add support for the EXT_provoking_vertex Vulkan extension, allowing us to skip software transform for this case.
2024-07-17 10:41:25 +02:00
Henrik Rydgård
b4eecf3d5c
Mali: Turn off any depth writes if depth test is set to NEVER.
2024-02-02 11:11:31 +01:00
Henrik Rydgård
6ce4933db8
Split the discard-stencil-bug flag into separate flags for Adreno and Mali
2024-02-02 11:11:31 +01:00
Henrik Rydgård
126d88ecfc
Back out clearly inconsequential/useless .reserve() calls
2023-12-29 08:27:56 +01:00
Herman Semenov
0748ce610f
[GPU/Common/D3D11/Directx9/GLES/Vulkan] Using reserve if possible
2023-12-15 14:08:22 +03:00
Henrik Rydgård
69b43ab734
Extend the Test Drive color ramp smoother to detect up to 3 ramps in a texture.
...
Note that we also offset the lookup slightly to miss the wrap-around
points. The existing 31 scale factor instead of 32, together with that
half-texel, are enough to avoid that problem.
Fixes #18300
2023-10-03 23:30:18 +02:00
Henrik Rydgård
6d8069dfd1
Vulkan: Remove the remains of the input attachment experiment
...
Haven't been using these for a while.
I've come to the conclusion here that I think it's better to try to
deal with the issues using safe workarounds like copies, instead of
relying on features with somewhat iffy driver support that are not
universal across APIs anyway.
2023-06-13 20:46:27 +02:00
Henrik Rydgård
7178c0cd42
Restore fragmentshader ID flags double and texalpha. Add a ubershader mode that uses dynamic state.
2023-05-25 10:19:01 +02:00
Henrik Rydgård
bb6d696a84
Merge the tex "ubershader" uniforms into one for convenience
2023-05-25 10:19:01 +02:00
Henrik Rydgård
fd43807c4d
New fragment shader optimization: Only clamp color output if needed.
2023-05-09 18:44:24 +02:00
Henrik Rydgård
b42670cf59
Manually revert the rest of the lmode optimization
2023-05-09 18:44:24 +02:00
Henrik Rydgård
f42c682d34
Revert "Merge pull request #16628 from hrydgard/remove-fog-fshader-flag"
...
This reverts commit 10dee90c83 , reversing
changes made to 34c11c8acf .
2023-05-08 22:01:38 +02:00
Henrik Rydgård
547ecec074
Replace the rest of the uses of DepthSliceFactor
2023-02-11 14:45:14 +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
c4d8ebcad5
D3D11 fix
2023-01-11 14:16:46 +01:00
Henrik Rydgård
088d0c39dc
Remove the FS_TEXTURE_AT_OFFSET fragment shader flag
2023-01-10 12:37:21 +01:00
Henrik Rydgård
c7c48abb37
Switch the 2x flag to a uniform
2023-01-10 12:36:28 +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
5022ddc4fc
D3D9 bool constants have a separate register space, oops.
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
Henrik Rydgård
18d00b0718
Remove lmode flag bit from fragment and geometry shaders
2023-01-04 11:04:23 +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
Unknown W. Brackets
86d748fa0c
GLES: Use uint for uint shift amounts.
...
This seems to cause trouble for some Adreno drivers as well.
2023-01-02 14:37:38 -08:00
Unknown W. Brackets
26dc773b2a
Merge pull request #16709 from unknownbrackets/shader-errors
...
Correct some shader errors in reporting
2023-01-02 13:51:23 -08:00
Henrik Rydgård
6b95ed2e2e
Prevent name clash from redefining packUnorm4x8 if the driver "lies" about having it
2023-01-02 22:24:00 +01:00
Unknown W. Brackets
2b4a182b46
GLES: Use hex for uint constants.
...
Apparently some Adreno drivers have issues (fixed in 2014):
https://developer.qualcomm.com/forum/qdn-forums/maximize-hardware/mobile-gaming-graphics-adreno/27945
2023-01-02 13:13:48 -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
Henrik Rydgård
26884150d7
Remove the 0th descriptor set, move everything else back to 0
2022-12-16 13:05:40 +01:00
Henrik Rydgård
7950a00c14
Headless buildfix. Crashfix in shader generator test.
2022-12-01 22:49:00 +01:00
Henrik Rydgård
8208768c15
Add a pipeline flag for USES_DISCARD. Will be used for the MSAA quality setting.
2022-12-01 22:49:00 +01:00