gdk
c832f55618
Fix inverse viewport transform vector type on SPIR-V
2022-06-17 22:47:02 +01:00
riperiperi
52050e4d48
Fix gl_FragCoord.z transformation
...
FragCoord.z is always in 0-1, even when the real depth range is -1 to 1. Turns out the only bug was geo and tess stage outputs.
Fixes Pokemon Sword/Shield, possibly others.
2022-06-17 22:47:01 +01:00
riperiperi
d4ccb6b895
Return of the Vector Indexing Bug
...
One day, everyone will get this right.
2022-06-17 22:47:00 +01:00
riperiperi
182c95a588
Vulkan/SPIR-V support for viewport inverse
2022-06-17 22:47:00 +01:00
riperiperi
c3951877f7
Geometry Shader index count from ThreadsPerInputPrimitive
...
Generally fixes SPIR-V emitting too many triangles, may change games in OpenGL
2022-06-17 22:46:59 +01:00
riperiperi
8097480b02
Improvements to -1 to 1 depth mode.
...
- Transformation is only applied on the last stage in the vertex pipeline.
- Should fix some issues with geometry and tessellation (hopefully)
- Reading back FragCoord Z on fragment will transform back to -1 to 1.
2022-06-17 22:46:59 +01:00
gdk
dd54eb4be1
Geometry shader passthrough emulation
2022-06-17 22:46:05 +01:00
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
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
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
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
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
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
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
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
7347642c05
More instructions + fixes on SPIR-V backend
2022-06-17 22:42:40 +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
gdk
9a95c3c3bc
Update Spv.Generator
2022-06-17 22:42:35 +01:00
riperiperi
393d0a6134
Update findMSB/findLSB to match master's instruction enum
2022-06-17 22:42:34 +01:00
gdk
616f14c46d
Fix rebase build break
2022-06-17 22:42:32 +01:00
gdk
fa24c41d32
Fix some tessellation related issues (still doesn't work?)
2022-06-17 22:42:32 +01:00
gdkchan
c6fbaf844e
No need to initialize attributes on the SPIR-V backend anymore
2022-06-17 22:42:31 +01:00
gdkchan
4513e8b226
WIP Vulkan implementation
2022-06-17 22:42:30 +01:00
riperiperi
43b4b34376
Implement Viewport Transform Disable ( #3328 )
...
* Initial implementation (no specialization)
* Use specialization
* Fix render scale, increase code gen version
* Revert accidental change
* Address Feedback
2022-05-12 10:47:13 -03:00
gdkchan
e44a43c7e1
Implement VMAD shader instruction and improve InvocationInfo and ISBERD handling ( #3251 )
...
* Implement VMAD shader instruction and improve InvocationInfo and ISBERD handling
* Shader cache version bump
* Fix typo
2022-04-08 12:42:39 +02:00
gdkchan
04bd87ed5a
Fix shader textureSize with multisample and buffer textures ( #3240 )
...
* Fix shader textureSize with multisample and buffer textures
* Replace out param with tuple return value
2022-04-04 14:43:58 -03:00
gdkchan
f861f0bca2
Fix missing geometry shader passthrough inputs ( #3106 )
...
* Fix missing geometry shader passthrough inputs
* Shader cache version bump
2022-02-11 19:52:20 +01:00