SPIRV-Tools/tools
Jaebaek Seo d997c83b10
Add spirv-opt pass to replace descriptor accesses based on variable indices (#4574)
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)
```
2021-10-26 17:20:58 -04:00
..
as Use standard function to get stdin to binary mode. (#4141) 2021-03-01 09:38:49 -05:00
cfg Fix -Wunreachable-code-aggressive. (#4358) 2021-07-14 10:23:59 -04:00
dis Use standard function to get stdin to binary mode. (#4141) 2021-03-01 09:38:49 -05:00
emacs Define variable to skip installation 2017-07-04 12:24:44 -04:00
fuzz spirv-fuzz: Allow inapplicable transformations to be ignored (#4407) 2021-07-28 22:59:37 +01:00
lesspipe tools/lesspipe: Allow generic shell (#2255) 2018-12-27 15:06:37 -05:00
link Use standard function to get stdin to binary mode. (#4141) 2021-03-01 09:38:49 -05:00
lint spirv-lint: add basic CLI argument handling (#4478) 2021-08-18 16:17:03 -04:00
opt Add spirv-opt pass to replace descriptor accesses based on variable indices (#4574) 2021-10-26 17:20:58 -04:00
reduce Use standard function to get stdin to binary mode. (#4141) 2021-03-01 09:38:49 -05:00
sva Bump glob-parent from 5.0.0 to 5.1.2. (#4353) 2021-06-29 11:25:32 -04:00
util Fix header include syntax. (#2882) 2019-09-19 09:26:24 -05:00
val Add a feature for allowing LocalSizeId (#4492) 2021-08-26 14:33:19 -04:00
CMakeLists.txt Add new target for spirv-lint (#4446) 2021-08-06 14:03:59 -04:00
io.h fix SIGSEGV when reading from a non-existant file (#4453) 2021-08-16 09:44:22 -04:00