Philip Rebohle
e5a06d3f4a
[dxbc] Only load requested components from constant buffers
...
Results in better performance compared to loading the entire vector
on RADV. Suggested by Samuel Pitoiset.
2019-01-30 16:32:25 +01:00
Philip Rebohle
1cc24c223b
[dxbc] Reduce length of tessellation i/o arrays to minimum
...
This allows us to fix a violation of the Vulkan specification
where using the same location range for per-vertex and per-patch
i/o is illegal.
May also help certain drivers figure out what's actually needed.
2019-01-26 17:12:23 +01:00
Philip Rebohle
0b5cffb0bb
[dxbc] Parse patch constant signature
2019-01-26 14:52:29 +01:00
Philip Rebohle
9890b87225
[dxbc] Fix incorrect error message
2019-01-08 00:46:24 +01:00
Philip Rebohle
e5beab2872
[dxbc] Rename struct_c0 -> c0_t etc.
2018-12-14 23:45:38 +01:00
Philip Rebohle
01b8e74457
[dxbc] Use raw SSBOs for raw and structured buffers if appropriate
2018-12-14 23:45:37 +01:00
Philip Rebohle
a0de90861c
[dxvk] Store access flags in resource slots
...
Makes distinguishing read-only resources from read-write
resources significantly easier.
2018-12-14 23:45:37 +01:00
Philip Rebohle
7096937c11
[dxbc] Use ballot to determine early-discard condition in fragment shaders
2018-11-27 11:50:01 +01:00
Philip Rebohle
ea5f11d091
[dxbc] Implement function to clear thread-group shared memory
...
Can be enabled in case a game reads undefined data from TGSM.
2018-11-23 15:57:54 +01:00
Philip Rebohle
79a6dd111e
[dxbc] Store workgroup size for compute shaders
2018-11-23 14:39:33 +01:00
Philip Rebohle
6dd82dfe03
[dxbc] Clamp written depth value to (0.0, 1.0)
...
Fixes shadow issue in Overwatch (#738 ).
2018-11-23 12:00:23 +01:00
Philip Rebohle
0418c02ac3
[dxbc] Use clustered subgroup operations on supported hardware
2018-11-21 11:17:09 +01:00
Philip Rebohle
ab17c49c4e
[dxbc] Fix compiler warning about uninitialized values
2018-11-21 11:17:09 +01:00
Philip Rebohle
4f76b89941
[dxbc] Use subgroup operations for early discard
...
Can improve performance in some complex fragment shaders.
2018-11-21 11:17:09 +01:00
Philip Rebohle
a574829bb6
[dxbc] Remove DeferKill flag
...
This behaviour is correct, and needs to be enabled by default.
2018-11-21 11:17:09 +01:00
Philip Rebohle
f69c5e4c4e
[dxbc] Emit Index decoration for pixel shader outputs
...
Simplifies shader patching when dual-source blending is used.
2018-11-19 16:57:11 +01:00
Philip Rebohle
a971370524
[dxbc] Implement Dmovc instruction
...
Fixes some mandelbrot demo mentioned in #216 .
2018-11-10 23:27:56 +01:00
Philip Rebohle
bd03225c14
[dxbc] Refactor DxbcOptions
...
A bit mask isn't good enough going forward, and we also don't
need application-specific options for now.
2018-11-09 08:41:02 +01:00
Philip Rebohle
780780f8d1
[dxbc] Don't enable sample shading for interpolation functions
...
Actually doesn't resolve #456 , and doesn't make any sense either because
interpolation at a given sample index is apparently supposed to work even
without using sample shading.
2018-11-05 18:30:32 +01:00
Philip Rebohle
2ee7ef7689
[dxbc] Enable sample shading when using interpolation functions
...
Fixes artifacts on RADV when enabling MSAA in World of Warcraft (#456 ).
2018-11-05 17:07:11 +01:00
Philip Rebohle
a53e053391
[dxbc] Fix incorrect data type for explicit interpolation instructions
2018-10-25 22:25:13 +02:00
Philip Rebohle
a27e440272
[dxvk] Detect Xfb and set rasterized stream index
2018-10-10 13:05:37 +02:00
Philip Rebohle
d2c62a8645
[dxbc] Implement passthrough geometry shader
...
This is needed when vertex or domain shader code is
passed to CreateGeometryShaderWithStreamOutput.
- Fix compilation with new DxbcProgramInfo.
2018-10-10 10:28:15 +02:00
Philip Rebohle
017699df15
[dxbc] Implement Xfb output declarations and setup
2018-10-10 10:28:15 +02:00
Philip Rebohle
6a5fe2247a
[dxbc] Add support for multiple streams in geometry shaders
2018-10-10 10:28:15 +02:00
Philip Rebohle
a42f03e32d
[dxbc] Add Xfb structures to DxbcModuleInfo
2018-10-10 10:28:15 +02:00
Andre Heider
8fcdf78b51
[dxbc] rename DxbcProgramVersion to DxbcProgramInfo
...
The version in not part of this class anymore.
2018-10-08 12:32:01 +02:00
Philip Rebohle
059073fcd0
[dxbc] Fix missing hull shader input declarations
...
Fixes tessellation in Tomb Raider 2013. Closes #368 .
2018-09-13 18:25:32 +02:00
Philip Rebohle
797c568c74
[dxbc] Use temporary array for per-patch hull shader outputs
...
Drivers don't seem to like it when output arrays are addressed dynamically.
2018-09-13 15:17:39 +02:00
Philip Rebohle
16a3ae52fe
[dxbc] Remove emitCsSystemValueLoad
...
There are no compute shader system values.
2018-09-10 11:50:13 +02:00
Philip Rebohle
f8dc5612f7
[d3d11] Added option to limit tessellation factors
...
d3d11.maxTessFactor accepts values ranging from 8 to 64, and limits
the maximum tessellation factor accordingly.
2018-09-09 23:14:00 +02:00
Philip Rebohle
108a6645e6
[dxbc] Make emitRawBufferLoad more readable
2018-09-06 21:44:53 +02:00
Philip Rebohle
9520c9b1b8
[dxbc] Apply Modulo 31 to bit counts and offsets (shr/shl/bfe/bfi)
...
Assassin's Creed Syndicate relies on correct behaviour.
2018-09-03 01:01:44 +02:00
Philip Rebohle
05e505a844
[dxbc] Implement pixel shader output component mapping
2018-09-01 18:15:27 +02:00
Philip Rebohle
01cc49555a
[dxbc] End functions correctly even if last instruction is not 'ret'
...
Some DXBC shaders don't end in a return instruction, but rather implicitly
end when all branches end in a return instruction. Fixes an illegal shader
generated in Crysis 1.
2018-08-27 14:29:40 +02:00
Philip Rebohle
b51361eaa9
Revert "[dxbc] Work around OpControlBarrier issue on radv 18.2-git"
...
This reverts commit 9293acfeb561fced8e05e2d08e3bd70fb5de8fff.
This issue is caused by an LLVM bug, which now has a workaround in RADV:
https://cgit.freedesktop.org/mesa/mesa/commit/?id=71d5b2fbf83061a1319141d26942771e8c75ff2b
2018-08-17 11:50:36 +02:00
Philip Rebohle
e113392bb9
[dxbc] Implement DtoI, DtoU, ItoD and UtoD
2018-08-15 20:11:40 +02:00
Philip Rebohle
86fbba06be
[dxbc] Implement DDiv, DFma and DRcp
2018-08-15 20:11:40 +02:00
Philip Rebohle
e1479f41c1
[dxbc] Fix case labels when case blocks are terminated with ret
...
Fixes incorrect shader in Monster Hunter World, which caused
RADV to crash.
2018-08-10 03:31:35 +02:00
Philip Rebohle
9293acfeb5
[dxbc] Work around OpControlBarrier issue on radv 18.2-git
2018-08-03 15:15:18 +02:00
Philip Rebohle
1da6617a73
[dxbc] Fix sample location order for 2xMSAA case
...
The sample locations were apparently incorrectly documented
in the Vulkan spec and have changed with the 1.1.82 update.
2018-08-01 11:38:59 +02:00
Philip Rebohle
91407098d5
[dxbc] Actually set "icb" as the debug name of the ICB
2018-07-30 22:08:01 +02:00
Philip Rebohle
f8392b4f83
[dxbc] Fix incorrect pointer type when loading from baked ICBs
2018-07-30 21:08:52 +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
c31e646921
[dxvk] Introduce concept of shader constants
...
Large constant arrays should be moved to a uniform buffer instead
of being baked directly into the shader code.
2018-07-30 20:29:05 +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
c370eea948
[dxbc] Decorate untyped write-only UAVs as NonReadable
2018-06-28 03:42:11 +02:00
Philip Rebohle
6cc303c5ef
[dxbc] Implement SV_ViewportID as pixel shader input
2018-06-27 12:02:54 +02:00
Philip Rebohle
dd51437584
[dxbc] Implement EmitThenCut / EmitThenCutStream
2018-06-23 17:34:50 +02:00