tint: const eval of reverseBits

Bug: tint:1581
Change-Id: I3dd1ea2c774f9fc0dff87b71f25375a469c3d05e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108300
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
Antonio Maiorano
2022-11-04 13:48:26 +00:00
committed by Dawn LUCI CQ
parent 23a35c8a26
commit 6fcc4f3a54
45 changed files with 274 additions and 200 deletions

View File

@@ -1,5 +1,5 @@
void reverseBits_222177() {
int2 res = asint(reversebits(asuint((1).xx)));
int2 res = (-2147483648).xx;
}
struct tint_symbol {

View File

@@ -1,5 +1,5 @@
void reverseBits_222177() {
int2 res = asint(reversebits(asuint((1).xx)));
int2 res = (-2147483648).xx;
}
struct tint_symbol {

View File

@@ -1,7 +1,7 @@
#version 310 es
void reverseBits_222177() {
ivec2 res = bitfieldReverse(ivec2(1));
ivec2 res = ivec2(-2147483648);
}
vec4 vertex_main() {
@@ -21,7 +21,7 @@ void main() {
precision mediump float;
void reverseBits_222177() {
ivec2 res = bitfieldReverse(ivec2(1));
ivec2 res = ivec2(-2147483648);
}
void fragment_main() {
@@ -35,7 +35,7 @@ void main() {
#version 310 es
void reverseBits_222177() {
ivec2 res = bitfieldReverse(ivec2(1));
ivec2 res = ivec2(-2147483648);
}
void compute_main() {

View File

@@ -2,7 +2,7 @@
using namespace metal;
void reverseBits_222177() {
int2 res = reverse_bits(int2(1));
int2 res = int2((-2147483647 - 1));
}
struct tint_symbol {

View File

@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 35
; Bound: 34
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -32,38 +32,37 @@
%9 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
%int_1 = OpConstant %int 1
%17 = OpConstantComposite %v2int %int_1 %int_1
%int_n2147483648 = OpConstant %int -2147483648
%16 = OpConstantComposite %v2int %int_n2147483648 %int_n2147483648
%_ptr_Function_v2int = OpTypePointer Function %v2int
%20 = OpConstantNull %v2int
%21 = OpTypeFunction %v4float
%19 = OpConstantNull %v2int
%20 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%reverseBits_222177 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v2int Function %20
%13 = OpBitReverse %v2int %17
OpStore %res %13
%res = OpVariable %_ptr_Function_v2int Function %19
OpStore %res %16
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %21
%23 = OpLabel
%24 = OpFunctionCall %void %reverseBits_222177
%vertex_main_inner = OpFunction %v4float None %20
%22 = OpLabel
%23 = OpFunctionCall %void %reverseBits_222177
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%26 = OpLabel
%27 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %27
%25 = OpLabel
%26 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %26
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%30 = OpLabel
%31 = OpFunctionCall %void %reverseBits_222177
%29 = OpLabel
%30 = OpFunctionCall %void %reverseBits_222177
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%33 = OpLabel
%34 = OpFunctionCall %void %reverseBits_222177
%32 = OpLabel
%33 = OpFunctionCall %void %reverseBits_222177
OpReturn
OpFunctionEnd

View File

@@ -1,5 +1,5 @@
void reverseBits_35fea9() {
uint4 res = reversebits((1u).xxxx);
uint4 res = (2147483648u).xxxx;
}
struct tint_symbol {

View File

@@ -1,5 +1,5 @@
void reverseBits_35fea9() {
uint4 res = reversebits((1u).xxxx);
uint4 res = (2147483648u).xxxx;
}
struct tint_symbol {

View File

@@ -1,7 +1,7 @@
#version 310 es
void reverseBits_35fea9() {
uvec4 res = bitfieldReverse(uvec4(1u));
uvec4 res = uvec4(2147483648u);
}
vec4 vertex_main() {
@@ -21,7 +21,7 @@ void main() {
precision mediump float;
void reverseBits_35fea9() {
uvec4 res = bitfieldReverse(uvec4(1u));
uvec4 res = uvec4(2147483648u);
}
void fragment_main() {
@@ -35,7 +35,7 @@ void main() {
#version 310 es
void reverseBits_35fea9() {
uvec4 res = bitfieldReverse(uvec4(1u));
uvec4 res = uvec4(2147483648u);
}
void compute_main() {

View File

@@ -2,7 +2,7 @@
using namespace metal;
void reverseBits_35fea9() {
uint4 res = reverse_bits(uint4(1u));
uint4 res = uint4(2147483648u);
}
struct tint_symbol {

View File

@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 35
; Bound: 34
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -32,38 +32,37 @@
%9 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v4uint = OpTypeVector %uint 4
%uint_1 = OpConstant %uint 1
%17 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%uint_2147483648 = OpConstant %uint 2147483648
%16 = OpConstantComposite %v4uint %uint_2147483648 %uint_2147483648 %uint_2147483648 %uint_2147483648
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
%20 = OpConstantNull %v4uint
%21 = OpTypeFunction %v4float
%19 = OpConstantNull %v4uint
%20 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%reverseBits_35fea9 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v4uint Function %20
%13 = OpBitReverse %v4uint %17
OpStore %res %13
%res = OpVariable %_ptr_Function_v4uint Function %19
OpStore %res %16
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %21
%23 = OpLabel
%24 = OpFunctionCall %void %reverseBits_35fea9
%vertex_main_inner = OpFunction %v4float None %20
%22 = OpLabel
%23 = OpFunctionCall %void %reverseBits_35fea9
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%26 = OpLabel
%27 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %27
%25 = OpLabel
%26 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %26
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%30 = OpLabel
%31 = OpFunctionCall %void %reverseBits_35fea9
%29 = OpLabel
%30 = OpFunctionCall %void %reverseBits_35fea9
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%33 = OpLabel
%34 = OpFunctionCall %void %reverseBits_35fea9
%32 = OpLabel
%33 = OpFunctionCall %void %reverseBits_35fea9
OpReturn
OpFunctionEnd

View File

@@ -1,5 +1,5 @@
void reverseBits_4dbd6f() {
int4 res = asint(reversebits(asuint((1).xxxx)));
int4 res = (-2147483648).xxxx;
}
struct tint_symbol {

View File

@@ -1,5 +1,5 @@
void reverseBits_4dbd6f() {
int4 res = asint(reversebits(asuint((1).xxxx)));
int4 res = (-2147483648).xxxx;
}
struct tint_symbol {

View File

@@ -1,7 +1,7 @@
#version 310 es
void reverseBits_4dbd6f() {
ivec4 res = bitfieldReverse(ivec4(1));
ivec4 res = ivec4(-2147483648);
}
vec4 vertex_main() {
@@ -21,7 +21,7 @@ void main() {
precision mediump float;
void reverseBits_4dbd6f() {
ivec4 res = bitfieldReverse(ivec4(1));
ivec4 res = ivec4(-2147483648);
}
void fragment_main() {
@@ -35,7 +35,7 @@ void main() {
#version 310 es
void reverseBits_4dbd6f() {
ivec4 res = bitfieldReverse(ivec4(1));
ivec4 res = ivec4(-2147483648);
}
void compute_main() {

View File

@@ -2,7 +2,7 @@
using namespace metal;
void reverseBits_4dbd6f() {
int4 res = reverse_bits(int4(1));
int4 res = int4((-2147483647 - 1));
}
struct tint_symbol {

View File

@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 35
; Bound: 34
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -32,38 +32,37 @@
%9 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v4int = OpTypeVector %int 4
%int_1 = OpConstant %int 1
%17 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%int_n2147483648 = OpConstant %int -2147483648
%16 = OpConstantComposite %v4int %int_n2147483648 %int_n2147483648 %int_n2147483648 %int_n2147483648
%_ptr_Function_v4int = OpTypePointer Function %v4int
%20 = OpConstantNull %v4int
%21 = OpTypeFunction %v4float
%19 = OpConstantNull %v4int
%20 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%reverseBits_4dbd6f = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v4int Function %20
%13 = OpBitReverse %v4int %17
OpStore %res %13
%res = OpVariable %_ptr_Function_v4int Function %19
OpStore %res %16
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %21
%23 = OpLabel
%24 = OpFunctionCall %void %reverseBits_4dbd6f
%vertex_main_inner = OpFunction %v4float None %20
%22 = OpLabel
%23 = OpFunctionCall %void %reverseBits_4dbd6f
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%26 = OpLabel
%27 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %27
%25 = OpLabel
%26 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %26
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%30 = OpLabel
%31 = OpFunctionCall %void %reverseBits_4dbd6f
%29 = OpLabel
%30 = OpFunctionCall %void %reverseBits_4dbd6f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%33 = OpLabel
%34 = OpFunctionCall %void %reverseBits_4dbd6f
%32 = OpLabel
%33 = OpFunctionCall %void %reverseBits_4dbd6f
OpReturn
OpFunctionEnd

View File

@@ -1,5 +1,5 @@
void reverseBits_7c4269() {
int res = asint(reversebits(asuint(1)));
int res = -2147483648;
}
struct tint_symbol {

View File

@@ -1,5 +1,5 @@
void reverseBits_7c4269() {
int res = asint(reversebits(asuint(1)));
int res = -2147483648;
}
struct tint_symbol {

View File

@@ -1,7 +1,7 @@
#version 310 es
void reverseBits_7c4269() {
int res = bitfieldReverse(1);
int res = -2147483648;
}
vec4 vertex_main() {
@@ -21,7 +21,7 @@ void main() {
precision mediump float;
void reverseBits_7c4269() {
int res = bitfieldReverse(1);
int res = -2147483648;
}
void fragment_main() {
@@ -35,7 +35,7 @@ void main() {
#version 310 es
void reverseBits_7c4269() {
int res = bitfieldReverse(1);
int res = -2147483648;
}
void compute_main() {

View File

@@ -2,7 +2,7 @@
using namespace metal;
void reverseBits_7c4269() {
int res = reverse_bits(1);
int res = (-2147483647 - 1);
}
struct tint_symbol {

View File

@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 33
; Bound: 32
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -31,37 +31,36 @@
%void = OpTypeVoid
%9 = OpTypeFunction %void
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%int_n2147483648 = OpConstant %int -2147483648
%_ptr_Function_int = OpTypePointer Function %int
%18 = OpConstantNull %int
%19 = OpTypeFunction %v4float
%17 = OpConstantNull %int
%18 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%reverseBits_7c4269 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_int Function %18
%13 = OpBitReverse %int %int_1
OpStore %res %13
%res = OpVariable %_ptr_Function_int Function %17
OpStore %res %int_n2147483648
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %19
%21 = OpLabel
%22 = OpFunctionCall %void %reverseBits_7c4269
%vertex_main_inner = OpFunction %v4float None %18
%20 = OpLabel
%21 = OpFunctionCall %void %reverseBits_7c4269
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%24 = OpLabel
%25 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %25
%23 = OpLabel
%24 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %24
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%28 = OpLabel
%29 = OpFunctionCall %void %reverseBits_7c4269
%27 = OpLabel
%28 = OpFunctionCall %void %reverseBits_7c4269
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%31 = OpLabel
%32 = OpFunctionCall %void %reverseBits_7c4269
%30 = OpLabel
%31 = OpFunctionCall %void %reverseBits_7c4269
OpReturn
OpFunctionEnd

View File

@@ -1,5 +1,5 @@
void reverseBits_a6ccd4() {
uint3 res = reversebits((1u).xxx);
uint3 res = (2147483648u).xxx;
}
struct tint_symbol {

View File

@@ -1,5 +1,5 @@
void reverseBits_a6ccd4() {
uint3 res = reversebits((1u).xxx);
uint3 res = (2147483648u).xxx;
}
struct tint_symbol {

View File

@@ -1,7 +1,7 @@
#version 310 es
void reverseBits_a6ccd4() {
uvec3 res = bitfieldReverse(uvec3(1u));
uvec3 res = uvec3(2147483648u);
}
vec4 vertex_main() {
@@ -21,7 +21,7 @@ void main() {
precision mediump float;
void reverseBits_a6ccd4() {
uvec3 res = bitfieldReverse(uvec3(1u));
uvec3 res = uvec3(2147483648u);
}
void fragment_main() {
@@ -35,7 +35,7 @@ void main() {
#version 310 es
void reverseBits_a6ccd4() {
uvec3 res = bitfieldReverse(uvec3(1u));
uvec3 res = uvec3(2147483648u);
}
void compute_main() {

View File

@@ -2,7 +2,7 @@
using namespace metal;
void reverseBits_a6ccd4() {
uint3 res = reverse_bits(uint3(1u));
uint3 res = uint3(2147483648u);
}
struct tint_symbol {

View File

@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 35
; Bound: 34
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -32,38 +32,37 @@
%9 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
%uint_1 = OpConstant %uint 1
%17 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
%uint_2147483648 = OpConstant %uint 2147483648
%16 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
%20 = OpConstantNull %v3uint
%21 = OpTypeFunction %v4float
%19 = OpConstantNull %v3uint
%20 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%reverseBits_a6ccd4 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v3uint Function %20
%13 = OpBitReverse %v3uint %17
OpStore %res %13
%res = OpVariable %_ptr_Function_v3uint Function %19
OpStore %res %16
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %21
%23 = OpLabel
%24 = OpFunctionCall %void %reverseBits_a6ccd4
%vertex_main_inner = OpFunction %v4float None %20
%22 = OpLabel
%23 = OpFunctionCall %void %reverseBits_a6ccd4
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%26 = OpLabel
%27 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %27
%25 = OpLabel
%26 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %26
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%30 = OpLabel
%31 = OpFunctionCall %void %reverseBits_a6ccd4
%29 = OpLabel
%30 = OpFunctionCall %void %reverseBits_a6ccd4
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%33 = OpLabel
%34 = OpFunctionCall %void %reverseBits_a6ccd4
%32 = OpLabel
%33 = OpFunctionCall %void %reverseBits_a6ccd4
OpReturn
OpFunctionEnd

View File

@@ -1,5 +1,5 @@
void reverseBits_c21bc1() {
int3 res = asint(reversebits(asuint((1).xxx)));
int3 res = (-2147483648).xxx;
}
struct tint_symbol {

View File

@@ -1,5 +1,5 @@
void reverseBits_c21bc1() {
int3 res = asint(reversebits(asuint((1).xxx)));
int3 res = (-2147483648).xxx;
}
struct tint_symbol {

View File

@@ -1,7 +1,7 @@
#version 310 es
void reverseBits_c21bc1() {
ivec3 res = bitfieldReverse(ivec3(1));
ivec3 res = ivec3(-2147483648);
}
vec4 vertex_main() {
@@ -21,7 +21,7 @@ void main() {
precision mediump float;
void reverseBits_c21bc1() {
ivec3 res = bitfieldReverse(ivec3(1));
ivec3 res = ivec3(-2147483648);
}
void fragment_main() {
@@ -35,7 +35,7 @@ void main() {
#version 310 es
void reverseBits_c21bc1() {
ivec3 res = bitfieldReverse(ivec3(1));
ivec3 res = ivec3(-2147483648);
}
void compute_main() {

View File

@@ -2,7 +2,7 @@
using namespace metal;
void reverseBits_c21bc1() {
int3 res = reverse_bits(int3(1));
int3 res = int3((-2147483647 - 1));
}
struct tint_symbol {

View File

@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 35
; Bound: 34
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -32,38 +32,37 @@
%9 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
%int_1 = OpConstant %int 1
%17 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%int_n2147483648 = OpConstant %int -2147483648
%16 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
%_ptr_Function_v3int = OpTypePointer Function %v3int
%20 = OpConstantNull %v3int
%21 = OpTypeFunction %v4float
%19 = OpConstantNull %v3int
%20 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%reverseBits_c21bc1 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v3int Function %20
%13 = OpBitReverse %v3int %17
OpStore %res %13
%res = OpVariable %_ptr_Function_v3int Function %19
OpStore %res %16
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %21
%23 = OpLabel
%24 = OpFunctionCall %void %reverseBits_c21bc1
%vertex_main_inner = OpFunction %v4float None %20
%22 = OpLabel
%23 = OpFunctionCall %void %reverseBits_c21bc1
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%26 = OpLabel
%27 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %27
%25 = OpLabel
%26 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %26
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%30 = OpLabel
%31 = OpFunctionCall %void %reverseBits_c21bc1
%29 = OpLabel
%30 = OpFunctionCall %void %reverseBits_c21bc1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%33 = OpLabel
%34 = OpFunctionCall %void %reverseBits_c21bc1
%32 = OpLabel
%33 = OpFunctionCall %void %reverseBits_c21bc1
OpReturn
OpFunctionEnd

View File

@@ -1,5 +1,5 @@
void reverseBits_e1f4c1() {
uint2 res = reversebits((1u).xx);
uint2 res = (2147483648u).xx;
}
struct tint_symbol {

View File

@@ -1,5 +1,5 @@
void reverseBits_e1f4c1() {
uint2 res = reversebits((1u).xx);
uint2 res = (2147483648u).xx;
}
struct tint_symbol {

View File

@@ -1,7 +1,7 @@
#version 310 es
void reverseBits_e1f4c1() {
uvec2 res = bitfieldReverse(uvec2(1u));
uvec2 res = uvec2(2147483648u);
}
vec4 vertex_main() {
@@ -21,7 +21,7 @@ void main() {
precision mediump float;
void reverseBits_e1f4c1() {
uvec2 res = bitfieldReverse(uvec2(1u));
uvec2 res = uvec2(2147483648u);
}
void fragment_main() {
@@ -35,7 +35,7 @@ void main() {
#version 310 es
void reverseBits_e1f4c1() {
uvec2 res = bitfieldReverse(uvec2(1u));
uvec2 res = uvec2(2147483648u);
}
void compute_main() {

View File

@@ -2,7 +2,7 @@
using namespace metal;
void reverseBits_e1f4c1() {
uint2 res = reverse_bits(uint2(1u));
uint2 res = uint2(2147483648u);
}
struct tint_symbol {

View File

@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 35
; Bound: 34
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -32,38 +32,37 @@
%9 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
%uint_1 = OpConstant %uint 1
%17 = OpConstantComposite %v2uint %uint_1 %uint_1
%uint_2147483648 = OpConstant %uint 2147483648
%16 = OpConstantComposite %v2uint %uint_2147483648 %uint_2147483648
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%20 = OpConstantNull %v2uint
%21 = OpTypeFunction %v4float
%19 = OpConstantNull %v2uint
%20 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%reverseBits_e1f4c1 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v2uint Function %20
%13 = OpBitReverse %v2uint %17
OpStore %res %13
%res = OpVariable %_ptr_Function_v2uint Function %19
OpStore %res %16
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %21
%23 = OpLabel
%24 = OpFunctionCall %void %reverseBits_e1f4c1
%vertex_main_inner = OpFunction %v4float None %20
%22 = OpLabel
%23 = OpFunctionCall %void %reverseBits_e1f4c1
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%26 = OpLabel
%27 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %27
%25 = OpLabel
%26 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %26
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%30 = OpLabel
%31 = OpFunctionCall %void %reverseBits_e1f4c1
%29 = OpLabel
%30 = OpFunctionCall %void %reverseBits_e1f4c1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%33 = OpLabel
%34 = OpFunctionCall %void %reverseBits_e1f4c1
%32 = OpLabel
%33 = OpFunctionCall %void %reverseBits_e1f4c1
OpReturn
OpFunctionEnd

View File

@@ -1,5 +1,5 @@
void reverseBits_e31adf() {
uint res = reversebits(1u);
uint res = 2147483648u;
}
struct tint_symbol {

View File

@@ -1,5 +1,5 @@
void reverseBits_e31adf() {
uint res = reversebits(1u);
uint res = 2147483648u;
}
struct tint_symbol {

View File

@@ -1,7 +1,7 @@
#version 310 es
void reverseBits_e31adf() {
uint res = bitfieldReverse(1u);
uint res = 2147483648u;
}
vec4 vertex_main() {
@@ -21,7 +21,7 @@ void main() {
precision mediump float;
void reverseBits_e31adf() {
uint res = bitfieldReverse(1u);
uint res = 2147483648u;
}
void fragment_main() {
@@ -35,7 +35,7 @@ void main() {
#version 310 es
void reverseBits_e31adf() {
uint res = bitfieldReverse(1u);
uint res = 2147483648u;
}
void compute_main() {

View File

@@ -2,7 +2,7 @@
using namespace metal;
void reverseBits_e31adf() {
uint res = reverse_bits(1u);
uint res = 2147483648u;
}
struct tint_symbol {

View File

@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 33
; Bound: 32
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -31,37 +31,36 @@
%void = OpTypeVoid
%9 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%uint_2147483648 = OpConstant %uint 2147483648
%_ptr_Function_uint = OpTypePointer Function %uint
%18 = OpConstantNull %uint
%19 = OpTypeFunction %v4float
%17 = OpConstantNull %uint
%18 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%reverseBits_e31adf = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_uint Function %18
%13 = OpBitReverse %uint %uint_1
OpStore %res %13
%res = OpVariable %_ptr_Function_uint Function %17
OpStore %res %uint_2147483648
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %19
%21 = OpLabel
%22 = OpFunctionCall %void %reverseBits_e31adf
%vertex_main_inner = OpFunction %v4float None %18
%20 = OpLabel
%21 = OpFunctionCall %void %reverseBits_e31adf
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
%24 = OpLabel
%25 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %25
%23 = OpLabel
%24 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %24
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
%28 = OpLabel
%29 = OpFunctionCall %void %reverseBits_e31adf
%27 = OpLabel
%28 = OpFunctionCall %void %reverseBits_e31adf
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
%31 = OpLabel
%32 = OpFunctionCall %void %reverseBits_e31adf
%30 = OpLabel
%31 = OpFunctionCall %void %reverseBits_e31adf
OpReturn
OpFunctionEnd