Philip Rebohle
91407098d5
[dxbc] Actually set "icb" as the debug name of the ICB
2018-07-30 22:08:01 +02:00
Philip Rebohle
2166769096
[dxbc] Map large ICBs to a constant buffer
...
Should fix an issue with compiling a specific compute shader in
the game Dragon Ball Xenoverse 2 (#523 ).
2018-07-30 20:52:42 +02:00
Philip Rebohle
a196451400
[dxbc] Respect number of input/output components
...
Fixes issues with geometry shaders exceeding output component limits.
2018-07-01 17:45:50 +02:00
Philip Rebohle
2bce1491c6
WIP: Typed shader interfaces
2018-07-01 12:44:37 +02:00
Philip Rebohle
6cc303c5ef
[dxbc] Implement SV_ViewportID as pixel shader input
2018-06-27 12:02:54 +02:00
Philip Rebohle
102591369e
[dxbc] Add DxbcModuleInfo struct
...
This will be required in the future to pass data from the
application to the shader compiler.
2018-06-23 17:14:35 +02:00
Philip Rebohle
97af5ee6fe
[dxbc] Implement DtoF and FtoD instructions
2018-06-07 14:32:56 +02:00
Philip Rebohle
217399926d
Revert "[dxbc] Bound-check dynamically indexed constant buffer reads"
...
This reverts commit 621aed5fdb
.
Breaks Dishonored 2. Apparently, out-of-bounds access to constant buffers
is allowed as long as it doesn't exceed the range of bound constants.
2018-06-02 18:09:59 +02:00
Philip Rebohle
9ff17b03f2
[dxbc] Support RenderTargetId and ViewportId in Vertex/Domain shaders
...
Fixes shader compilation errors in Pillars of Eternity II (#408 )
and Lost Sphear (#406 ). Currently unsupported by RADV.
2018-06-01 13:57:26 +02:00
Philip Rebohle
621aed5fdb
[dxbc] Bound-check dynamically indexed constant buffer reads
...
Emulates D3D11 behaviour more closely on Nvidia hardware.
Fixes an issue in Dark Souls Remastered caused by constant
buffer access with an undefined index value (#405 ).
2018-05-31 10:13:32 +02:00
Philip Rebohle
001794a094
[dxbc] Implement deferred kill operation
...
Fixes visual issues during LOD transitions in The Witcher 3,
Rise of the Tomb Raider and other games with a similar LOD
system. UAV stores and atomics are conditionalized as well.
2018-05-26 19:25:20 +02:00
Philip Rebohle
0619842dd9
[dxbc] Make UAV stores and atomics conditional
...
We should only perform stores when the corresponding
UAV is bound. This may be extended with range checks
at a later time.
2018-05-26 19:01:44 +02:00
Philip Rebohle
d79f39b963
[dxbc] Implement sampleinfo instruction for rasterizer
2018-05-26 14:54:05 +02:00
Philip Rebohle
fb11acbc91
[dxbc] Implement geometry shader instancing
...
Required for Frostpunk (see #385 ).
2018-05-22 19:36:53 +02:00
Philip Rebohle
a6ace7908f
[dxbc] Do not emit empty 'else' blocks
2018-05-18 22:37:23 +02:00
Philip Rebohle
581e505f54
[dxbc] Fix bit scan instructions
...
firstbithi counts from the MSB rather than the LSB. Fixes
rendering issues in Hitman.
2018-05-12 01:39:23 +02:00
Philip Rebohle
01147492d5
[dxbc] Implemented Texture2D -> Texture2DArray mapping as a knob
...
Doing this for all applications is not necessary and degrades
performance in some cases.
2018-04-23 00:46:27 +02:00
Philip Rebohle
dcb5b2a20c
[dxbc] Map 1D and 2D textures to their respective array type v2
...
We need to adjust the texture coordinate vectors as well, so that
some instructions continue to work properly.
2018-04-21 18:09:43 +02:00
Philip Rebohle
8eb78591a0
[dxbc] Scan pixel shader output register type at declaration time
...
Fixes invalid shaders being generated in the Blacksmith demo on
some GPUs. Works around a possible issue in the output signature
reader.
Commit #1000 , yay.
2018-04-18 21:14:34 +02:00
Philip Rebohle
98b8d41016
[dxbc] Write shader name to the generated SPIR-V
...
Might help identifying shaders in debugging tools such as Renderdoc.
2018-04-15 21:00:08 +02:00
Philip Rebohle
adb1789571
[dxbc] Fixed incorrect result vector dimension for OpImageQuerySize
2018-04-12 13:57:15 +02:00
Philip Rebohle
e38cc4a0e0
[dxbc] Implement support for SV_PrimitiveID
...
Fixes some geometry/tessellation shaders in The Witcher 3.
2018-04-08 18:25:44 +02:00
Philip Rebohle
60d6416e5f
[dxbc] Implemnted SV_ViewportArrayIndex for geometry shaders
...
Required by Final Fantasy XIV.
2018-03-26 23:32:30 +02:00
Philip Rebohle
ac94c42380
Revert "[dxbc] Do not emit per-vertex input block"
...
This reverts commit 4ce64bd886
.
Fixes a regression in Sniper: Ghost Warrior 2 and Dishonored 2.
2018-03-24 16:23:31 +01:00
Philip Rebohle
7f7eedac35
[dxbc] Implement SV_ClipDistance and SV_CullDistance
2018-03-24 11:29:07 +01:00
Philip Rebohle
4ce64bd886
[dxbc] Do not emit per-vertex input block
...
Instead, we can let the normal input registers do their thing.
2018-03-24 00:32:22 +01:00
Philip Rebohle
abb90086d5
[dxvk] Use analyzer to determine UAV image type
2018-03-23 01:04:04 +01:00
Philip Rebohle
fcff10aae7
[dxbc] Set image format for UAVs when atomic operations are used
...
Fixes a violation of the Vulkan specification where atomic operations
would be used on storage images with SpvImageFormatUnknown. Should fix
driver crashes on Nvidia.
TODO: Fix data types for atomic operation instructions.
2018-03-21 12:11:18 +01:00
Philip Rebohle
3d0aad705d
[dxbc] Implemented samplepos instruction
...
Required by Fallout 4, among other games.
2018-03-12 12:25:10 +01:00
Mikhail Paulyshka
3dad074fc4
[dxbc] implemented retc instructions ( #140 )
2018-03-10 15:04:58 +01:00
Philip Rebohle
28880d0fa8
[dxbc] Implemented DclHsMaxTessFactor
2018-03-10 15:02:27 +01:00
Philip Rebohle
88c4e363e5
[dxbc] Implemented workaround for hull shader output synchronization
2018-03-06 18:29:20 +01:00
Philip Rebohle
2271814d95
[dxbc] Implemented domain shader input variables
2018-03-06 16:47:35 +01:00
Philip Rebohle
ff0ff0c23b
[dxbc] Implemented hull shader passthrough
2018-03-06 15:52:29 +01:00
Philip Rebohle
d2ca721387
[dxbc] Reworked Hull Shader phase invocations
...
Instead of running individual phases sequentially, we can
run them in parallel if execution barriers are in place.
2018-03-06 15:05:58 +01:00
Philip Rebohle
87afb33228
[dxbc] Implemented Hull Shader output setup
2018-03-06 14:49:11 +01:00
Philip Rebohle
988aaa0161
[dxbc] Implemented Hull Shader output variables
2018-03-06 14:00:03 +01:00
Philip Rebohle
b2f5b262f7
[dxbc] Added support for the control point phase in Hull Shaders
2018-03-05 17:23:00 +01:00
Philip Rebohle
4688b2cc5a
[dxbc] Formatting fixes + Hull shader barriers
2018-03-05 16:14:46 +01:00
Philip Rebohle
3501186d38
[dxbc] Added tess level interface variables
2018-03-05 14:07:15 +01:00
Philip Rebohle
3dea58dabc
[dxbc] Implemented more tessellation-related declarations
2018-03-01 14:36:17 +01:00
Philip Rebohle
feba1f0e88
[dxbc] Implemented Hull Shader control point count declarations
2018-03-01 12:47:24 +01:00
Philip Rebohle
0916115086
[dxbc] Implemented Hull Shader fork/join phase invocations
2018-03-01 12:08:06 +01:00
Philip Rebohle
0e9b7d7ccd
[dxbc] Implemented new workaround for depth-compare ops on Nvidia
2018-03-01 10:11:15 +01:00
Philip Rebohle
d185977918
[dxbc] Implemented Hull shader function declarations
2018-03-01 09:26:17 +01:00
Philip Rebohle
d0db88ee62
[dxbc] Implemnted some HS/DS stubs
2018-03-01 07:00:54 +01:00
Philip Rebohle
ec59389527
[dxbc] Implement EvalAttribute* instructions
2018-02-26 16:46:34 +01:00
Philip Rebohle
8ebffc1018
[dxbc] Added support for SV_RenderTargetID in pixel shaders
2018-02-15 18:07:40 +01:00
Philip Rebohle
fc947f5985
[dxbc] Implemented Geometry SV RenderTargetId
2018-02-04 23:36:00 +01:00
Philip Rebohle
8c64a81e27
[dxbc] Implemented stream instructions for single-stream GS
2018-02-04 22:59:15 +01:00