dawn-cmake/test/bug/tint/1321.wgsl.expected.spvasm
Ben Clayton 0079a597e6 test: Add a test case for tint:1321
It's surprising that the fuzzers didn't find this, but I've confirmed that at least one of the fuzzers will fail with this case.
By adding a e2e test case, this will be used as a seed for the fuzzer corpus.

Bug: tint:1321
Change-Id: Ibf4bfa50bf376ae4cba401dfc31a2498fa3b9eec
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70982
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-11-25 18:02:36 +00:00

48 lines
1.6 KiB
Plaintext

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 25
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main"
OpExecutionMode %main OriginUpperLeft
OpName %foo "foo"
OpName %main "main"
OpName %arr "arr"
OpDecorate %_arr_float_uint_4 ArrayStride 4
%int = OpTypeInt 32 1
%1 = OpTypeFunction %int
%int_1 = OpConstant %int 1
%void = OpTypeVoid
%6 = OpTypeFunction %void
%float = OpTypeFloat 32
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_float_uint_4 = OpTypeArray %float %uint_4
%14 = OpConstantNull %_arr_float_uint_4
%_ptr_Function__arr_float_uint_4 = OpTypePointer Function %_arr_float_uint_4
%_ptr_Function_float = OpTypePointer Function %float
%foo = OpFunction %int None %1
%4 = OpLabel
OpReturnValue %int_1
OpFunctionEnd
%main = OpFunction %void None %6
%9 = OpLabel
%arr = OpVariable %_ptr_Function__arr_float_uint_4 Function %14
OpStore %arr %14
%17 = OpFunctionCall %int %foo
OpBranch %18
%18 = OpLabel
OpLoopMerge %19 %20 None
OpBranch %21
%21 = OpLabel
%23 = OpAccessChain %_ptr_Function_float %arr %17
%24 = OpLoad %float %23
OpBranch %19
%20 = OpLabel
OpBranch %18
%19 = OpLabel
OpReturn
OpFunctionEnd