spirv: Implement compound assignment

Use the ExpandCompoundAssignment transform to convert compound
assignments to regular assignments.

Bug: tint:1325
Change-Id: I193a09815836755bc1f7138fe1947be39f7b7206
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/85285
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: James Price <jrprice@google.com>
This commit is contained in:
James Price 2022-03-31 22:30:10 +00:00
parent 508a9660a5
commit 16eeff387c
33 changed files with 1550 additions and 489 deletions

View File

@ -45,6 +45,7 @@
#include "src/tint/transform/add_spirv_block_attribute.h"
#include "src/tint/transform/builtin_polyfill.h"
#include "src/tint/transform/canonicalize_entry_point_io.h"
#include "src/tint/transform/expand_compound_assignment.h"
#include "src/tint/transform/fold_constants.h"
#include "src/tint/transform/for_loop_to_loop.h"
#include "src/tint/transform/manager.h"
@ -279,6 +280,7 @@ SanitizedResult Sanitize(const Program* in,
manager.Add<transform::ZeroInitWorkgroupMemory>();
}
manager.Add<transform::RemoveUnreachableStatements>();
manager.Add<transform::ExpandCompoundAssignment>();
manager.Add<transform::PromoteSideEffectsToDecl>();
manager.Add<transform::UnwindDiscardFunctions>();
manager.Add<transform::SimplifyPointers>(); // Required for arrayLength()

View File

@ -1,26 +1,71 @@
SKIP: FAILED
struct S {
a : array<vec4<i32>, 4>,
}
var<private> counter : i32;
fn foo() -> i32 {
counter += 1;
return counter;
}
fn bar() -> i32 {
counter += 2;
return counter;
}
fn main() {
var x = S();
let p = &(x);
(*(p)).a[foo()][bar()] += 5;
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 41
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %counter "counter"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpName %bar "bar"
OpName %main "main"
OpName %S "S"
OpMemberName %S 0 "a"
OpName %x "x"
OpMemberDecorate %S 0 Offset 0
OpDecorate %_arr_v4int_uint_4 ArrayStride 16
%int = OpTypeInt 32 1
%_ptr_Private_int = OpTypePointer Private %int
%4 = OpConstantNull %int
%counter = OpVariable %_ptr_Private_int Private %4
%void = OpTypeVoid
%5 = OpTypeFunction %void
%9 = OpTypeFunction %int
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%v4int = OpTypeVector %int 4
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_v4int_uint_4 = OpTypeArray %v4int %uint_4
%S = OpTypeStruct %_arr_v4int_uint_4
%29 = OpConstantNull %S
%_ptr_Function_S = OpTypePointer Function %S
%uint_0 = OpConstant %uint 0
%_ptr_Function_int = OpTypePointer Function %int
%int_5 = OpConstant %int 5
%unused_entry_point = OpFunction %void None %5
%8 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %int None %9
%11 = OpLabel
%12 = OpLoad %int %counter
%14 = OpIAdd %int %12 %int_1
OpStore %counter %14
%15 = OpLoad %int %counter
OpReturnValue %15
OpFunctionEnd
%bar = OpFunction %int None %9
%17 = OpLabel
%18 = OpLoad %int %counter
%20 = OpIAdd %int %18 %int_2
OpStore %counter %20
%21 = OpLoad %int %counter
OpReturnValue %21
OpFunctionEnd
%main = OpFunction %void None %5
%23 = OpLabel
%x = OpVariable %_ptr_Function_S Function %29
OpStore %x %29
%32 = OpFunctionCall %int %foo
%33 = OpFunctionCall %int %bar
%36 = OpAccessChain %_ptr_Function_int %x %uint_0 %32 %33
%37 = OpAccessChain %_ptr_Function_int %x %uint_0 %32 %33
%38 = OpLoad %int %37
%40 = OpIAdd %int %38 %int_5
OpStore %36 %40
OpReturn
OpFunctionEnd

View File

@ -1,19 +1,62 @@
SKIP: FAILED
var<private> a : i32;
var<private> b : f32;
fn foo(maybe_zero : i32) {
a /= 0;
a %= 0;
a /= maybe_zero;
a %= maybe_zero;
b /= 0.0;
b %= 0.0;
b /= f32(maybe_zero);
b %= f32(maybe_zero);
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 37
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %a "a"
OpName %b "b"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpName %maybe_zero "maybe_zero"
%int = OpTypeInt 32 1
%_ptr_Private_int = OpTypePointer Private %int
%4 = OpConstantNull %int
%a = OpVariable %_ptr_Private_int Private %4
%float = OpTypeFloat 32
%_ptr_Private_float = OpTypePointer Private %float
%8 = OpConstantNull %float
%b = OpVariable %_ptr_Private_float Private %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%13 = OpTypeFunction %void %int
%int_0 = OpConstant %int 0
%float_0 = OpConstant %float 0
%unused_entry_point = OpFunction %void None %9
%12 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %13
%maybe_zero = OpFunctionParameter %int
%16 = OpLabel
%17 = OpLoad %int %a
%19 = OpSDiv %int %17 %int_0
OpStore %a %19
%20 = OpLoad %int %a
%21 = OpSMod %int %20 %int_0
OpStore %a %21
%22 = OpLoad %int %a
%23 = OpSDiv %int %22 %maybe_zero
OpStore %a %23
%24 = OpLoad %int %a
%25 = OpSMod %int %24 %maybe_zero
OpStore %a %25
%26 = OpLoad %float %b
%28 = OpFDiv %float %26 %float_0
OpStore %b %28
%29 = OpLoad %float %b
%30 = OpFRem %float %29 %float_0
OpStore %b %30
%31 = OpLoad %float %b
%32 = OpConvertSToF %float %maybe_zero
%33 = OpFDiv %float %31 %32
OpStore %b %33
%34 = OpLoad %float %b
%35 = OpConvertSToF %float %maybe_zero
%36 = OpFRem %float %34 %35
OpStore %b %36
OpReturn
OpFunctionEnd

View File

@ -1,35 +1,120 @@
SKIP: FAILED
struct S {
a : i32,
b : vec4<f32>,
c : mat2x2<f32>,
}
@group(0) @binding(0) var<storage, read_write> v : S;
var<private> i : u32;
fn idx1() -> i32 {
i += 1u;
return 1;
}
fn idx2() -> i32 {
i += 2u;
return 1;
}
fn idx3() -> i32 {
i += 3u;
return 1;
}
fn foo() {
var a = array<f32, 4>();
for(a[idx1()] *= 2.0; (a[idx2()] < 10.0); a[idx3()] += 1.0) {
}
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 67
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpMemberName %S 1 "b"
OpMemberName %S 2 "c"
OpName %v "v"
OpName %i "i"
OpName %unused_entry_point "unused_entry_point"
OpName %idx1 "idx1"
OpName %idx2 "idx2"
OpName %idx3 "idx3"
OpName %foo "foo"
OpName %a "a"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %S 1 Offset 16
OpMemberDecorate %S 2 Offset 32
OpMemberDecorate %S 2 ColMajor
OpMemberDecorate %S 2 MatrixStride 8
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
OpDecorate %_arr_float_uint_4 ArrayStride 4
%int = OpTypeInt 32 1
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%v2float = OpTypeVector %float 2
%mat2v2float = OpTypeMatrix %v2float 2
%S = OpTypeStruct %int %v4float %mat2v2float
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%uint = OpTypeInt 32 0
%_ptr_Private_uint = OpTypePointer Private %uint
%12 = OpConstantNull %uint
%i = OpVariable %_ptr_Private_uint Private %12
%void = OpTypeVoid
%13 = OpTypeFunction %void
%17 = OpTypeFunction %int
%uint_1 = OpConstant %uint 1
%int_1 = OpConstant %int 1
%uint_2 = OpConstant %uint 2
%uint_3 = OpConstant %uint 3
%uint_4 = OpConstant %uint 4
%_arr_float_uint_4 = OpTypeArray %float %uint_4
%38 = OpConstantNull %_arr_float_uint_4
%_ptr_Function__arr_float_uint_4 = OpTypePointer Function %_arr_float_uint_4
%_ptr_Function_float = OpTypePointer Function %float
%float_2 = OpConstant %float 2
%float_10 = OpConstant %float 10
%bool = OpTypeBool
%float_1 = OpConstant %float 1
%unused_entry_point = OpFunction %void None %13
%16 = OpLabel
OpReturn
OpFunctionEnd
%idx1 = OpFunction %int None %17
%19 = OpLabel
%20 = OpLoad %uint %i
%22 = OpIAdd %uint %20 %uint_1
OpStore %i %22
OpReturnValue %int_1
OpFunctionEnd
%idx2 = OpFunction %int None %17
%25 = OpLabel
%26 = OpLoad %uint %i
%28 = OpIAdd %uint %26 %uint_2
OpStore %i %28
OpReturnValue %int_1
OpFunctionEnd
%idx3 = OpFunction %int None %17
%30 = OpLabel
%31 = OpLoad %uint %i
%33 = OpIAdd %uint %31 %uint_3
OpStore %i %33
OpReturnValue %int_1
OpFunctionEnd
%foo = OpFunction %void None %13
%35 = OpLabel
%a = OpVariable %_ptr_Function__arr_float_uint_4 Function %38
OpStore %a %38
%41 = OpFunctionCall %int %idx1
%43 = OpAccessChain %_ptr_Function_float %a %41
%44 = OpAccessChain %_ptr_Function_float %a %41
%45 = OpLoad %float %44
%47 = OpFMul %float %45 %float_2
OpStore %43 %47
OpBranch %48
%48 = OpLabel
OpLoopMerge %49 %50 None
OpBranch %51
%51 = OpLabel
%52 = OpFunctionCall %int %idx2
%54 = OpAccessChain %_ptr_Function_float %a %52
%55 = OpLoad %float %54
%57 = OpFOrdLessThan %bool %55 %float_10
%53 = OpLogicalNot %bool %57
OpSelectionMerge %59 None
OpBranchConditional %53 %60 %59
%60 = OpLabel
OpBranch %49
%59 = OpLabel
OpBranch %50
%50 = OpLabel
%61 = OpFunctionCall %int %idx3
%62 = OpAccessChain %_ptr_Function_float %a %61
%63 = OpAccessChain %_ptr_Function_float %a %61
%64 = OpLoad %float %63
%66 = OpFAdd %float %64 %float_1
OpStore %62 %66
OpBranch %48
%49 = OpLabel
OpReturn
OpFunctionEnd

View File

@ -1,13 +1,51 @@
SKIP: FAILED
fn foo() {
var<function> a : i32;
var<function> b : vec4<f32>;
var<function> c : mat2x2<f32>;
a /= 2;
b *= mat4x4<f32>();
c *= 2.0;
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 31
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpName %a "a"
OpName %b "b"
OpName %c "c"
%void = OpTypeVoid
%1 = OpTypeFunction %void
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%10 = OpConstantNull %int
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Function_v4float = OpTypePointer Function %v4float
%15 = OpConstantNull %v4float
%v2float = OpTypeVector %float 2
%mat2v2float = OpTypeMatrix %v2float 2
%_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float
%20 = OpConstantNull %mat2v2float
%int_2 = OpConstant %int 2
%mat4v4float = OpTypeMatrix %v4float 4
%26 = OpConstantNull %mat4v4float
%float_2 = OpConstant %float 2
%unused_entry_point = OpFunction %void None %1
%4 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %1
%6 = OpLabel
%a = OpVariable %_ptr_Function_int Function %10
%b = OpVariable %_ptr_Function_v4float Function %15
%c = OpVariable %_ptr_Function_mat2v2float Function %20
%21 = OpLoad %int %a
%23 = OpSDiv %int %21 %int_2
OpStore %a %23
%24 = OpLoad %v4float %b
%27 = OpVectorTimesMatrix %v4float %24 %26
OpStore %b %27
%28 = OpLoad %mat2v2float %c
%30 = OpMatrixTimesScalar %mat2v2float %28 %float_2
OpStore %c %30
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,57 @@
SKIP: FAILED
struct S {
a : mat4x4<f32>,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a -= mat4x4<f32>();
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 34
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %S 0 ColMajor
OpMemberDecorate %S 0 MatrixStride 16
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%mat4v4float = OpTypeMatrix %v4float 4
%S = OpTypeStruct %mat4v4float
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%7 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_mat4v4float = OpTypePointer StorageBuffer %mat4v4float
%19 = OpConstantNull %mat4v4float
%unused_entry_point = OpFunction %void None %7
%10 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %7
%12 = OpLabel
%16 = OpAccessChain %_ptr_StorageBuffer_mat4v4float %v %uint_0
%17 = OpAccessChain %_ptr_StorageBuffer_mat4v4float %v %uint_0
%18 = OpLoad %mat4v4float %17
%21 = OpCompositeExtract %v4float %18 0
%22 = OpCompositeExtract %v4float %19 0
%23 = OpFSub %v4float %21 %22
%24 = OpCompositeExtract %v4float %18 1
%25 = OpCompositeExtract %v4float %19 1
%26 = OpFSub %v4float %24 %25
%27 = OpCompositeExtract %v4float %18 2
%28 = OpCompositeExtract %v4float %19 2
%29 = OpFSub %v4float %27 %28
%30 = OpCompositeExtract %v4float %18 3
%31 = OpCompositeExtract %v4float %19 3
%32 = OpFSub %v4float %30 %31
%33 = OpCompositeConstruct %mat4v4float %23 %26 %29 %32
OpStore %16 %33
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,57 @@
SKIP: FAILED
struct S {
a : mat4x4<f32>,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a += mat4x4<f32>();
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 34
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %S 0 ColMajor
OpMemberDecorate %S 0 MatrixStride 16
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%mat4v4float = OpTypeMatrix %v4float 4
%S = OpTypeStruct %mat4v4float
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%7 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_mat4v4float = OpTypePointer StorageBuffer %mat4v4float
%19 = OpConstantNull %mat4v4float
%unused_entry_point = OpFunction %void None %7
%10 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %7
%12 = OpLabel
%16 = OpAccessChain %_ptr_StorageBuffer_mat4v4float %v %uint_0
%17 = OpAccessChain %_ptr_StorageBuffer_mat4v4float %v %uint_0
%18 = OpLoad %mat4v4float %17
%21 = OpCompositeExtract %v4float %18 0
%22 = OpCompositeExtract %v4float %19 0
%23 = OpFAdd %v4float %21 %22
%24 = OpCompositeExtract %v4float %18 1
%25 = OpCompositeExtract %v4float %19 1
%26 = OpFAdd %v4float %24 %25
%27 = OpCompositeExtract %v4float %18 2
%28 = OpCompositeExtract %v4float %19 2
%29 = OpFAdd %v4float %27 %28
%30 = OpCompositeExtract %v4float %18 3
%31 = OpCompositeExtract %v4float %19 3
%32 = OpFAdd %v4float %30 %31
%33 = OpCompositeConstruct %mat4v4float %23 %26 %29 %32
OpStore %16 %33
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,45 @@
SKIP: FAILED
struct S {
a : mat4x4<f32>,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a *= 2.0;
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 21
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %S 0 ColMajor
OpMemberDecorate %S 0 MatrixStride 16
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%mat4v4float = OpTypeMatrix %v4float 4
%S = OpTypeStruct %mat4v4float
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%7 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_mat4v4float = OpTypePointer StorageBuffer %mat4v4float
%float_2 = OpConstant %float 2
%unused_entry_point = OpFunction %void None %7
%10 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %7
%12 = OpLabel
%16 = OpAccessChain %_ptr_StorageBuffer_mat4v4float %v %uint_0
%17 = OpAccessChain %_ptr_StorageBuffer_mat4v4float %v %uint_0
%18 = OpLoad %mat4v4float %17
%20 = OpMatrixTimesScalar %mat4v4float %18 %float_2
OpStore %16 %20
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,45 @@
SKIP: FAILED
struct S {
a : mat4x4<f32>,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a *= mat4x4<f32>();
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 21
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %S 0 ColMajor
OpMemberDecorate %S 0 MatrixStride 16
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%mat4v4float = OpTypeMatrix %v4float 4
%S = OpTypeStruct %mat4v4float
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%7 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_mat4v4float = OpTypePointer StorageBuffer %mat4v4float
%19 = OpConstantNull %mat4v4float
%unused_entry_point = OpFunction %void None %7
%10 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %7
%12 = OpLabel
%16 = OpAccessChain %_ptr_StorageBuffer_mat4v4float %v %uint_0
%17 = OpAccessChain %_ptr_StorageBuffer_mat4v4float %v %uint_0
%18 = OpLoad %mat4v4float %17
%20 = OpMatrixTimesMatrix %mat4v4float %18 %19
OpStore %16 %20
OpReturn
OpFunctionEnd

View File

@ -1,16 +1,51 @@
SKIP: FAILED
var<private> a : i32;
var<private> b : vec4<f32>;
var<private> c : mat2x2<f32>;
fn foo() {
a /= 2;
b *= mat4x4<f32>();
c *= 2.0;
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 31
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %a "a"
OpName %b "b"
OpName %c "c"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
%int = OpTypeInt 32 1
%_ptr_Private_int = OpTypePointer Private %int
%4 = OpConstantNull %int
%a = OpVariable %_ptr_Private_int Private %4
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%9 = OpConstantNull %v4float
%b = OpVariable %_ptr_Private_v4float Private %9
%v2float = OpTypeVector %float 2
%mat2v2float = OpTypeMatrix %v2float 2
%_ptr_Private_mat2v2float = OpTypePointer Private %mat2v2float
%14 = OpConstantNull %mat2v2float
%c = OpVariable %_ptr_Private_mat2v2float Private %14
%void = OpTypeVoid
%15 = OpTypeFunction %void
%int_2 = OpConstant %int 2
%mat4v4float = OpTypeMatrix %v4float 4
%26 = OpConstantNull %mat4v4float
%float_2 = OpConstant %float 2
%unused_entry_point = OpFunction %void None %15
%18 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %15
%20 = OpLabel
%21 = OpLoad %int %a
%23 = OpSDiv %int %21 %int_2
OpStore %a %23
%24 = OpLoad %v4float %b
%27 = OpVectorTimesMatrix %v4float %24 %26
OpStore %b %27
%28 = OpLoad %mat2v2float %c
%30 = OpMatrixTimesScalar %mat2v2float %28 %float_2
OpStore %c %30
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,41 @@
SKIP: FAILED
struct S {
a : i32,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a &= 2;
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 19
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%int = OpTypeInt 32 1
%S = OpTypeStruct %int
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%5 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%int_2 = OpConstant %int 2
%unused_entry_point = OpFunction %void None %5
%8 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %5
%10 = OpLabel
%14 = OpAccessChain %_ptr_StorageBuffer_int %v %uint_0
%15 = OpAccessChain %_ptr_StorageBuffer_int %v %uint_0
%16 = OpLoad %int %15
%18 = OpBitwiseAnd %int %16 %int_2
OpStore %14 %18
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,41 @@
SKIP: FAILED
struct S {
a : i32,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a /= 2;
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 19
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%int = OpTypeInt 32 1
%S = OpTypeStruct %int
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%5 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%int_2 = OpConstant %int 2
%unused_entry_point = OpFunction %void None %5
%8 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %5
%10 = OpLabel
%14 = OpAccessChain %_ptr_StorageBuffer_int %v %uint_0
%15 = OpAccessChain %_ptr_StorageBuffer_int %v %uint_0
%16 = OpLoad %int %15
%18 = OpSDiv %int %16 %int_2
OpStore %14 %18
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,41 @@
SKIP: FAILED
struct S {
a : i32,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a -= 2;
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 19
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%int = OpTypeInt 32 1
%S = OpTypeStruct %int
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%5 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%int_2 = OpConstant %int 2
%unused_entry_point = OpFunction %void None %5
%8 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %5
%10 = OpLabel
%14 = OpAccessChain %_ptr_StorageBuffer_int %v %uint_0
%15 = OpAccessChain %_ptr_StorageBuffer_int %v %uint_0
%16 = OpLoad %int %15
%18 = OpISub %int %16 %int_2
OpStore %14 %18
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,41 @@
SKIP: FAILED
struct S {
a : i32,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a %= 2;
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 19
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%int = OpTypeInt 32 1
%S = OpTypeStruct %int
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%5 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%int_2 = OpConstant %int 2
%unused_entry_point = OpFunction %void None %5
%8 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %5
%10 = OpLabel
%14 = OpAccessChain %_ptr_StorageBuffer_int %v %uint_0
%15 = OpAccessChain %_ptr_StorageBuffer_int %v %uint_0
%16 = OpLoad %int %15
%18 = OpSMod %int %16 %int_2
OpStore %14 %18
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,41 @@
SKIP: FAILED
struct S {
a : i32,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a |= 2;
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 19
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%int = OpTypeInt 32 1
%S = OpTypeStruct %int
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%5 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%int_2 = OpConstant %int 2
%unused_entry_point = OpFunction %void None %5
%8 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %5
%10 = OpLabel
%14 = OpAccessChain %_ptr_StorageBuffer_int %v %uint_0
%15 = OpAccessChain %_ptr_StorageBuffer_int %v %uint_0
%16 = OpLoad %int %15
%18 = OpBitwiseOr %int %16 %int_2
OpStore %14 %18
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,41 @@
SKIP: FAILED
struct S {
a : i32,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a += 2;
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 19
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%int = OpTypeInt 32 1
%S = OpTypeStruct %int
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%5 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%int_2 = OpConstant %int 2
%unused_entry_point = OpFunction %void None %5
%8 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %5
%10 = OpLabel
%14 = OpAccessChain %_ptr_StorageBuffer_int %v %uint_0
%15 = OpAccessChain %_ptr_StorageBuffer_int %v %uint_0
%16 = OpLoad %int %15
%18 = OpIAdd %int %16 %int_2
OpStore %14 %18
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,41 @@
SKIP: FAILED
struct S {
a : i32,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a *= 2;
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 19
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%int = OpTypeInt 32 1
%S = OpTypeStruct %int
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%5 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%int_2 = OpConstant %int 2
%unused_entry_point = OpFunction %void None %5
%8 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %5
%10 = OpLabel
%14 = OpAccessChain %_ptr_StorageBuffer_int %v %uint_0
%15 = OpAccessChain %_ptr_StorageBuffer_int %v %uint_0
%16 = OpLoad %int %15
%18 = OpIMul %int %16 %int_2
OpStore %14 %18
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,41 @@
SKIP: FAILED
struct S {
a : i32,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a ^= 2;
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 19
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%int = OpTypeInt 32 1
%S = OpTypeStruct %int
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%5 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%int_2 = OpConstant %int 2
%unused_entry_point = OpFunction %void None %5
%8 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %5
%10 = OpLabel
%14 = OpAccessChain %_ptr_StorageBuffer_int %v %uint_0
%15 = OpAccessChain %_ptr_StorageBuffer_int %v %uint_0
%16 = OpLoad %int %15
%18 = OpBitwiseXor %int %16 %int_2
OpStore %14 %18
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,43 @@
SKIP: FAILED
struct S {
a : vec4<i32>,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a &= vec4<i32>(2);
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 21
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%int = OpTypeInt 32 1
%v4int = OpTypeVector %int 4
%S = OpTypeStruct %v4int
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%6 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%int_2 = OpConstant %int 2
%19 = OpConstantComposite %v4int %int_2 %int_2 %int_2 %int_2
%unused_entry_point = OpFunction %void None %6
%9 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %6
%11 = OpLabel
%15 = OpAccessChain %_ptr_StorageBuffer_v4int %v %uint_0
%16 = OpAccessChain %_ptr_StorageBuffer_v4int %v %uint_0
%17 = OpLoad %v4int %16
%20 = OpBitwiseAnd %v4int %17 %19
OpStore %15 %20
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,46 @@
SKIP: FAILED
struct S {
a : vec4<f32>,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a /= 2.0;
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 24
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%S = OpTypeStruct %v4float
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%6 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
%float_2 = OpConstant %float 2
%_ptr_Function_v4float = OpTypePointer Function %v4float
%22 = OpConstantNull %v4float
%unused_entry_point = OpFunction %void None %6
%9 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %6
%11 = OpLabel
%20 = OpVariable %_ptr_Function_v4float Function %22
%15 = OpAccessChain %_ptr_StorageBuffer_v4float %v %uint_0
%16 = OpAccessChain %_ptr_StorageBuffer_v4float %v %uint_0
%17 = OpLoad %v4float %16
%23 = OpCompositeConstruct %v4float %float_2 %float_2 %float_2 %float_2
%19 = OpFDiv %v4float %17 %23
OpStore %15 %19
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,43 @@
SKIP: FAILED
struct S {
a : vec4<i32>,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a /= vec4<i32>(2);
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 21
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%int = OpTypeInt 32 1
%v4int = OpTypeVector %int 4
%S = OpTypeStruct %v4int
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%6 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%int_2 = OpConstant %int 2
%19 = OpConstantComposite %v4int %int_2 %int_2 %int_2 %int_2
%unused_entry_point = OpFunction %void None %6
%9 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %6
%11 = OpLabel
%15 = OpAccessChain %_ptr_StorageBuffer_v4int %v %uint_0
%16 = OpAccessChain %_ptr_StorageBuffer_v4int %v %uint_0
%17 = OpLoad %v4int %16
%20 = OpSDiv %v4int %17 %19
OpStore %15 %20
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,46 @@
SKIP: FAILED
struct S {
a : vec4<f32>,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a -= 2.0;
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 24
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%S = OpTypeStruct %v4float
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%6 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
%float_2 = OpConstant %float 2
%_ptr_Function_v4float = OpTypePointer Function %v4float
%22 = OpConstantNull %v4float
%unused_entry_point = OpFunction %void None %6
%9 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %6
%11 = OpLabel
%20 = OpVariable %_ptr_Function_v4float Function %22
%15 = OpAccessChain %_ptr_StorageBuffer_v4float %v %uint_0
%16 = OpAccessChain %_ptr_StorageBuffer_v4float %v %uint_0
%17 = OpLoad %v4float %16
%23 = OpCompositeConstruct %v4float %float_2 %float_2 %float_2 %float_2
%19 = OpFSub %v4float %17 %23
OpStore %15 %19
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,43 @@
SKIP: FAILED
struct S {
a : vec4<i32>,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a -= vec4<i32>(2);
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 21
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%int = OpTypeInt 32 1
%v4int = OpTypeVector %int 4
%S = OpTypeStruct %v4int
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%6 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%int_2 = OpConstant %int 2
%19 = OpConstantComposite %v4int %int_2 %int_2 %int_2 %int_2
%unused_entry_point = OpFunction %void None %6
%9 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %6
%11 = OpLabel
%15 = OpAccessChain %_ptr_StorageBuffer_v4int %v %uint_0
%16 = OpAccessChain %_ptr_StorageBuffer_v4int %v %uint_0
%17 = OpLoad %v4int %16
%20 = OpISub %v4int %17 %19
OpStore %15 %20
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,46 @@
SKIP: FAILED
struct S {
a : vec4<i32>,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a %= 2;
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 24
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%int = OpTypeInt 32 1
%v4int = OpTypeVector %int 4
%S = OpTypeStruct %v4int
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%6 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%int_2 = OpConstant %int 2
%_ptr_Function_v4int = OpTypePointer Function %v4int
%22 = OpConstantNull %v4int
%unused_entry_point = OpFunction %void None %6
%9 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %6
%11 = OpLabel
%20 = OpVariable %_ptr_Function_v4int Function %22
%15 = OpAccessChain %_ptr_StorageBuffer_v4int %v %uint_0
%16 = OpAccessChain %_ptr_StorageBuffer_v4int %v %uint_0
%17 = OpLoad %v4int %16
%23 = OpCompositeConstruct %v4int %int_2 %int_2 %int_2 %int_2
%19 = OpSMod %v4int %17 %23
OpStore %15 %19
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,43 @@
SKIP: FAILED
struct S {
a : vec4<i32>,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a %= vec4<i32>(2);
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 21
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%int = OpTypeInt 32 1
%v4int = OpTypeVector %int 4
%S = OpTypeStruct %v4int
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%6 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%int_2 = OpConstant %int 2
%19 = OpConstantComposite %v4int %int_2 %int_2 %int_2 %int_2
%unused_entry_point = OpFunction %void None %6
%9 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %6
%11 = OpLabel
%15 = OpAccessChain %_ptr_StorageBuffer_v4int %v %uint_0
%16 = OpAccessChain %_ptr_StorageBuffer_v4int %v %uint_0
%17 = OpLoad %v4int %16
%20 = OpSMod %v4int %17 %19
OpStore %15 %20
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,43 @@
SKIP: FAILED
struct S {
a : vec4<i32>,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a |= vec4<i32>(2);
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 21
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%int = OpTypeInt 32 1
%v4int = OpTypeVector %int 4
%S = OpTypeStruct %v4int
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%6 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%int_2 = OpConstant %int 2
%19 = OpConstantComposite %v4int %int_2 %int_2 %int_2 %int_2
%unused_entry_point = OpFunction %void None %6
%9 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %6
%11 = OpLabel
%15 = OpAccessChain %_ptr_StorageBuffer_v4int %v %uint_0
%16 = OpAccessChain %_ptr_StorageBuffer_v4int %v %uint_0
%17 = OpLoad %v4int %16
%20 = OpBitwiseOr %v4int %17 %19
OpStore %15 %20
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,46 @@
SKIP: FAILED
struct S {
a : vec4<f32>,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a += 2.0;
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 24
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%S = OpTypeStruct %v4float
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%6 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
%float_2 = OpConstant %float 2
%_ptr_Function_v4float = OpTypePointer Function %v4float
%22 = OpConstantNull %v4float
%unused_entry_point = OpFunction %void None %6
%9 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %6
%11 = OpLabel
%20 = OpVariable %_ptr_Function_v4float Function %22
%15 = OpAccessChain %_ptr_StorageBuffer_v4float %v %uint_0
%16 = OpAccessChain %_ptr_StorageBuffer_v4float %v %uint_0
%17 = OpLoad %v4float %16
%23 = OpCompositeConstruct %v4float %float_2 %float_2 %float_2 %float_2
%19 = OpFAdd %v4float %17 %23
OpStore %15 %19
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,43 @@
SKIP: FAILED
struct S {
a : vec4<i32>,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a += vec4<i32>(2);
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 21
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%int = OpTypeInt 32 1
%v4int = OpTypeVector %int 4
%S = OpTypeStruct %v4int
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%6 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%int_2 = OpConstant %int 2
%19 = OpConstantComposite %v4int %int_2 %int_2 %int_2 %int_2
%unused_entry_point = OpFunction %void None %6
%9 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %6
%11 = OpLabel
%15 = OpAccessChain %_ptr_StorageBuffer_v4int %v %uint_0
%16 = OpAccessChain %_ptr_StorageBuffer_v4int %v %uint_0
%17 = OpLoad %v4int %16
%20 = OpIAdd %v4int %17 %19
OpStore %15 %20
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,43 @@
SKIP: FAILED
struct S {
a : vec4<f32>,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a *= mat4x4<f32>();
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 21
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%S = OpTypeStruct %v4float
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%6 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
%mat4v4float = OpTypeMatrix %v4float 4
%19 = OpConstantNull %mat4v4float
%unused_entry_point = OpFunction %void None %6
%9 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %6
%11 = OpLabel
%15 = OpAccessChain %_ptr_StorageBuffer_v4float %v %uint_0
%16 = OpAccessChain %_ptr_StorageBuffer_v4float %v %uint_0
%17 = OpLoad %v4float %16
%20 = OpVectorTimesMatrix %v4float %17 %19
OpStore %15 %20
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,42 @@
SKIP: FAILED
struct S {
a : vec4<f32>,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a *= 2.0;
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 20
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%S = OpTypeStruct %v4float
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%6 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
%float_2 = OpConstant %float 2
%unused_entry_point = OpFunction %void None %6
%9 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %6
%11 = OpLabel
%15 = OpAccessChain %_ptr_StorageBuffer_v4float %v %uint_0
%16 = OpAccessChain %_ptr_StorageBuffer_v4float %v %uint_0
%17 = OpLoad %v4float %16
%19 = OpVectorTimesScalar %v4float %17 %float_2
OpStore %15 %19
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,43 @@
SKIP: FAILED
struct S {
a : vec4<i32>,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a *= vec4<i32>(2);
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 21
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%int = OpTypeInt 32 1
%v4int = OpTypeVector %int 4
%S = OpTypeStruct %v4int
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%6 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%int_2 = OpConstant %int 2
%19 = OpConstantComposite %v4int %int_2 %int_2 %int_2 %int_2
%unused_entry_point = OpFunction %void None %6
%9 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %6
%11 = OpLabel
%15 = OpAccessChain %_ptr_StorageBuffer_v4int %v %uint_0
%16 = OpAccessChain %_ptr_StorageBuffer_v4int %v %uint_0
%17 = OpLoad %v4int %16
%20 = OpIMul %v4int %17 %19
OpStore %15 %20
OpReturn
OpFunctionEnd

View File

@ -1,14 +1,43 @@
SKIP: FAILED
struct S {
a : vec4<i32>,
}
@group(0) @binding(0) var<storage, read_write> v : S;
fn foo() {
v.a ^= vec4<i32>(2);
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 21
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%int = OpTypeInt 32 1
%v4int = OpTypeVector %int 4
%S = OpTypeStruct %v4int
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%v = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%6 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%int_2 = OpConstant %int 2
%19 = OpConstantComposite %v4int %int_2 %int_2 %int_2 %int_2
%unused_entry_point = OpFunction %void None %6
%9 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %6
%11 = OpLabel
%15 = OpAccessChain %_ptr_StorageBuffer_v4int %v %uint_0
%16 = OpAccessChain %_ptr_StorageBuffer_v4int %v %uint_0
%17 = OpLoad %v4int %16
%20 = OpBitwiseXor %v4int %17 %19
OpStore %15 %20
OpReturn
OpFunctionEnd

View File

@ -1,16 +1,48 @@
SKIP: FAILED
var<workgroup> a : i32;
var<workgroup> b : vec4<f32>;
var<workgroup> c : mat2x2<f32>;
fn foo() {
a /= 2;
b *= mat4x4<f32>();
c *= 2.0;
}
Failed to generate: Unknown statement: tint::ast::CompoundAssignmentStatement
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 28
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %a "a"
OpName %b "b"
OpName %c "c"
OpName %unused_entry_point "unused_entry_point"
OpName %foo "foo"
%int = OpTypeInt 32 1
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
%a = OpVariable %_ptr_Workgroup_int Workgroup
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Workgroup_v4float = OpTypePointer Workgroup %v4float
%b = OpVariable %_ptr_Workgroup_v4float Workgroup
%v2float = OpTypeVector %float 2
%mat2v2float = OpTypeMatrix %v2float 2
%_ptr_Workgroup_mat2v2float = OpTypePointer Workgroup %mat2v2float
%c = OpVariable %_ptr_Workgroup_mat2v2float Workgroup
%void = OpTypeVoid
%12 = OpTypeFunction %void
%int_2 = OpConstant %int 2
%mat4v4float = OpTypeMatrix %v4float 4
%23 = OpConstantNull %mat4v4float
%float_2 = OpConstant %float 2
%unused_entry_point = OpFunction %void None %12
%15 = OpLabel
OpReturn
OpFunctionEnd
%foo = OpFunction %void None %12
%17 = OpLabel
%18 = OpLoad %int %a
%20 = OpSDiv %int %18 %int_2
OpStore %a %20
%21 = OpLoad %v4float %b
%24 = OpVectorTimesMatrix %v4float %21 %23
OpStore %b %24
%25 = OpLoad %mat2v2float %c
%27 = OpMatrixTimesScalar %mat2v2float %25 %float_2
OpStore %c %27
OpReturn
OpFunctionEnd