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
c11f7e3a5f
Fix texture alpha when texturing from full-alpha textures.
...
Fixes #16875
2023-02-02 16:13:38 +01:00
Unknown W. Brackets
08ac34bae0
GPU: Allow depth above 65535.
...
Hopefully it rounds down for any == or <= tests.
2023-01-31 18:41:06 -08:00
Serena
30f6296767
Remove some Windows + Qt stuff + meow
2023-01-27 19:12:41 +03:00
Unknown W. Brackets
8d4007ce3f
Vulkan: Force align verts to 4 on Apple devices.
2023-01-18 07:24:18 -08:00
Unknown W. Brackets
0f3f2e361f
GLES: More uint const paranoia.
...
We don't use indexing on GLES now, but better to stay consistent.
2023-01-12 17:41:55 -08:00
Henrik Rydgård
0604e51272
Merge pull request #16734 from hrydgard/remove-nonindexed-optimization-vk
...
Vulkan: Don't use non-indexed draws for pure tristrips and fans (only PowerVR for now)
2023-01-12 08:09:21 +01:00
Henrik Rydgård
86f34c52a4
Revert bad shader optimization
2023-01-12 00:30:41 +01:00
Henrik Rydgård
beed3c06d2
Vulkan: Don't use non-indexed draws for pure tristrips and fans, creates extra pipelines.
...
Bump shader cache version
2023-01-11 22:57:23 +01:00
Henrik Rydgård
ca63bb1e5b
Even more optimization/cleanup. Don't need to check ldot that we already know is >= 0.0.
2023-01-11 19:34:58 +01:00
Henrik Rydgård
965007d65b
Tighten up the lighting shader code a bit, hopefully eliminating a branch or two.
2023-01-11 19:29:02 +01:00
Henrik Rydgård
1c8e456c97
Also apply this to OpenGL and D3D9
2023-01-11 19:29:02 +01:00
Henrik Rydgård
4c2a41cc83
Break out the attenuation term, too
2023-01-11 19:29:02 +01:00
Henrik Rydgård
a508f7e345
Shave a few instructions from lighting shaders by prenormalizing the light dir used for spotlights
2023-01-11 19:29:02 +01:00
Henrik Rydgård
7b62b4626f
Comment fixes
2023-01-11 15:29:52 +01:00
Henrik Rydgård
3b46409350
Vertex shaders: On platforms with uniform buffers, use indexing and loop for real over the lights.
...
Strangely, greatly speeds up pipeline creation on PowerVR.
2023-01-11 15:24:56 +01:00
Henrik Rydgård
d894906a7e
Fix formatting of lights uniform buffer (tabs->spaces)
2023-01-11 14:18:14 +01:00
Henrik Rydgård
c4d8ebcad5
D3D11 fix
2023-01-11 14:16:46 +01:00
Henrik Rydgård
3d376b0ab7
Remove the rather redundant DoTexture flag from vshaders.
...
Slightly reduces the number of unique vertex shaders but doesn't do much
for the pipeline count, as the fragment shader has a tex flag. Still
worth doing for the simplification.
2023-01-11 14:16:46 +01:00
Henrik Rydgård
56261af697
Uniform dirty-bits: Make room for four more uniforms. Then we're out and need to merge.
2023-01-11 00:16:17 +01:00
Henrik Rydgård
edaa5246d1
Merge pull request #16771 from hrydgard/more-getpointer-cleanup
...
Core: A bit more GetPointer cleanup.
2023-01-10 14:36:08 +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
e1a48d74c4
A bit more GetPointer cleanup.
...
Probably not worth it for performance reasons, but some semantic cleanup
is good, especially the accidental GetPointer -> writable casts without
using GetPointerWrite.
Using Unchecked on already checked pointers, or when we'd crash anyway
if it returned nullptr, is good for clarity.
2023-01-10 12:13:47 +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
Unknown W. Brackets
f09c09caa8
GLES: Avoid GLSL redefinition error.
2023-01-08 22:30:15 -08:00
Henrik Rydgård
10d7b2d410
Merge pull request #16756 from unknownbrackets/replace-stride
...
Replacement: Always return w/h from GetMipSize()
2023-01-08 22:34:50 +01:00
Unknown W. Brackets
0f92afb0c1
Replacement: Check replaceValid before load.
2023-01-08 10:20:52 -08:00
Unknown W. Brackets
26aedbe2f5
Replacement: Always return w/h from GetMipSize().
2023-01-08 10:12:04 -08:00
Unknown W. Brackets
f49f7c6371
D3D9: Force branch usage for fog compute.
...
When using `[flatten]`/default, it picks the wrong value, seemingly always
taking the else case (even if the condition is changed or reversed.)
2023-01-06 17:25:04 -08:00
Unknown W. Brackets
81f4a76ac9
GPU: Don't bother with fog uniform in sw transform.
2023-01-06 17:24:44 -08:00
Henrik Rydgård
3cd882f21b
Merge pull request #16565 from unknownbrackets/bloom-hack
...
GPU: Avoid bloom hack on buffers used for depth
2023-01-06 14:32:23 +01:00
Henrik Rydgård
d1cc378242
Merge pull request #16577 from unknownbrackets/shader-cache
...
Fix GLES and Vulkan cache with equal depth check detect
2023-01-06 14:19:36 +01:00
Unknown W. Brackets
3f20562b9f
Vulkan: Store saw equal depth flag in cache.
2023-01-05 18:24:29 -08:00
Unknown W. Brackets
e5d67119a8
GPU: Avoid bloom hack on buffers used for depth.
...
If a buffer even has depth transferred to it, let's avoid lowering its
resolution.
2023-01-05 18:00:43 -08:00
Unknown W. Brackets
f3acdb9da8
GLES: Avoid a shader constant error.
...
Some Adreno drivers interpret 0u as an integer.
2023-01-05 17:56:58 -08:00
Henrik Rydgård
a58bf45540
Removes LM flag from vshader in the common case, if ubershader is enabled.
2023-01-05 13:09:49 +01:00
Henrik Rydgård
389c7bf44c
FragmentShaderDesc improvement (debugging)
2023-01-05 11:49:03 +01:00
Henrik Rydgård
a73ccd77e3
Add FOGCOEFENABLE to the list of base uniforms.
...
Spotted by Unknown in #16628 comments.
2023-01-05 08:34:54 +01:00
Henrik Rydgård
4e30c5c0c6
Unbreak fog, oops.
...
Fixes #16722
2023-01-04 13:01:00 +01:00
Henrik Rydgård
b84e24cb89
Invert the nesting of specularIsZero and lmode conditions in VS.
2023-01-04 11:04:24 +01:00
Henrik Rydgård
ae383147db
Minor simplification in VS
2023-01-04 11:04:24 +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
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
34c11c8acf
Merge pull request #16584 from hrydgard/vertex-format-vshader-id
...
Pass in the vertex decoder to the shader ID computation
2023-01-04 10:26:18 +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