mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
writer: avoid type breakage during AppendVector
When building a vector via tint::writer::AppendVector, and the
vector argument is already a vector constructor, expand that
vector constructor into its components only when those components
are all scalars. This avoids a type breakage which can occur with cases
like this:
vector argument is:
vec2<i32>(vec2<u32>(0u,1u))
scalar argument is:
2
Before this fix, the result was:
vec2<i32>(0u, 1u, 2);
But should be this instead:
vec3<i32>(vec2<u32>(0u,1u),2)
This was noticed in SPIR-V writer output when forming a coordinate
vector from a an unsigned WGSL coordinate vector with a signed array
vector.
Fixed: tint:1048
Change-Id: Id46665739cc23da0ca58b9baabf7b4531b86350b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60040
Auto-Submit: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
; Test: ConvertUintCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm
|
||||
; SPIR-V
|
||||
; Version: 1.0
|
||||
; Generator: Khronos SPIR-V Tools Assembler; 0
|
||||
; Bound: 1001
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpCapability Sampled1D
|
||||
OpCapability Image1D
|
||||
OpCapability StorageImageExtendedFormats
|
||||
OpCapability ImageQuery
|
||||
OpMemoryModel Logical Simple
|
||||
OpEntryPoint Fragment %100 "main"
|
||||
OpExecutionMode %100 OriginUpperLeft
|
||||
OpName %float_var "float_var"
|
||||
OpName %ptr_float "ptr_float"
|
||||
OpName %i1 "i1"
|
||||
OpName %vi12 "vi12"
|
||||
OpName %vi123 "vi123"
|
||||
OpName %vi1234 "vi1234"
|
||||
OpName %u1 "u1"
|
||||
OpName %vu12 "vu12"
|
||||
OpName %vu123 "vu123"
|
||||
OpName %vu1234 "vu1234"
|
||||
OpName %f1 "f1"
|
||||
OpName %vf12 "vf12"
|
||||
OpName %vf123 "vf123"
|
||||
OpName %vf1234 "vf1234"
|
||||
OpDecorate %10 DescriptorSet 0
|
||||
OpDecorate %10 Binding 0
|
||||
OpDecorate %20 DescriptorSet 2
|
||||
OpDecorate %20 Binding 1
|
||||
OpDecorate %30 DescriptorSet 0
|
||||
OpDecorate %30 Binding 1
|
||||
%void = OpTypeVoid
|
||||
%17 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%uint = OpTypeInt 32 0
|
||||
%int = OpTypeInt 32 1
|
||||
%int_0 = OpConstant %int 0
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%int_4 = OpConstant %int 4
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%uint_100 = OpConstant %uint 100
|
||||
%v2int = OpTypeVector %int 2
|
||||
%v3int = OpTypeVector %int 3
|
||||
%v4int = OpTypeVector %int 4
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%v4uint = OpTypeVector %uint 4
|
||||
%v2float = OpTypeVector %float 2
|
||||
%v3float = OpTypeVector %float 3
|
||||
%v4float = OpTypeVector %float 4
|
||||
%43 = OpConstantNull %float
|
||||
%float_0 = OpConstant %float 0
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_7 = OpConstant %float 7
|
||||
%50 = OpConstantNull %v2float
|
||||
%51 = OpConstantNull %v3float
|
||||
%52 = OpConstantNull %v4float
|
||||
%53 = OpConstantComposite %v2int %int_1 %int_2
|
||||
%54 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%55 = OpConstantComposite %v4int %int_1 %int_2 %int_3 %int_4
|
||||
%56 = OpConstantComposite %v2uint %uint_1 %uint_2
|
||||
%57 = OpConstantComposite %v3uint %uint_1 %uint_2 %uint_3
|
||||
%58 = OpConstantComposite %v4uint %uint_1 %uint_2 %uint_3 %uint_4
|
||||
%59 = OpConstantComposite %v2float %float_1 %float_2
|
||||
%60 = OpConstantComposite %v2float %float_2 %float_1
|
||||
%61 = OpConstantComposite %v3float %float_1 %float_2 %float_3
|
||||
%62 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4
|
||||
%float_0_200000003 = OpConstant %float 0.200000003
|
||||
%64 = OpTypeSampler
|
||||
%_ptr_UniformConstant_64 = OpTypePointer UniformConstant %64
|
||||
%66 = OpTypeImage %float 2D 0 1 0 1 Unknown
|
||||
%_ptr_UniformConstant_66 = OpTypePointer UniformConstant %66
|
||||
%68 = OpTypeSampledImage %66
|
||||
%ptr_float = OpTypePointer Function %float
|
||||
%10 = OpVariable %_ptr_UniformConstant_64 UniformConstant
|
||||
%20 = OpVariable %_ptr_UniformConstant_66 UniformConstant
|
||||
%30 = OpVariable %_ptr_UniformConstant_64 UniformConstant
|
||||
%100 = OpFunction %void None %17
|
||||
%69 = OpLabel
|
||||
%float_var = OpVariable %ptr_float Function
|
||||
%i1 = OpCopyObject %int %int_1
|
||||
%vi12 = OpCopyObject %v2int %53
|
||||
%vi123 = OpCopyObject %v3int %54
|
||||
%vi1234 = OpCopyObject %v4int %55
|
||||
%u1 = OpCopyObject %uint %uint_1
|
||||
%vu12 = OpCopyObject %v2uint %56
|
||||
%vu123 = OpCopyObject %v3uint %57
|
||||
%vu1234 = OpCopyObject %v4uint %58
|
||||
%f1 = OpCopyObject %float %float_1
|
||||
%vf12 = OpCopyObject %v2float %59
|
||||
%vf123 = OpCopyObject %v3float %61
|
||||
%vf1234 = OpCopyObject %v4float %62
|
||||
%70 = OpLoad %64 %10
|
||||
%71 = OpLoad %66 %20
|
||||
%72 = OpSampledImage %68 %71 %70
|
||||
%73 = OpImageFetch %v4float %71 %vu123
|
||||
%1000 = OpCopyObject %uint %uint_0
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
SamplerState x_10 : register(s0, space0);
|
||||
Texture2DArray<float4> x_20 : register(t1, space2);
|
||||
SamplerState x_30 : register(s1, space0);
|
||||
|
||||
void main_1() {
|
||||
float float_var = 0.0f;
|
||||
const int i1 = 1;
|
||||
const int2 vi12 = int2(1, 2);
|
||||
const int3 vi123 = int3(1, 2, 3);
|
||||
const int4 vi1234 = int4(1, 2, 3, 4);
|
||||
const uint u1 = 1u;
|
||||
const uint2 vu12 = uint2(1u, 2u);
|
||||
const uint3 vu123 = uint3(1u, 2u, 3u);
|
||||
const uint4 vu1234 = uint4(1u, 2u, 3u, 4u);
|
||||
const float f1 = 1.0f;
|
||||
const float2 vf12 = float2(1.0f, 2.0f);
|
||||
const float3 vf123 = float3(1.0f, 2.0f, 3.0f);
|
||||
const float4 vf1234 = float4(1.0f, 2.0f, 3.0f, 4.0f);
|
||||
const float4 x_73 = x_20.Load(int4(int3(int2(vu123.xy), int(vu123.z)), 0));
|
||||
const uint x_1000 = 0u;
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 62
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main"
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpName %x_10 "x_10"
|
||||
OpName %x_20 "x_20"
|
||||
OpName %x_30 "x_30"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %float_var "float_var"
|
||||
OpName %main "main"
|
||||
OpDecorate %x_10 DescriptorSet 0
|
||||
OpDecorate %x_10 Binding 0
|
||||
OpDecorate %x_20 DescriptorSet 2
|
||||
OpDecorate %x_20 Binding 1
|
||||
OpDecorate %x_30 DescriptorSet 0
|
||||
OpDecorate %x_30 Binding 1
|
||||
%3 = OpTypeSampler
|
||||
%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
|
||||
%x_10 = OpVariable %_ptr_UniformConstant_3 UniformConstant
|
||||
%float = OpTypeFloat 32
|
||||
%6 = OpTypeImage %float 2D 0 1 0 1 Unknown
|
||||
%_ptr_UniformConstant_6 = OpTypePointer UniformConstant %6
|
||||
%x_20 = OpVariable %_ptr_UniformConstant_6 UniformConstant
|
||||
%x_30 = OpVariable %_ptr_UniformConstant_3 UniformConstant
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%15 = OpConstantNull %float
|
||||
%int = OpTypeInt 32 1
|
||||
%int_1 = OpConstant %int 1
|
||||
%v2int = OpTypeVector %int 2
|
||||
%int_2 = OpConstant %int 2
|
||||
%20 = OpConstantComposite %v2int %int_1 %int_2
|
||||
%v3int = OpTypeVector %int 3
|
||||
%int_3 = OpConstant %int 3
|
||||
%23 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%v4int = OpTypeVector %int 4
|
||||
%int_4 = OpConstant %int 4
|
||||
%26 = OpConstantComposite %v4int %int_1 %int_2 %int_3 %int_4
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%31 = OpConstantComposite %v2uint %uint_1 %uint_2
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%34 = OpConstantComposite %v3uint %uint_1 %uint_2 %uint_3
|
||||
%v4uint = OpTypeVector %uint 4
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%37 = OpConstantComposite %v4uint %uint_1 %uint_2 %uint_3 %uint_4
|
||||
%float_1 = OpConstant %float 1
|
||||
%v2float = OpTypeVector %float 2
|
||||
%float_2 = OpConstant %float 2
|
||||
%41 = OpConstantComposite %v2float %float_1 %float_2
|
||||
%v3float = OpTypeVector %float 3
|
||||
%float_3 = OpConstant %float 3
|
||||
%44 = OpConstantComposite %v3float %float_1 %float_2 %float_3
|
||||
%v4float = OpTypeVector %float 4
|
||||
%float_4 = OpConstant %float 4
|
||||
%47 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4
|
||||
%int_0 = OpConstant %int 0
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%main_1 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%float_var = OpVariable %_ptr_Function_float Function %15
|
||||
%49 = OpLoad %6 %x_20
|
||||
%51 = OpVectorShuffle %v2uint %34 %34 0 1
|
||||
%50 = OpBitcast %v2int %51
|
||||
%52 = OpCompositeExtract %int %50 0
|
||||
%53 = OpCompositeExtract %int %50 1
|
||||
%55 = OpCompositeExtract %uint %34 2
|
||||
%54 = OpBitcast %int %55
|
||||
%56 = OpCompositeConstruct %v3int %52 %53 %54
|
||||
%48 = OpImageFetch %v4float %49 %56 Lod %int_0
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %9
|
||||
%60 = OpLabel
|
||||
%61 = OpFunctionCall %void %main_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,110 @@
|
||||
; Test: ConvertUintCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_1.spvasm
|
||||
; SPIR-V
|
||||
; Version: 1.0
|
||||
; Generator: Khronos SPIR-V Tools Assembler; 0
|
||||
; Bound: 1001
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpCapability Sampled1D
|
||||
OpCapability Image1D
|
||||
OpCapability StorageImageExtendedFormats
|
||||
OpCapability ImageQuery
|
||||
OpMemoryModel Logical Simple
|
||||
OpEntryPoint Fragment %100 "main"
|
||||
OpExecutionMode %100 OriginUpperLeft
|
||||
OpName %float_var "float_var"
|
||||
OpName %ptr_float "ptr_float"
|
||||
OpName %i1 "i1"
|
||||
OpName %vi12 "vi12"
|
||||
OpName %vi123 "vi123"
|
||||
OpName %vi1234 "vi1234"
|
||||
OpName %u1 "u1"
|
||||
OpName %vu12 "vu12"
|
||||
OpName %vu123 "vu123"
|
||||
OpName %vu1234 "vu1234"
|
||||
OpName %f1 "f1"
|
||||
OpName %vf12 "vf12"
|
||||
OpName %vf123 "vf123"
|
||||
OpName %vf1234 "vf1234"
|
||||
OpDecorate %10 DescriptorSet 0
|
||||
OpDecorate %10 Binding 0
|
||||
OpDecorate %20 DescriptorSet 2
|
||||
OpDecorate %20 Binding 1
|
||||
OpDecorate %30 DescriptorSet 0
|
||||
OpDecorate %30 Binding 1
|
||||
%void = OpTypeVoid
|
||||
%17 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%uint = OpTypeInt 32 0
|
||||
%int = OpTypeInt 32 1
|
||||
%int_0 = OpConstant %int 0
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%int_4 = OpConstant %int 4
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%uint_100 = OpConstant %uint 100
|
||||
%v2int = OpTypeVector %int 2
|
||||
%v3int = OpTypeVector %int 3
|
||||
%v4int = OpTypeVector %int 4
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%v4uint = OpTypeVector %uint 4
|
||||
%v2float = OpTypeVector %float 2
|
||||
%v3float = OpTypeVector %float 3
|
||||
%v4float = OpTypeVector %float 4
|
||||
%43 = OpConstantNull %float
|
||||
%float_0 = OpConstant %float 0
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_7 = OpConstant %float 7
|
||||
%50 = OpConstantNull %v2float
|
||||
%51 = OpConstantNull %v3float
|
||||
%52 = OpConstantNull %v4float
|
||||
%53 = OpConstantComposite %v2int %int_1 %int_2
|
||||
%54 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%55 = OpConstantComposite %v4int %int_1 %int_2 %int_3 %int_4
|
||||
%56 = OpConstantComposite %v2uint %uint_1 %uint_2
|
||||
%57 = OpConstantComposite %v3uint %uint_1 %uint_2 %uint_3
|
||||
%58 = OpConstantComposite %v4uint %uint_1 %uint_2 %uint_3 %uint_4
|
||||
%59 = OpConstantComposite %v2float %float_1 %float_2
|
||||
%60 = OpConstantComposite %v2float %float_2 %float_1
|
||||
%61 = OpConstantComposite %v3float %float_1 %float_2 %float_3
|
||||
%62 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4
|
||||
%float_0_200000003 = OpConstant %float 0.200000003
|
||||
%64 = OpTypeSampler
|
||||
%_ptr_UniformConstant_64 = OpTypePointer UniformConstant %64
|
||||
%66 = OpTypeImage %float 2D 0 1 0 2 R32f
|
||||
%_ptr_UniformConstant_66 = OpTypePointer UniformConstant %66
|
||||
%ptr_float = OpTypePointer Function %float
|
||||
%10 = OpVariable %_ptr_UniformConstant_64 UniformConstant
|
||||
%20 = OpVariable %_ptr_UniformConstant_66 UniformConstant
|
||||
%30 = OpVariable %_ptr_UniformConstant_64 UniformConstant
|
||||
%100 = OpFunction %void None %17
|
||||
%68 = OpLabel
|
||||
%float_var = OpVariable %ptr_float Function
|
||||
%i1 = OpCopyObject %int %int_1
|
||||
%vi12 = OpCopyObject %v2int %53
|
||||
%vi123 = OpCopyObject %v3int %54
|
||||
%vi1234 = OpCopyObject %v4int %55
|
||||
%u1 = OpCopyObject %uint %uint_1
|
||||
%vu12 = OpCopyObject %v2uint %56
|
||||
%vu123 = OpCopyObject %v3uint %57
|
||||
%vu1234 = OpCopyObject %v4uint %58
|
||||
%f1 = OpCopyObject %float %float_1
|
||||
%vf12 = OpCopyObject %v2float %59
|
||||
%vf123 = OpCopyObject %v3float %61
|
||||
%vf1234 = OpCopyObject %v4float %62
|
||||
%69 = OpLoad %64 %10
|
||||
%70 = OpLoad %66 %20
|
||||
%71 = OpImageRead %v4float %70 %vu123
|
||||
%1000 = OpCopyObject %uint %uint_0
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
warning: use of deprecated intrinsic
|
||||
SamplerState x_10 : register(s0, space0);
|
||||
Texture2DArray<float4> x_20 : register(t1, space2);
|
||||
SamplerState x_30 : register(s1, space0);
|
||||
|
||||
void main_1() {
|
||||
float float_var = 0.0f;
|
||||
const int i1 = 1;
|
||||
const int2 vi12 = int2(1, 2);
|
||||
const int3 vi123 = int3(1, 2, 3);
|
||||
const int4 vi1234 = int4(1, 2, 3, 4);
|
||||
const uint u1 = 1u;
|
||||
const uint2 vu12 = uint2(1u, 2u);
|
||||
const uint3 vu123 = uint3(1u, 2u, 3u);
|
||||
const uint4 vu1234 = uint4(1u, 2u, 3u, 4u);
|
||||
const float f1 = 1.0f;
|
||||
const float2 vf12 = float2(1.0f, 2.0f);
|
||||
const float3 vf123 = float3(1.0f, 2.0f, 3.0f);
|
||||
const float4 vf1234 = float4(1.0f, 2.0f, 3.0f, 4.0f);
|
||||
const float4 x_71 = x_20.Load(int4(int3(int2(vu123.xy), int(vu123.z)), 0));
|
||||
const uint x_1000 = 0u;
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
warning: use of deprecated intrinsic
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 61
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main"
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpName %x_10 "x_10"
|
||||
OpName %x_20 "x_20"
|
||||
OpName %x_30 "x_30"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %float_var "float_var"
|
||||
OpName %main "main"
|
||||
OpDecorate %x_10 DescriptorSet 0
|
||||
OpDecorate %x_10 Binding 0
|
||||
OpDecorate %x_20 NonWritable
|
||||
OpDecorate %x_20 DescriptorSet 2
|
||||
OpDecorate %x_20 Binding 1
|
||||
OpDecorate %x_30 DescriptorSet 0
|
||||
OpDecorate %x_30 Binding 1
|
||||
%3 = OpTypeSampler
|
||||
%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
|
||||
%x_10 = OpVariable %_ptr_UniformConstant_3 UniformConstant
|
||||
%float = OpTypeFloat 32
|
||||
%6 = OpTypeImage %float 2D 0 1 0 2 R32f
|
||||
%_ptr_UniformConstant_6 = OpTypePointer UniformConstant %6
|
||||
%x_20 = OpVariable %_ptr_UniformConstant_6 UniformConstant
|
||||
%x_30 = OpVariable %_ptr_UniformConstant_3 UniformConstant
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%15 = OpConstantNull %float
|
||||
%int = OpTypeInt 32 1
|
||||
%int_1 = OpConstant %int 1
|
||||
%v2int = OpTypeVector %int 2
|
||||
%int_2 = OpConstant %int 2
|
||||
%20 = OpConstantComposite %v2int %int_1 %int_2
|
||||
%v3int = OpTypeVector %int 3
|
||||
%int_3 = OpConstant %int 3
|
||||
%23 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%v4int = OpTypeVector %int 4
|
||||
%int_4 = OpConstant %int 4
|
||||
%26 = OpConstantComposite %v4int %int_1 %int_2 %int_3 %int_4
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%31 = OpConstantComposite %v2uint %uint_1 %uint_2
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%34 = OpConstantComposite %v3uint %uint_1 %uint_2 %uint_3
|
||||
%v4uint = OpTypeVector %uint 4
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%37 = OpConstantComposite %v4uint %uint_1 %uint_2 %uint_3 %uint_4
|
||||
%float_1 = OpConstant %float 1
|
||||
%v2float = OpTypeVector %float 2
|
||||
%float_2 = OpConstant %float 2
|
||||
%41 = OpConstantComposite %v2float %float_1 %float_2
|
||||
%v3float = OpTypeVector %float 3
|
||||
%float_3 = OpConstant %float 3
|
||||
%44 = OpConstantComposite %v3float %float_1 %float_2 %float_3
|
||||
%v4float = OpTypeVector %float 4
|
||||
%float_4 = OpConstant %float 4
|
||||
%47 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%main_1 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%float_var = OpVariable %_ptr_Function_float Function %15
|
||||
%49 = OpLoad %6 %x_20
|
||||
%51 = OpVectorShuffle %v2uint %34 %34 0 1
|
||||
%50 = OpBitcast %v2int %51
|
||||
%52 = OpCompositeExtract %int %50 0
|
||||
%53 = OpCompositeExtract %int %50 1
|
||||
%55 = OpCompositeExtract %uint %34 2
|
||||
%54 = OpBitcast %int %55
|
||||
%56 = OpCompositeConstruct %v3int %52 %53 %54
|
||||
%48 = OpImageRead %v4float %49 %56
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %9
|
||||
%59 = OpLabel
|
||||
%60 = OpFunctionCall %void %main_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,110 @@
|
||||
; Test: ConvertUintCoords_Arrayed_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_2.spvasm
|
||||
; SPIR-V
|
||||
; Version: 1.0
|
||||
; Generator: Khronos SPIR-V Tools Assembler; 0
|
||||
; Bound: 1001
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpCapability Sampled1D
|
||||
OpCapability Image1D
|
||||
OpCapability StorageImageExtendedFormats
|
||||
OpCapability ImageQuery
|
||||
OpMemoryModel Logical Simple
|
||||
OpEntryPoint Fragment %100 "main"
|
||||
OpExecutionMode %100 OriginUpperLeft
|
||||
OpName %float_var "float_var"
|
||||
OpName %ptr_float "ptr_float"
|
||||
OpName %i1 "i1"
|
||||
OpName %vi12 "vi12"
|
||||
OpName %vi123 "vi123"
|
||||
OpName %vi1234 "vi1234"
|
||||
OpName %u1 "u1"
|
||||
OpName %vu12 "vu12"
|
||||
OpName %vu123 "vu123"
|
||||
OpName %vu1234 "vu1234"
|
||||
OpName %f1 "f1"
|
||||
OpName %vf12 "vf12"
|
||||
OpName %vf123 "vf123"
|
||||
OpName %vf1234 "vf1234"
|
||||
OpDecorate %10 DescriptorSet 0
|
||||
OpDecorate %10 Binding 0
|
||||
OpDecorate %20 DescriptorSet 2
|
||||
OpDecorate %20 Binding 1
|
||||
OpDecorate %30 DescriptorSet 0
|
||||
OpDecorate %30 Binding 1
|
||||
%void = OpTypeVoid
|
||||
%17 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%uint = OpTypeInt 32 0
|
||||
%int = OpTypeInt 32 1
|
||||
%int_0 = OpConstant %int 0
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%int_4 = OpConstant %int 4
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%uint_100 = OpConstant %uint 100
|
||||
%v2int = OpTypeVector %int 2
|
||||
%v3int = OpTypeVector %int 3
|
||||
%v4int = OpTypeVector %int 4
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%v4uint = OpTypeVector %uint 4
|
||||
%v2float = OpTypeVector %float 2
|
||||
%v3float = OpTypeVector %float 3
|
||||
%v4float = OpTypeVector %float 4
|
||||
%43 = OpConstantNull %float
|
||||
%float_0 = OpConstant %float 0
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_7 = OpConstant %float 7
|
||||
%50 = OpConstantNull %v2float
|
||||
%51 = OpConstantNull %v3float
|
||||
%52 = OpConstantNull %v4float
|
||||
%53 = OpConstantComposite %v2int %int_1 %int_2
|
||||
%54 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%55 = OpConstantComposite %v4int %int_1 %int_2 %int_3 %int_4
|
||||
%56 = OpConstantComposite %v2uint %uint_1 %uint_2
|
||||
%57 = OpConstantComposite %v3uint %uint_1 %uint_2 %uint_3
|
||||
%58 = OpConstantComposite %v4uint %uint_1 %uint_2 %uint_3 %uint_4
|
||||
%59 = OpConstantComposite %v2float %float_1 %float_2
|
||||
%60 = OpConstantComposite %v2float %float_2 %float_1
|
||||
%61 = OpConstantComposite %v3float %float_1 %float_2 %float_3
|
||||
%62 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4
|
||||
%float_0_200000003 = OpConstant %float 0.200000003
|
||||
%64 = OpTypeSampler
|
||||
%_ptr_UniformConstant_64 = OpTypePointer UniformConstant %64
|
||||
%66 = OpTypeImage %float 2D 0 1 0 2 R32f
|
||||
%_ptr_UniformConstant_66 = OpTypePointer UniformConstant %66
|
||||
%ptr_float = OpTypePointer Function %float
|
||||
%10 = OpVariable %_ptr_UniformConstant_64 UniformConstant
|
||||
%20 = OpVariable %_ptr_UniformConstant_66 UniformConstant
|
||||
%30 = OpVariable %_ptr_UniformConstant_64 UniformConstant
|
||||
%100 = OpFunction %void None %17
|
||||
%68 = OpLabel
|
||||
%float_var = OpVariable %ptr_float Function
|
||||
%i1 = OpCopyObject %int %int_1
|
||||
%vi12 = OpCopyObject %v2int %53
|
||||
%vi123 = OpCopyObject %v3int %54
|
||||
%vi1234 = OpCopyObject %v4int %55
|
||||
%u1 = OpCopyObject %uint %uint_1
|
||||
%vu12 = OpCopyObject %v2uint %56
|
||||
%vu123 = OpCopyObject %v3uint %57
|
||||
%vu1234 = OpCopyObject %v4uint %58
|
||||
%f1 = OpCopyObject %float %float_1
|
||||
%vf12 = OpCopyObject %v2float %59
|
||||
%vf123 = OpCopyObject %v3float %61
|
||||
%vf1234 = OpCopyObject %v4float %62
|
||||
%69 = OpLoad %64 %10
|
||||
%70 = OpLoad %66 %20
|
||||
OpImageWrite %70 %vu123 %vf1234
|
||||
%1000 = OpCopyObject %uint %uint_0
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
SamplerState x_10 : register(s0, space0);
|
||||
RWTexture2DArray<float4> x_20 : register(u1, space2);
|
||||
SamplerState x_30 : register(s1, space0);
|
||||
|
||||
void main_1() {
|
||||
float float_var = 0.0f;
|
||||
const int i1 = 1;
|
||||
const int2 vi12 = int2(1, 2);
|
||||
const int3 vi123 = int3(1, 2, 3);
|
||||
const int4 vi1234 = int4(1, 2, 3, 4);
|
||||
const uint u1 = 1u;
|
||||
const uint2 vu12 = uint2(1u, 2u);
|
||||
const uint3 vu123 = uint3(1u, 2u, 3u);
|
||||
const uint4 vu1234 = uint4(1u, 2u, 3u, 4u);
|
||||
const float f1 = 1.0f;
|
||||
const float2 vf12 = float2(1.0f, 2.0f);
|
||||
const float3 vf123 = float3(1.0f, 2.0f, 3.0f);
|
||||
const float4 vf1234 = float4(1.0f, 2.0f, 3.0f, 4.0f);
|
||||
x_20[int3(int2(vu123.xy), int(vu123.z))] = vf1234;
|
||||
const uint x_1000 = 0u;
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 61
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main"
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpName %x_10 "x_10"
|
||||
OpName %x_20 "x_20"
|
||||
OpName %x_30 "x_30"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %float_var "float_var"
|
||||
OpName %main "main"
|
||||
OpDecorate %x_10 DescriptorSet 0
|
||||
OpDecorate %x_10 Binding 0
|
||||
OpDecorate %x_20 NonReadable
|
||||
OpDecorate %x_20 DescriptorSet 2
|
||||
OpDecorate %x_20 Binding 1
|
||||
OpDecorate %x_30 DescriptorSet 0
|
||||
OpDecorate %x_30 Binding 1
|
||||
%3 = OpTypeSampler
|
||||
%_ptr_UniformConstant_3 = OpTypePointer UniformConstant %3
|
||||
%x_10 = OpVariable %_ptr_UniformConstant_3 UniformConstant
|
||||
%float = OpTypeFloat 32
|
||||
%6 = OpTypeImage %float 2D 0 1 0 2 R32f
|
||||
%_ptr_UniformConstant_6 = OpTypePointer UniformConstant %6
|
||||
%x_20 = OpVariable %_ptr_UniformConstant_6 UniformConstant
|
||||
%x_30 = OpVariable %_ptr_UniformConstant_3 UniformConstant
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%15 = OpConstantNull %float
|
||||
%int = OpTypeInt 32 1
|
||||
%int_1 = OpConstant %int 1
|
||||
%v2int = OpTypeVector %int 2
|
||||
%int_2 = OpConstant %int 2
|
||||
%20 = OpConstantComposite %v2int %int_1 %int_2
|
||||
%v3int = OpTypeVector %int 3
|
||||
%int_3 = OpConstant %int 3
|
||||
%23 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%v4int = OpTypeVector %int 4
|
||||
%int_4 = OpConstant %int 4
|
||||
%26 = OpConstantComposite %v4int %int_1 %int_2 %int_3 %int_4
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%31 = OpConstantComposite %v2uint %uint_1 %uint_2
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%34 = OpConstantComposite %v3uint %uint_1 %uint_2 %uint_3
|
||||
%v4uint = OpTypeVector %uint 4
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%37 = OpConstantComposite %v4uint %uint_1 %uint_2 %uint_3 %uint_4
|
||||
%float_1 = OpConstant %float 1
|
||||
%v2float = OpTypeVector %float 2
|
||||
%float_2 = OpConstant %float 2
|
||||
%41 = OpConstantComposite %v2float %float_1 %float_2
|
||||
%v3float = OpTypeVector %float 3
|
||||
%float_3 = OpConstant %float 3
|
||||
%44 = OpConstantComposite %v3float %float_1 %float_2 %float_3
|
||||
%v4float = OpTypeVector %float 4
|
||||
%float_4 = OpConstant %float 4
|
||||
%47 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%main_1 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%float_var = OpVariable %_ptr_Function_float Function %15
|
||||
%49 = OpLoad %6 %x_20
|
||||
%51 = OpVectorShuffle %v2uint %34 %34 0 1
|
||||
%50 = OpBitcast %v2int %51
|
||||
%52 = OpCompositeExtract %int %50 0
|
||||
%53 = OpCompositeExtract %int %50 1
|
||||
%55 = OpCompositeExtract %uint %34 2
|
||||
%54 = OpBitcast %int %55
|
||||
%56 = OpCompositeConstruct %v3int %52 %53 %54
|
||||
OpImageWrite %49 %56 %47
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %9
|
||||
%59 = OpLabel
|
||||
%60 = OpFunctionCall %void %main_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,27 @@
|
||||
SamplerState x_10 : register(s0, space0);
|
||||
Texture2D<float4> x_20 : register(t1, space2);
|
||||
SamplerState x_30 : register(s1, space0);
|
||||
|
||||
void main_1() {
|
||||
float float_var = 0.0f;
|
||||
const int i1 = 1;
|
||||
const int2 vi12 = int2(1, 2);
|
||||
const int3 vi123 = int3(1, 2, 3);
|
||||
const int4 vi1234 = int4(1, 2, 3, 4);
|
||||
const uint u1 = 1u;
|
||||
const uint2 vu12 = uint2(1u, 2u);
|
||||
const uint3 vu123 = uint3(1u, 2u, 3u);
|
||||
const uint4 vu1234 = uint4(1u, 2u, 3u, 4u);
|
||||
const float f1 = 1.0f;
|
||||
const float2 vf12 = float2(1.0f, 2.0f);
|
||||
const float3 vf123 = float3(1.0f, 2.0f, 3.0f);
|
||||
const float4 vf1234 = float4(1.0f, 2.0f, 3.0f, 4.0f);
|
||||
const float4 x_73 = x_20.Load(int3(int2(vu12), 0));
|
||||
const uint x_1000 = 0u;
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
warning: use of deprecated intrinsic
|
||||
SamplerState x_10 : register(s0, space0);
|
||||
Texture2D<float4> x_20 : register(t1, space2);
|
||||
SamplerState x_30 : register(s1, space0);
|
||||
|
||||
void main_1() {
|
||||
float float_var = 0.0f;
|
||||
const int i1 = 1;
|
||||
const int2 vi12 = int2(1, 2);
|
||||
const int3 vi123 = int3(1, 2, 3);
|
||||
const int4 vi1234 = int4(1, 2, 3, 4);
|
||||
const uint u1 = 1u;
|
||||
const uint2 vu12 = uint2(1u, 2u);
|
||||
const uint3 vu123 = uint3(1u, 2u, 3u);
|
||||
const uint4 vu1234 = uint4(1u, 2u, 3u, 4u);
|
||||
const float f1 = 1.0f;
|
||||
const float2 vf12 = float2(1.0f, 2.0f);
|
||||
const float3 vf123 = float3(1.0f, 2.0f, 3.0f);
|
||||
const float4 vf1234 = float4(1.0f, 2.0f, 3.0f, 4.0f);
|
||||
const float4 x_71 = x_20.Load(int3(int2(vu12), 0));
|
||||
const uint x_1000 = 0u;
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
warning: use of deprecated intrinsic
|
||||
SamplerState x_10 : register(s0, space0);
|
||||
Texture2DArray<float4> x_20 : register(t1, space2);
|
||||
SamplerState x_30 : register(s1, space0);
|
||||
|
||||
void main_1() {
|
||||
const float f1 = 1.0f;
|
||||
const float2 vf12 = float2(1.0f, 2.0f);
|
||||
const float2 vf21 = float2(2.0f, 1.0f);
|
||||
const float3 vf123 = float3(1.0f, 2.0f, 3.0f);
|
||||
const float4 vf1234 = float4(1.0f, 2.0f, 3.0f, 4.0f);
|
||||
const int i1 = 1;
|
||||
const int2 vi12 = int2(1, 2);
|
||||
const int3 vi123 = int3(1, 2, 3);
|
||||
const int4 vi1234 = int4(1, 2, 3, 4);
|
||||
const uint u1 = 1u;
|
||||
const uint2 vu12 = uint2(1u, 2u);
|
||||
const uint3 vu123 = uint3(1u, 2u, 3u);
|
||||
const uint4 vu1234 = uint4(1u, 2u, 3u, 4u);
|
||||
const float coords1 = 1.0f;
|
||||
const float2 coords12 = vf12;
|
||||
const float3 coords123 = vf123;
|
||||
const float4 coords1234 = vf1234;
|
||||
int3 tint_tmp;
|
||||
x_20.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
|
||||
int3 tint_tmp_1;
|
||||
x_20.GetDimensions(tint_tmp_1.x, tint_tmp_1.y, tint_tmp_1.z);
|
||||
const int3 x_99 = int3(tint_tmp.xy, tint_tmp_1.z);
|
||||
const float4 x_98 = x_20.Load(int4(int3(vi123.xy, vi123.z), 0));
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
SamplerState x_10 : register(s0, space0);
|
||||
Texture2DArray<float4> x_20 : register(t1, space2);
|
||||
SamplerState x_30 : register(s1, space0);
|
||||
|
||||
void main_1() {
|
||||
float float_var = 0.0f;
|
||||
const int i1 = 1;
|
||||
const int2 vi12 = int2(1, 2);
|
||||
const int3 vi123 = int3(1, 2, 3);
|
||||
const int4 vi1234 = int4(1, 2, 3, 4);
|
||||
const uint u1 = 1u;
|
||||
const uint2 vu12 = uint2(1u, 2u);
|
||||
const uint3 vu123 = uint3(1u, 2u, 3u);
|
||||
const uint4 vu1234 = uint4(1u, 2u, 3u, 4u);
|
||||
const float f1 = 1.0f;
|
||||
const float2 vf12 = float2(1.0f, 2.0f);
|
||||
const float3 vf123 = float3(1.0f, 2.0f, 3.0f);
|
||||
const float4 vf1234 = float4(1.0f, 2.0f, 3.0f, 4.0f);
|
||||
const float4 x_73 = x_20.Load(int4(int3(vi123.xy, vi123.z), 0));
|
||||
const uint x_1000 = 0u;
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
warning: use of deprecated intrinsic
|
||||
SamplerState x_10 : register(s0, space0);
|
||||
Texture2DArray<float4> x_20 : register(t1, space2);
|
||||
SamplerState x_30 : register(s1, space0);
|
||||
|
||||
void main_1() {
|
||||
float float_var = 0.0f;
|
||||
const int i1 = 1;
|
||||
const int2 vi12 = int2(1, 2);
|
||||
const int3 vi123 = int3(1, 2, 3);
|
||||
const int4 vi1234 = int4(1, 2, 3, 4);
|
||||
const uint u1 = 1u;
|
||||
const uint2 vu12 = uint2(1u, 2u);
|
||||
const uint3 vu123 = uint3(1u, 2u, 3u);
|
||||
const uint4 vu1234 = uint4(1u, 2u, 3u, 4u);
|
||||
const float f1 = 1.0f;
|
||||
const float2 vf12 = float2(1.0f, 2.0f);
|
||||
const float3 vf123 = float3(1.0f, 2.0f, 3.0f);
|
||||
const float4 vf1234 = float4(1.0f, 2.0f, 3.0f, 4.0f);
|
||||
const float4 x_71 = x_20.Load(int4(int3(vi123.xy, vi123.z), 0));
|
||||
const uint x_1000 = 0u;
|
||||
return;
|
||||
}
|
||||
|
||||
void main() {
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 22
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main"
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpName %var_1 "var_1"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %main "main"
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Private_uint = OpTypePointer Private %uint
|
||||
%4 = OpConstantNull %uint
|
||||
%var_1 = OpVariable %_ptr_Private_uint Private %4
|
||||
%void = OpTypeVoid
|
||||
%5 = OpTypeFunction %void
|
||||
%bool = OpTypeBool
|
||||
%false = OpConstantFalse %bool
|
||||
%true = OpConstantTrue %bool
|
||||
%main_1 = OpFunction %void None %5
|
||||
%8 = OpLabel
|
||||
OpBranch %9
|
||||
%9 = OpLabel
|
||||
OpLoopMerge %10 %11 None
|
||||
OpBranch %12
|
||||
%12 = OpLabel
|
||||
OpSelectionMerge %15 None
|
||||
OpBranchConditional %false %16 %17
|
||||
%16 = OpLabel
|
||||
OpBranch %15
|
||||
%17 = OpLabel
|
||||
OpBranch %10
|
||||
%15 = OpLabel
|
||||
OpBranch %11
|
||||
%11 = OpLabel
|
||||
OpBranchConditional %true %9 %10
|
||||
%10 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %5
|
||||
%20 = OpLabel
|
||||
%21 = OpFunctionCall %void %main_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,46 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 22
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main"
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpName %var_1 "var_1"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %main "main"
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Private_uint = OpTypePointer Private %uint
|
||||
%4 = OpConstantNull %uint
|
||||
%var_1 = OpVariable %_ptr_Private_uint Private %4
|
||||
%void = OpTypeVoid
|
||||
%5 = OpTypeFunction %void
|
||||
%bool = OpTypeBool
|
||||
%false = OpConstantFalse %bool
|
||||
%true = OpConstantTrue %bool
|
||||
%main_1 = OpFunction %void None %5
|
||||
%8 = OpLabel
|
||||
OpBranch %9
|
||||
%9 = OpLabel
|
||||
OpLoopMerge %10 %11 None
|
||||
OpBranch %12
|
||||
%12 = OpLabel
|
||||
OpSelectionMerge %15 None
|
||||
OpBranchConditional %false %16 %17
|
||||
%16 = OpLabel
|
||||
OpBranch %15
|
||||
%17 = OpLabel
|
||||
OpBranch %10
|
||||
%15 = OpLabel
|
||||
OpBranch %11
|
||||
%11 = OpLabel
|
||||
OpBranchConditional %true %9 %10
|
||||
%10 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %5
|
||||
%20 = OpLabel
|
||||
%21 = OpFunctionCall %void %main_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,46 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 22
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main"
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpName %var_1 "var_1"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %main "main"
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Private_uint = OpTypePointer Private %uint
|
||||
%4 = OpConstantNull %uint
|
||||
%var_1 = OpVariable %_ptr_Private_uint Private %4
|
||||
%void = OpTypeVoid
|
||||
%5 = OpTypeFunction %void
|
||||
%bool = OpTypeBool
|
||||
%false = OpConstantFalse %bool
|
||||
%true = OpConstantTrue %bool
|
||||
%main_1 = OpFunction %void None %5
|
||||
%8 = OpLabel
|
||||
OpBranch %9
|
||||
%9 = OpLabel
|
||||
OpLoopMerge %10 %11 None
|
||||
OpBranch %12
|
||||
%12 = OpLabel
|
||||
OpSelectionMerge %15 None
|
||||
OpBranchConditional %false %16 %17
|
||||
%16 = OpLabel
|
||||
OpBranch %15
|
||||
%17 = OpLabel
|
||||
OpBranch %10
|
||||
%15 = OpLabel
|
||||
OpBranch %11
|
||||
%11 = OpLabel
|
||||
OpBranchConditional %true %10 %9
|
||||
%10 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %5
|
||||
%20 = OpLabel
|
||||
%21 = OpFunctionCall %void %main_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,46 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 22
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main"
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpName %var_1 "var_1"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %main "main"
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Private_uint = OpTypePointer Private %uint
|
||||
%4 = OpConstantNull %uint
|
||||
%var_1 = OpVariable %_ptr_Private_uint Private %4
|
||||
%void = OpTypeVoid
|
||||
%5 = OpTypeFunction %void
|
||||
%bool = OpTypeBool
|
||||
%false = OpConstantFalse %bool
|
||||
%true = OpConstantTrue %bool
|
||||
%main_1 = OpFunction %void None %5
|
||||
%8 = OpLabel
|
||||
OpBranch %9
|
||||
%9 = OpLabel
|
||||
OpLoopMerge %10 %11 None
|
||||
OpBranch %12
|
||||
%12 = OpLabel
|
||||
OpSelectionMerge %15 None
|
||||
OpBranchConditional %false %16 %17
|
||||
%16 = OpLabel
|
||||
OpBranch %15
|
||||
%17 = OpLabel
|
||||
OpBranch %10
|
||||
%15 = OpLabel
|
||||
OpBranch %11
|
||||
%11 = OpLabel
|
||||
OpBranchConditional %true %9 %10
|
||||
%10 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %5
|
||||
%20 = OpLabel
|
||||
%21 = OpFunctionCall %void %main_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,62 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 29
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main"
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpName %var_1 "var_1"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %main "main"
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Private_uint = OpTypePointer Private %uint
|
||||
%4 = OpConstantNull %uint
|
||||
%var_1 = OpVariable %_ptr_Private_uint Private %4
|
||||
%void = OpTypeVoid
|
||||
%5 = OpTypeFunction %void
|
||||
%bool = OpTypeBool
|
||||
%false = OpConstantFalse %bool
|
||||
%true = OpConstantTrue %bool
|
||||
%main_1 = OpFunction %void None %5
|
||||
%8 = OpLabel
|
||||
OpBranch %9
|
||||
%9 = OpLabel
|
||||
OpLoopMerge %10 %11 None
|
||||
OpBranch %12
|
||||
%12 = OpLabel
|
||||
OpSelectionMerge %15 None
|
||||
OpBranchConditional %false %16 %17
|
||||
%16 = OpLabel
|
||||
OpBranch %15
|
||||
%17 = OpLabel
|
||||
OpBranch %10
|
||||
%15 = OpLabel
|
||||
OpBranch %18
|
||||
%18 = OpLabel
|
||||
OpLoopMerge %19 %20 None
|
||||
OpBranch %21
|
||||
%21 = OpLabel
|
||||
OpSelectionMerge %23 None
|
||||
OpBranchConditional %true %24 %25
|
||||
%24 = OpLabel
|
||||
OpBranch %23
|
||||
%25 = OpLabel
|
||||
OpBranch %19
|
||||
%23 = OpLabel
|
||||
OpBranch %20
|
||||
%20 = OpLabel
|
||||
OpBranchConditional %false %18 %19
|
||||
%19 = OpLabel
|
||||
OpBranch %11
|
||||
%11 = OpLabel
|
||||
OpBranch %9
|
||||
%10 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %5
|
||||
%27 = OpLabel
|
||||
%28 = OpFunctionCall %void %main_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,44 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 21
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main"
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpName %var_1 "var_1"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %main "main"
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Private_uint = OpTypePointer Private %uint
|
||||
%4 = OpConstantNull %uint
|
||||
%var_1 = OpVariable %_ptr_Private_uint Private %4
|
||||
%void = OpTypeVoid
|
||||
%5 = OpTypeFunction %void
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%bool = OpTypeBool
|
||||
%false = OpConstantFalse %bool
|
||||
%uint_5 = OpConstant %uint 5
|
||||
%main_1 = OpFunction %void None %5
|
||||
%8 = OpLabel
|
||||
OpStore %var_1 %uint_0
|
||||
OpBranch %10
|
||||
%10 = OpLabel
|
||||
OpLoopMerge %11 %12 None
|
||||
OpBranch %13
|
||||
%13 = OpLabel
|
||||
OpStore %var_1 %uint_1
|
||||
OpBranch %12
|
||||
%12 = OpLabel
|
||||
OpBranchConditional %false %10 %11
|
||||
%11 = OpLabel
|
||||
OpStore %var_1 %uint_5
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %5
|
||||
%19 = OpLabel
|
||||
%20 = OpFunctionCall %void %main_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,44 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 21
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main"
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpName %var_1 "var_1"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %main "main"
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Private_uint = OpTypePointer Private %uint
|
||||
%4 = OpConstantNull %uint
|
||||
%var_1 = OpVariable %_ptr_Private_uint Private %4
|
||||
%void = OpTypeVoid
|
||||
%5 = OpTypeFunction %void
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%bool = OpTypeBool
|
||||
%false = OpConstantFalse %bool
|
||||
%uint_5 = OpConstant %uint 5
|
||||
%main_1 = OpFunction %void None %5
|
||||
%8 = OpLabel
|
||||
OpStore %var_1 %uint_0
|
||||
OpBranch %10
|
||||
%10 = OpLabel
|
||||
OpLoopMerge %11 %12 None
|
||||
OpBranch %13
|
||||
%13 = OpLabel
|
||||
OpStore %var_1 %uint_1
|
||||
OpBranch %12
|
||||
%12 = OpLabel
|
||||
OpBranchConditional %false %11 %10
|
||||
%11 = OpLabel
|
||||
OpStore %var_1 %uint_5
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %5
|
||||
%19 = OpLabel
|
||||
%20 = OpFunctionCall %void %main_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,40 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 19
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main"
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpName %var_1 "var_1"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %main "main"
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Private_uint = OpTypePointer Private %uint
|
||||
%4 = OpConstantNull %uint
|
||||
%var_1 = OpVariable %_ptr_Private_uint Private %4
|
||||
%void = OpTypeVoid
|
||||
%5 = OpTypeFunction %void
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%bool = OpTypeBool
|
||||
%false = OpConstantFalse %bool
|
||||
%main_1 = OpFunction %void None %5
|
||||
%8 = OpLabel
|
||||
OpBranch %9
|
||||
%9 = OpLabel
|
||||
OpLoopMerge %10 %11 None
|
||||
OpBranch %12
|
||||
%12 = OpLabel
|
||||
OpBranch %11
|
||||
%11 = OpLabel
|
||||
OpStore %var_1 %uint_1
|
||||
OpBranchConditional %false %9 %10
|
||||
%10 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %5
|
||||
%17 = OpLabel
|
||||
%18 = OpFunctionCall %void %main_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,68 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 33
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main"
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpName %x_1 "x_1"
|
||||
OpName %main_1 "main_1"
|
||||
OpName %x_2 "x_2"
|
||||
OpName %main "main"
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Private_uint = OpTypePointer Private %uint
|
||||
%4 = OpConstantNull %uint
|
||||
%x_1 = OpVariable %_ptr_Private_uint Private %4
|
||||
%void = OpTypeVoid
|
||||
%5 = OpTypeFunction %void
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%bool = OpTypeBool
|
||||
%false = OpConstantFalse %bool
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%true = OpConstantTrue %bool
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%uint_5 = OpConstant %uint 5
|
||||
%main_1 = OpFunction %void None %5
|
||||
%8 = OpLabel
|
||||
%x_2 = OpVariable %_ptr_Function_uint Function %4
|
||||
OpStore %x_1 %uint_0
|
||||
OpBranch %10
|
||||
%10 = OpLabel
|
||||
OpLoopMerge %11 %12 None
|
||||
OpBranch %13
|
||||
%13 = OpLabel
|
||||
OpStore %x_1 %uint_1
|
||||
OpSelectionMerge %19 None
|
||||
OpBranchConditional %false %20 %19
|
||||
%20 = OpLabel
|
||||
OpBranch %11
|
||||
%19 = OpLabel
|
||||
OpStore %x_1 %uint_3
|
||||
OpSelectionMerge %23 None
|
||||
OpBranchConditional %true %24 %25
|
||||
%24 = OpLabel
|
||||
%26 = OpIAdd %uint %uint_1 %uint_1
|
||||
OpStore %x_2 %26
|
||||
OpBranch %23
|
||||
%25 = OpLabel
|
||||
OpReturn
|
||||
%23 = OpLabel
|
||||
%27 = OpLoad %uint %x_2
|
||||
OpStore %x_1 %27
|
||||
OpBranch %12
|
||||
%12 = OpLabel
|
||||
OpStore %x_1 %uint_4
|
||||
OpBranchConditional %false %11 %10
|
||||
%11 = OpLabel
|
||||
OpStore %x_1 %uint_5
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %5
|
||||
%31 = OpLabel
|
||||
%32 = OpFunctionCall %void %main_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
Reference in New Issue
Block a user