mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-12-27 02:10:15 +00:00
01df41dfdb
Format: ``` --set-spec-constant-default-value "<spec id A>:<default value A> <spec id B>:<default value B> ..." ``` Example: shader: `test.vert` ``` layout(constant_id = 100) const int myint = 10; layout(constant_id = 101) const int myuint = 100; layout(constant_id = 200) const float myfloat = 1.25; layout(constant_id = 201) const double mydouble = 2.34; void main() {} ``` command line: ``` spirv-opt --set-spec-const-default-value "100:12 101:200 200:1.2323 201:1.2345" test.vert -o output.spv ``` output: ``` ... OpDecorate %7 SpecId 100 OpDecorate %8 SpecId 101 OpDecorate %10 SpecId 200 OpDecorate %12 SpecId 201 %void = OpTypeVoid %3 = OpTypeFunction %void %int = OpTypeInt 32 1 %7 = OpSpecConstant %int 12 %8 = OpSpecConstant %int 200 %float = OpTypeFloat 32 %10 = OpSpecConstant %float 1.23232 %double = OpTypeFloat 64 %12 = OpSpecConstant %double 2.34232 ... ``` |
||
---|---|---|
.. | ||
as | ||
cfg | ||
dis | ||
emacs | ||
lesspipe | ||
opt | ||
val | ||
CMakeLists.txt | ||
io.h |