Henrik Rydgård
f061eadc04
Initial implementation of 3D texturing through equal-size mips (see #6357 )
...
Vulkan-only currently, though all the other backends except ES 2.0
without GL_OES_texture_3d can support it with some work.
2022-07-31 10:43:47 +02:00
Henrik Rydgård
0ff8c721e4
Improve comment, variable name
2022-07-12 00:17:26 +02:00
Henrik Rydgård
e52e9094ca
Vulkan fragment shaders: Don't opportunistically emit "layout (early_fragment_tests)"
...
The purpose of this is not really for optimization, it's to get a
specific behavior that we really don't care about. Drivers are pretty
good at getting this potential performance improvement automatically
if it's possible without changing the output.
git blame says I added it, heh.
Don't think it'll make much difference one way or another, though, but
trying to reduce complexity.
2022-07-12 00:14:22 +02:00
Henrik Rydgård
6b2dec91b5
Finish BlueToAlpha functionality
2022-04-30 18:17:17 +02:00
Henrik Rydgård
462972f7ea
Add option to redirect blue to alpha if 565 mode is rendered and mask is 0x0FFFFF.
...
This is used by several games to render to the alpha channel of RGBA4444
images, which cannot normally be done directly on the PSP.
Can be used as a far more efficient replacement for
ReinterpretFramebuffers/ShaderColorBitmask
2022-04-30 18:17:16 +02:00
Unknown W. Brackets
c18236b5fa
GPU: Avoid switch on uint.
...
Vivante seems to get confused.
2021-04-10 14:01:33 -07:00
Henrik Rydgård
98f593fd5d
Only do the workaround in #14273 in Vulkan. May help #14280
2021-03-11 09:14:36 +01:00
Henrik Rydgård
3ac405ab5d
GLSL vulkan: Specify the precision of function arguments. Works around #14269
2021-03-09 00:09:00 +01:00
Henrik Rydgård
294f530cd0
Have the flat shading workaround obey the driver workarounds checkbox
2021-01-31 15:50:19 +01:00
Henrik Rydgård
960e2dac36
OpenGL fragment shader gen: Fix precision inconsistency for v_color0/1.
...
Probably won't fix anything, just want this in for, well, consistency.
Noticed it debugging the iOS flat shading issues, but doesn't fix that.
2021-01-24 18:29:55 +01:00
Henrik Rydgård
c8bbf40bb0
GL FB readback: Only use "inout" if we actually want to read from the fb.
2021-01-17 19:13:56 +01:00
Henrik Rydgård
71f9196d61
VK: Re-apply the old Adreno driver bug workaround. Fixes #13910 .
...
Should likely fix issue #13923 too.
2021-01-16 12:57:14 +01:00
Unknown W. Brackets
1834a524c8
GPU: Be careful with color write mask precision.
2021-01-03 08:50:34 -08:00
Unknown W. Brackets
4006a4b143
GPU: Ignore color write mask if unusable.
...
We unconditionally attempt to use a shader with color write mask, so we
can't just refuse to generate a shader - it'll mean non-supporting devices
get no shader at all.
It's better to continue ignoring the mask in that case.
2021-01-03 08:15:37 -08:00
Henrik Rydgård
7de7680416
Apple driver bug workaround. See issue #13451
2020-12-16 14:39:08 +01:00
Henrik Rydgård
29b2f2c4ef
Better GLSL version handling. Now specify the latest version supported by the device.
...
Correct the version check for our own implementations of packUnorm4x8 etc.
2020-11-16 23:30:07 +01:00
Henrik Rydgård
e14437cb3f
OpenGL: Assorted shader-depal bugfixes and regression fixes.
...
Fixes #13517
2020-11-11 23:09:48 +01:00
Henrik Rydgård
653a4bddde
Fix check for when to generate packUnorm4x8 replacements
2020-11-11 22:46:25 +01:00
Henrik Rydgård
34efa1281b
More consistent use of GLSL precision modifiers, now use them in Vulkan too.
...
Might help #13464 ?
2020-11-10 22:42:41 +01:00
Henrik Rydgård
9f33a82b49
Merge pull request #13646 from hrydgard/framebuffer-fetch-fixes
...
Framebuffer fetch fixes
2020-11-09 19:30:35 +01:00
Henrik Rydgård
81024d9ec0
Merge pull request #13643 from hrydgard/move-shader-translations
...
Reorganize end of fragment shader, move shader translator to Common
2020-11-09 19:30:12 +01:00
Henrik Rydgård
85fd7c26f7
Merge branch 'master' into framebuffer-fetch-fixes
2020-11-09 18:14:42 +01:00
Henrik Rydgård
a31fc4087b
D3D11: Fix writing to SV_Depth. Fixes #13641
2020-11-09 16:05:28 +01:00
Henrik Rydgård
2384b7a17d
Remove support for NV_shader_framebuffer_fetch extension, very old and rare.
...
Minor refactor.
2020-11-09 13:31:39 +01:00
Henrik Rydgård
e77a9d7368
Reorganize the end of the fragment shader generator.
...
Thanks unknown.
2020-11-09 11:19:02 +01:00
Henrik Rydgård
6310af25fa
Get shader color write masking going on all backends.
2020-11-08 23:45:47 +01:00
Henrik Rydgård
2aa9ee97f4
Simplify shader blend logic in FragmentShaderGenerator.cpp
2020-11-08 12:54:05 +01:00
Henrik Rydgård
106fc70a75
Forgot a line in caa960ee8e
2020-11-07 11:25:05 +01:00
Henrik Rydgård
caa960ee8e
GLSL ES compilers can be very picky about uint/int. Fixes #13628 - for real this time hopefully
2020-11-07 00:32:00 +01:00
Henrik Rydgård
733a152c54
Move ShaderWriter to Common/GPU, along with some stuff from ShaderCommon.h.
2020-11-04 09:18:35 +01:00
Unknown W. Brackets
f3415f4f9c
GPU: Correct shader blend equations.
...
This was wrong when ported to HLSL, and then ported back everywhere.
2020-11-02 21:56:43 -08:00
Henrik Rydgård
ce4ee010ac
Apparently only MSVC can handle the ambiguity.
2020-11-02 11:45:47 +01:00
Henrik Rydgård
39b5eb5b3d
ShaderWriter, a replacement for the sprintf WRITE macro.
2020-11-02 10:02:52 +01:00
Henrik Rydgård
17778131bd
Share the uniform buffer declarations between D3D11 and VK.
2020-11-01 19:58:53 +01:00
Henrik Rydgård
105a6ce920
Oops, seems I screwed those #version statements up worse.
2020-11-01 19:53:08 +01:00
Henrik Rydgård
2e9f42a75f
Fix #version statement in GLES 2 fragment shaders
2020-11-01 18:06:56 +01:00
Henrik Rydgård
d32fc34b2b
Remove inPrefix. HLSL shaders gets slightly longer but probably no biggie.
...
The extra variable should be optimized out anyway.
Tried doing it with the preprocessor, couldn't get it to work.
2020-10-31 23:22:06 +01:00
Henrik Rydgård
0b1b36921e
Move the now-renamed fragment shader generator to GPU/Common.
2020-10-31 19:03:14 +01:00