aboutsummaryrefslogtreecommitdiff
path: root/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp
AgeCommit message (Collapse)Author
2022-03-20shader_recompiler: Reduce unused includesameerj
2021-12-29shader: Add integer attribute get optimization passameerj
Works around an nvidia driver bug, where casting the integer attributes to float and back to an integer always returned 0.
2021-07-30Merge pull request #6767 from ReinUsesLisp/fold-float-packMorph
shader: Fold UnpackFloat2x16 and PackFloat2x16
2021-07-29shader: Fold UnpackFloat2x16 and PackFloat2x16ReinUsesLisp
Simplifies the code a bit when possible. These instructions should be no-ops codegen wise.
2021-07-26shader: Fold integer FMA from Nvidia's patternReinUsesLisp
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 ```
2021-07-26shader: Use TryInstRecursive on XMAD multiply foldingReinUsesLisp
Simplify a bit the logic.
2021-07-22shader: Avoid usage of C++20 ranges to build in clangReinUsesLisp
2021-07-22shader: Add constant propagation to integer vectorsReinUsesLisp
2021-07-22shader: Fix FSwizzleAdd folding when going through phi nodesReinUsesLisp
2021-07-22glasm: Rework control flow introducing a syntax listReinUsesLisp
This commit regresses VertexA shaders, their transformation pass has to be adapted to the new control flow.
2021-07-22shader: Fix BFE s32 undefined checkameerj
Our unit tests were hitting this exception.
2021-07-22shader: Fix error checking in bitfieldExtract and implement bitfieldInsert ↵ReinUsesLisp
folding
2021-07-22shader: Move microinstruction header to the value headerReinUsesLisp
2021-07-22shader: Add constant propagation for arithmetic right shiftsReinUsesLisp
2021-07-22shader: Add coarse derivativesFernandoS27
2021-07-22shader: Implement fine derivates constant propagationFernandoS27
2021-07-22shader: Add constant propagation for *&^| binary operationsReinUsesLisp
2021-07-22shader_recompiler,video_core: Cleanup some GCC and Clang errorslat9nq
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-22shader: Address FeedbackFernandoS27
2021-07-22shader: Fold composite extractFernandoS27
2021-07-22shader: Fold comparisons and Pack/Unpack16FernandoS27
2021-07-22shader: Fix constant propagation to use reverse post orderReinUsesLisp
2021-07-22shader: Refactor PTP and other minor changesReinUsesLisp
2021-07-22shader: Implement TLD4.PTPFernandoS27
2021-07-22shader: Implement TLD4 and TLD4_BFernandoS27
2021-07-22shader: Fold interpolation multiplicationsReinUsesLisp
2021-07-22shader: Implement DMNMX, DSET, DSETPameerj
2021-07-22shader: Implement CAL inlining function callsReinUsesLisp
2021-07-22shader: Partial implementation of LDCReinUsesLisp
2021-07-22shader: FMUL, select, RRO, and MUFU fixesReinUsesLisp
2021-07-22spirv: Add lower fp16 to fp32 passReinUsesLisp
2021-07-22shader: Add XMAD multiplication folding optimizationReinUsesLisp
2021-07-22spirv: Initial bindings supportReinUsesLisp
2021-07-22shader: Misc fixesReinUsesLisp
2021-07-22shader: Initial implementation of an ASTReinUsesLisp
2021-07-22shader: Better constant foldingReinUsesLisp
2021-07-22shader: Make typed IRReinUsesLisp
2021-07-22shader: Constant propagation and global memory to storage bufferReinUsesLisp