mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-13 19:01:24 +00:00
Fix integer vector bitwise ops not being allowed
Bug: 768 Change-Id: Id5023cd32b9368e9c0634bdad884ad199f17aa80 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/52943 Reviewed-by: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
parent
2871ad9138
commit
0895c238e3
@ -2221,7 +2221,7 @@ bool Resolver::Binary(ast::BinaryExpression* expr) {
|
|||||||
|
|
||||||
// Binary bitwise operations
|
// Binary bitwise operations
|
||||||
if (expr->IsBitwise()) {
|
if (expr->IsBitwise()) {
|
||||||
if (matching_types && lhs_type->IsAnyOf<I32, U32>()) {
|
if (matching_types && lhs_type->is_integer_scalar_or_vector()) {
|
||||||
SetType(expr, lhs_type);
|
SetType(expr, lhs_type);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1438,9 +1438,6 @@ static constexpr Params all_valid_cases[] = {
|
|||||||
Params{Op::kGreaterThanEqual, ast_vec3<f32>, ast_vec3<f32>,
|
Params{Op::kGreaterThanEqual, ast_vec3<f32>, ast_vec3<f32>,
|
||||||
sem_vec3<sem_bool>},
|
sem_vec3<sem_bool>},
|
||||||
|
|
||||||
// Bit expressions
|
|
||||||
// https://gpuweb.github.io/gpuweb/wgsl.html#bit-expr
|
|
||||||
|
|
||||||
// Binary bitwise operations
|
// Binary bitwise operations
|
||||||
Params{Op::kOr, ast_i32, ast_i32, sem_i32},
|
Params{Op::kOr, ast_i32, ast_i32, sem_i32},
|
||||||
Params{Op::kAnd, ast_i32, ast_i32, sem_i32},
|
Params{Op::kAnd, ast_i32, ast_i32, sem_i32},
|
||||||
@ -1450,6 +1447,14 @@ static constexpr Params all_valid_cases[] = {
|
|||||||
Params{Op::kAnd, ast_u32, ast_u32, sem_u32},
|
Params{Op::kAnd, ast_u32, ast_u32, sem_u32},
|
||||||
Params{Op::kXor, ast_u32, ast_u32, sem_u32},
|
Params{Op::kXor, ast_u32, ast_u32, sem_u32},
|
||||||
|
|
||||||
|
Params{Op::kOr, ast_vec3<i32>, ast_vec3<i32>, sem_vec3<sem_i32>},
|
||||||
|
Params{Op::kAnd, ast_vec3<i32>, ast_vec3<i32>, sem_vec3<sem_i32>},
|
||||||
|
Params{Op::kXor, ast_vec3<i32>, ast_vec3<i32>, sem_vec3<sem_i32>},
|
||||||
|
|
||||||
|
Params{Op::kOr, ast_vec3<u32>, ast_vec3<u32>, sem_vec3<sem_u32>},
|
||||||
|
Params{Op::kAnd, ast_vec3<u32>, ast_vec3<u32>, sem_vec3<sem_u32>},
|
||||||
|
Params{Op::kXor, ast_vec3<u32>, ast_vec3<u32>, sem_vec3<sem_u32>},
|
||||||
|
|
||||||
// Bit shift expressions
|
// Bit shift expressions
|
||||||
Params{Op::kShiftLeft, ast_i32, ast_u32, sem_i32},
|
Params{Op::kShiftLeft, ast_i32, ast_u32, sem_i32},
|
||||||
Params{Op::kShiftLeft, ast_vec3<i32>, ast_vec3<u32>, sem_vec3<sem_i32>},
|
Params{Op::kShiftLeft, ast_vec3<i32>, ast_vec3<u32>, sem_vec3<sem_i32>},
|
||||||
|
@ -1,3 +1,33 @@
|
|||||||
|
fn bitwise_i32() {
|
||||||
|
var s1 : i32;
|
||||||
|
var s2 : i32;
|
||||||
|
var v1 : vec3<i32>;
|
||||||
|
var v2 : vec3<i32>;
|
||||||
|
|
||||||
|
s1 = s1 | s2;
|
||||||
|
s1 = s1 & s2;
|
||||||
|
s1 = s1 ^ s2;
|
||||||
|
|
||||||
|
v1 = v1 | v2;
|
||||||
|
v1 = v1 & v2;
|
||||||
|
v1 = v1 ^ v2;
|
||||||
|
}
|
||||||
|
|
||||||
|
fn bitwise_u32() {
|
||||||
|
var s1 : u32;
|
||||||
|
var s2 : u32;
|
||||||
|
var v1 : vec3<u32>;
|
||||||
|
var v2 : vec3<u32>;
|
||||||
|
|
||||||
|
s1 = s1 | s2;
|
||||||
|
s1 = s1 & s2;
|
||||||
|
s1 = s1 ^ s2;
|
||||||
|
|
||||||
|
v1 = v1 | v2;
|
||||||
|
v1 = v1 & v2;
|
||||||
|
v1 = v1 ^ v2;
|
||||||
|
}
|
||||||
|
|
||||||
fn vector_scalar_f32() {
|
fn vector_scalar_f32() {
|
||||||
var v : vec3<f32>;
|
var v : vec3<f32>;
|
||||||
var s : f32;
|
var s : f32;
|
||||||
|
@ -2,6 +2,32 @@ struct tint_symbol {
|
|||||||
float4 value : SV_Target0;
|
float4 value : SV_Target0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void bitwise_i32() {
|
||||||
|
int s1 = 0;
|
||||||
|
int s2 = 0;
|
||||||
|
int3 v1 = int3(0, 0, 0);
|
||||||
|
int3 v2 = int3(0, 0, 0);
|
||||||
|
s1 = (s1 | s2);
|
||||||
|
s1 = (s1 & s2);
|
||||||
|
s1 = (s1 ^ s2);
|
||||||
|
v1 = (v1 | v2);
|
||||||
|
v1 = (v1 & v2);
|
||||||
|
v1 = (v1 ^ v2);
|
||||||
|
}
|
||||||
|
|
||||||
|
void bitwise_u32() {
|
||||||
|
uint s1 = 0u;
|
||||||
|
uint s2 = 0u;
|
||||||
|
uint3 v1 = uint3(0u, 0u, 0u);
|
||||||
|
uint3 v2 = uint3(0u, 0u, 0u);
|
||||||
|
s1 = (s1 | s2);
|
||||||
|
s1 = (s1 & s2);
|
||||||
|
s1 = (s1 ^ s2);
|
||||||
|
v1 = (v1 | v2);
|
||||||
|
v1 = (v1 & v2);
|
||||||
|
v1 = (v1 ^ v2);
|
||||||
|
}
|
||||||
|
|
||||||
void vector_scalar_f32() {
|
void vector_scalar_f32() {
|
||||||
float3 v = float3(0.0f, 0.0f, 0.0f);
|
float3 v = float3(0.0f, 0.0f, 0.0f);
|
||||||
float s = 0.0f;
|
float s = 0.0f;
|
||||||
|
@ -5,6 +5,32 @@ struct tint_symbol_1 {
|
|||||||
float4 value [[color(0)]];
|
float4 value [[color(0)]];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void bitwise_i32() {
|
||||||
|
int s1 = 0;
|
||||||
|
int s2 = 0;
|
||||||
|
int3 v1 = 0;
|
||||||
|
int3 v2 = 0;
|
||||||
|
s1 = (s1 | s2);
|
||||||
|
s1 = (s1 & s2);
|
||||||
|
s1 = (s1 ^ s2);
|
||||||
|
v1 = (v1 | v2);
|
||||||
|
v1 = (v1 & v2);
|
||||||
|
v1 = (v1 ^ v2);
|
||||||
|
}
|
||||||
|
|
||||||
|
void bitwise_u32() {
|
||||||
|
uint s1 = 0u;
|
||||||
|
uint s2 = 0u;
|
||||||
|
uint3 v1 = 0u;
|
||||||
|
uint3 v2 = 0u;
|
||||||
|
s1 = (s1 | s2);
|
||||||
|
s1 = (s1 & s2);
|
||||||
|
s1 = (s1 ^ s2);
|
||||||
|
v1 = (v1 | v2);
|
||||||
|
v1 = (v1 & v2);
|
||||||
|
v1 = (v1 ^ v2);
|
||||||
|
}
|
||||||
|
|
||||||
void vector_scalar_f32() {
|
void vector_scalar_f32() {
|
||||||
float3 v = 0.0f;
|
float3 v = 0.0f;
|
||||||
float s = 0.0f;
|
float s = 0.0f;
|
||||||
|
@ -1,13 +1,23 @@
|
|||||||
; SPIR-V
|
; SPIR-V
|
||||||
; Version: 1.3
|
; Version: 1.3
|
||||||
; Generator: Google Tint Compiler; 0
|
; Generator: Google Tint Compiler; 0
|
||||||
; Bound: 250
|
; Bound: 298
|
||||||
; Schema: 0
|
; Schema: 0
|
||||||
OpCapability Shader
|
OpCapability Shader
|
||||||
OpMemoryModel Logical GLSL450
|
OpMemoryModel Logical GLSL450
|
||||||
OpEntryPoint Fragment %main "main" %tint_symbol_1
|
OpEntryPoint Fragment %main "main" %tint_symbol_1
|
||||||
OpExecutionMode %main OriginUpperLeft
|
OpExecutionMode %main OriginUpperLeft
|
||||||
OpName %tint_symbol_1 "tint_symbol_1"
|
OpName %tint_symbol_1 "tint_symbol_1"
|
||||||
|
OpName %bitwise_i32 "bitwise_i32"
|
||||||
|
OpName %s1 "s1"
|
||||||
|
OpName %s2 "s2"
|
||||||
|
OpName %v1 "v1"
|
||||||
|
OpName %v2 "v2"
|
||||||
|
OpName %bitwise_u32 "bitwise_u32"
|
||||||
|
OpName %s1_0 "s1"
|
||||||
|
OpName %s2_0 "s2"
|
||||||
|
OpName %v1_0 "v1"
|
||||||
|
OpName %v2_0 "v2"
|
||||||
OpName %vector_scalar_f32 "vector_scalar_f32"
|
OpName %vector_scalar_f32 "vector_scalar_f32"
|
||||||
OpName %v "v"
|
OpName %v "v"
|
||||||
OpName %s "s"
|
OpName %s "s"
|
||||||
@ -48,294 +58,358 @@
|
|||||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %5
|
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %5
|
||||||
%void = OpTypeVoid
|
%void = OpTypeVoid
|
||||||
%6 = OpTypeFunction %void
|
%6 = OpTypeFunction %void
|
||||||
%v3float = OpTypeVector %float 3
|
|
||||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
|
||||||
%13 = OpConstantNull %v3float
|
|
||||||
%_ptr_Function_float = OpTypePointer Function %float
|
|
||||||
%16 = OpConstantNull %float
|
|
||||||
%int = OpTypeInt 32 1
|
%int = OpTypeInt 32 1
|
||||||
|
%_ptr_Function_int = OpTypePointer Function %int
|
||||||
|
%13 = OpConstantNull %int
|
||||||
%v3int = OpTypeVector %int 3
|
%v3int = OpTypeVector %int 3
|
||||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||||
%42 = OpConstantNull %v3int
|
%18 = OpConstantNull %v3int
|
||||||
%_ptr_Function_int = OpTypePointer Function %int
|
|
||||||
%45 = OpConstantNull %int
|
|
||||||
%uint = OpTypeInt 32 0
|
%uint = OpTypeInt 32 0
|
||||||
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||||
|
%43 = OpConstantNull %uint
|
||||||
%v3uint = OpTypeVector %uint 3
|
%v3uint = OpTypeVector %uint 3
|
||||||
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
|
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
|
||||||
%78 = OpConstantNull %v3uint
|
%48 = OpConstantNull %v3uint
|
||||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
%v3float = OpTypeVector %float 3
|
||||||
%81 = OpConstantNull %uint
|
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||||
|
%73 = OpConstantNull %v3float
|
||||||
|
%_ptr_Function_float = OpTypePointer Function %float
|
||||||
|
%76 = OpConstantNull %float
|
||||||
%mat3v4float = OpTypeMatrix %v4float 3
|
%mat3v4float = OpTypeMatrix %v4float 3
|
||||||
%_ptr_Function_mat3v4float = OpTypePointer Function %mat3v4float
|
%_ptr_Function_mat3v4float = OpTypePointer Function %mat3v4float
|
||||||
%196 = OpConstantNull %mat3v4float
|
%244 = OpConstantNull %mat3v4float
|
||||||
%mat4v3float = OpTypeMatrix %v3float 4
|
%mat4v3float = OpTypeMatrix %v3float 4
|
||||||
%_ptr_Function_mat4v3float = OpTypePointer Function %mat4v3float
|
%_ptr_Function_mat4v3float = OpTypePointer Function %mat4v3float
|
||||||
%200 = OpConstantNull %mat4v3float
|
%248 = OpConstantNull %mat4v3float
|
||||||
%mat3v3float = OpTypeMatrix %v3float 3
|
%mat3v3float = OpTypeMatrix %v3float 3
|
||||||
%_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float
|
%_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float
|
||||||
%204 = OpConstantNull %mat3v3float
|
%252 = OpConstantNull %mat3v3float
|
||||||
%mat4v4float = OpTypeMatrix %v4float 4
|
%mat4v4float = OpTypeMatrix %v4float 4
|
||||||
%_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float
|
%_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float
|
||||||
%208 = OpConstantNull %mat4v4float
|
%256 = OpConstantNull %mat4v4float
|
||||||
%241 = OpTypeFunction %void %v4float
|
%289 = OpTypeFunction %void %v4float
|
||||||
%float_0 = OpConstant %float 0
|
%float_0 = OpConstant %float 0
|
||||||
%249 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
|
%297 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
|
||||||
%vector_scalar_f32 = OpFunction %void None %6
|
%bitwise_i32 = OpFunction %void None %6
|
||||||
%9 = OpLabel
|
%9 = OpLabel
|
||||||
%v = OpVariable %_ptr_Function_v3float Function %13
|
%s1 = OpVariable %_ptr_Function_int Function %13
|
||||||
%s = OpVariable %_ptr_Function_float Function %16
|
%s2 = OpVariable %_ptr_Function_int Function %13
|
||||||
%r = OpVariable %_ptr_Function_v3float Function %13
|
%v1 = OpVariable %_ptr_Function_v3int Function %18
|
||||||
%21 = OpVariable %_ptr_Function_v3float Function %13
|
%v2 = OpVariable %_ptr_Function_v3int Function %18
|
||||||
%26 = OpVariable %_ptr_Function_v3float Function %13
|
%20 = OpLoad %int %s1
|
||||||
%34 = OpVariable %_ptr_Function_v3float Function %13
|
%21 = OpLoad %int %s2
|
||||||
%18 = OpLoad %v3float %v
|
%22 = OpBitwiseOr %int %20 %21
|
||||||
%19 = OpLoad %float %s
|
OpStore %s1 %22
|
||||||
%22 = OpCompositeConstruct %v3float %19 %19 %19
|
%23 = OpLoad %int %s1
|
||||||
%20 = OpFAdd %v3float %18 %22
|
%24 = OpLoad %int %s2
|
||||||
OpStore %r %20
|
%25 = OpBitwiseAnd %int %23 %24
|
||||||
%23 = OpLoad %v3float %v
|
OpStore %s1 %25
|
||||||
%24 = OpLoad %float %s
|
%26 = OpLoad %int %s1
|
||||||
%27 = OpCompositeConstruct %v3float %24 %24 %24
|
%27 = OpLoad %int %s2
|
||||||
%25 = OpFSub %v3float %23 %27
|
%28 = OpBitwiseXor %int %26 %27
|
||||||
OpStore %r %25
|
OpStore %s1 %28
|
||||||
%28 = OpLoad %v3float %v
|
%29 = OpLoad %v3int %v1
|
||||||
%29 = OpLoad %float %s
|
%30 = OpLoad %v3int %v2
|
||||||
%30 = OpVectorTimesScalar %v3float %28 %29
|
%31 = OpBitwiseOr %v3int %29 %30
|
||||||
OpStore %r %30
|
OpStore %v1 %31
|
||||||
%31 = OpLoad %v3float %v
|
%32 = OpLoad %v3int %v1
|
||||||
%32 = OpLoad %float %s
|
%33 = OpLoad %v3int %v2
|
||||||
%35 = OpCompositeConstruct %v3float %32 %32 %32
|
%34 = OpBitwiseAnd %v3int %32 %33
|
||||||
%33 = OpFDiv %v3float %31 %35
|
OpStore %v1 %34
|
||||||
OpStore %r %33
|
%35 = OpLoad %v3int %v1
|
||||||
|
%36 = OpLoad %v3int %v2
|
||||||
|
%37 = OpBitwiseXor %v3int %35 %36
|
||||||
|
OpStore %v1 %37
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%bitwise_u32 = OpFunction %void None %6
|
||||||
|
%39 = OpLabel
|
||||||
|
%s1_0 = OpVariable %_ptr_Function_uint Function %43
|
||||||
|
%s2_0 = OpVariable %_ptr_Function_uint Function %43
|
||||||
|
%v1_0 = OpVariable %_ptr_Function_v3uint Function %48
|
||||||
|
%v2_0 = OpVariable %_ptr_Function_v3uint Function %48
|
||||||
|
%50 = OpLoad %uint %s1_0
|
||||||
|
%51 = OpLoad %uint %s2_0
|
||||||
|
%52 = OpBitwiseOr %uint %50 %51
|
||||||
|
OpStore %s1_0 %52
|
||||||
|
%53 = OpLoad %uint %s1_0
|
||||||
|
%54 = OpLoad %uint %s2_0
|
||||||
|
%55 = OpBitwiseAnd %uint %53 %54
|
||||||
|
OpStore %s1_0 %55
|
||||||
|
%56 = OpLoad %uint %s1_0
|
||||||
|
%57 = OpLoad %uint %s2_0
|
||||||
|
%58 = OpBitwiseXor %uint %56 %57
|
||||||
|
OpStore %s1_0 %58
|
||||||
|
%59 = OpLoad %v3uint %v1_0
|
||||||
|
%60 = OpLoad %v3uint %v2_0
|
||||||
|
%61 = OpBitwiseOr %v3uint %59 %60
|
||||||
|
OpStore %v1_0 %61
|
||||||
|
%62 = OpLoad %v3uint %v1_0
|
||||||
|
%63 = OpLoad %v3uint %v2_0
|
||||||
|
%64 = OpBitwiseAnd %v3uint %62 %63
|
||||||
|
OpStore %v1_0 %64
|
||||||
|
%65 = OpLoad %v3uint %v1_0
|
||||||
|
%66 = OpLoad %v3uint %v2_0
|
||||||
|
%67 = OpBitwiseXor %v3uint %65 %66
|
||||||
|
OpStore %v1_0 %67
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%vector_scalar_f32 = OpFunction %void None %6
|
||||||
|
%69 = OpLabel
|
||||||
|
%v = OpVariable %_ptr_Function_v3float Function %73
|
||||||
|
%s = OpVariable %_ptr_Function_float Function %76
|
||||||
|
%r = OpVariable %_ptr_Function_v3float Function %73
|
||||||
|
%81 = OpVariable %_ptr_Function_v3float Function %73
|
||||||
|
%86 = OpVariable %_ptr_Function_v3float Function %73
|
||||||
|
%94 = OpVariable %_ptr_Function_v3float Function %73
|
||||||
|
%78 = OpLoad %v3float %v
|
||||||
|
%79 = OpLoad %float %s
|
||||||
|
%82 = OpCompositeConstruct %v3float %79 %79 %79
|
||||||
|
%80 = OpFAdd %v3float %78 %82
|
||||||
|
OpStore %r %80
|
||||||
|
%83 = OpLoad %v3float %v
|
||||||
|
%84 = OpLoad %float %s
|
||||||
|
%87 = OpCompositeConstruct %v3float %84 %84 %84
|
||||||
|
%85 = OpFSub %v3float %83 %87
|
||||||
|
OpStore %r %85
|
||||||
|
%88 = OpLoad %v3float %v
|
||||||
|
%89 = OpLoad %float %s
|
||||||
|
%90 = OpVectorTimesScalar %v3float %88 %89
|
||||||
|
OpStore %r %90
|
||||||
|
%91 = OpLoad %v3float %v
|
||||||
|
%92 = OpLoad %float %s
|
||||||
|
%95 = OpCompositeConstruct %v3float %92 %92 %92
|
||||||
|
%93 = OpFDiv %v3float %91 %95
|
||||||
|
OpStore %r %93
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vector_scalar_i32 = OpFunction %void None %6
|
%vector_scalar_i32 = OpFunction %void None %6
|
||||||
%37 = OpLabel
|
%97 = OpLabel
|
||||||
%v_0 = OpVariable %_ptr_Function_v3int Function %42
|
%v_0 = OpVariable %_ptr_Function_v3int Function %18
|
||||||
%s_0 = OpVariable %_ptr_Function_int Function %45
|
%s_0 = OpVariable %_ptr_Function_int Function %13
|
||||||
%r_0 = OpVariable %_ptr_Function_v3int Function %42
|
%r_0 = OpVariable %_ptr_Function_v3int Function %18
|
||||||
%50 = OpVariable %_ptr_Function_v3int Function %42
|
%104 = OpVariable %_ptr_Function_v3int Function %18
|
||||||
%55 = OpVariable %_ptr_Function_v3int Function %42
|
%109 = OpVariable %_ptr_Function_v3int Function %18
|
||||||
%60 = OpVariable %_ptr_Function_v3int Function %42
|
%114 = OpVariable %_ptr_Function_v3int Function %18
|
||||||
%65 = OpVariable %_ptr_Function_v3int Function %42
|
%119 = OpVariable %_ptr_Function_v3int Function %18
|
||||||
%70 = OpVariable %_ptr_Function_v3int Function %42
|
%124 = OpVariable %_ptr_Function_v3int Function %18
|
||||||
%47 = OpLoad %v3int %v_0
|
%101 = OpLoad %v3int %v_0
|
||||||
%48 = OpLoad %int %s_0
|
%102 = OpLoad %int %s_0
|
||||||
%51 = OpCompositeConstruct %v3int %48 %48 %48
|
%105 = OpCompositeConstruct %v3int %102 %102 %102
|
||||||
%49 = OpIAdd %v3int %47 %51
|
%103 = OpIAdd %v3int %101 %105
|
||||||
OpStore %r_0 %49
|
OpStore %r_0 %103
|
||||||
%52 = OpLoad %v3int %v_0
|
%106 = OpLoad %v3int %v_0
|
||||||
%53 = OpLoad %int %s_0
|
%107 = OpLoad %int %s_0
|
||||||
%56 = OpCompositeConstruct %v3int %53 %53 %53
|
%110 = OpCompositeConstruct %v3int %107 %107 %107
|
||||||
%54 = OpISub %v3int %52 %56
|
%108 = OpISub %v3int %106 %110
|
||||||
OpStore %r_0 %54
|
OpStore %r_0 %108
|
||||||
%57 = OpLoad %v3int %v_0
|
%111 = OpLoad %v3int %v_0
|
||||||
%58 = OpLoad %int %s_0
|
%112 = OpLoad %int %s_0
|
||||||
%61 = OpCompositeConstruct %v3int %58 %58 %58
|
%115 = OpCompositeConstruct %v3int %112 %112 %112
|
||||||
%59 = OpIMul %v3int %57 %61
|
%113 = OpIMul %v3int %111 %115
|
||||||
OpStore %r_0 %59
|
OpStore %r_0 %113
|
||||||
%62 = OpLoad %v3int %v_0
|
%116 = OpLoad %v3int %v_0
|
||||||
%63 = OpLoad %int %s_0
|
%117 = OpLoad %int %s_0
|
||||||
%66 = OpCompositeConstruct %v3int %63 %63 %63
|
%120 = OpCompositeConstruct %v3int %117 %117 %117
|
||||||
%64 = OpSDiv %v3int %62 %66
|
%118 = OpSDiv %v3int %116 %120
|
||||||
OpStore %r_0 %64
|
OpStore %r_0 %118
|
||||||
%67 = OpLoad %v3int %v_0
|
%121 = OpLoad %v3int %v_0
|
||||||
%68 = OpLoad %int %s_0
|
%122 = OpLoad %int %s_0
|
||||||
%71 = OpCompositeConstruct %v3int %68 %68 %68
|
%125 = OpCompositeConstruct %v3int %122 %122 %122
|
||||||
%69 = OpSMod %v3int %67 %71
|
%123 = OpSMod %v3int %121 %125
|
||||||
OpStore %r_0 %69
|
OpStore %r_0 %123
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%vector_scalar_u32 = OpFunction %void None %6
|
%vector_scalar_u32 = OpFunction %void None %6
|
||||||
%73 = OpLabel
|
%127 = OpLabel
|
||||||
%v_1 = OpVariable %_ptr_Function_v3uint Function %78
|
%v_1 = OpVariable %_ptr_Function_v3uint Function %48
|
||||||
%s_1 = OpVariable %_ptr_Function_uint Function %81
|
%s_1 = OpVariable %_ptr_Function_uint Function %43
|
||||||
%r_1 = OpVariable %_ptr_Function_v3uint Function %78
|
%r_1 = OpVariable %_ptr_Function_v3uint Function %48
|
||||||
%86 = OpVariable %_ptr_Function_v3uint Function %78
|
%134 = OpVariable %_ptr_Function_v3uint Function %48
|
||||||
%91 = OpVariable %_ptr_Function_v3uint Function %78
|
%139 = OpVariable %_ptr_Function_v3uint Function %48
|
||||||
%96 = OpVariable %_ptr_Function_v3uint Function %78
|
%144 = OpVariable %_ptr_Function_v3uint Function %48
|
||||||
%101 = OpVariable %_ptr_Function_v3uint Function %78
|
%149 = OpVariable %_ptr_Function_v3uint Function %48
|
||||||
%106 = OpVariable %_ptr_Function_v3uint Function %78
|
%154 = OpVariable %_ptr_Function_v3uint Function %48
|
||||||
%83 = OpLoad %v3uint %v_1
|
%131 = OpLoad %v3uint %v_1
|
||||||
%84 = OpLoad %uint %s_1
|
%132 = OpLoad %uint %s_1
|
||||||
%87 = OpCompositeConstruct %v3uint %84 %84 %84
|
%135 = OpCompositeConstruct %v3uint %132 %132 %132
|
||||||
%85 = OpIAdd %v3uint %83 %87
|
%133 = OpIAdd %v3uint %131 %135
|
||||||
OpStore %r_1 %85
|
OpStore %r_1 %133
|
||||||
%88 = OpLoad %v3uint %v_1
|
%136 = OpLoad %v3uint %v_1
|
||||||
%89 = OpLoad %uint %s_1
|
%137 = OpLoad %uint %s_1
|
||||||
%92 = OpCompositeConstruct %v3uint %89 %89 %89
|
%140 = OpCompositeConstruct %v3uint %137 %137 %137
|
||||||
%90 = OpISub %v3uint %88 %92
|
%138 = OpISub %v3uint %136 %140
|
||||||
OpStore %r_1 %90
|
OpStore %r_1 %138
|
||||||
%93 = OpLoad %v3uint %v_1
|
%141 = OpLoad %v3uint %v_1
|
||||||
%94 = OpLoad %uint %s_1
|
%142 = OpLoad %uint %s_1
|
||||||
%97 = OpCompositeConstruct %v3uint %94 %94 %94
|
%145 = OpCompositeConstruct %v3uint %142 %142 %142
|
||||||
%95 = OpIMul %v3uint %93 %97
|
%143 = OpIMul %v3uint %141 %145
|
||||||
OpStore %r_1 %95
|
OpStore %r_1 %143
|
||||||
%98 = OpLoad %v3uint %v_1
|
%146 = OpLoad %v3uint %v_1
|
||||||
%99 = OpLoad %uint %s_1
|
%147 = OpLoad %uint %s_1
|
||||||
%102 = OpCompositeConstruct %v3uint %99 %99 %99
|
%150 = OpCompositeConstruct %v3uint %147 %147 %147
|
||||||
%100 = OpUDiv %v3uint %98 %102
|
%148 = OpUDiv %v3uint %146 %150
|
||||||
OpStore %r_1 %100
|
OpStore %r_1 %148
|
||||||
%103 = OpLoad %v3uint %v_1
|
%151 = OpLoad %v3uint %v_1
|
||||||
%104 = OpLoad %uint %s_1
|
%152 = OpLoad %uint %s_1
|
||||||
%107 = OpCompositeConstruct %v3uint %104 %104 %104
|
%155 = OpCompositeConstruct %v3uint %152 %152 %152
|
||||||
%105 = OpUMod %v3uint %103 %107
|
%153 = OpUMod %v3uint %151 %155
|
||||||
OpStore %r_1 %105
|
OpStore %r_1 %153
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%scalar_vector_f32 = OpFunction %void None %6
|
%scalar_vector_f32 = OpFunction %void None %6
|
||||||
%109 = OpLabel
|
%157 = OpLabel
|
||||||
%v_2 = OpVariable %_ptr_Function_v3float Function %13
|
%v_2 = OpVariable %_ptr_Function_v3float Function %73
|
||||||
%s_2 = OpVariable %_ptr_Function_float Function %16
|
%s_2 = OpVariable %_ptr_Function_float Function %76
|
||||||
%r_2 = OpVariable %_ptr_Function_v3float Function %13
|
%r_2 = OpVariable %_ptr_Function_v3float Function %73
|
||||||
%116 = OpVariable %_ptr_Function_v3float Function %13
|
%164 = OpVariable %_ptr_Function_v3float Function %73
|
||||||
%121 = OpVariable %_ptr_Function_v3float Function %13
|
%169 = OpVariable %_ptr_Function_v3float Function %73
|
||||||
%129 = OpVariable %_ptr_Function_v3float Function %13
|
%177 = OpVariable %_ptr_Function_v3float Function %73
|
||||||
%113 = OpLoad %float %s_2
|
%161 = OpLoad %float %s_2
|
||||||
%114 = OpLoad %v3float %v_2
|
%162 = OpLoad %v3float %v_2
|
||||||
%117 = OpCompositeConstruct %v3float %113 %113 %113
|
%165 = OpCompositeConstruct %v3float %161 %161 %161
|
||||||
%115 = OpFAdd %v3float %117 %114
|
%163 = OpFAdd %v3float %165 %162
|
||||||
OpStore %r_2 %115
|
OpStore %r_2 %163
|
||||||
%118 = OpLoad %float %s_2
|
%166 = OpLoad %float %s_2
|
||||||
%119 = OpLoad %v3float %v_2
|
%167 = OpLoad %v3float %v_2
|
||||||
%122 = OpCompositeConstruct %v3float %118 %118 %118
|
%170 = OpCompositeConstruct %v3float %166 %166 %166
|
||||||
%120 = OpFSub %v3float %122 %119
|
%168 = OpFSub %v3float %170 %167
|
||||||
OpStore %r_2 %120
|
OpStore %r_2 %168
|
||||||
%123 = OpLoad %float %s_2
|
%171 = OpLoad %float %s_2
|
||||||
%124 = OpLoad %v3float %v_2
|
%172 = OpLoad %v3float %v_2
|
||||||
%125 = OpVectorTimesScalar %v3float %124 %123
|
%173 = OpVectorTimesScalar %v3float %172 %171
|
||||||
OpStore %r_2 %125
|
OpStore %r_2 %173
|
||||||
%126 = OpLoad %float %s_2
|
%174 = OpLoad %float %s_2
|
||||||
%127 = OpLoad %v3float %v_2
|
%175 = OpLoad %v3float %v_2
|
||||||
%130 = OpCompositeConstruct %v3float %126 %126 %126
|
%178 = OpCompositeConstruct %v3float %174 %174 %174
|
||||||
%128 = OpFDiv %v3float %130 %127
|
%176 = OpFDiv %v3float %178 %175
|
||||||
OpStore %r_2 %128
|
OpStore %r_2 %176
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%scalar_vector_i32 = OpFunction %void None %6
|
%scalar_vector_i32 = OpFunction %void None %6
|
||||||
%132 = OpLabel
|
%180 = OpLabel
|
||||||
%v_3 = OpVariable %_ptr_Function_v3int Function %42
|
%v_3 = OpVariable %_ptr_Function_v3int Function %18
|
||||||
%s_3 = OpVariable %_ptr_Function_int Function %45
|
%s_3 = OpVariable %_ptr_Function_int Function %13
|
||||||
%r_3 = OpVariable %_ptr_Function_v3int Function %42
|
%r_3 = OpVariable %_ptr_Function_v3int Function %18
|
||||||
%139 = OpVariable %_ptr_Function_v3int Function %42
|
%187 = OpVariable %_ptr_Function_v3int Function %18
|
||||||
%144 = OpVariable %_ptr_Function_v3int Function %42
|
%192 = OpVariable %_ptr_Function_v3int Function %18
|
||||||
%149 = OpVariable %_ptr_Function_v3int Function %42
|
%197 = OpVariable %_ptr_Function_v3int Function %18
|
||||||
%154 = OpVariable %_ptr_Function_v3int Function %42
|
%202 = OpVariable %_ptr_Function_v3int Function %18
|
||||||
%159 = OpVariable %_ptr_Function_v3int Function %42
|
%207 = OpVariable %_ptr_Function_v3int Function %18
|
||||||
%136 = OpLoad %int %s_3
|
%184 = OpLoad %int %s_3
|
||||||
%137 = OpLoad %v3int %v_3
|
%185 = OpLoad %v3int %v_3
|
||||||
%140 = OpCompositeConstruct %v3int %136 %136 %136
|
%188 = OpCompositeConstruct %v3int %184 %184 %184
|
||||||
%138 = OpIAdd %v3int %140 %137
|
%186 = OpIAdd %v3int %188 %185
|
||||||
OpStore %r_3 %138
|
OpStore %r_3 %186
|
||||||
%141 = OpLoad %int %s_3
|
%189 = OpLoad %int %s_3
|
||||||
%142 = OpLoad %v3int %v_3
|
%190 = OpLoad %v3int %v_3
|
||||||
%145 = OpCompositeConstruct %v3int %141 %141 %141
|
%193 = OpCompositeConstruct %v3int %189 %189 %189
|
||||||
%143 = OpISub %v3int %145 %142
|
%191 = OpISub %v3int %193 %190
|
||||||
OpStore %r_3 %143
|
OpStore %r_3 %191
|
||||||
%146 = OpLoad %int %s_3
|
%194 = OpLoad %int %s_3
|
||||||
%147 = OpLoad %v3int %v_3
|
%195 = OpLoad %v3int %v_3
|
||||||
%150 = OpCompositeConstruct %v3int %146 %146 %146
|
%198 = OpCompositeConstruct %v3int %194 %194 %194
|
||||||
%148 = OpIMul %v3int %150 %147
|
%196 = OpIMul %v3int %198 %195
|
||||||
OpStore %r_3 %148
|
OpStore %r_3 %196
|
||||||
%151 = OpLoad %int %s_3
|
%199 = OpLoad %int %s_3
|
||||||
%152 = OpLoad %v3int %v_3
|
%200 = OpLoad %v3int %v_3
|
||||||
%155 = OpCompositeConstruct %v3int %151 %151 %151
|
%203 = OpCompositeConstruct %v3int %199 %199 %199
|
||||||
%153 = OpSDiv %v3int %155 %152
|
%201 = OpSDiv %v3int %203 %200
|
||||||
OpStore %r_3 %153
|
OpStore %r_3 %201
|
||||||
%156 = OpLoad %int %s_3
|
%204 = OpLoad %int %s_3
|
||||||
%157 = OpLoad %v3int %v_3
|
%205 = OpLoad %v3int %v_3
|
||||||
%160 = OpCompositeConstruct %v3int %156 %156 %156
|
%208 = OpCompositeConstruct %v3int %204 %204 %204
|
||||||
%158 = OpSMod %v3int %160 %157
|
%206 = OpSMod %v3int %208 %205
|
||||||
OpStore %r_3 %158
|
OpStore %r_3 %206
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%scalar_vector_u32 = OpFunction %void None %6
|
%scalar_vector_u32 = OpFunction %void None %6
|
||||||
%162 = OpLabel
|
%210 = OpLabel
|
||||||
%v_4 = OpVariable %_ptr_Function_v3uint Function %78
|
%v_4 = OpVariable %_ptr_Function_v3uint Function %48
|
||||||
%s_4 = OpVariable %_ptr_Function_uint Function %81
|
%s_4 = OpVariable %_ptr_Function_uint Function %43
|
||||||
%r_4 = OpVariable %_ptr_Function_v3uint Function %78
|
%r_4 = OpVariable %_ptr_Function_v3uint Function %48
|
||||||
%169 = OpVariable %_ptr_Function_v3uint Function %78
|
%217 = OpVariable %_ptr_Function_v3uint Function %48
|
||||||
%174 = OpVariable %_ptr_Function_v3uint Function %78
|
%222 = OpVariable %_ptr_Function_v3uint Function %48
|
||||||
%179 = OpVariable %_ptr_Function_v3uint Function %78
|
%227 = OpVariable %_ptr_Function_v3uint Function %48
|
||||||
%184 = OpVariable %_ptr_Function_v3uint Function %78
|
%232 = OpVariable %_ptr_Function_v3uint Function %48
|
||||||
%189 = OpVariable %_ptr_Function_v3uint Function %78
|
%237 = OpVariable %_ptr_Function_v3uint Function %48
|
||||||
%166 = OpLoad %uint %s_4
|
%214 = OpLoad %uint %s_4
|
||||||
%167 = OpLoad %v3uint %v_4
|
%215 = OpLoad %v3uint %v_4
|
||||||
%170 = OpCompositeConstruct %v3uint %166 %166 %166
|
%218 = OpCompositeConstruct %v3uint %214 %214 %214
|
||||||
%168 = OpIAdd %v3uint %170 %167
|
%216 = OpIAdd %v3uint %218 %215
|
||||||
OpStore %r_4 %168
|
OpStore %r_4 %216
|
||||||
%171 = OpLoad %uint %s_4
|
%219 = OpLoad %uint %s_4
|
||||||
%172 = OpLoad %v3uint %v_4
|
%220 = OpLoad %v3uint %v_4
|
||||||
%175 = OpCompositeConstruct %v3uint %171 %171 %171
|
%223 = OpCompositeConstruct %v3uint %219 %219 %219
|
||||||
%173 = OpISub %v3uint %175 %172
|
%221 = OpISub %v3uint %223 %220
|
||||||
OpStore %r_4 %173
|
OpStore %r_4 %221
|
||||||
%176 = OpLoad %uint %s_4
|
%224 = OpLoad %uint %s_4
|
||||||
%177 = OpLoad %v3uint %v_4
|
%225 = OpLoad %v3uint %v_4
|
||||||
%180 = OpCompositeConstruct %v3uint %176 %176 %176
|
%228 = OpCompositeConstruct %v3uint %224 %224 %224
|
||||||
%178 = OpIMul %v3uint %180 %177
|
%226 = OpIMul %v3uint %228 %225
|
||||||
OpStore %r_4 %178
|
OpStore %r_4 %226
|
||||||
%181 = OpLoad %uint %s_4
|
%229 = OpLoad %uint %s_4
|
||||||
%182 = OpLoad %v3uint %v_4
|
%230 = OpLoad %v3uint %v_4
|
||||||
%185 = OpCompositeConstruct %v3uint %181 %181 %181
|
%233 = OpCompositeConstruct %v3uint %229 %229 %229
|
||||||
%183 = OpUDiv %v3uint %185 %182
|
%231 = OpUDiv %v3uint %233 %230
|
||||||
OpStore %r_4 %183
|
OpStore %r_4 %231
|
||||||
%186 = OpLoad %uint %s_4
|
%234 = OpLoad %uint %s_4
|
||||||
%187 = OpLoad %v3uint %v_4
|
%235 = OpLoad %v3uint %v_4
|
||||||
%190 = OpCompositeConstruct %v3uint %186 %186 %186
|
%238 = OpCompositeConstruct %v3uint %234 %234 %234
|
||||||
%188 = OpUMod %v3uint %190 %187
|
%236 = OpUMod %v3uint %238 %235
|
||||||
OpStore %r_4 %188
|
OpStore %r_4 %236
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%matrix_matrix_f32 = OpFunction %void None %6
|
%matrix_matrix_f32 = OpFunction %void None %6
|
||||||
%192 = OpLabel
|
%240 = OpLabel
|
||||||
%m34 = OpVariable %_ptr_Function_mat3v4float Function %196
|
%m34 = OpVariable %_ptr_Function_mat3v4float Function %244
|
||||||
%m43 = OpVariable %_ptr_Function_mat4v3float Function %200
|
%m43 = OpVariable %_ptr_Function_mat4v3float Function %248
|
||||||
%m33 = OpVariable %_ptr_Function_mat3v3float Function %204
|
%m33 = OpVariable %_ptr_Function_mat3v3float Function %252
|
||||||
%m44 = OpVariable %_ptr_Function_mat4v4float Function %208
|
%m44 = OpVariable %_ptr_Function_mat4v4float Function %256
|
||||||
%209 = OpLoad %mat3v4float %m34
|
%257 = OpLoad %mat3v4float %m34
|
||||||
%210 = OpLoad %mat3v4float %m34
|
%258 = OpLoad %mat3v4float %m34
|
||||||
%212 = OpCompositeExtract %v4float %209 0
|
%260 = OpCompositeExtract %v4float %257 0
|
||||||
%213 = OpCompositeExtract %v4float %210 0
|
%261 = OpCompositeExtract %v4float %258 0
|
||||||
%214 = OpFAdd %v4float %212 %213
|
%262 = OpFAdd %v4float %260 %261
|
||||||
%215 = OpCompositeExtract %v4float %209 1
|
%263 = OpCompositeExtract %v4float %257 1
|
||||||
%216 = OpCompositeExtract %v4float %210 1
|
%264 = OpCompositeExtract %v4float %258 1
|
||||||
%217 = OpFAdd %v4float %215 %216
|
%265 = OpFAdd %v4float %263 %264
|
||||||
%218 = OpCompositeExtract %v4float %209 2
|
%266 = OpCompositeExtract %v4float %257 2
|
||||||
%219 = OpCompositeExtract %v4float %210 2
|
%267 = OpCompositeExtract %v4float %258 2
|
||||||
%220 = OpFAdd %v4float %218 %219
|
%268 = OpFAdd %v4float %266 %267
|
||||||
%221 = OpCompositeConstruct %mat3v4float %214 %217 %220
|
%269 = OpCompositeConstruct %mat3v4float %262 %265 %268
|
||||||
OpStore %m34 %221
|
OpStore %m34 %269
|
||||||
%222 = OpLoad %mat3v4float %m34
|
%270 = OpLoad %mat3v4float %m34
|
||||||
%223 = OpLoad %mat3v4float %m34
|
%271 = OpLoad %mat3v4float %m34
|
||||||
%225 = OpCompositeExtract %v4float %222 0
|
%273 = OpCompositeExtract %v4float %270 0
|
||||||
%226 = OpCompositeExtract %v4float %223 0
|
%274 = OpCompositeExtract %v4float %271 0
|
||||||
%227 = OpFSub %v4float %225 %226
|
%275 = OpFSub %v4float %273 %274
|
||||||
%228 = OpCompositeExtract %v4float %222 1
|
%276 = OpCompositeExtract %v4float %270 1
|
||||||
%229 = OpCompositeExtract %v4float %223 1
|
%277 = OpCompositeExtract %v4float %271 1
|
||||||
%230 = OpFSub %v4float %228 %229
|
%278 = OpFSub %v4float %276 %277
|
||||||
%231 = OpCompositeExtract %v4float %222 2
|
%279 = OpCompositeExtract %v4float %270 2
|
||||||
%232 = OpCompositeExtract %v4float %223 2
|
%280 = OpCompositeExtract %v4float %271 2
|
||||||
%233 = OpFSub %v4float %231 %232
|
%281 = OpFSub %v4float %279 %280
|
||||||
%234 = OpCompositeConstruct %mat3v4float %227 %230 %233
|
%282 = OpCompositeConstruct %mat3v4float %275 %278 %281
|
||||||
OpStore %m34 %234
|
OpStore %m34 %282
|
||||||
%235 = OpLoad %mat4v3float %m43
|
%283 = OpLoad %mat4v3float %m43
|
||||||
%236 = OpLoad %mat3v4float %m34
|
%284 = OpLoad %mat3v4float %m34
|
||||||
%237 = OpMatrixTimesMatrix %mat3v3float %235 %236
|
%285 = OpMatrixTimesMatrix %mat3v3float %283 %284
|
||||||
OpStore %m33 %237
|
OpStore %m33 %285
|
||||||
%238 = OpLoad %mat3v4float %m34
|
%286 = OpLoad %mat3v4float %m34
|
||||||
%239 = OpLoad %mat4v3float %m43
|
%287 = OpLoad %mat4v3float %m43
|
||||||
%240 = OpMatrixTimesMatrix %mat4v4float %238 %239
|
%288 = OpMatrixTimesMatrix %mat4v4float %286 %287
|
||||||
OpStore %m44 %240
|
OpStore %m44 %288
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%tint_symbol_2 = OpFunction %void None %241
|
%tint_symbol_2 = OpFunction %void None %289
|
||||||
%tint_symbol = OpFunctionParameter %v4float
|
%tint_symbol = OpFunctionParameter %v4float
|
||||||
%244 = OpLabel
|
%292 = OpLabel
|
||||||
OpStore %tint_symbol_1 %tint_symbol
|
OpStore %tint_symbol_1 %tint_symbol
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%main = OpFunction %void None %6
|
%main = OpFunction %void None %6
|
||||||
%246 = OpLabel
|
%294 = OpLabel
|
||||||
%247 = OpFunctionCall %void %tint_symbol_2 %249
|
%295 = OpFunctionCall %void %tint_symbol_2 %297
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
|
@ -1,3 +1,29 @@
|
|||||||
|
fn bitwise_i32() {
|
||||||
|
var s1 : i32;
|
||||||
|
var s2 : i32;
|
||||||
|
var v1 : vec3<i32>;
|
||||||
|
var v2 : vec3<i32>;
|
||||||
|
s1 = (s1 | s2);
|
||||||
|
s1 = (s1 & s2);
|
||||||
|
s1 = (s1 ^ s2);
|
||||||
|
v1 = (v1 | v2);
|
||||||
|
v1 = (v1 & v2);
|
||||||
|
v1 = (v1 ^ v2);
|
||||||
|
}
|
||||||
|
|
||||||
|
fn bitwise_u32() {
|
||||||
|
var s1 : u32;
|
||||||
|
var s2 : u32;
|
||||||
|
var v1 : vec3<u32>;
|
||||||
|
var v2 : vec3<u32>;
|
||||||
|
s1 = (s1 | s2);
|
||||||
|
s1 = (s1 & s2);
|
||||||
|
s1 = (s1 ^ s2);
|
||||||
|
v1 = (v1 | v2);
|
||||||
|
v1 = (v1 & v2);
|
||||||
|
v1 = (v1 ^ v2);
|
||||||
|
}
|
||||||
|
|
||||||
fn vector_scalar_f32() {
|
fn vector_scalar_f32() {
|
||||||
var v : vec3<f32>;
|
var v : vec3<f32>;
|
||||||
var s : f32;
|
var s : f32;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user