dawn-cmake/test/tint/var/override/named/zero_init/i32.wgsl.expected.spvasm
dan sinclair 256f1116b8 Add transform to substitute overrides with const expressions.
This CL adds a SubstituteOverride transform which will convert
an `override` into a `const`. The transform is provided a map of
(string, double) which matches what the WebGPU API accepts as
data for overrides.

Bug: tint:1582
Change-Id: I6e6bf51b98ce4d4746f8de55128666c36735e585
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96760
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-07-22 16:05:06 +00:00

27 lines
807 B
Plaintext

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 12
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpName %main "main"
%void = OpTypeVoid
%1 = OpTypeFunction %void
%int = OpTypeInt 32 1
%6 = OpConstantNull %int
%int_2 = OpConstant %int 2
%bool = OpTypeBool
%main = OpFunction %void None %1
%4 = OpLabel
%8 = OpIEqual %bool %6 %int_2
OpSelectionMerge %10 None
OpBranchConditional %8 %11 %10
%11 = OpLabel
OpBranch %10
%10 = OpLabel
OpReturn
OpFunctionEnd