mirror of
https://github.com/RPCSX/SPIRV-Tools.git
synced 2024-12-04 01:11:44 +00:00
d997c83b10
This commit adds a spirv-opt pass to replace accesses to descriptor array based on variable indices with constant elements. Before: ``` %descriptor = OpVariable %_ptr_array_Image Uniform ... %ac = OpAccessChain %_ptr_Image %descriptor %variable_index (some image instructions using %ac) ``` After: ``` %descriptor = OpVariable %_ptr_array_Image Uniform ... OpSwitch %variable_index 0 %case0 1 %case1 ... ... %case0 = OpLabel %ac = OpAccessChain %_ptr_Image %descriptor %uint_0 ... %case1 = OpLabel %ac = OpAccessChain %_ptr_Image %descriptor %uint_1 ... (use OpPhi for value with concrete type) ``` |
||
---|---|---|
.. | ||
as | ||
cfg | ||
dis | ||
emacs | ||
fuzz | ||
lesspipe | ||
link | ||
lint | ||
opt | ||
reduce | ||
sva | ||
util | ||
val | ||
CMakeLists.txt | ||
io.h |