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
gdk
c260ef7b0a
SPIR-V: Add early fragment tests support
2022-06-17 22:42:44 +01:00
gdk
387333454b
SPIR-V: Fragment shader interlock support (and image coherency)
2022-06-17 22:42:44 +01:00
gdk
f51f9e90d4
SPIR-V: Transform feedback support
2022-06-17 22:42:44 +01:00
riperiperi
afa54813f7
LocalDefMap for Ssa Rewriter
...
Rather than allocating a large array of all registers for each block in the shader, allocate one array of all registers and clear it between blocks. Reduces allocations in the shader translator.
2022-06-17 22:42:44 +01:00
riperiperi
dd718fbe97
Pool Spv.Generator resources, cache delegates, spv opts
...
- Pools for Instructions and LiteralIntegers. Can be passed in when creating the generator module.
- NewInstruction is called instead of new Instruction()
- Ryujinx SpirvGenerator passes in some pools that are static. The idea is for these to be shared between threads eventually.
- Estimate code size when creating the output MemoryStream
- LiteralInteger pools using ThreadStatic pools that are initialized before and after creation... not sure of a better way since the way these are created is via implicit cast.
Also, cache delegates for Spv.Generator for functions that are passed around to GenerateBinary etc, since passing the function raw creates a delegate on each call.
TODO: update python spv cs generator to make the coregrammar with NewInstruction and the `params` overloads.
2022-06-17 22:42:43 +01:00
riperiperi
bf94f4c7d6
Some optimizations to Spv.Generator
...
- Dictionary for lookups of type declarations, constants, extinst
- LiteralInteger internal data format -> ushort
- Deterministic HashCode implementation to avoid spirv result not being the same between runs
- Inline operand list instead of List<T>, falls back to array if many operands. (large performance boost)
TODO: improve instruction allocation, structured program creator, ssa?
2022-06-17 22:42:43 +01:00
riperiperi
12dec18f39
Reduce allocations for Spir-v serialization
...
Passes BinaryWriter instead of the stream to Write and WriteOperand
- Removes creation of BinaryWriter for each instruction
- Removes allocations for literal string
2022-06-17 22:42:43 +01:00
gdk
301ddec36f
SPIR-V: Use correct binding number on storage buffers array
2022-06-17 22:42:43 +01:00
gdk
e1d73cc560
SPIR-V: Geometry shader support
2022-06-17 22:42:42 +01:00
gdk
bd56998f4d
Re-enable BGRA (was not supposed to disable it)
2022-06-17 22:42:41 +01:00
gdk
3c949309e5
SPIR-V: Implement LoopContinue IR instruction
2022-06-17 22:42:41 +01:00
gdk
aa0913838d
SPIR-V: Set DepthReplacing execution mode when FragDepth is modified
2022-06-17 22:42:40 +01:00
gdk
97b179696b
SPIR-V: Fix ImageQuerySizeLod
2022-06-17 22:42:40 +01:00
gdk
a2e4b4b6d8
SPIR-V: Functions must always end with a return
2022-06-17 22:42:40 +01:00
gdk
be36f6fa5b
Correct GTK UI status bar positions
2022-06-17 22:42:40 +01:00
gdk
f1a1f477ef
Allow custom aspect ratio on Vulkan
2022-06-17 22:42:40 +01:00
gdk
7347642c05
More instructions + fixes on SPIR-V backend
2022-06-17 22:42:40 +01:00
gdk
9b779adf57
Better workaround for AMD vertex buffer size alignment issue
2022-06-17 22:42:39 +01:00
gdk
522e7933e8
Workaround for wrong last attribute on AMD (affects FFVII, STRIKERS1945, probably more)
2022-06-17 22:42:39 +01:00
gdk
36b3ab0741
Fix draw outside of render pass and missing capability
2022-06-17 22:42:39 +01:00
gdk
5a3695c968
Don't pause transform feedback for multi draw
2022-06-17 22:42:39 +01:00
gdk
52249e50dd
Fix transform feedback on Intel, gl_Position feedback and clears to inexistent depth buffers
2022-06-17 22:42:38 +01:00
riperiperi
0fe19f51c0
Insert barriers around vkCmdBlitImage (may fix some amd flicker)
2022-06-17 22:42:38 +01:00
riperiperi
3f38a8526c
Port #3019
2022-06-17 22:42:38 +01:00
riperiperi
2f066d1d6d
Force device local storage for textures (fixes linux performance)
2022-06-17 22:42:38 +01:00
riperiperi
1e167788d4
Fix counter queue leak when game decides to use host conditional rendering
2022-06-17 22:42:38 +01:00
riperiperi
d14dbb0cff
Use SupportBufferUpdater, add single layer flush
2022-06-17 22:42:38 +01:00
riperiperi
db5ac3488a
Use circular queue for checking consumption on command buffers
...
Speeds up games that spam command buffers a little. Avoids checking multiple command buffers if multiple are active at once.
2022-06-17 22:42:38 +01:00
gdk
64d11d3574
Remove Intel bug workaround, it was fixed on the latest driver
2022-06-17 22:42:37 +01:00
gdk
f6a4fe8f5f
Fix some validation errors around extended dynamic state
2022-06-17 22:42:37 +01:00
riperiperi
4d94b03622
Add single queue support
...
Multiqueue seems to be a bit more responsive on NVIDIA. Should fix texture flush on intel. AMD has been forced to single queue for an experiment.
2022-06-17 22:42:37 +01:00
riperiperi
dc0d0f49b1
Cleanup, disable device local buffers for now.
2022-06-17 22:42:36 +01:00
riperiperi
4994e50d1c
Device local mapping for all buffers
...
May avoid issues with drivers with NVIDIA on linux/older gpus on windows when using large buffers (?)
Also some performance things and fixes issues with opengl games loading textures weird.
2022-06-17 22:42:36 +01:00
riperiperi
74f8ef93c7
Be a bit more careful with texture access flags, since it can be used for anything
2022-06-17 22:42:36 +01:00
riperiperi
066094241a
Add barriers around vkCmdCopyImage
...
Write->Read barrier for src image (we want to wait for a write to read it)
Write->Read barrier for dst image (we want to wait for the copy to complete before use)
2022-06-17 22:42:36 +01:00
gdk
d3e7606a74
Validation layers should be enabled for any log level other than None
2022-06-17 22:42:35 +01:00
gdk
0dc5a48e6f
Fix R4G4B4A4Unorm texture format permutation
2022-06-17 22:42:35 +01:00
gdk
4c7e6df7d1
Add alpha test emulation on shader (but no shader specialisation yet...)
2022-06-17 22:42:35 +01:00
gdk
9a95c3c3bc
Update Spv.Generator
2022-06-17 22:42:35 +01:00
gdk
adfba37a3f
Fix samplers with MinFilter Linear or Nearest (fixes New Super Mario Bros U Deluxe black borders)
2022-06-17 22:42:34 +01:00
gdk
5738b66b75
Don't make Intel Mesa pay for Intel Windows bugs
2022-06-17 22:42:34 +01:00
gdk
cd01a2f74a
Fix triangle overlay on SMO, Captain Toad, maybe others?
2022-06-17 22:42:34 +01:00
riperiperi
393d0a6134
Update findMSB/findLSB to match master's instruction enum
2022-06-17 22:42:34 +01:00
riperiperi
5590811ea3
Don't throw when ending conditional rendering for now
...
This should be re-enabled when conditional rendering is enabled on nvidia etc.
2022-06-17 22:42:34 +01:00
riperiperi
23b8bd8642
Update counter queue to be similar to the OGL one
...
Fixes softlocks when games had to flush counters.
2022-06-17 22:42:33 +01:00
riperiperi
d55f664908
Fix PrimitivesGenerated query, disable Transform Feedback queries for now
...
Lets Splatoon 2 work on nvidia. (mostly)
2022-06-17 22:42:33 +01:00
riperiperi
51bd7454bd
Update Silk.NET to version 2.10.1
...
Somehow, massive performance boost. Seems like their vtable for looking up vulkan methods was really slow before.
2022-06-17 22:42:33 +01:00
riperiperi
d4e4ae60d5
Update to .net6
2022-06-17 22:42:33 +01:00