Commit graph

152 commits

Author SHA1 Message Date
ReinUsesLisp
050e81500c shader: Move microinstruction header to the value header 2021-07-22 21:51:28 -04:00
ReinUsesLisp
4209828646 shader: Intrusively store register values in block for SSA pass 2021-07-22 21:51:28 -04:00
ReinUsesLisp
dd860b684c shader: Implement D3D samplers 2021-07-22 21:51:28 -04:00
ReinUsesLisp
a8d46a5eae shader: Add constant propagation for arithmetic right shifts 2021-07-22 21:51:28 -04:00
ReinUsesLisp
7018e524f5 shader: Add NVN storage buffer fallbacks
When we can't track the SSBO origin of a global memory instruction,
leave it as a global memory operation and assume these pointers are in
the NVN storage buffer slots, then apply a linear search in the shader's
runtime.
2021-07-22 21:51:28 -04:00
FernandoS27
f69d0b91ff shader: Address feedback 2021-07-22 21:51:28 -04:00
FernandoS27
080857b60e shader: Add coarse derivatives 2021-07-22 21:51:28 -04:00
FernandoS27
04c459fc8d shader: Implement fine derivates constant propagation 2021-07-22 21:51:28 -04:00
ReinUsesLisp
50f8007172 shader: Fix Phi node types 2021-07-22 21:51:28 -04:00
ReinUsesLisp
80940b1706 shader: Implement SampleMask 2021-07-22 21:51:28 -04:00
ReinUsesLisp
95815a3883 shader: Implement PIXLD.MY_INDEX 2021-07-22 21:51:28 -04:00
ReinUsesLisp
e3514bcd6b spirv: Implement ViewportMask with NV_viewport_array2 2021-07-22 21:51:28 -04:00
ReinUsesLisp
b0f1255c8c shader: Implement PrimitiveId 2021-07-22 21:51:27 -04:00
ReinUsesLisp
183855e396 shader: Implement tessellation shaders, polygon mode and invocation id 2021-07-22 21:51:27 -04:00
ReinUsesLisp
34519d3fc6 shader: Mark atomic instructions as writes 2021-07-22 21:51:27 -04:00
ReinUsesLisp
416e1b7441 spirv: Implement image buffers 2021-07-22 21:51:27 -04:00
ReinUsesLisp
d8ec99dada spirv: Implement Layer stores 2021-07-22 21:51:27 -04:00
ReinUsesLisp
fa75b9b062 spirv: Rework storage buffers and shader memory 2021-07-22 21:51:27 -04:00
ReinUsesLisp
2597cee85b shader: Add constant propagation for *&^| binary operations 2021-07-22 21:51:27 -04:00
ReinUsesLisp
23b8714732 spirv: Define StorageImageWriteWithoutFormat capability when used 2021-07-22 21:51:27 -04:00
ReinUsesLisp
5c61e860e4 shader: Implement SR_THREAD_KILL 2021-07-22 21:51:27 -04:00
ameerj
3db2b3effa shader: Implement ATOM/S and RED 2021-07-22 21:51:27 -04:00
ReinUsesLisp
ab543f1821 spirv: Guard against typeless image reads on unsupported devices 2021-07-22 21:51:27 -04:00
ReinUsesLisp
9280cd649a shader: Move LaneId to the warp emission file and fix AMD 2021-07-22 21:51:27 -04:00
ReinUsesLisp
7cb2ab3585 shader: Implement SULD and SUST 2021-07-22 21:51:26 -04:00
lat9nq
5bfcafa0a2 shader: Address feedback + clang format 2021-07-22 21:51:26 -04:00
lat9nq
0bb85f6a75 shader_recompiler,video_core: Cleanup some GCC and Clang errors
Mostly fixing unused *, implicit conversion, braced scalar init,
fpermissive, and some others.

Some Clang errors likely remain in video_core, and std::ranges is still
a pertinent issue in shader_recompiler

shader_recompiler: cmake: Force bracket depth to 1024 on Clang
Increases the maximum fold expression depth

thread_worker: Include condition_variable

Don't use list initializers in control flow

Co-authored-by: ReinUsesLisp <reinuseslisp@airmail.cc>
2021-07-22 21:51:26 -04:00
ReinUsesLisp
1f3eb601ac shader: Implement texture buffers 2021-07-22 21:51:26 -04:00
FernandoS27
dcaf0e9150 shader: Address feedback 2021-07-22 21:51:26 -04:00
FernandoS27
73cb17f41b shader: Implement indexed Position and ClipDistances 2021-07-22 21:51:26 -04:00
FernandoS27
1d51803169 shader: Implement indexed attributes 2021-07-22 21:51:26 -04:00
ReinUsesLisp
417fb5d385 shader: Move recursive SSA rewrite to the heap 2021-07-22 21:51:26 -04:00
ReinUsesLisp
da6cf2632c shader: Add subgroup masks 2021-07-22 21:51:26 -04:00
ReinUsesLisp
85795de99f shader: Abstract breadth searches and use the abstraction 2021-07-22 21:51:26 -04:00
ReinUsesLisp
3f594dd86b shader: Reimplement GetCbufU64 as GetCbufU32x2
It may generate better code on some compilers and it's easier to handle.
2021-07-22 21:51:26 -04:00
ReinUsesLisp
9a342f5605 shader: Rework global memory tracking to use breadth-first search 2021-07-22 21:51:26 -04:00
FernandoS27
ed6a1b1a3d shader: Address feedback 2021-07-22 21:51:26 -04:00
FernandoS27
baec84247f shader: Address Feedback 2021-07-22 21:51:26 -04:00
FernandoS27
45d547af11 shader: Implement SR_LaneId 2021-07-22 21:51:26 -04:00
FernandoS27
ecb30c9072 shader: Improve VOTE.VTG stub 2021-07-22 21:51:25 -04:00
FernandoS27
12f5f32098 shader: Mark SSBOs as written when they are 2021-07-22 21:51:25 -04:00
FernandoS27
d819ba4489 shader: Implement ViewportIndex 2021-07-22 21:51:25 -04:00
FernandoS27
bee8188799 shader: Fold composite extract 2021-07-22 21:51:25 -04:00
FernandoS27
c3bace756f shader: Fold comparisons and Pack/Unpack16 2021-07-22 21:51:25 -04:00
ReinUsesLisp
5f22cd89e2 shader: Fix constant propagation to use reverse post order 2021-07-22 21:51:25 -04:00
FernandoS27
0c4cf3b9eb shader: Implement ClipDistance 2021-07-22 21:51:25 -04:00
FernandoS27
d5bfc63088 shader: Implement ImageGradient 2021-07-22 21:51:25 -04:00
FernandoS27
613b48c4a2 shader,spirv: Implement ImageQueryLod. 2021-07-22 21:51:25 -04:00
FernandoS27
dc1a9a3bed shader: Implement TLD 2021-07-22 21:51:25 -04:00
FernandoS27
9d7422d967 shader: Add PointCoord attribute 2021-07-22 21:51:25 -04:00
ameerj
b7589fe115 shader: Add PointSize attribute 2021-07-22 21:51:25 -04:00
ameerj
6c51f49632 shader: Implement FSWZADD 2021-07-22 21:51:25 -04:00
FernandoS27
34aba9627a shader: Implement BRX 2021-07-22 21:51:25 -04:00
ReinUsesLisp
e860870dd2 shader: Implement LDS, STS, LDL, and STS and use SPIR-V 1.4 when available 2021-07-22 21:51:25 -04:00
ReinUsesLisp
dbd882ddeb shader: Better interpolation and disabled attributes support 2021-07-22 21:51:24 -04:00
ReinUsesLisp
f0031babeb shader: Implement front face 2021-07-22 21:51:24 -04:00
ReinUsesLisp
17063d16a3 shader: Implement TXQ and fix FragDepth 2021-07-22 21:51:24 -04:00
ReinUsesLisp
d9c5bd9509 shader: Refactor PTP and other minor changes 2021-07-22 21:51:24 -04:00
FernandoS27
b5db38f50e shader: Add IR opcode for ImageFetch 2021-07-22 21:51:24 -04:00
FernandoS27
742d11c2ad shader: Implement TLD4.PTP 2021-07-22 21:51:24 -04:00
FernandoS27
c7c518e280 shader: Implement TLD4 and TLD4_B 2021-07-22 21:51:24 -04:00
ameerj
32c5483beb shader: Implement SHFL 2021-07-22 21:51:24 -04:00
ReinUsesLisp
49e87ea8ab shader: Track first bindless argument instead of the instruction itself 2021-07-22 21:51:24 -04:00
FernandoS27
8cb9443cb9 shader: Fix F2I 2021-07-22 21:51:24 -04:00
ameerj
3d07cef009 shader: Implement VOTE 2021-07-22 21:51:24 -04:00
ReinUsesLisp
2be5c7eff4 shader: Fold interpolation multiplications 2021-07-22 21:51:24 -04:00
ameerj
e4e1cc11b8 shader: Implement DMNMX, DSET, DSETP 2021-07-22 21:51:24 -04:00
FernandoS27
a62f04efab shader: Implement F2F 2021-07-22 21:51:24 -04:00
ReinUsesLisp
8b3b9c3371 shader: Add missing fp64 usage flags 2021-07-22 21:51:24 -04:00
ReinUsesLisp
a77e764726 shader: Add support for fp16 comparisons and misc fixes 2021-07-22 21:51:24 -04:00
FernandoS27
27fb97377e shader: Fix floating point comparison for FP16 2021-07-22 21:51:23 -04:00
ReinUsesLisp
76c8a962ac spirv: Implement VertexId and InstanceId, refactor code 2021-07-22 21:51:23 -04:00
ReinUsesLisp
f91859efd2 shader: Implement I2F 2021-07-22 21:51:23 -04:00
ReinUsesLisp
260743f371 shader: Add partial rasterizer integration 2021-07-22 21:51:23 -04:00
ReinUsesLisp
32b6c63485 shader: Reorder phi nodes when redefined as undefined opcodes 2021-07-22 21:51:23 -04:00
ReinUsesLisp
71f96fa636 shader: Implement CAL inlining function calls 2021-07-22 21:51:23 -04:00
ameerj
ba8c1d2eb4 shader: Implement FCMP
still need to configure some settings for NV denorm flush and intel NaN
2021-07-22 21:51:23 -04:00
ReinUsesLisp
3a63fa0477 shader: Partial implementation of LDC 2021-07-22 21:51:23 -04:00
ReinUsesLisp
ab46371247 shader: Initial support for textures and TEX 2021-07-22 21:51:23 -04:00
ReinUsesLisp
4006929c98 shader: Implement HADD2 2021-07-22 21:51:23 -04:00
ameerj
8810c88b7e shader: Implement SEL 2021-07-22 21:51:22 -04:00
ReinUsesLisp
3bc857f2f3 shader: Avoid infinite recursion when tracking global memory 2021-07-22 21:51:22 -04:00
ReinUsesLisp
e44752ddc8 shader: FMUL, select, RRO, and MUFU fixes 2021-07-22 21:51:22 -04:00
ReinUsesLisp
e2bc05b17d shader: Add denorm flush support 2021-07-22 21:51:22 -04:00
ReinUsesLisp
6db69990da spirv: Add lower fp16 to fp32 pass 2021-07-22 21:51:22 -04:00
ReinUsesLisp
58914796c0 shader: Add XMAD multiplication folding optimization 2021-07-22 21:51:22 -04:00
ReinUsesLisp
b5d7279d87 spirv: Initial bindings support 2021-07-22 21:51:22 -04:00
ReinUsesLisp
1c0b8bca5e shader: Fix tracking 2021-07-22 21:51:22 -04:00
ReinUsesLisp
1b0cf2309c shader: Add support for forward declarations 2021-07-22 21:51:22 -04:00
ReinUsesLisp
cbfb7d182a shader: Support SSA loops on IR 2021-07-22 21:51:22 -04:00
ReinUsesLisp
8af9297f09 shader: Misc fixes 2021-07-22 21:51:22 -04:00
ReinUsesLisp
9170200a11 shader: Initial implementation of an AST 2021-07-22 21:51:22 -04:00
ReinUsesLisp
2930dccecc spirv: Initial SPIR-V support 2021-07-22 21:51:22 -04:00
ReinUsesLisp
6dafb08f52 shader: Better constant folding 2021-07-22 21:51:22 -04:00
ReinUsesLisp
da8096e6e3 shader: Properly store phi on Inst 2021-07-22 21:51:21 -04:00
ReinUsesLisp
16cb00c521 shader: Add pools and rename files 2021-07-22 21:51:21 -04:00
ReinUsesLisp
be94ee88d2 shader: Make typed IR 2021-07-22 21:51:21 -04:00
ReinUsesLisp
dc04a50ac2 shader: Remove illegal character in SSA pass 2021-07-22 21:51:21 -04:00
ReinUsesLisp
e81739493a shader: Constant propagation and global memory to storage buffer 2021-07-22 21:51:21 -04:00
ReinUsesLisp
d24a16045f shader: Initial instruction support 2021-07-22 21:51:21 -04:00