gdk
c95cdc853e
Enable shader cache on Vulkan and implement MultiplyHighS32/U32 on SPIR-V (missed those before)
2022-06-17 22:45:57 +01:00
gdk
2121f69b1c
We don't need to recompile shaders if alpha test state changed but alpha test is disabled
2022-06-17 22:45:03 +01:00
gdk
5670022e27
Only enable ShaderFloat64 if the GPU supports it
2022-06-17 22:45:03 +01:00
gdk
1edc85c26e
Check if the subgroup size is supported before passing a explicit size
2022-06-17 22:45:03 +01:00
gdk
4f086b0ec9
Shader specialization for new Vulkan required state (fixes remaining alpha test issues, vertex stretching on AMD on Crash Bandicoot, etc)
2022-06-17 22:45:00 +01:00
gdk
4648e37a31
Use ClampToEdge for Clamp sampler address mode on Vulkan (fixes Hollow Knight)
...
Clamp is unsupported on Vulkan, but ClampToEdge behaves almost the same. ClampToBorder on the other hand (which was being used before) is pretty different
2022-06-17 22:42:59 +01:00
gdk
7c32e4a3fe
Add missing barriers around CmdFillBuffer (fixes Monster Hunter Rise flickering on NVIDIA)
2022-06-17 22:42:58 +01:00
gdk
80d72504d4
Take componentMask and scissor into account when clearing framebuffer attachments
2022-06-17 22:42:58 +01:00
gdk
746eded2cf
Use explicit subgroup size if we can (might fix some block flickering on AMD)
2022-06-17 22:42:57 +01:00
gdk
3767cf4ce5
Fix some validation errors related to texel block view usage flag and invalid image barrier base level
2022-06-17 22:42:57 +01:00
gdk
03955d6b04
Allow null samplers (samplers are not required when only using texelFetch to access the texture)
2022-06-17 22:42:57 +01:00
gdk
3bac0b872c
Enable SPIR-V backend by default
2022-06-17 22:42:57 +01:00
gdk
f16b47114c
SPIR-V: Workaround for Intel FrontFacing bug
2022-06-17 22:42:56 +01:00
gdk
ad081de56b
SPIR-V: Fix ImageLoad CompositeExtract component type
2022-06-17 22:42:56 +01:00
gdk
0a7fbb6bfd
SPIRV/GLSL: More scaling related fixes
2022-06-17 22:42:56 +01:00
gdk
3aa5397bad
SPIR-V: Fix another case of wrong field index
2022-06-17 22:42:56 +01:00
gdk
670431f4fa
SPIR-V: Fix field index for scale count
2022-06-17 22:42:56 +01:00
gdk
0b27b3e470
SPIR-V: Resolution scale support and fix TextureSample multisample with LOD bug
2022-06-17 22:42:55 +01:00
gdk
f18e7aa779
SPIR-V: Implement StoreShader8/16 and StoreStorage8/16
2022-06-17 22:42:55 +01:00
gdk
3b444f0ea3
SPIR-V: Geometry shader passthrough support
2022-06-17 22:42:54 +01:00
gdk
cacc9c7da4
SPIR-V: Implement tessellation support
2022-06-17 22:42:54 +01:00
gdk
070996ad6d
Ignore unsupported attributes rather than throwing (matches current GLSL behaviour)
2022-06-17 22:42:54 +01:00
gdk
d5e2cc2f9b
SPIR-V: Constant buffer indexing support
2022-06-17 22:42:54 +01:00
gdk
1448136c3d
SPIR-V: Implement LogicalExclusiveOr
2022-06-17 22:42:53 +01:00
gdk
fbfaf63940
Fix relaunch issues
2022-06-17 22:42:53 +01:00
gdk
324d0528d3
SPIR-V: Fix TextureSize for MS and Buffer sampler types
2022-06-17 22:42:53 +01:00
gdk
95d5a50042
SPIR-V: Implement attribute indexing and StoreAttribute
2022-06-17 22:42:53 +01:00
gdk
2ef7622126
SPIR-V: Fix SwizzleAdd and some validation errors
2022-06-17 22:42:52 +01:00
riperiperi
90ae2dbf69
Fix validation error for query reset
...
Need to think of a better way to do this.
2022-06-17 22:42:52 +01:00
riperiperi
05a736b6d3
Remove unnecessary lines
...
Was for testing
2022-06-17 22:42:51 +01:00
riperiperi
4cc0c2132c
Rework Query stuff a bit to avoid render pass end
...
Tries to reset returned queries in background when possible, rather than ending the render pass.
Still ends render pass when resetting a counter after draws, but maybe that can be solved too. (by just pulling an empty object off the pool?)
2022-06-17 22:42:51 +01:00
riperiperi
eda65c8dd3
Copy query results after RP ends, rather than ending to copy
...
We need to end the render pass to get the data (submit command buffer) anyways...
Reduces render passes created in games that use queries.
2022-06-17 22:42:51 +01:00
riperiperi
af4aae7951
Use a bitmap to do granular tracking for buffer uploads.
...
This path is only taken if the much faster check of "is the buffer rented at all" is triggered, so it doesn't actually end up costing too much, and the time saved by not ending render passes (and on gpu for not waiting on barriers) is probably helpful.
Avoids ending render passes to update buffer data (not all the time)
- 140-180 to 35-45 in SMO metro kingdom (these updates are in the UI)
- Very variable 60-150(!) to 16-25 in mario kart 8 (these updates are in the UI)
As well as allowing more data to be preloaded persistently, this will also allow more data to be loaded in the preload buffer, which should be faster as it doesn't need to insert barriers between draws. (and on tbdr, does not need to flush and reload tile memory)
Improves performance in GPU limited scenarios. Should notably improve performance on TBDR gpus. Still a lot more to do here.
2022-06-17 22:42:51 +01:00
riperiperi
3e88558182
Only update fragment scale count if a vertex texture needs a scale.
...
Fixes a performance regression introduced by texture scaling in the vertex stage where support buffer updates would be very frequent, even at 1x, if any textures were used on the vertex stage.
This check doesn't exactly look cheap (a flag in the shader stage would probably be preferred), but it is much cheaper than uploading scales in both vulkan and opengl, so it will do for now.
2022-06-17 22:42:51 +01:00
riperiperi
9c696fc2e1
Fix Multisampling
2022-06-17 22:42:50 +01:00
riperiperi
089fa6bd54
Make more robust to shader compilation failure
...
- Don't freeze when GLSL compilation fails
- Background SPIR-V pipeline compile failure results in skipped draws, similar to GLSL compilation failure.
2022-06-17 22:42:50 +01:00
riperiperi
d45b28f6b7
Cleanup for merge (note: disables spir-v)
2022-06-17 22:42:50 +01:00
riperiperi
6c09cfff4c
Update topology with GpuAccessorState
2022-06-17 22:42:50 +01:00
riperiperi
ba8887b848
Make this 32
2022-06-17 22:42:49 +01:00
riperiperi
c75860e627
Address some feedback
2022-06-17 22:42:49 +01:00
riperiperi
f6196fe07b
Multithreaded Pipeline Compilation
2022-06-17 22:42:49 +01:00
riperiperi
7882c0498b
SPIR-V: Only use input attribute type for input attributes
...
Output vertex attributes should always be of type float.
2022-06-17 22:42:48 +01:00
riperiperi
cbeb40934f
SPIR-V: Don't OpReturn if we already OpExit'ed
...
Fixes spir-v parse failure and stack smashing in RADV (obviously you still need bolist)
2022-06-17 22:42:48 +01:00
riperiperi
c1517e5ee3
SPIR-V: Use ConstantComposite for Texture Offset Vector
...
Fixes a bunch of freezes with SPIR-V on AMD hardware, and validation errors. Note: Obviously assumes input offsets are constant, which they currently are.
2022-06-17 22:42:48 +01:00
riperiperi
2d6642d605
SPIR-V: Only add FSI exec mode if used.
2022-06-17 22:42:47 +01:00
gdk
51d986da35
Multisampling: We can only resolve for unscaled copies
2022-06-17 22:42:47 +01:00
gdk
5efe0167ea
Multisampling: Use resolve if src samples count > dst samples count
2022-06-17 22:42:47 +01:00
gdk
6810796638
Multisampling support
2022-06-17 22:42:46 +01:00
riperiperi
fb20e5b371
Don't pass depth clip state right now (fix decals)
...
Explicitly disabling it is incorrect. OpenGL currently automatically disables based on depth clamp, which is the behaviour if this state is omitted.
2022-06-17 22:42:45 +01:00
gdk
1ab42e9ce8
SPIR-V: Implement SwizzleAdd, add missing Triangles ExecutionMode for geometry shaders, remove SamplerType field from TextureMeta
2022-06-17 22:42:44 +01:00