Henrik Rydgård
970c266b41
Restore parallel GLSL builds
2022-11-08 00:30:21 +01:00
Henrik Rydgård
4d637342f7
Log source code for failed pipeline creations
2022-11-08 00:21:08 +01:00
Henrik Rydgård
24d5cd087c
Experiment (Vulkan): Temporarily disable GLSL parallel compilation on Android. For #16341 investigation.
2022-11-07 14:30:24 +01:00
Henrik Rydgård
ad14d628b6
Turn off boundSecondaryIsInputAttachment_ when we don't have one.
2022-11-07 09:30:47 +01:00
Henrik Rydgård
668904a515
Vulkan: Use the very same view as input attachment and color attachment, not just the same image
...
Fixes most of the new validation errors seen #16351 , though one remains.
I believe that to be a bug in the validation layers, will investigate
later.
2022-11-07 09:14:55 +01:00
Henrik Rydgård
41c812651d
Merge pull request #16347 from unknownbrackets/softgpu-skin
...
Always skin in decode for software transform and rendering
2022-11-06 20:21:02 +01: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
Henrik Rydgård
ad6725b684
VK/D3D11: Move the rarely used "u_rotation" uniform to the frame uniform buffer.
...
This uniform is used in two cases:
* Non-buffered rendering in Vulkan, software transform
* Non-buffered rendering in D3D11 level 9 on Windows Phone, software transform
- which I don't think anyone builds for anymore
Nice to not have it in the main uniform buffer, but mainly a
demonstrator/test of moving stuff to the new frame-global buffer, and
setting up the infrastructure.
2022-11-05 22:14:05 +01:00
Henrik Rydgård
c6fe91224a
Vulkan: Fixes validation errors with "null" textures
...
These arise in non-buffered rendering when we don't have a framebuffer
to texture from.
2022-10-28 18:40:55 +02:00
Henrik Rydgård
8e0b82f92e
Address feedback
2022-10-28 17:42:21 +02:00
Henrik Rydgård
d9cfcf215e
Need to request the proper type of uniform buffer descriptors.
...
Otherwise, assert on Mali.
2022-10-28 10:20:47 +02:00
Henrik Rydgård
ab1cebec51
Actually bind a global uniform buffer, too. Not yet used.
2022-10-28 10:15:36 +02:00
Henrik Rydgård
96a5c52037
Vulkan: Reserve descriptor set 0 for frame-global data, move everything else to set 1
2022-10-28 09:39:56 +02:00
Henrik Rydgård
e0bbebc65e
Clean up GPU_Vulkan::BuildReportingInfo a bit
2022-10-27 11:05:59 +02:00
Henrik Rydgård
763afd4a8e
Improve compatibility checks for stereo rendering.
2022-10-27 11:05:59 +02:00
Henrik Rydgård
31fd928a5c
Name more image views. Very useful with a little patch to the Vulkan debug layers.
2022-10-27 11:05:59 +02:00
Henrik Rydgård
8413473fa4
Fix more cases, GTA works now.
2022-10-27 11:05:59 +02:00
Henrik Rydgård
524e92374f
Use arrays more consistently.
2022-10-27 11:05:59 +02:00
Henrik Rydgård
6af4644ab2
Stereo on mobile fixes
2022-10-27 11:05:58 +02:00
Henrik Rydgård
0de12f5ca9
Some refactoring of framebuffer views, layer issues, more work.
2022-10-27 11:05:58 +02:00
Henrik Rydgård
fb250c4b29
More multiview work
2022-10-27 11:05:58 +02:00
Henrik Rydgård
d3804ec2e5
Misc multiview hackery
2022-10-27 11:05:58 +02:00
Henrik Rydgård
1d8ab38ce5
Vulkan: Use v2 feature checks, and add check for multiview features.
...
Extracted from the multiview PR, and renamed some stuff.
2022-10-24 00:21:28 +02:00
Henrik Rydgård
8cd602a9c6
Merge pull request #16257 from unknownbrackets/error-cleanup
...
Kernel: Fix reported StopThread error
2022-10-19 08:06:30 +02:00
Unknown W. Brackets
a42064eb48
Vulkan: Correct some enum switch warnings.
...
Nice to log debug annotations anyway.
2022-10-18 21:52:38 -07:00
Henrik Rydgård
7c5fc3ccb5
Reorder the GPU USE flags a bit
2022-10-17 19:55:11 +02:00
Henrik Rydgård
9b8a5d1db3
Rename GPU_SUPPORTS_ to GPU_USE_
2022-10-17 08:47:03 +02:00
Henrik Rydgård
daca0b2109
Rename gstate_c.Supports to gstate_c.Use
2022-10-17 08:46:37 +02:00
Henrik Rydgård
e0e29a1556
Merge pull request #16197 from hrydgard/more-uniform-optimization
...
More uniform optimization, fixes
2022-10-12 01:00:27 +02:00
Unknown W. Brackets
416265431b
GE Debugger: Display if tex is framebuf.
...
Rather than guessing based on size, let's show explicitly.
2022-10-10 22:35:42 -07:00
Unknown W. Brackets
fc9f200224
GE Debugger: Centralize current fb tex fetch code.
2022-10-10 21:50:53 -07:00
Henrik Rydgård
ee46f8992e
Don't use fragmentShaderInt32Support as a replacement for checking for bitwiseOps
2022-10-10 18:02:19 +02:00
Unknown W. Brackets
bc84d6345b
Vulkan: Disable geometry shaders for Mali <= 18.
...
These drivers apparently have some weird behavior.
2022-10-09 00:57:10 -07:00
Unknown W. Brackets
aee2ad46a2
GPU: Verify generated shader buffer length.
...
Hardware tessellation + uberlighting + clamp was exceeding the buffer,
causing memory corruption. Let's try to catch it, but also increase
buffers to be safe.
2022-10-05 21:41:09 -07:00
Unknown W. Brackets
b9b59f7806
GPU: Mask away unused bits in framebuf/zbuf ptr.
...
Lower 4 bits are ignored during rendering, and mirrors (even even the 8
bit at the top) are ignored.
2022-10-02 20:44:35 -07:00
Unknown W. Brackets
2832edcc37
Vulkan: Allow configuring geometry shaders on/off.
2022-10-02 07:42:22 -07:00
Unknown W. Brackets
8df956b036
Vulkan: Block geometry shaders on older Mali.
...
They're too slow to be usable.
2022-10-02 07:42:22 -07:00
Unknown W. Brackets
2ce0cda333
Vulkan: Enable geo shader for culling.
...
The compat setting was really for some previously buggy cases that
couldn't work without cull.
2022-10-02 07:42:22 -07:00
Henrik Rydgård
ac248338be
Vulkan: Cull in geoshader, hack to on for now.
2022-10-02 07:42:17 -07:00
Henrik Rydgård
cdee10fe86
Vulkan: Basic geoshader code generation.
2022-10-02 07:42:17 -07:00
Unknown W. Brackets
fbdb278168
Vulkan: Update shader cache format for geo shaders.
2022-10-02 07:42:16 -07:00
Unknown W. Brackets
d16caa71af
Vulkan: Add geometry shader ID tracking.
...
We're still not generating them, yet. But this tracks the objects and
IDs through the pipeline.
2022-10-02 07:42:16 -07:00
Unknown W. Brackets
38e16324f0
Vulkan: Clean up shader module tag.
2022-10-02 07:42:16 -07:00
Unknown W. Brackets
878a049f60
GPU: Add dirtying for geo shader state.
...
Not yet used, but dirtied at the right times.
2022-10-02 07:42:16 -07:00
Unknown W. Brackets
87171cef98
GPU: Add geometry path for shader writer.
...
Not yet used.
2022-10-01 12:45:43 -07:00
Henrik Rydgård
07ca9e4656
Fold the "materialUpdate" flag into the light ubershader part.
...
This reduces the number of vertex shaders and thus pipelines by quite a
bit more in a few games, like Tekken and GoW, continuing the fight
against shader compile stutter.
The perf impact should be minimal if not positive due to less pipeline
changes.
GLES fixes
Make the vertex input declarations match (always declare fog input). Fixes D3D11 validation
Tess fix
2022-09-26 12:06:16 +02:00
Henrik Rydgård
9d1355e137
Always do the vertex shader part of the fog computation.
...
In #16104 , we drastically reduced the number of shader variants for
games that use flexible lighting setups. I looked at a few games and it
seems that a lot of games have the same shaders with fog on/off, while
fog is super cheap to compute. So let's just always do it, reducing
vertex shader variants further (though the amount of pipelines will probably
remain the same, since we still specialize the fragment shader).
Might also be worth adding a dynamic bool for the fragment shader, but
if so, doing it separately.
2022-09-26 09:30:54 +02:00
Henrik Rydgård
08d2cb4486
Bump the shader cache version
2022-09-24 22:40:42 +02:00
Henrik Rydgård
9f3dfe7ebe
Vulkan: Don't compile pipeline variants that don't make sense given their flags.
...
Ran into this with cache files from previous version of my change.
Also bumping the shader cache ID again to avoid this in other ways, but
good to be robust here.
2022-09-24 22:39:22 +02:00
Unknown W. Brackets
c76d31dfa8
GPU: Cleanup unused CheckAlpha() funcs.
2022-09-24 02:00:03 -07:00
Henrik Rydgård
1259283c2e
More tweaks, fix crash on exit (double-join thread)
2022-09-23 22:10:29 +02:00
Henrik Rydgård
7884e4ccb3
Another uninitialized variable (VAI minihash/hash)
2022-09-23 12:33:16 +02:00
Henrik Rydgård
ac7ca963db
Make valgrind happy
2022-09-23 12:24:43 +02:00
Henrik Rydgård
8e30a7ccfc
Vulkan: Don't have renderpasses store/load depth buffers when we don't use them
2022-09-22 10:06:05 +02:00
Henrik Rydgård
aa19712fc3
Unify depth texture and framebuffer fetch checks
2022-09-20 10:47:49 +02:00
Henrik Rydgård
09bcf3ec13
Unify range culling detection
2022-09-20 10:15:04 +02:00
Henrik Rydgård
1ae7c0132c
Start unifying setting of the GPU feature flags, now that thin3d has feature detection.
2022-09-20 10:07:01 +02:00
Henrik Rydgård
262a306b9a
Flag shader blending as broken on Adreno for now.
2022-09-16 19:19:42 +02:00
Henrik Rydgård
5f5277a409
Need to have input attachments in the descriptor pool.
2022-09-16 19:19:42 +02:00
Henrik Rydgård
ce82fce8de
Use subpass dependencies to implement shader framebuffer read in Vulkan.
2022-09-16 19:19:42 +02:00
Henrik Rydgård
d6d7a15d25
Get depal-from-dynamic-CLUT working
2022-09-14 22:18:35 +02:00
Henrik Rydgård
abd58199ce
Add way to bind cached textures to a DrawContext
2022-09-14 22:18:35 +02:00
Henrik Rydgård
0ed1f3d461
Switch multiple bools as parameters to DecodeTextureLevel to a flags enum.
2022-09-14 18:40:08 +02:00
Henrik Rydgård
b86648b352
Address feedback
2022-09-12 16:30:08 +02:00
Henrik Rydgård
4ad345d78d
Better shader compile logging
2022-09-12 15:39:29 +02:00
Henrik Rydgård
a2eaad5445
Debug-name shader modules with their shader desc strings
2022-09-12 15:39:29 +02:00
Henrik Rydgård
75efcd9dfd
Merge pull request #16000 from unknownbrackets/gedebugger
...
Cleanup some crashes in GE debugger or with large textures
2022-09-11 19:41:11 +02:00
Henrik Rydgård
694dbe1271
Add ShaderDepalMode enum, use in shader ID. Replaces smoothed bit.
2022-09-11 14:40:01 +02:00
Unknown W. Brackets
6c6d817ce7
Vulkan: Avoid crash if large texture attempted.
...
Doesn't do the clamp/wrap thing, but at least this won't crash.
2022-09-10 20:14:37 -07:00
Henrik Rydgård
f3c097680e
Merge pull request #15982 from hrydgard/renderpass-refactor
...
Vulkan: Refactor renderpass handling
2022-09-08 09:35:55 +02:00
Henrik Rydgård
974cd38b1f
Some more debug names to vulkan objects
2022-09-08 09:16:40 +02:00
Unknown W. Brackets
e6b4495e22
GPU: Make NotifyConfigChanged() calls consistent.
...
They're generally centralized in Common.
2022-09-07 23:41:00 -07:00
Henrik Rydgård
14b5a1a7cd
Fix pipeline lifetime issue, misc.
2022-09-08 00:38:32 +02:00
Henrik Rydgård
77819c6f80
Lifetime fixes, cleanups
2022-09-08 00:38:32 +02:00
Henrik Rydgård
befcfb470c
Fix shader caching.
2022-09-08 00:38:32 +02:00
Henrik Rydgård
e828df9f25
Split each renderpass/framebuffer into multiple "compatibility classes" (RenderPassType).
2022-09-08 00:32:03 +02:00
Henrik Rydgård
b15c65540e
Fix the new logic-op-in-shader on OpenGL and D3D11
...
Also disable BlueToAlpha for now for Outrun and DiRT 2, it breaks the
water effect somehow. Will come back to it later.
2022-09-04 22:53:05 +02:00
Henrik Rydgård
2474eb6a72
Shader bit setup and code generation for logic-ops-in-shader
2022-09-04 11:14:47 +02:00
Henrik Rydgård
ec173559f8
Additional cleanup
2022-09-04 00:10:55 +02:00
Henrik Rydgård
ceda7aef49
Add log functions to state structs
2022-09-04 00:10:55 +02:00
Henrik Rydgård
87b14fe1c2
Some more renaming and refactoring, extracted from a future PR
2022-09-04 00:10:55 +02:00
Henrik Rydgård
8e39018b95
Channel mask refactor
2022-09-04 00:10:54 +02:00
Henrik Rydgård
5f1ffeae70
Correct LogicOp API support detection
2022-09-04 00:08:40 +02:00
Henrik Rydgård
6b1e4806cf
Don't parallelize shader compiles in debug mode, sync in debug allocator kills performance.
2022-09-03 23:07:39 +02:00
Henrik Rydgård
b92ea74fb3
Merge pull request #15589 from hrydgard/glsl-compilation-parallelization
...
Vulkan: Parallelize GLSL compilation
2022-09-03 17:00:01 +02:00
Henrik Rydgård
fb3f417e77
Fix lying comment, log level reduction
2022-09-03 16:15:46 +02:00
Henrik Rydgård
c06cf8efaa
Switch Vulkan pipelines to use promises for synchronization
...
Slightly more expensive I guess but shouldn't be much of a bottleneck.
2022-09-03 15:21:08 +02:00
Henrik Rydgård
6e605fa2bc
Fix silly logic, fixes the shader leak.
2022-09-03 15:21:07 +02:00
Henrik Rydgård
8775837c11
Work towards finding the leak
2022-09-03 15:21:07 +02:00
Henrik Rydgård
93422f6dea
Don't block on shader creation until it's time to create the pipeline.
2022-09-03 15:21:07 +02:00
Henrik Rydgård
e2c740827a
Use shader module promises as keys in pipeline cache instead of the actual shader modules.
...
Prevents early block.
2022-09-03 15:21:07 +02:00
Henrik Rydgård
fc418ee16f
Create shader modules (and compile GLSL) on worker threads
2022-09-03 15:21:07 +02:00
Henrik Rydgård
ec0586ba50
Use promises to hold shader modules, for later asyncification
2022-09-03 15:21:07 +02:00
Henrik Rydgård
c846c2dfa8
Remove confusing resetFramebufferRead flag from secondary framebuffer binding
2022-09-03 14:48:07 +02:00
Henrik Rydgård
8c56abd3dc
Remove setting "Disable slower framebuffer effects"
2022-09-03 11:06:43 +02:00
Henrik Rydgård
fd6ab4c495
Avoid recomputing the shaderblend setup in ComputeFragmentShaderID.
2022-09-02 23:06:41 +02:00
Henrik Rydgård
f81a28f661
Some reordering
2022-09-02 22:40:15 +02:00
Henrik Rydgård
b84cda2876
Plumb the computed pipeline state into ComputeFragmentShaderID.
2022-09-02 22:16:57 +02:00
Henrik Rydgård
c784c0e94b
Some renaming. Store the BlendState/MaskState.
2022-09-02 21:07:29 +02:00