ameerj
22a4d26479
shader: Add integer attribute get optimization pass
Works around an nvidia driver bug, where casting the integer attributes to float and back to an integer always returned 0.
4 years ago
ReinUsesLisp
ecc05bdcb6
shader: Fold UnpackFloat2x16 and PackFloat2x16
Simplifies the code a bit when possible. These instructions should be
no-ops codegen wise.
4 years ago
ReinUsesLisp
4f19303fe0
shader: Fold integer FMA from Nvidia's pattern
Fold shaders doing "a * b + c" on integers from the pattern generated by
Nvidia's GL compiler.
On a somewhat complex compute shader it reduces the code size by 16
instructions from 2 matches on Turing GPUs.
On Intel as extracted from KHR_pipeline_executable_properties:
Before the optimization:
```
Instruction Count: 2057
Basic Block Count: 45
Scratch Memory Size: 14752
Spill Count: 232
Fill Count: 261
SEND Count: 610
Cycle Count: 11325
```
After the optimization:
```
Instruction Count: 2046
Basic Block Count: 44
Scratch Memory Size: 13728
Spill Count: 219
Fill Count: 268
SEND Count: 604
Cycle Count: 11367
```
4 years ago
ReinUsesLisp
c6e1483e17
shader: Use TryInstRecursive on XMAD multiply folding
Simplify a bit the logic.
4 years ago
ReinUsesLisp
2321666580
shader: Avoid usage of C++20 ranges to build in clang
5 years ago
ReinUsesLisp
f54fa4a1f5
shader: Add constant propagation to integer vectors
5 years ago
ReinUsesLisp
ca3e927e35
shader: Fix FSwizzleAdd folding when going through phi nodes
5 years ago
ReinUsesLisp
03f6d424ce
glasm: Rework control flow introducing a syntax list
This commit regresses VertexA shaders, their transformation pass has to
be adapted to the new control flow.
5 years ago
ameerj
90ff800962
shader: Fix BFE s32 undefined check
Our unit tests were hitting this exception.
5 years ago
ReinUsesLisp
1f54f1ff26
shader: Fix error checking in bitfieldExtract and implement bitfieldInsert folding
5 years ago
ReinUsesLisp
6236b611cf
shader: Move microinstruction header to the value header
5 years ago
ReinUsesLisp
5c187201ec
shader: Add constant propagation for arithmetic right shifts
5 years ago
FernandoS27
2f01c7fb62
shader: Add coarse derivatives
5 years ago
FernandoS27
b1e325f317
shader: Implement fine derivates constant propagation
5 years ago
ReinUsesLisp
deba5c7666
shader: Add constant propagation for *&^| binary operations
5 years ago
lat9nq
a4e7a41e7f
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>
5 years ago
FernandoS27
741b21715a
shader: Address Feedback
5 years ago
FernandoS27
82698ecb41
shader: Fold composite extract
5 years ago
FernandoS27
5b74fe36ec
shader: Fold comparisons and Pack/Unpack16
5 years ago
ReinUsesLisp
6df3c1a64e
shader: Fix constant propagation to use reverse post order
5 years ago
ReinUsesLisp
4cd2c1588b
shader: Refactor PTP and other minor changes
5 years ago
FernandoS27
f573d3642e
shader: Implement TLD4.PTP
5 years ago
FernandoS27
d4974db16f
shader: Implement TLD4 and TLD4_B
5 years ago
ReinUsesLisp
cdbb207953
shader: Fold interpolation multiplications
5 years ago
ameerj
1a8e8498a4
shader: Implement DMNMX, DSET, DSETP
5 years ago
ReinUsesLisp
db2e9d64aa
shader: Implement CAL inlining function calls
5 years ago
ReinUsesLisp
83c7592d3d
shader: Partial implementation of LDC
5 years ago
ReinUsesLisp
dda21fd317
shader: FMUL, select, RRO, and MUFU fixes
5 years ago
ReinUsesLisp
a2fe90fa60
spirv: Add lower fp16 to fp32 pass
5 years ago
ReinUsesLisp
2bb0069e4e
shader: Add XMAD multiplication folding optimization
5 years ago
ReinUsesLisp
605783f828
spirv: Initial bindings support
5 years ago
ReinUsesLisp
76a3a2510f
shader: Misc fixes
5 years ago
ReinUsesLisp
c4d75e4b78
shader: Initial implementation of an AST
5 years ago
ReinUsesLisp
8e9207253c
shader: Better constant folding
5 years ago
ReinUsesLisp
f5b3324bca
shader: Make typed IR
5 years ago
ReinUsesLisp
37fc39de17
shader: Constant propagation and global memory to storage buffer
5 years ago