Tests for sign handling in integer operations
Added tests to verify that integer operations are not sensitive to operand sign.
Includes tests for most built-in instructions and the glsl extension.
New tests:
dEQP-VK.spirv_assembly.instruction.compute.signed_op.*
Components: Vulkan
VK-GL-CTS issue: 2382
Change-Id: I71b4b1851b87ada137acb83498bf2a2de2ace698
diff --git a/AndroidGen.mk b/AndroidGen.mk
index 9ba1b68..c2441a6 100644
--- a/AndroidGen.mk
+++ b/AndroidGen.mk
@@ -351,6 +351,7 @@
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmPointerParameterTests.cpp \
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmPtrAccessChainTests.cpp \
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmSignedIntCompareTests.cpp \
+ external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmSignedOpTests.cpp \
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmSpirvVersion1p4Tests.cpp \
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmSpirvVersionTests.cpp \
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmTests.cpp \
diff --git a/android/cts/master/vk-master-2020-03-01.txt b/android/cts/master/vk-master-2020-03-01.txt
index 5171c6b..54073e2 100644
--- a/android/cts/master/vk-master-2020-03-01.txt
+++ b/android/cts/master/vk-master-2020-03-01.txt
@@ -136965,6 +136965,29 @@
dEQP-VK.spirv_assembly.instruction.compute.signed_int_compare.uint_sgreaterthan
dEQP-VK.spirv_assembly.instruction.compute.signed_int_compare.uint_slessthan
dEQP-VK.spirv_assembly.instruction.compute.signed_int_compare.uint_slessthanequal
+dEQP-VK.spirv_assembly.instruction.compute.signed_op.glsl_int_findumsb
+dEQP-VK.spirv_assembly.instruction.compute.signed_op.glsl_int_uclamp
+dEQP-VK.spirv_assembly.instruction.compute.signed_op.glsl_int_umax
+dEQP-VK.spirv_assembly.instruction.compute.signed_op.glsl_int_umin
+dEQP-VK.spirv_assembly.instruction.compute.signed_op.glsl_uint_findsmsb
+dEQP-VK.spirv_assembly.instruction.compute.signed_op.glsl_uint_sabs
+dEQP-VK.spirv_assembly.instruction.compute.signed_op.glsl_uint_sclamp
+dEQP-VK.spirv_assembly.instruction.compute.signed_op.glsl_uint_smax
+dEQP-VK.spirv_assembly.instruction.compute.signed_op.glsl_uint_smin
+dEQP-VK.spirv_assembly.instruction.compute.signed_op.glsl_uint_ssign
+dEQP-VK.spirv_assembly.instruction.compute.signed_op.int_atomicumax
+dEQP-VK.spirv_assembly.instruction.compute.signed_op.int_atomicumin
+dEQP-VK.spirv_assembly.instruction.compute.signed_op.int_ugreaterthan
+dEQP-VK.spirv_assembly.instruction.compute.signed_op.int_ugreaterthanequal
+dEQP-VK.spirv_assembly.instruction.compute.signed_op.int_ulessthan
+dEQP-VK.spirv_assembly.instruction.compute.signed_op.int_ulessthanequal
+dEQP-VK.spirv_assembly.instruction.compute.signed_op.uint_atomicsmax
+dEQP-VK.spirv_assembly.instruction.compute.signed_op.uint_atomicsmin
+dEQP-VK.spirv_assembly.instruction.compute.signed_op.uint_sdiv
+dEQP-VK.spirv_assembly.instruction.compute.signed_op.uint_smod
+dEQP-VK.spirv_assembly.instruction.compute.signed_op.uint_smulextended
+dEQP-VK.spirv_assembly.instruction.compute.signed_op.uint_snegate
+dEQP-VK.spirv_assembly.instruction.compute.signed_op.uint_srem
dEQP-VK.spirv_assembly.instruction.compute.unused_variables.variable_set_0_binding_5
dEQP-VK.spirv_assembly.instruction.compute.unused_variables.function_set_0_binding_5
dEQP-VK.spirv_assembly.instruction.compute.unused_variables.variable_set_5_binding_5
diff --git a/android/cts/master/vk-master.txt b/android/cts/master/vk-master.txt
index cc7d2a2..7753c16 100644
--- a/android/cts/master/vk-master.txt
+++ b/android/cts/master/vk-master.txt
Binary files differ
diff --git a/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_int_findumsb.amber b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_int_findumsb.amber
new file mode 100644
index 0000000..d34980b
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_int_findumsb.amber
@@ -0,0 +1,76 @@
+#!amber
+# Test GLSL.std.450 FindUMsb instruction
+
+SHADER compute test SPIRV-ASM
+ OpCapability Shader
+ %glsl = OpExtInstImport "GLSL.std.450"
+
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationId
+ OpExecutionMode %main LocalSize 1 1 1
+
+ OpDecorate %gl_GlobalInvocationId BuiltIn GlobalInvocationId
+ OpDecorate %ra_int ArrayStride 4
+ OpDecorate %struct_int2 BufferBlock
+ OpMemberDecorate %struct_int2 0 Offset 0
+ OpDecorate %input DescriptorSet 0
+ OpDecorate %input Binding 0
+ OpDecorate %output DescriptorSet 0
+ OpDecorate %output Binding 1
+
+ %uint = OpTypeInt 32 0
+ %ptr_uint = OpTypePointer Uniform %uint
+ %ptr_input_uint = OpTypePointer Input %uint
+ %uint3 = OpTypeVector %uint 3
+ %ptr_input_uint3 = OpTypePointer Input %uint3
+ %void = OpTypeVoid
+ %voidFn = OpTypeFunction %void
+
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %ra_int = OpTypeRuntimeArray %int
+ %int2 = OpTypeVector %int 2
+ %ptr_int = OpTypePointer Uniform %int
+ %struct_int2 = OpTypeStruct %ra_int
+ %ptr_struct_int2 = OpTypePointer Uniform %struct_int2
+
+%gl_GlobalInvocationId = OpVariable %ptr_input_uint3 Input
+ %input = OpVariable %ptr_struct_int2 Uniform
+
+ %output = OpVariable %ptr_struct_int2 Uniform
+ %main = OpFunction %void None %voidFn
+ %mainStart = OpLabel
+ %index_ptr = OpAccessChain %ptr_input_uint %gl_GlobalInvocationId %uint_0
+ %index = OpLoad %uint %index_ptr
+ %in_ptr = OpAccessChain %ptr_int %input %uint_0 %index
+ %invalue = OpLoad %int %in_ptr
+
+ %outvalue = OpExtInst %int %glsl FindUMsb %invalue
+ %out_ptr = OpAccessChain %ptr_int %output %uint_0 %index
+ OpStore %out_ptr %outvalue
+
+ OpReturn
+ OpFunctionEnd
+END
+BUFFER data0 DATA_TYPE int32 DATA
+ 0 -1
+END
+
+BUFFER data1 DATA_TYPE int32 DATA
+ 8 8
+END
+
+BUFFER expected0 DATA_TYPE int32 DATA
+-1 31
+END
+
+PIPELINE compute compute_pipeline
+ ATTACH test
+ BIND BUFFER data0 AS storage DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER data1 AS storage DESCRIPTOR_SET 0 BINDING 1
+END
+
+RUN compute_pipeline 2 1 1
+
+EXPECT data1 EQ_BUFFER expected0
diff --git a/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp.amber b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp.amber
new file mode 100644
index 0000000..db6ef7e
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_int_uclamp.amber
@@ -0,0 +1,97 @@
+#!amber
+# Test GLSL.std.450 UClamp instruction
+
+SHADER compute test SPIRV-ASM
+ OpCapability Shader
+ %glsl = OpExtInstImport "GLSL.std.450"
+
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationId
+ OpExecutionMode %main LocalSize 1 1 1
+
+ OpDecorate %gl_GlobalInvocationId BuiltIn GlobalInvocationId
+ OpDecorate %ra_int ArrayStride 4
+ OpDecorate %struct_int4 BufferBlock
+ OpMemberDecorate %struct_int4 0 Offset 0
+ OpDecorate %input0 DescriptorSet 0
+ OpDecorate %input0 Binding 0
+ OpDecorate %input1 DescriptorSet 0
+ OpDecorate %input1 Binding 1
+ OpDecorate %input2 DescriptorSet 0
+ OpDecorate %input2 Binding 2
+ OpDecorate %output DescriptorSet 0
+ OpDecorate %output Binding 3
+
+ %uint = OpTypeInt 32 0
+ %ptr_uint = OpTypePointer Uniform %uint
+ %ptr_input_uint = OpTypePointer Input %uint
+ %uint3 = OpTypeVector %uint 3
+ %ptr_input_uint3 = OpTypePointer Input %uint3
+ %void = OpTypeVoid
+ %voidFn = OpTypeFunction %void
+
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %ra_int = OpTypeRuntimeArray %int
+ %int4 = OpTypeVector %int 4
+ %ptr_input_int = OpTypePointer Input %int
+ %ptr_int = OpTypePointer Uniform %int
+ %struct_int4 = OpTypeStruct %ra_int
+ %ptr_struct_int4 = OpTypePointer Uniform %struct_int4
+
+%gl_GlobalInvocationId = OpVariable %ptr_input_uint3 Input
+ %input0 = OpVariable %ptr_struct_int4 Uniform
+ %input1 = OpVariable %ptr_struct_int4 Uniform
+ %input2 = OpVariable %ptr_struct_int4 Uniform
+
+ %output = OpVariable %ptr_struct_int4 Uniform
+ %main = OpFunction %void None %voidFn
+ %mainStart = OpLabel
+ %index_ptr = OpAccessChain %ptr_input_uint %gl_GlobalInvocationId %uint_0
+ %index = OpLoad %uint %index_ptr
+ %in_ptr0 = OpAccessChain %ptr_int %input0 %uint_0 %index
+ %invalue0 = OpLoad %int %in_ptr0
+ %in_ptr1 = OpAccessChain %ptr_int %input1 %uint_0 %index
+ %invalue1 = OpLoad %int %in_ptr1
+ %in_ptr2 = OpAccessChain %ptr_int %input2 %uint_0 %index
+ %invalue2 = OpLoad %int %in_ptr2
+
+ %outvalue = OpExtInst %int %glsl UClamp %invalue0 %invalue1 %invalue2
+ %out_ptr = OpAccessChain %ptr_int %output %uint_0 %index
+ OpStore %out_ptr %outvalue
+
+ OpReturn
+ OpFunctionEnd
+END
+BUFFER data0 DATA_TYPE int32 DATA
+-9 -5 -3
+END
+
+BUFFER data1 DATA_TYPE int32 DATA
+ 5 4 -2
+END
+
+BUFFER data2 DATA_TYPE int32 DATA
+ 5 -4 -1
+END
+
+BUFFER data3 DATA_TYPE int32 DATA
+ 8 8 8
+END
+
+BUFFER expected0 DATA_TYPE int32 DATA
+ 5 -5 -2
+END
+
+PIPELINE compute compute_pipeline
+ ATTACH test
+ BIND BUFFER data0 AS storage DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER data1 AS storage DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER data2 AS storage DESCRIPTOR_SET 0 BINDING 2
+ BIND BUFFER data3 AS storage DESCRIPTOR_SET 0 BINDING 3
+END
+
+RUN compute_pipeline 3 1 1
+
+EXPECT data3 EQ_BUFFER expected0
diff --git a/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_int_umax.amber b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_int_umax.amber
new file mode 100644
index 0000000..8910503
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_int_umax.amber
@@ -0,0 +1,89 @@
+#!amber
+# Test GLSL.std.450 UMax instruction
+
+SHADER compute test SPIRV-ASM
+ OpCapability Shader
+ %glsl = OpExtInstImport "GLSL.std.450"
+
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationId
+ OpExecutionMode %main LocalSize 1 1 1
+
+ OpDecorate %gl_GlobalInvocationId BuiltIn GlobalInvocationId
+ OpDecorate %ra_int ArrayStride 4
+ OpDecorate %struct_int3 BufferBlock
+ OpMemberDecorate %struct_int3 0 Offset 0
+ OpDecorate %input0 DescriptorSet 0
+ OpDecorate %input0 Binding 0
+ OpDecorate %input1 DescriptorSet 0
+ OpDecorate %input1 Binding 1
+ OpDecorate %output DescriptorSet 0
+ OpDecorate %output Binding 2
+
+ %uint = OpTypeInt 32 0
+ %ptr_uint = OpTypePointer Uniform %uint
+ %ptr_input_uint = OpTypePointer Input %uint
+ %uint3 = OpTypeVector %uint 3
+ %ptr_input_uint3 = OpTypePointer Input %uint3
+ %void = OpTypeVoid
+ %voidFn = OpTypeFunction %void
+
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %ra_int = OpTypeRuntimeArray %int
+ %ra_uint = OpTypeRuntimeArray %uint
+ %struct_uint3 = OpTypeStruct %ra_uint
+ %ptr_struct_uint3 = OpTypePointer Uniform %struct_uint3
+ %int3 = OpTypeVector %int 3
+ %ptr_int = OpTypePointer Uniform %int
+ %struct_int3 = OpTypeStruct %ra_int
+ %ptr_struct_int3 = OpTypePointer Uniform %struct_int3
+
+%gl_GlobalInvocationId = OpVariable %ptr_input_uint3 Input
+ %input0 = OpVariable %ptr_struct_int3 Uniform
+ %input1 = OpVariable %ptr_struct_int3 Uniform
+
+ %output = OpVariable %ptr_struct_int3 Uniform
+ %main = OpFunction %void None %voidFn
+ %mainStart = OpLabel
+ %index_ptr = OpAccessChain %ptr_input_uint %gl_GlobalInvocationId %uint_0
+ %index = OpLoad %uint %index_ptr
+ %in_ptr0 = OpAccessChain %ptr_int %input0 %uint_0 %index
+ %invalue0 = OpLoad %int %in_ptr0
+ %in_ptr1 = OpAccessChain %ptr_int %input1 %uint_0 %index
+ %invalue1 = OpLoad %int %in_ptr1
+
+ %outvalue = OpExtInst %int %glsl UMax %invalue0 %invalue1
+ %out_ptr = OpAccessChain %ptr_int %output %uint_0 %index
+ OpStore %out_ptr %outvalue
+
+ OpReturn
+ OpFunctionEnd
+END
+BUFFER data0 DATA_TYPE int32 DATA
+-7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7
+END
+
+BUFFER data1 DATA_TYPE int32 DATA
+ 7 6 5 4 3 2 1 0 -1 -2 -3 -4 -5 -6 -7
+END
+
+BUFFER data2 DATA_TYPE int32 DATA
+ 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
+END
+
+BUFFER expected0 DATA_TYPE int32 DATA
+-7 -6 -5 -4 -3 -2 -1 0 -1 -2 -3 -4 -5 -6 -7
+END
+
+PIPELINE compute compute_pipeline
+ ATTACH test
+ BIND BUFFER data0 AS storage DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER data1 AS storage DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER data2 AS storage DESCRIPTOR_SET 0 BINDING 2
+END
+
+RUN compute_pipeline 15 1 1
+
+EXPECT data2 EQ_BUFFER expected0
diff --git a/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_int_umin.amber b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_int_umin.amber
new file mode 100644
index 0000000..39645fd
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_int_umin.amber
@@ -0,0 +1,89 @@
+#!amber
+# Test GLSL.std.450 UMin instruction
+
+SHADER compute test SPIRV-ASM
+ OpCapability Shader
+ %glsl = OpExtInstImport "GLSL.std.450"
+
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationId
+ OpExecutionMode %main LocalSize 1 1 1
+
+ OpDecorate %gl_GlobalInvocationId BuiltIn GlobalInvocationId
+ OpDecorate %ra_int ArrayStride 4
+ OpDecorate %struct_int3 BufferBlock
+ OpMemberDecorate %struct_int3 0 Offset 0
+ OpDecorate %input0 DescriptorSet 0
+ OpDecorate %input0 Binding 0
+ OpDecorate %input1 DescriptorSet 0
+ OpDecorate %input1 Binding 1
+ OpDecorate %output DescriptorSet 0
+ OpDecorate %output Binding 2
+
+ %uint = OpTypeInt 32 0
+ %ptr_uint = OpTypePointer Uniform %uint
+ %ptr_input_uint = OpTypePointer Input %uint
+ %uint3 = OpTypeVector %uint 3
+ %ptr_input_uint3 = OpTypePointer Input %uint3
+ %void = OpTypeVoid
+ %voidFn = OpTypeFunction %void
+
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %ra_int = OpTypeRuntimeArray %int
+ %ra_uint = OpTypeRuntimeArray %uint
+ %struct_uint3 = OpTypeStruct %ra_uint
+ %ptr_struct_uint3 = OpTypePointer Uniform %struct_uint3
+ %int3 = OpTypeVector %int 3
+ %ptr_int = OpTypePointer Uniform %int
+ %struct_int3 = OpTypeStruct %ra_int
+ %ptr_struct_int3 = OpTypePointer Uniform %struct_int3
+
+%gl_GlobalInvocationId = OpVariable %ptr_input_uint3 Input
+ %input0 = OpVariable %ptr_struct_int3 Uniform
+ %input1 = OpVariable %ptr_struct_int3 Uniform
+
+ %output = OpVariable %ptr_struct_int3 Uniform
+ %main = OpFunction %void None %voidFn
+ %mainStart = OpLabel
+ %index_ptr = OpAccessChain %ptr_input_uint %gl_GlobalInvocationId %uint_0
+ %index = OpLoad %uint %index_ptr
+ %in_ptr0 = OpAccessChain %ptr_int %input0 %uint_0 %index
+ %invalue0 = OpLoad %int %in_ptr0
+ %in_ptr1 = OpAccessChain %ptr_int %input1 %uint_0 %index
+ %invalue1 = OpLoad %int %in_ptr1
+
+ %outvalue = OpExtInst %int %glsl UMin %invalue0 %invalue1
+ %out_ptr = OpAccessChain %ptr_int %output %uint_0 %index
+ OpStore %out_ptr %outvalue
+
+ OpReturn
+ OpFunctionEnd
+END
+BUFFER data0 DATA_TYPE int32 DATA
+-7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7
+END
+
+BUFFER data1 DATA_TYPE int32 DATA
+ 7 6 5 4 3 2 1 0 -1 -2 -3 -4 -5 -6 -7
+END
+
+BUFFER data2 DATA_TYPE int32 DATA
+ 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
+END
+
+BUFFER expected0 DATA_TYPE int32 DATA
+ 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7
+END
+
+PIPELINE compute compute_pipeline
+ ATTACH test
+ BIND BUFFER data0 AS storage DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER data1 AS storage DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER data2 AS storage DESCRIPTOR_SET 0 BINDING 2
+END
+
+RUN compute_pipeline 15 1 1
+
+EXPECT data2 EQ_BUFFER expected0
diff --git a/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_uint_findsmsb.amber b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_uint_findsmsb.amber
new file mode 100644
index 0000000..d3cf262
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_uint_findsmsb.amber
@@ -0,0 +1,74 @@
+#!amber
+# Test GLSL.std.450 FindSMsb instruction
+
+SHADER compute test SPIRV-ASM
+ OpCapability Shader
+ %glsl = OpExtInstImport "GLSL.std.450"
+
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationId
+ OpExecutionMode %main LocalSize 1 1 1
+
+ OpDecorate %gl_GlobalInvocationId BuiltIn GlobalInvocationId
+ OpDecorate %ra_uint ArrayStride 4
+ OpDecorate %struct_uint2 BufferBlock
+ OpMemberDecorate %struct_uint2 0 Offset 0
+ OpDecorate %input DescriptorSet 0
+ OpDecorate %input Binding 0
+ OpDecorate %output DescriptorSet 0
+ OpDecorate %output Binding 1
+
+ %uint = OpTypeInt 32 0
+ %ptr_uint = OpTypePointer Uniform %uint
+ %ptr_input_uint = OpTypePointer Input %uint
+ %uint3 = OpTypeVector %uint 3
+ %ptr_input_uint3 = OpTypePointer Input %uint3
+ %void = OpTypeVoid
+ %voidFn = OpTypeFunction %void
+
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %ra_uint = OpTypeRuntimeArray %uint
+ %uint2 = OpTypeVector %uint 2
+ %struct_uint2 = OpTypeStruct %ra_uint
+ %ptr_struct_uint2 = OpTypePointer Uniform %struct_uint2
+
+%gl_GlobalInvocationId = OpVariable %ptr_input_uint3 Input
+ %input = OpVariable %ptr_struct_uint2 Uniform
+
+ %output = OpVariable %ptr_struct_uint2 Uniform
+ %main = OpFunction %void None %voidFn
+ %mainStart = OpLabel
+ %index_ptr = OpAccessChain %ptr_input_uint %gl_GlobalInvocationId %uint_0
+ %index = OpLoad %uint %index_ptr
+ %in_ptr = OpAccessChain %ptr_uint %input %uint_0 %index
+ %invalue = OpLoad %uint %in_ptr
+
+ %outvalue = OpExtInst %uint %glsl FindSMsb %invalue
+ %out_ptr = OpAccessChain %ptr_uint %output %uint_0 %index
+ OpStore %out_ptr %outvalue
+
+ OpReturn
+ OpFunctionEnd
+END
+BUFFER data0 DATA_TYPE int32 DATA
+ 0 -8 -7 -6 -5 -4 -3 -2 0 -1 1 2 3 4 5 6
+END
+
+BUFFER data1 DATA_TYPE int32 DATA
+ 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
+END
+
+BUFFER expected0 DATA_TYPE int32 DATA
+-1 2 2 2 2 1 1 0 -1 -1 0 1 1 2 2 2
+END
+
+PIPELINE compute compute_pipeline
+ ATTACH test
+ BIND BUFFER data0 AS storage DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER data1 AS storage DESCRIPTOR_SET 0 BINDING 1
+END
+
+RUN compute_pipeline 16 1 1
+
+EXPECT data1 EQ_BUFFER expected0
diff --git a/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs.amber b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs.amber
new file mode 100644
index 0000000..b61e14a
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs.amber
@@ -0,0 +1,74 @@
+#!amber
+# Test GLSL.std.450 SAbs instruction
+
+SHADER compute test SPIRV-ASM
+ OpCapability Shader
+ %glsl = OpExtInstImport "GLSL.std.450"
+
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationId
+ OpExecutionMode %main LocalSize 1 1 1
+
+ OpDecorate %gl_GlobalInvocationId BuiltIn GlobalInvocationId
+ OpDecorate %ra_uint ArrayStride 4
+ OpDecorate %struct_uint2 BufferBlock
+ OpMemberDecorate %struct_uint2 0 Offset 0
+ OpDecorate %input DescriptorSet 0
+ OpDecorate %input Binding 0
+ OpDecorate %output DescriptorSet 0
+ OpDecorate %output Binding 1
+
+ %uint = OpTypeInt 32 0
+ %ptr_uint = OpTypePointer Uniform %uint
+ %ptr_input_uint = OpTypePointer Input %uint
+ %uint3 = OpTypeVector %uint 3
+ %ptr_input_uint3 = OpTypePointer Input %uint3
+ %void = OpTypeVoid
+ %voidFn = OpTypeFunction %void
+
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %ra_uint = OpTypeRuntimeArray %uint
+ %uint2 = OpTypeVector %uint 2
+ %struct_uint2 = OpTypeStruct %ra_uint
+ %ptr_struct_uint2 = OpTypePointer Uniform %struct_uint2
+
+%gl_GlobalInvocationId = OpVariable %ptr_input_uint3 Input
+ %input = OpVariable %ptr_struct_uint2 Uniform
+
+ %output = OpVariable %ptr_struct_uint2 Uniform
+ %main = OpFunction %void None %voidFn
+ %mainStart = OpLabel
+ %index_ptr = OpAccessChain %ptr_input_uint %gl_GlobalInvocationId %uint_0
+ %index = OpLoad %uint %index_ptr
+ %in_ptr = OpAccessChain %ptr_uint %input %uint_0 %index
+ %invalue = OpLoad %uint %in_ptr
+
+ %outvalue = OpExtInst %uint %glsl SAbs %invalue
+ %out_ptr = OpAccessChain %ptr_uint %output %uint_0 %index
+ OpStore %out_ptr %outvalue
+
+ OpReturn
+ OpFunctionEnd
+END
+BUFFER data0 DATA_TYPE int32 DATA
+-7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7
+END
+
+BUFFER data1 DATA_TYPE int32 DATA
+ 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
+END
+
+BUFFER expected0 DATA_TYPE int32 DATA
+ 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7
+END
+
+PIPELINE compute compute_pipeline
+ ATTACH test
+ BIND BUFFER data0 AS storage DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER data1 AS storage DESCRIPTOR_SET 0 BINDING 1
+END
+
+RUN compute_pipeline 15 1 1
+
+EXPECT data1 EQ_BUFFER expected0
diff --git a/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp.amber b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp.amber
new file mode 100644
index 0000000..366dabf
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_uint_sclamp.amber
@@ -0,0 +1,94 @@
+#!amber
+# Test GLSL.std.450 SClamp instruction
+
+SHADER compute test SPIRV-ASM
+ OpCapability Shader
+ %glsl = OpExtInstImport "GLSL.std.450"
+
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationId
+ OpExecutionMode %main LocalSize 1 1 1
+
+ OpDecorate %gl_GlobalInvocationId BuiltIn GlobalInvocationId
+ OpDecorate %ra_uint ArrayStride 4
+ OpDecorate %struct_uint4 BufferBlock
+ OpMemberDecorate %struct_uint4 0 Offset 0
+ OpDecorate %input0 DescriptorSet 0
+ OpDecorate %input0 Binding 0
+ OpDecorate %input1 DescriptorSet 0
+ OpDecorate %input1 Binding 1
+ OpDecorate %input2 DescriptorSet 0
+ OpDecorate %input2 Binding 2
+ OpDecorate %output DescriptorSet 0
+ OpDecorate %output Binding 3
+
+ %uint = OpTypeInt 32 0
+ %ptr_uint = OpTypePointer Uniform %uint
+ %ptr_input_uint = OpTypePointer Input %uint
+ %uint3 = OpTypeVector %uint 3
+ %ptr_input_uint3 = OpTypePointer Input %uint3
+ %void = OpTypeVoid
+ %voidFn = OpTypeFunction %void
+
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %ra_uint = OpTypeRuntimeArray %uint
+ %uint4 = OpTypeVector %uint 4
+ %struct_uint4 = OpTypeStruct %ra_uint
+ %ptr_struct_uint4 = OpTypePointer Uniform %struct_uint4
+
+%gl_GlobalInvocationId = OpVariable %ptr_input_uint3 Input
+ %input0 = OpVariable %ptr_struct_uint4 Uniform
+ %input1 = OpVariable %ptr_struct_uint4 Uniform
+ %input2 = OpVariable %ptr_struct_uint4 Uniform
+
+ %output = OpVariable %ptr_struct_uint4 Uniform
+ %main = OpFunction %void None %voidFn
+ %mainStart = OpLabel
+ %index_ptr = OpAccessChain %ptr_input_uint %gl_GlobalInvocationId %uint_0
+ %index = OpLoad %uint %index_ptr
+ %in_ptr0 = OpAccessChain %ptr_uint %input0 %uint_0 %index
+ %invalue0 = OpLoad %uint %in_ptr0
+ %in_ptr1 = OpAccessChain %ptr_uint %input1 %uint_0 %index
+ %invalue1 = OpLoad %uint %in_ptr1
+ %in_ptr2 = OpAccessChain %ptr_uint %input2 %uint_0 %index
+ %invalue2 = OpLoad %uint %in_ptr2
+
+ %outvalue = OpExtInst %uint %glsl SClamp %invalue0 %invalue1 %invalue2
+ %out_ptr = OpAccessChain %ptr_uint %output %uint_0 %index
+ OpStore %out_ptr %outvalue
+
+ OpReturn
+ OpFunctionEnd
+END
+BUFFER data0 DATA_TYPE int32 DATA
+-9 -5 -3 0 0 3 5 9
+END
+
+BUFFER data1 DATA_TYPE int32 DATA
+-5 -4 -3 -1 0 1 4 5
+END
+
+BUFFER data2 DATA_TYPE int32 DATA
+ 5 4 3 2 1 2 5 6
+END
+
+BUFFER data3 DATA_TYPE int32 DATA
+ 8 8 8 8 8 8 8 8
+END
+
+BUFFER expected0 DATA_TYPE int32 DATA
+-5 -4 -3 0 0 2 5 6
+END
+
+PIPELINE compute compute_pipeline
+ ATTACH test
+ BIND BUFFER data0 AS storage DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER data1 AS storage DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER data2 AS storage DESCRIPTOR_SET 0 BINDING 2
+ BIND BUFFER data3 AS storage DESCRIPTOR_SET 0 BINDING 3
+END
+
+RUN compute_pipeline 8 1 1
+
+EXPECT data3 EQ_BUFFER expected0
diff --git a/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax.amber b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax.amber
new file mode 100644
index 0000000..2fbcaa9
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_uint_smax.amber
@@ -0,0 +1,83 @@
+#!amber
+# Test GLSL.std.450 SMax instruction
+
+SHADER compute test SPIRV-ASM
+ OpCapability Shader
+ %glsl = OpExtInstImport "GLSL.std.450"
+
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationId
+ OpExecutionMode %main LocalSize 1 1 1
+
+ OpDecorate %gl_GlobalInvocationId BuiltIn GlobalInvocationId
+ OpDecorate %ra_uint ArrayStride 4
+ OpDecorate %struct_uint3 BufferBlock
+ OpMemberDecorate %struct_uint3 0 Offset 0
+ OpDecorate %input0 DescriptorSet 0
+ OpDecorate %input0 Binding 0
+ OpDecorate %input1 DescriptorSet 0
+ OpDecorate %input1 Binding 1
+ OpDecorate %output DescriptorSet 0
+ OpDecorate %output Binding 2
+
+ %uint = OpTypeInt 32 0
+ %ptr_uint = OpTypePointer Uniform %uint
+ %ptr_input_uint = OpTypePointer Input %uint
+ %uint3 = OpTypeVector %uint 3
+ %ptr_input_uint3 = OpTypePointer Input %uint3
+ %void = OpTypeVoid
+ %voidFn = OpTypeFunction %void
+
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %ra_uint = OpTypeRuntimeArray %uint
+ %struct_uint3 = OpTypeStruct %ra_uint
+ %ptr_struct_uint3 = OpTypePointer Uniform %struct_uint3
+
+%gl_GlobalInvocationId = OpVariable %ptr_input_uint3 Input
+ %input0 = OpVariable %ptr_struct_uint3 Uniform
+ %input1 = OpVariable %ptr_struct_uint3 Uniform
+
+ %output = OpVariable %ptr_struct_uint3 Uniform
+ %main = OpFunction %void None %voidFn
+ %mainStart = OpLabel
+ %index_ptr = OpAccessChain %ptr_input_uint %gl_GlobalInvocationId %uint_0
+ %index = OpLoad %uint %index_ptr
+ %in_ptr0 = OpAccessChain %ptr_uint %input0 %uint_0 %index
+ %invalue0 = OpLoad %uint %in_ptr0
+ %in_ptr1 = OpAccessChain %ptr_uint %input1 %uint_0 %index
+ %invalue1 = OpLoad %uint %in_ptr1
+
+ %outvalue = OpExtInst %uint %glsl SMax %invalue0 %invalue1
+ %out_ptr = OpAccessChain %ptr_uint %output %uint_0 %index
+ OpStore %out_ptr %outvalue
+
+ OpReturn
+ OpFunctionEnd
+END
+BUFFER data0 DATA_TYPE int32 DATA
+-7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7
+END
+
+BUFFER data1 DATA_TYPE int32 DATA
+ 7 6 5 4 3 2 1 0 -1 -2 -3 -4 -5 -6 -7
+END
+
+BUFFER data2 DATA_TYPE int32 DATA
+ 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
+END
+
+BUFFER expected0 DATA_TYPE int32 DATA
+ 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7
+END
+
+PIPELINE compute compute_pipeline
+ ATTACH test
+ BIND BUFFER data0 AS storage DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER data1 AS storage DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER data2 AS storage DESCRIPTOR_SET 0 BINDING 2
+END
+
+RUN compute_pipeline 15 1 1
+
+EXPECT data2 EQ_BUFFER expected0
diff --git a/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin.amber b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin.amber
new file mode 100644
index 0000000..a3c6389
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_uint_smin.amber
@@ -0,0 +1,83 @@
+#!amber
+# Test GLSL.std.450 SMin instruction
+
+SHADER compute test SPIRV-ASM
+ OpCapability Shader
+ %glsl = OpExtInstImport "GLSL.std.450"
+
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationId
+ OpExecutionMode %main LocalSize 1 1 1
+
+ OpDecorate %gl_GlobalInvocationId BuiltIn GlobalInvocationId
+ OpDecorate %ra_uint ArrayStride 4
+ OpDecorate %struct_uint3 BufferBlock
+ OpMemberDecorate %struct_uint3 0 Offset 0
+ OpDecorate %input0 DescriptorSet 0
+ OpDecorate %input0 Binding 0
+ OpDecorate %input1 DescriptorSet 0
+ OpDecorate %input1 Binding 1
+ OpDecorate %output DescriptorSet 0
+ OpDecorate %output Binding 2
+
+ %uint = OpTypeInt 32 0
+ %ptr_uint = OpTypePointer Uniform %uint
+ %ptr_input_uint = OpTypePointer Input %uint
+ %uint3 = OpTypeVector %uint 3
+ %ptr_input_uint3 = OpTypePointer Input %uint3
+ %void = OpTypeVoid
+ %voidFn = OpTypeFunction %void
+
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %ra_uint = OpTypeRuntimeArray %uint
+ %struct_uint3 = OpTypeStruct %ra_uint
+ %ptr_struct_uint3 = OpTypePointer Uniform %struct_uint3
+
+%gl_GlobalInvocationId = OpVariable %ptr_input_uint3 Input
+ %input0 = OpVariable %ptr_struct_uint3 Uniform
+ %input1 = OpVariable %ptr_struct_uint3 Uniform
+
+ %output = OpVariable %ptr_struct_uint3 Uniform
+ %main = OpFunction %void None %voidFn
+ %mainStart = OpLabel
+ %index_ptr = OpAccessChain %ptr_input_uint %gl_GlobalInvocationId %uint_0
+ %index = OpLoad %uint %index_ptr
+ %in_ptr0 = OpAccessChain %ptr_uint %input0 %uint_0 %index
+ %invalue0 = OpLoad %uint %in_ptr0
+ %in_ptr1 = OpAccessChain %ptr_uint %input1 %uint_0 %index
+ %invalue1 = OpLoad %uint %in_ptr1
+
+ %outvalue = OpExtInst %uint %glsl SMin %invalue0 %invalue1
+ %out_ptr = OpAccessChain %ptr_uint %output %uint_0 %index
+ OpStore %out_ptr %outvalue
+
+ OpReturn
+ OpFunctionEnd
+END
+BUFFER data0 DATA_TYPE int32 DATA
+-7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7
+END
+
+BUFFER data1 DATA_TYPE int32 DATA
+ 7 6 5 4 3 2 1 0 -1 -2 -3 -4 -5 -6 -7
+END
+
+BUFFER data2 DATA_TYPE int32 DATA
+ 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
+END
+
+BUFFER expected0 DATA_TYPE int32 DATA
+-7 -6 -5 -4 -3 -2 -1 0 -1 -2 -3 -4 -5 -6 -7
+END
+
+PIPELINE compute compute_pipeline
+ ATTACH test
+ BIND BUFFER data0 AS storage DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER data1 AS storage DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER data2 AS storage DESCRIPTOR_SET 0 BINDING 2
+END
+
+RUN compute_pipeline 15 1 1
+
+EXPECT data2 EQ_BUFFER expected0
diff --git a/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_uint_ssign.amber b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_uint_ssign.amber
new file mode 100644
index 0000000..1414e71
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/glsl_uint_ssign.amber
@@ -0,0 +1,74 @@
+#!amber
+# Test GLSL.std.450 SSign instruction
+
+SHADER compute test SPIRV-ASM
+ OpCapability Shader
+ %glsl = OpExtInstImport "GLSL.std.450"
+
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationId
+ OpExecutionMode %main LocalSize 1 1 1
+
+ OpDecorate %gl_GlobalInvocationId BuiltIn GlobalInvocationId
+ OpDecorate %ra_uint ArrayStride 4
+ OpDecorate %struct_uint2 BufferBlock
+ OpMemberDecorate %struct_uint2 0 Offset 0
+ OpDecorate %input DescriptorSet 0
+ OpDecorate %input Binding 0
+ OpDecorate %output DescriptorSet 0
+ OpDecorate %output Binding 1
+
+ %uint = OpTypeInt 32 0
+ %ptr_uint = OpTypePointer Uniform %uint
+ %ptr_input_uint = OpTypePointer Input %uint
+ %uint3 = OpTypeVector %uint 3
+ %ptr_input_uint3 = OpTypePointer Input %uint3
+ %void = OpTypeVoid
+ %voidFn = OpTypeFunction %void
+
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %ra_uint = OpTypeRuntimeArray %uint
+ %uint2 = OpTypeVector %uint 2
+ %struct_uint2 = OpTypeStruct %ra_uint
+ %ptr_struct_uint2 = OpTypePointer Uniform %struct_uint2
+
+%gl_GlobalInvocationId = OpVariable %ptr_input_uint3 Input
+ %input = OpVariable %ptr_struct_uint2 Uniform
+
+ %output = OpVariable %ptr_struct_uint2 Uniform
+ %main = OpFunction %void None %voidFn
+ %mainStart = OpLabel
+ %index_ptr = OpAccessChain %ptr_input_uint %gl_GlobalInvocationId %uint_0
+ %index = OpLoad %uint %index_ptr
+ %in_ptr = OpAccessChain %ptr_uint %input %uint_0 %index
+ %invalue = OpLoad %uint %in_ptr
+
+ %outvalue = OpExtInst %uint %glsl SSign %invalue
+ %out_ptr = OpAccessChain %ptr_uint %output %uint_0 %index
+ OpStore %out_ptr %outvalue
+
+ OpReturn
+ OpFunctionEnd
+END
+BUFFER data0 DATA_TYPE int32 DATA
+-7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7
+END
+
+BUFFER data1 DATA_TYPE int32 DATA
+ 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
+END
+
+BUFFER expected0 DATA_TYPE int32 DATA
+-1 -1 -1 -1 -1 -1 -1 0 1 1 1 1 1 1 1
+END
+
+PIPELINE compute compute_pipeline
+ ATTACH test
+ BIND BUFFER data0 AS storage DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER data1 AS storage DESCRIPTOR_SET 0 BINDING 1
+END
+
+RUN compute_pipeline 15 1 1
+
+EXPECT data1 EQ_BUFFER expected0
diff --git a/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/int_atomicumax.amber b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/int_atomicumax.amber
new file mode 100644
index 0000000..639944a
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/int_atomicumax.amber
@@ -0,0 +1,76 @@
+#!amber
+# Test OpAtomicUMax instruction
+
+SHADER compute test SPIRV-ASM
+ OpCapability Shader
+ %glsl = OpExtInstImport "GLSL.std.450"
+
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationId
+ OpExecutionMode %main LocalSize 1 1 1
+
+ OpDecorate %gl_GlobalInvocationId BuiltIn GlobalInvocationId
+ OpDecorate %ra_int ArrayStride 4
+ OpDecorate %struct_int2 BufferBlock
+ OpMemberDecorate %struct_int2 0 Offset 0
+ OpDecorate %input DescriptorSet 0
+ OpDecorate %input Binding 0
+ OpDecorate %output DescriptorSet 0
+ OpDecorate %output Binding 1
+
+ %uint = OpTypeInt 32 0
+ %ptr_uint = OpTypePointer Uniform %uint
+ %ptr_input_uint = OpTypePointer Input %uint
+ %uint3 = OpTypeVector %uint 3
+ %ptr_input_uint3 = OpTypePointer Input %uint3
+ %void = OpTypeVoid
+ %voidFn = OpTypeFunction %void
+
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %ra_int = OpTypeRuntimeArray %int
+ %int2 = OpTypeVector %int 2
+ %ptr_int = OpTypePointer Uniform %int
+ %struct_int2 = OpTypeStruct %ra_int
+ %ptr_struct_int2 = OpTypePointer Uniform %struct_int2
+
+%gl_GlobalInvocationId = OpVariable %ptr_input_uint3 Input
+ %input = OpVariable %ptr_struct_int2 Uniform
+
+ %output = OpVariable %ptr_struct_int2 Uniform
+ %main = OpFunction %void None %voidFn
+ %mainStart = OpLabel
+ %index_ptr = OpAccessChain %ptr_input_uint %gl_GlobalInvocationId %uint_0
+ %index = OpLoad %uint %index_ptr
+ %in_ptr = OpAccessChain %ptr_int %input %uint_0 %index
+ %invalue = OpLoad %int %in_ptr
+
+ %out_ptr = OpAccessChain %ptr_int %output %uint_0 %index
+ %result = OpAtomicUMax %int %out_ptr %uint_1 %uint_0 %invalue
+
+
+ OpReturn
+ OpFunctionEnd
+END
+BUFFER data0 DATA_TYPE int32 DATA
+-7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7
+END
+
+BUFFER data1 DATA_TYPE int32 DATA
+ 7 6 5 4 3 2 1 0 -1 -2 -3 -4 -5 -6 -7
+END
+
+BUFFER expected0 DATA_TYPE int32 DATA
+-7 -6 -5 -4 -3 -2 -1 0 -1 -2 -3 -4 -5 -6 -7
+END
+
+PIPELINE compute compute_pipeline
+ ATTACH test
+ BIND BUFFER data0 AS storage DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER data1 AS storage DESCRIPTOR_SET 0 BINDING 1
+END
+
+RUN compute_pipeline 15 1 1
+
+EXPECT data1 EQ_BUFFER expected0
diff --git a/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/int_atomicumin.amber b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/int_atomicumin.amber
new file mode 100644
index 0000000..ff0f7ab
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/int_atomicumin.amber
@@ -0,0 +1,76 @@
+#!amber
+# Test OpAtomicUMin instruction
+
+SHADER compute test SPIRV-ASM
+ OpCapability Shader
+ %glsl = OpExtInstImport "GLSL.std.450"
+
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationId
+ OpExecutionMode %main LocalSize 1 1 1
+
+ OpDecorate %gl_GlobalInvocationId BuiltIn GlobalInvocationId
+ OpDecorate %ra_int ArrayStride 4
+ OpDecorate %struct_int2 BufferBlock
+ OpMemberDecorate %struct_int2 0 Offset 0
+ OpDecorate %input DescriptorSet 0
+ OpDecorate %input Binding 0
+ OpDecorate %output DescriptorSet 0
+ OpDecorate %output Binding 1
+
+ %uint = OpTypeInt 32 0
+ %ptr_uint = OpTypePointer Uniform %uint
+ %ptr_input_uint = OpTypePointer Input %uint
+ %uint3 = OpTypeVector %uint 3
+ %ptr_input_uint3 = OpTypePointer Input %uint3
+ %void = OpTypeVoid
+ %voidFn = OpTypeFunction %void
+
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %ra_int = OpTypeRuntimeArray %int
+ %int2 = OpTypeVector %int 2
+ %ptr_int = OpTypePointer Uniform %int
+ %struct_int2 = OpTypeStruct %ra_int
+ %ptr_struct_int2 = OpTypePointer Uniform %struct_int2
+
+%gl_GlobalInvocationId = OpVariable %ptr_input_uint3 Input
+ %input = OpVariable %ptr_struct_int2 Uniform
+
+ %output = OpVariable %ptr_struct_int2 Uniform
+ %main = OpFunction %void None %voidFn
+ %mainStart = OpLabel
+ %index_ptr = OpAccessChain %ptr_input_uint %gl_GlobalInvocationId %uint_0
+ %index = OpLoad %uint %index_ptr
+ %in_ptr = OpAccessChain %ptr_int %input %uint_0 %index
+ %invalue = OpLoad %int %in_ptr
+
+ %out_ptr = OpAccessChain %ptr_int %output %uint_0 %index
+ %result = OpAtomicUMin %int %out_ptr %uint_1 %uint_0 %invalue
+
+
+ OpReturn
+ OpFunctionEnd
+END
+BUFFER data0 DATA_TYPE int32 DATA
+-7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7
+END
+
+BUFFER data1 DATA_TYPE int32 DATA
+ 7 6 5 4 3 2 1 0 -1 -2 -3 -4 -5 -6 -7
+END
+
+BUFFER expected0 DATA_TYPE int32 DATA
+ 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7
+END
+
+PIPELINE compute compute_pipeline
+ ATTACH test
+ BIND BUFFER data0 AS storage DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER data1 AS storage DESCRIPTOR_SET 0 BINDING 1
+END
+
+RUN compute_pipeline 15 1 1
+
+EXPECT data1 EQ_BUFFER expected0
diff --git a/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/int_ugreaterthan.amber b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/int_ugreaterthan.amber
new file mode 100644
index 0000000..8519e6d
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/int_ugreaterthan.amber
@@ -0,0 +1,92 @@
+#!amber
+# Test OpUGreaterThan instruction
+
+SHADER compute test SPIRV-ASM
+ OpCapability Shader
+
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationId
+ OpExecutionMode %main LocalSize 1 1 1
+
+ OpDecorate %gl_GlobalInvocationId BuiltIn GlobalInvocationId
+ OpDecorate %ra_int ArrayStride 4
+ OpDecorate %struct_int3 BufferBlock
+ OpMemberDecorate %struct_int3 0 Offset 0
+ OpDecorate %input0 DescriptorSet 0
+ OpDecorate %input0 Binding 0
+ OpDecorate %input1 DescriptorSet 0
+ OpDecorate %input1 Binding 1
+ OpDecorate %output DescriptorSet 0
+ OpDecorate %output Binding 2
+
+ %uint = OpTypeInt 32 0
+ %ptr_uint = OpTypePointer Uniform %uint
+ %ptr_input_uint = OpTypePointer Input %uint
+ %uint3 = OpTypeVector %uint 3
+ %ptr_input_uint3 = OpTypePointer Input %uint3
+ %void = OpTypeVoid
+ %voidFn = OpTypeFunction %void
+
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %ra_int = OpTypeRuntimeArray %int
+ %ra_uint = OpTypeRuntimeArray %uint
+ %struct_uint3 = OpTypeStruct %ra_uint
+ %ptr_struct_uint3 = OpTypePointer Uniform %struct_uint3
+ %int3 = OpTypeVector %int 3
+ %ptr_int = OpTypePointer Uniform %int
+ %struct_int3 = OpTypeStruct %ra_int
+ %ptr_struct_int3 = OpTypePointer Uniform %struct_int3
+ %bool = OpTypeBool
+ %int_0 = OpConstant %int 0
+ %int_1 = OpConstant %int 1
+%gl_GlobalInvocationId = OpVariable %ptr_input_uint3 Input
+ %input0 = OpVariable %ptr_struct_int3 Uniform
+ %input1 = OpVariable %ptr_struct_int3 Uniform
+
+ %output = OpVariable %ptr_struct_int3 Uniform
+ %main = OpFunction %void None %voidFn
+ %mainStart = OpLabel
+ %index_ptr = OpAccessChain %ptr_input_uint %gl_GlobalInvocationId %uint_0
+ %index = OpLoad %uint %index_ptr
+ %in_ptr0 = OpAccessChain %ptr_int %input0 %uint_0 %index
+ %invalue0 = OpLoad %int %in_ptr0
+ %in_ptr1 = OpAccessChain %ptr_int %input1 %uint_0 %index
+ %invalue1 = OpLoad %int %in_ptr1
+
+ %result = OpUGreaterThan %bool %invalue0 %invalue1
+ %outvalue = OpSelect %int %result %int_1 %int_0
+
+ %out_ptr = OpAccessChain %ptr_int %output %uint_0 %index
+ OpStore %out_ptr %outvalue
+
+ OpReturn
+ OpFunctionEnd
+END
+BUFFER data0 DATA_TYPE int32 DATA
+ 0 -65536 0 1 32768
+END
+
+BUFFER data1 DATA_TYPE int32 DATA
+ 1 32768 0 0 -65536
+END
+
+BUFFER data2 DATA_TYPE int32 DATA
+ 8 8 8 8 8
+END
+
+BUFFER expected0 DATA_TYPE int32 DATA
+ 0 1 0 1 0
+END
+
+PIPELINE compute compute_pipeline
+ ATTACH test
+ BIND BUFFER data0 AS storage DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER data1 AS storage DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER data2 AS storage DESCRIPTOR_SET 0 BINDING 2
+END
+
+RUN compute_pipeline 5 1 1
+
+EXPECT data2 EQ_BUFFER expected0
diff --git a/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/int_ugreaterthanequal.amber b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/int_ugreaterthanequal.amber
new file mode 100644
index 0000000..32738f6
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/int_ugreaterthanequal.amber
@@ -0,0 +1,92 @@
+#!amber
+# Test OpUGreaterThanEqual instruction
+
+SHADER compute test SPIRV-ASM
+ OpCapability Shader
+
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationId
+ OpExecutionMode %main LocalSize 1 1 1
+
+ OpDecorate %gl_GlobalInvocationId BuiltIn GlobalInvocationId
+ OpDecorate %ra_int ArrayStride 4
+ OpDecorate %struct_int3 BufferBlock
+ OpMemberDecorate %struct_int3 0 Offset 0
+ OpDecorate %input0 DescriptorSet 0
+ OpDecorate %input0 Binding 0
+ OpDecorate %input1 DescriptorSet 0
+ OpDecorate %input1 Binding 1
+ OpDecorate %output DescriptorSet 0
+ OpDecorate %output Binding 2
+
+ %uint = OpTypeInt 32 0
+ %ptr_uint = OpTypePointer Uniform %uint
+ %ptr_input_uint = OpTypePointer Input %uint
+ %uint3 = OpTypeVector %uint 3
+ %ptr_input_uint3 = OpTypePointer Input %uint3
+ %void = OpTypeVoid
+ %voidFn = OpTypeFunction %void
+
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %ra_int = OpTypeRuntimeArray %int
+ %ra_uint = OpTypeRuntimeArray %uint
+ %struct_uint3 = OpTypeStruct %ra_uint
+ %ptr_struct_uint3 = OpTypePointer Uniform %struct_uint3
+ %int3 = OpTypeVector %int 3
+ %ptr_int = OpTypePointer Uniform %int
+ %struct_int3 = OpTypeStruct %ra_int
+ %ptr_struct_int3 = OpTypePointer Uniform %struct_int3
+ %bool = OpTypeBool
+ %int_0 = OpConstant %int 0
+ %int_1 = OpConstant %int 1
+%gl_GlobalInvocationId = OpVariable %ptr_input_uint3 Input
+ %input0 = OpVariable %ptr_struct_int3 Uniform
+ %input1 = OpVariable %ptr_struct_int3 Uniform
+
+ %output = OpVariable %ptr_struct_int3 Uniform
+ %main = OpFunction %void None %voidFn
+ %mainStart = OpLabel
+ %index_ptr = OpAccessChain %ptr_input_uint %gl_GlobalInvocationId %uint_0
+ %index = OpLoad %uint %index_ptr
+ %in_ptr0 = OpAccessChain %ptr_int %input0 %uint_0 %index
+ %invalue0 = OpLoad %int %in_ptr0
+ %in_ptr1 = OpAccessChain %ptr_int %input1 %uint_0 %index
+ %invalue1 = OpLoad %int %in_ptr1
+
+ %result = OpUGreaterThanEqual %bool %invalue0 %invalue1
+ %outvalue = OpSelect %int %result %int_1 %int_0
+
+ %out_ptr = OpAccessChain %ptr_int %output %uint_0 %index
+ OpStore %out_ptr %outvalue
+
+ OpReturn
+ OpFunctionEnd
+END
+BUFFER data0 DATA_TYPE int32 DATA
+ 0 -65536 0 1 32768
+END
+
+BUFFER data1 DATA_TYPE int32 DATA
+ 1 32768 0 0 -65536
+END
+
+BUFFER data2 DATA_TYPE int32 DATA
+ 8 8 8 8 8
+END
+
+BUFFER expected0 DATA_TYPE int32 DATA
+ 0 1 1 1 0
+END
+
+PIPELINE compute compute_pipeline
+ ATTACH test
+ BIND BUFFER data0 AS storage DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER data1 AS storage DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER data2 AS storage DESCRIPTOR_SET 0 BINDING 2
+END
+
+RUN compute_pipeline 5 1 1
+
+EXPECT data2 EQ_BUFFER expected0
diff --git a/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/int_ulessthan.amber b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/int_ulessthan.amber
new file mode 100644
index 0000000..dc97942
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/int_ulessthan.amber
@@ -0,0 +1,92 @@
+#!amber
+# Test OpULessThan instruction
+
+SHADER compute test SPIRV-ASM
+ OpCapability Shader
+
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationId
+ OpExecutionMode %main LocalSize 1 1 1
+
+ OpDecorate %gl_GlobalInvocationId BuiltIn GlobalInvocationId
+ OpDecorate %ra_int ArrayStride 4
+ OpDecorate %struct_int3 BufferBlock
+ OpMemberDecorate %struct_int3 0 Offset 0
+ OpDecorate %input0 DescriptorSet 0
+ OpDecorate %input0 Binding 0
+ OpDecorate %input1 DescriptorSet 0
+ OpDecorate %input1 Binding 1
+ OpDecorate %output DescriptorSet 0
+ OpDecorate %output Binding 2
+
+ %uint = OpTypeInt 32 0
+ %ptr_uint = OpTypePointer Uniform %uint
+ %ptr_input_uint = OpTypePointer Input %uint
+ %uint3 = OpTypeVector %uint 3
+ %ptr_input_uint3 = OpTypePointer Input %uint3
+ %void = OpTypeVoid
+ %voidFn = OpTypeFunction %void
+
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %ra_int = OpTypeRuntimeArray %int
+ %ra_uint = OpTypeRuntimeArray %uint
+ %struct_uint3 = OpTypeStruct %ra_uint
+ %ptr_struct_uint3 = OpTypePointer Uniform %struct_uint3
+ %int3 = OpTypeVector %int 3
+ %ptr_int = OpTypePointer Uniform %int
+ %struct_int3 = OpTypeStruct %ra_int
+ %ptr_struct_int3 = OpTypePointer Uniform %struct_int3
+ %bool = OpTypeBool
+ %int_0 = OpConstant %int 0
+ %int_1 = OpConstant %int 1
+%gl_GlobalInvocationId = OpVariable %ptr_input_uint3 Input
+ %input0 = OpVariable %ptr_struct_int3 Uniform
+ %input1 = OpVariable %ptr_struct_int3 Uniform
+
+ %output = OpVariable %ptr_struct_int3 Uniform
+ %main = OpFunction %void None %voidFn
+ %mainStart = OpLabel
+ %index_ptr = OpAccessChain %ptr_input_uint %gl_GlobalInvocationId %uint_0
+ %index = OpLoad %uint %index_ptr
+ %in_ptr0 = OpAccessChain %ptr_int %input0 %uint_0 %index
+ %invalue0 = OpLoad %int %in_ptr0
+ %in_ptr1 = OpAccessChain %ptr_int %input1 %uint_0 %index
+ %invalue1 = OpLoad %int %in_ptr1
+
+ %result = OpULessThan %bool %invalue0 %invalue1
+ %outvalue = OpSelect %int %result %int_1 %int_0
+
+ %out_ptr = OpAccessChain %ptr_int %output %uint_0 %index
+ OpStore %out_ptr %outvalue
+
+ OpReturn
+ OpFunctionEnd
+END
+BUFFER data0 DATA_TYPE int32 DATA
+ 0 -65536 0 1 32768
+END
+
+BUFFER data1 DATA_TYPE int32 DATA
+ 1 32768 0 0 -65536
+END
+
+BUFFER data2 DATA_TYPE int32 DATA
+ 8 8 8 8 8
+END
+
+BUFFER expected0 DATA_TYPE int32 DATA
+ 1 0 0 0 1
+END
+
+PIPELINE compute compute_pipeline
+ ATTACH test
+ BIND BUFFER data0 AS storage DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER data1 AS storage DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER data2 AS storage DESCRIPTOR_SET 0 BINDING 2
+END
+
+RUN compute_pipeline 5 1 1
+
+EXPECT data2 EQ_BUFFER expected0
diff --git a/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/int_ulessthanequal.amber b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/int_ulessthanequal.amber
new file mode 100644
index 0000000..4ab122e
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/int_ulessthanequal.amber
@@ -0,0 +1,92 @@
+#!amber
+# Test OpULessThanEqual instruction
+
+SHADER compute test SPIRV-ASM
+ OpCapability Shader
+
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationId
+ OpExecutionMode %main LocalSize 1 1 1
+
+ OpDecorate %gl_GlobalInvocationId BuiltIn GlobalInvocationId
+ OpDecorate %ra_int ArrayStride 4
+ OpDecorate %struct_int3 BufferBlock
+ OpMemberDecorate %struct_int3 0 Offset 0
+ OpDecorate %input0 DescriptorSet 0
+ OpDecorate %input0 Binding 0
+ OpDecorate %input1 DescriptorSet 0
+ OpDecorate %input1 Binding 1
+ OpDecorate %output DescriptorSet 0
+ OpDecorate %output Binding 2
+
+ %uint = OpTypeInt 32 0
+ %ptr_uint = OpTypePointer Uniform %uint
+ %ptr_input_uint = OpTypePointer Input %uint
+ %uint3 = OpTypeVector %uint 3
+ %ptr_input_uint3 = OpTypePointer Input %uint3
+ %void = OpTypeVoid
+ %voidFn = OpTypeFunction %void
+
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %int = OpTypeInt 32 1
+ %ra_int = OpTypeRuntimeArray %int
+ %ra_uint = OpTypeRuntimeArray %uint
+ %struct_uint3 = OpTypeStruct %ra_uint
+ %ptr_struct_uint3 = OpTypePointer Uniform %struct_uint3
+ %int3 = OpTypeVector %int 3
+ %ptr_int = OpTypePointer Uniform %int
+ %struct_int3 = OpTypeStruct %ra_int
+ %ptr_struct_int3 = OpTypePointer Uniform %struct_int3
+ %bool = OpTypeBool
+ %int_0 = OpConstant %int 0
+ %int_1 = OpConstant %int 1
+%gl_GlobalInvocationId = OpVariable %ptr_input_uint3 Input
+ %input0 = OpVariable %ptr_struct_int3 Uniform
+ %input1 = OpVariable %ptr_struct_int3 Uniform
+
+ %output = OpVariable %ptr_struct_int3 Uniform
+ %main = OpFunction %void None %voidFn
+ %mainStart = OpLabel
+ %index_ptr = OpAccessChain %ptr_input_uint %gl_GlobalInvocationId %uint_0
+ %index = OpLoad %uint %index_ptr
+ %in_ptr0 = OpAccessChain %ptr_int %input0 %uint_0 %index
+ %invalue0 = OpLoad %int %in_ptr0
+ %in_ptr1 = OpAccessChain %ptr_int %input1 %uint_0 %index
+ %invalue1 = OpLoad %int %in_ptr1
+
+ %result = OpULessThanEqual %bool %invalue0 %invalue1
+ %outvalue = OpSelect %int %result %int_1 %int_0
+
+ %out_ptr = OpAccessChain %ptr_int %output %uint_0 %index
+ OpStore %out_ptr %outvalue
+
+ OpReturn
+ OpFunctionEnd
+END
+BUFFER data0 DATA_TYPE int32 DATA
+ 0 -65536 0 1 32768
+END
+
+BUFFER data1 DATA_TYPE int32 DATA
+ 1 32768 0 0 -65536
+END
+
+BUFFER data2 DATA_TYPE int32 DATA
+ 8 8 8 8 8
+END
+
+BUFFER expected0 DATA_TYPE int32 DATA
+ 1 0 1 0 1
+END
+
+PIPELINE compute compute_pipeline
+ ATTACH test
+ BIND BUFFER data0 AS storage DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER data1 AS storage DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER data2 AS storage DESCRIPTOR_SET 0 BINDING 2
+END
+
+RUN compute_pipeline 5 1 1
+
+EXPECT data2 EQ_BUFFER expected0
diff --git a/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/uint_atomicsmax.amber b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/uint_atomicsmax.amber
new file mode 100644
index 0000000..42f8529
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/uint_atomicsmax.amber
@@ -0,0 +1,74 @@
+#!amber
+# Test OpAtomicSMax instruction
+
+SHADER compute test SPIRV-ASM
+ OpCapability Shader
+ %glsl = OpExtInstImport "GLSL.std.450"
+
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationId
+ OpExecutionMode %main LocalSize 1 1 1
+
+ OpDecorate %gl_GlobalInvocationId BuiltIn GlobalInvocationId
+ OpDecorate %ra_uint ArrayStride 4
+ OpDecorate %struct_uint2 BufferBlock
+ OpMemberDecorate %struct_uint2 0 Offset 0
+ OpDecorate %input DescriptorSet 0
+ OpDecorate %input Binding 0
+ OpDecorate %output DescriptorSet 0
+ OpDecorate %output Binding 1
+
+ %uint = OpTypeInt 32 0
+ %ptr_uint = OpTypePointer Uniform %uint
+ %ptr_input_uint = OpTypePointer Input %uint
+ %uint3 = OpTypeVector %uint 3
+ %ptr_input_uint3 = OpTypePointer Input %uint3
+ %void = OpTypeVoid
+ %voidFn = OpTypeFunction %void
+
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %ra_uint = OpTypeRuntimeArray %uint
+ %uint2 = OpTypeVector %uint 2
+ %struct_uint2 = OpTypeStruct %ra_uint
+ %ptr_struct_uint2 = OpTypePointer Uniform %struct_uint2
+
+%gl_GlobalInvocationId = OpVariable %ptr_input_uint3 Input
+ %input = OpVariable %ptr_struct_uint2 Uniform
+
+ %output = OpVariable %ptr_struct_uint2 Uniform
+ %main = OpFunction %void None %voidFn
+ %mainStart = OpLabel
+ %index_ptr = OpAccessChain %ptr_input_uint %gl_GlobalInvocationId %uint_0
+ %index = OpLoad %uint %index_ptr
+ %in_ptr = OpAccessChain %ptr_uint %input %uint_0 %index
+ %invalue = OpLoad %uint %in_ptr
+
+ %out_ptr = OpAccessChain %ptr_uint %output %uint_0 %index
+ %result = OpAtomicSMax %uint %out_ptr %uint_1 %uint_0 %invalue
+
+
+ OpReturn
+ OpFunctionEnd
+END
+BUFFER data0 DATA_TYPE int32 DATA
+-7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7
+END
+
+BUFFER data1 DATA_TYPE int32 DATA
+ 7 6 5 4 3 2 1 0 -1 -2 -3 -4 -5 -6 -7
+END
+
+BUFFER expected0 DATA_TYPE int32 DATA
+ 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7
+END
+
+PIPELINE compute compute_pipeline
+ ATTACH test
+ BIND BUFFER data0 AS storage DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER data1 AS storage DESCRIPTOR_SET 0 BINDING 1
+END
+
+RUN compute_pipeline 15 1 1
+
+EXPECT data1 EQ_BUFFER expected0
diff --git a/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/uint_atomicsmin.amber b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/uint_atomicsmin.amber
new file mode 100644
index 0000000..df29596
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/uint_atomicsmin.amber
@@ -0,0 +1,73 @@
+#!amber
+# Test OpAtomicSMin instruction
+
+SHADER compute test SPIRV-ASM
+ OpCapability Shader
+
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationId
+ OpExecutionMode %main LocalSize 1 1 1
+
+ OpDecorate %gl_GlobalInvocationId BuiltIn GlobalInvocationId
+ OpDecorate %ra_uint ArrayStride 4
+ OpDecorate %struct_uint2 BufferBlock
+ OpMemberDecorate %struct_uint2 0 Offset 0
+ OpDecorate %input DescriptorSet 0
+ OpDecorate %input Binding 0
+ OpDecorate %output DescriptorSet 0
+ OpDecorate %output Binding 1
+
+ %uint = OpTypeInt 32 0
+ %ptr_uint = OpTypePointer Uniform %uint
+ %ptr_input_uint = OpTypePointer Input %uint
+ %uint3 = OpTypeVector %uint 3
+ %ptr_input_uint3 = OpTypePointer Input %uint3
+ %void = OpTypeVoid
+ %voidFn = OpTypeFunction %void
+
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %ra_uint = OpTypeRuntimeArray %uint
+ %uint2 = OpTypeVector %uint 2
+ %struct_uint2 = OpTypeStruct %ra_uint
+ %ptr_struct_uint2 = OpTypePointer Uniform %struct_uint2
+
+%gl_GlobalInvocationId = OpVariable %ptr_input_uint3 Input
+ %input = OpVariable %ptr_struct_uint2 Uniform
+
+ %output = OpVariable %ptr_struct_uint2 Uniform
+ %main = OpFunction %void None %voidFn
+ %mainStart = OpLabel
+ %index_ptr = OpAccessChain %ptr_input_uint %gl_GlobalInvocationId %uint_0
+ %index = OpLoad %uint %index_ptr
+ %in_ptr = OpAccessChain %ptr_uint %input %uint_0 %index
+ %invalue = OpLoad %uint %in_ptr
+
+ %out_ptr = OpAccessChain %ptr_uint %output %uint_0 %index
+ %result = OpAtomicSMin %uint %out_ptr %uint_1 %uint_0 %invalue
+
+
+ OpReturn
+ OpFunctionEnd
+END
+BUFFER data0 DATA_TYPE int32 DATA
+-7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7
+END
+
+BUFFER data1 DATA_TYPE int32 DATA
+ 7 6 5 4 3 2 1 0 -1 -2 -3 -4 -5 -6 -7
+END
+
+BUFFER expected0 DATA_TYPE int32 DATA
+-7 -6 -5 -4 -3 -2 -1 0 -1 -2 -3 -4 -5 -6 -7
+END
+
+PIPELINE compute compute_pipeline
+ ATTACH test
+ BIND BUFFER data0 AS storage DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER data1 AS storage DESCRIPTOR_SET 0 BINDING 1
+END
+
+RUN compute_pipeline 15 1 1
+
+EXPECT data1 EQ_BUFFER expected0
diff --git a/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/uint_sdiv.amber b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/uint_sdiv.amber
new file mode 100644
index 0000000..5a2f88a
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/uint_sdiv.amber
@@ -0,0 +1,82 @@
+#!amber
+# Test OpSDiv instruction
+
+SHADER compute test SPIRV-ASM
+ OpCapability Shader
+
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationId
+ OpExecutionMode %main LocalSize 1 1 1
+
+ OpDecorate %gl_GlobalInvocationId BuiltIn GlobalInvocationId
+ OpDecorate %ra_uint ArrayStride 4
+ OpDecorate %struct_uint3 BufferBlock
+ OpMemberDecorate %struct_uint3 0 Offset 0
+ OpDecorate %input0 DescriptorSet 0
+ OpDecorate %input0 Binding 0
+ OpDecorate %input1 DescriptorSet 0
+ OpDecorate %input1 Binding 1
+ OpDecorate %output DescriptorSet 0
+ OpDecorate %output Binding 2
+
+ %uint = OpTypeInt 32 0
+ %ptr_uint = OpTypePointer Uniform %uint
+ %ptr_input_uint = OpTypePointer Input %uint
+ %uint3 = OpTypeVector %uint 3
+ %ptr_input_uint3 = OpTypePointer Input %uint3
+ %void = OpTypeVoid
+ %voidFn = OpTypeFunction %void
+
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %ra_uint = OpTypeRuntimeArray %uint
+ %struct_uint3 = OpTypeStruct %ra_uint
+ %ptr_struct_uint3 = OpTypePointer Uniform %struct_uint3
+
+%gl_GlobalInvocationId = OpVariable %ptr_input_uint3 Input
+ %input0 = OpVariable %ptr_struct_uint3 Uniform
+ %input1 = OpVariable %ptr_struct_uint3 Uniform
+
+ %output = OpVariable %ptr_struct_uint3 Uniform
+ %main = OpFunction %void None %voidFn
+ %mainStart = OpLabel
+ %index_ptr = OpAccessChain %ptr_input_uint %gl_GlobalInvocationId %uint_0
+ %index = OpLoad %uint %index_ptr
+ %in_ptr0 = OpAccessChain %ptr_uint %input0 %uint_0 %index
+ %invalue0 = OpLoad %uint %in_ptr0
+ %in_ptr1 = OpAccessChain %ptr_uint %input1 %uint_0 %index
+ %invalue1 = OpLoad %uint %in_ptr1
+
+ %outvalue = OpSDiv %uint %invalue0 %invalue1
+ %out_ptr = OpAccessChain %ptr_uint %output %uint_0 %index
+ OpStore %out_ptr %outvalue
+
+ OpReturn
+ OpFunctionEnd
+END
+BUFFER data0 DATA_TYPE int32 DATA
+ 0 -2 3 4 -5
+END
+
+BUFFER data1 DATA_TYPE int32 DATA
+ 1 -1 -1 1 1
+END
+
+BUFFER data2 DATA_TYPE int32 DATA
+ 8 8 8 8 8
+END
+
+BUFFER expected0 DATA_TYPE int32 DATA
+ 0 2 -3 4 -5
+END
+
+PIPELINE compute compute_pipeline
+ ATTACH test
+ BIND BUFFER data0 AS storage DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER data1 AS storage DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER data2 AS storage DESCRIPTOR_SET 0 BINDING 2
+END
+
+RUN compute_pipeline 5 1 1
+
+EXPECT data2 EQ_BUFFER expected0
diff --git a/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/uint_smulextended.amber b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/uint_smulextended.amber
new file mode 100644
index 0000000..4512b8b
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/uint_smulextended.amber
@@ -0,0 +1,102 @@
+#!amber
+# Test OpSMulExtended instruction
+
+SHADER compute test SPIRV-ASM
+ OpCapability Shader
+
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationId
+ OpExecutionMode %main LocalSize 1 1 1
+
+ OpDecorate %gl_GlobalInvocationId BuiltIn GlobalInvocationId
+ OpDecorate %ra_uint ArrayStride 4
+ OpDecorate %struct_uint4 BufferBlock
+ OpMemberDecorate %struct_uint4 0 Offset 0
+ OpDecorate %input0 DescriptorSet 0
+ OpDecorate %input0 Binding 0
+ OpDecorate %input1 DescriptorSet 0
+ OpDecorate %input1 Binding 1
+ OpDecorate %output0 DescriptorSet 0
+ OpDecorate %output0 Binding 2
+ OpDecorate %output1 DescriptorSet 0
+ OpDecorate %output1 Binding 3
+
+ %uint = OpTypeInt 32 0
+ %ptr_uint = OpTypePointer Uniform %uint
+ %ptr_input_uint = OpTypePointer Input %uint
+ %uint3 = OpTypeVector %uint 3
+ %ptr_input_uint3 = OpTypePointer Input %uint3
+ %void = OpTypeVoid
+ %voidFn = OpTypeFunction %void
+
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %ra_uint = OpTypeRuntimeArray %uint
+ %uint4 = OpTypeVector %uint 4
+ %struct_uint4 = OpTypeStruct %ra_uint
+ %ptr_struct_uint4 = OpTypePointer Uniform %struct_uint4
+ %resulttype = OpTypeStruct %uint %uint
+%gl_GlobalInvocationId = OpVariable %ptr_input_uint3 Input
+ %input0 = OpVariable %ptr_struct_uint4 Uniform
+ %input1 = OpVariable %ptr_struct_uint4 Uniform
+
+ %output0 = OpVariable %ptr_struct_uint4 Uniform
+ %output1 = OpVariable %ptr_struct_uint4 Uniform
+
+ %main = OpFunction %void None %voidFn
+ %mainStart = OpLabel
+ %index_ptr = OpAccessChain %ptr_input_uint %gl_GlobalInvocationId %uint_0
+ %index = OpLoad %uint %index_ptr
+ %in_ptr0 = OpAccessChain %ptr_uint %input0 %uint_0 %index
+ %invalue0 = OpLoad %uint %in_ptr0
+ %in_ptr1 = OpAccessChain %ptr_uint %input1 %uint_0 %index
+ %invalue1 = OpLoad %uint %in_ptr1
+
+ %outvalue = OpSMulExtended %resulttype %invalue0 %invalue1
+ %outvalue0 = OpCompositeExtract %uint %outvalue 0
+ %out_ptr0 = OpAccessChain %ptr_uint %output0 %uint_0 %index
+ OpStore %out_ptr0 %outvalue0
+ %outvalue1 = OpCompositeExtract %uint %outvalue 1
+ %out_ptr1 = OpAccessChain %ptr_uint %output1 %uint_0 %index
+ OpStore %out_ptr1 %outvalue1
+
+
+ OpReturn
+ OpFunctionEnd
+END
+BUFFER data0 DATA_TYPE int32 DATA
+-7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7
+END
+
+BUFFER data1 DATA_TYPE int32 DATA
+ 7 6 5 4 3 2 1 0 -1 -2 -3 -4 -5 -6 -7
+END
+
+BUFFER data2 DATA_TYPE int32 DATA
+ 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
+END
+
+BUFFER data3 DATA_TYPE int32 DATA
+ 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
+END
+
+BUFFER expected0 DATA_TYPE int32 DATA
+-49 -36 -25 -16 -9 -4 -1 0 -1 -4 -9 -16 -25 -36 -49
+END
+
+BUFFER expected1 DATA_TYPE int32 DATA
+-1 -1 -1 -1 -1 -1 -1 0 -1 -1 -1 -1 -1 -1 -1
+END
+
+PIPELINE compute compute_pipeline
+ ATTACH test
+ BIND BUFFER data0 AS storage DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER data1 AS storage DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER data2 AS storage DESCRIPTOR_SET 0 BINDING 2
+ BIND BUFFER data3 AS storage DESCRIPTOR_SET 0 BINDING 3
+END
+
+RUN compute_pipeline 15 1 1
+
+EXPECT data2 EQ_BUFFER expected0
+EXPECT data3 EQ_BUFFER expected1
diff --git a/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/uint_snegate.amber b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/uint_snegate.amber
new file mode 100644
index 0000000..8d9ef89
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/uint_snegate.amber
@@ -0,0 +1,73 @@
+#!amber
+# Test OpSNegate instruction
+
+SHADER compute test SPIRV-ASM
+ OpCapability Shader
+
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationId
+ OpExecutionMode %main LocalSize 1 1 1
+
+ OpDecorate %gl_GlobalInvocationId BuiltIn GlobalInvocationId
+ OpDecorate %ra_uint ArrayStride 4
+ OpDecorate %struct_uint2 BufferBlock
+ OpMemberDecorate %struct_uint2 0 Offset 0
+ OpDecorate %input DescriptorSet 0
+ OpDecorate %input Binding 0
+ OpDecorate %output DescriptorSet 0
+ OpDecorate %output Binding 1
+
+ %uint = OpTypeInt 32 0
+ %ptr_uint = OpTypePointer Uniform %uint
+ %ptr_input_uint = OpTypePointer Input %uint
+ %uint3 = OpTypeVector %uint 3
+ %ptr_input_uint3 = OpTypePointer Input %uint3
+ %void = OpTypeVoid
+ %voidFn = OpTypeFunction %void
+
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %ra_uint = OpTypeRuntimeArray %uint
+ %uint2 = OpTypeVector %uint 2
+ %struct_uint2 = OpTypeStruct %ra_uint
+ %ptr_struct_uint2 = OpTypePointer Uniform %struct_uint2
+
+%gl_GlobalInvocationId = OpVariable %ptr_input_uint3 Input
+ %input = OpVariable %ptr_struct_uint2 Uniform
+
+ %output = OpVariable %ptr_struct_uint2 Uniform
+ %main = OpFunction %void None %voidFn
+ %mainStart = OpLabel
+ %index_ptr = OpAccessChain %ptr_input_uint %gl_GlobalInvocationId %uint_0
+ %index = OpLoad %uint %index_ptr
+ %in_ptr = OpAccessChain %ptr_uint %input %uint_0 %index
+ %invalue = OpLoad %uint %in_ptr
+
+ %outvalue = OpSNegate %uint %invalue
+ %out_ptr = OpAccessChain %ptr_uint %output %uint_0 %index
+ OpStore %out_ptr %outvalue
+
+ OpReturn
+ OpFunctionEnd
+END
+BUFFER data0 DATA_TYPE int32 DATA
+ 0 -1 1
+END
+
+BUFFER data1 DATA_TYPE int32 DATA
+ 8 8 8
+END
+
+BUFFER expected0 DATA_TYPE int32 DATA
+ 0 1 -1
+END
+
+PIPELINE compute compute_pipeline
+ ATTACH test
+ BIND BUFFER data0 AS storage DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER data1 AS storage DESCRIPTOR_SET 0 BINDING 1
+END
+
+RUN compute_pipeline 3 1 1
+
+EXPECT data1 EQ_BUFFER expected0
diff --git a/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/uint_umulextended.amber b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/uint_umulextended.amber
new file mode 100644
index 0000000..2c8478d
--- /dev/null
+++ b/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/compute/signed_op/uint_umulextended.amber
@@ -0,0 +1,100 @@
+#!amber
+# Test OpUMulExtended instruction
+
+SHADER compute test SPIRV-ASM
+ OpCapability Shader
+
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationId
+ OpExecutionMode %main LocalSize 1 1 1
+
+ OpDecorate %gl_GlobalInvocationId BuiltIn GlobalInvocationId
+ OpDecorate %struct_uint4 BufferBlock
+ OpMemberDecorate %struct_uint4 0 Offset 0
+ OpDecorate %input0 DescriptorSet 0
+ OpDecorate %input0 Binding 0
+ OpDecorate %input1 DescriptorSet 0
+ OpDecorate %input1 Binding 1
+ OpDecorate %output0 DescriptorSet 0
+ OpDecorate %output0 Binding 2
+ OpDecorate %output1 DescriptorSet 0
+ OpDecorate %output1 Binding 3
+
+ %uint = OpTypeInt 32 0
+ %ptr_uint = OpTypePointer Uniform %uint
+ %ptr_input_uint = OpTypePointer Input %uint
+ %uint3 = OpTypeVector %uint 3
+ %ptr_input_uint3 = OpTypePointer Input %uint3
+ %void = OpTypeVoid
+ %voidFn = OpTypeFunction %void
+
+ %uint_0 = OpConstant %uint 0
+ %uint_1 = OpConstant %uint 1
+ %uint4 = OpTypeVector %uint 4
+ %struct_uint4 = OpTypeStruct %uint4
+ %ptr_struct_uint4 = OpTypePointer Uniform %struct_uint4
+ %resulttype = OpTypeStruct %uint %uint
+%gl_GlobalInvocationId = OpVariable %ptr_input_uint3 Input
+ %input0 = OpVariable %ptr_struct_uint4 Uniform
+ %input1 = OpVariable %ptr_struct_uint4 Uniform
+
+ %output0 = OpVariable %ptr_struct_uint4 Uniform
+ %output1 = OpVariable %ptr_struct_uint4 Uniform
+
+ %main = OpFunction %void None %voidFn
+ %mainStart = OpLabel
+ %index_ptr = OpAccessChain %ptr_input_uint %gl_GlobalInvocationId %uint_0
+ %index = OpLoad %uint %index_ptr
+ %in_ptr0 = OpAccessChain %ptr_uint %input0 %uint_0 %index
+ %invalue0 = OpLoad %uint %in_ptr0
+ %in_ptr1 = OpAccessChain %ptr_uint %input1 %uint_0 %index
+ %invalue1 = OpLoad %uint %in_ptr1
+
+ %outvalue = OpUMulExtended %resulttype %invalue0 %invalue1
+ %outvalue0 = OpCompositeExtract %uint %outvalue 0
+ %out_ptr0 = OpAccessChain %ptr_uint %output0 %uint_0 %index
+ OpStore %out_ptr0 %outvalue0
+ %outvalue1 = OpCompositeExtract %uint %outvalue 1
+ %out_ptr1 = OpAccessChain %ptr_uint %output1 %uint_0 %index
+ OpStore %out_ptr1 %outvalue1
+
+
+ OpReturn
+ OpFunctionEnd
+END
+BUFFER data0 DATA_TYPE int32 DATA
+-7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7
+END
+
+BUFFER data1 DATA_TYPE int32 DATA
+ 7 6 5 4 3 2 1 0 -1 -2 -3 -4 -5 -6 -7
+END
+
+BUFFER data2 DATA_TYPE int32 DATA
+ 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
+END
+
+BUFFER data3 DATA_TYPE int32 DATA
+ 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
+END
+
+BUFFER expected0 DATA_TYPE int32 DATA
+-49 -36 -25 -16 -9 -4 -1 0 -1 -4 -9 -16 -25 -36 -49
+END
+
+BUFFER expected1 DATA_TYPE int32 DATA
+ 6 5 4 3 2 1 0 0 0 1 2 3 4 5 6
+END
+
+PIPELINE compute compute_pipeline
+ ATTACH test
+ BIND BUFFER data0 AS storage DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER data1 AS storage DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER data2 AS storage DESCRIPTOR_SET 0 BINDING 2
+ BIND BUFFER data3 AS storage DESCRIPTOR_SET 0 BINDING 3
+END
+
+RUN compute_pipeline 15 1 1
+
+EXPECT data2 EQ_BUFFER expected0
+EXPECT data3 EQ_BUFFER expected1
diff --git a/external/vulkancts/modules/vulkan/spirv_assembly/CMakeLists.txt b/external/vulkancts/modules/vulkan/spirv_assembly/CMakeLists.txt
index f6f3238..a1f240c 100644
--- a/external/vulkancts/modules/vulkan/spirv_assembly/CMakeLists.txt
+++ b/external/vulkancts/modules/vulkan/spirv_assembly/CMakeLists.txt
@@ -35,6 +35,8 @@
vktSpvAsmPointerParameterTests.hpp
vktSpvAsmSignedIntCompareTests.cpp
vktSpvAsmSignedIntCompareTests.hpp
+ vktSpvAsmSignedOpTests.hpp
+ vktSpvAsmSignedOpTests.cpp
vktSpvAsm64bitCompareTests.cpp
vktSpvAsm64bitCompareTests.hpp
vktSpvAsmTypeTests.cpp
diff --git a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp
index ca0d267..2bfb4bf 100644
--- a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp
+++ b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp
@@ -76,6 +76,7 @@
#include "vktSpvAsmVaryingNameTests.hpp"
#include "vktSpvAsmWorkgroupMemoryTests.hpp"
#include "vktSpvAsmSignedIntCompareTests.hpp"
+#include "vktSpvAsmSignedOpTests.hpp"
#include "vktSpvAsmPtrAccessChainTests.hpp"
#include "vktSpvAsmFloatControlsExtensionlessTests.hpp"
#include "vktSpvAsmNonSemanticInfoTests.hpp"
@@ -20461,6 +20462,7 @@
computeTests->addChild(createWorkgroupMemoryComputeGroup(testCtx));
computeTests->addChild(createSpirvIdsAbuseGroup(testCtx));
computeTests->addChild(createSignedIntCompareGroup(testCtx));
+ computeTests->addChild(createSignedOpTestsGroup(testCtx));
computeTests->addChild(createUnusedVariableComputeTests(testCtx));
computeTests->addChild(createPtrAccessChainGroup(testCtx));
computeTests->addChild(createHlslComputeGroup(testCtx));
diff --git a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmSignedOpTests.cpp b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmSignedOpTests.cpp
new file mode 100644
index 0000000..2ececba
--- /dev/null
+++ b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmSignedOpTests.cpp
@@ -0,0 +1,90 @@
+/*------------------------------------------------------------------------
+ * Vulkan Conformance Tests
+ * ------------------------
+ *
+ * Copyright (c) 2019 Google LLC
+ * Copyright (c) 2019 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *//*!
+ * \file
+ * \brief SPIR-V signed instruction tests
+ *//*--------------------------------------------------------------------*/
+
+#include <string>
+
+#include "vktTestGroupUtil.hpp"
+#include "vktAmberTestCase.hpp"
+#include "vktSpvAsmSignedIntCompareTests.hpp"
+
+namespace vkt
+{
+namespace SpirVAssembly
+{
+namespace
+{
+
+void createSignedOpTests (tcu::TestCaseGroup* tests, const char* data_dir)
+{
+ tcu::TestContext& testCtx = tests->getTestContext();
+
+ // Shader test files are saved in <path>/external/vulkancts/data/vulkan/amber/<data_dir>/<basename>.amber
+ struct Case {
+ const char* basename;
+ const char* description;
+ };
+ const Case cases[] =
+ {
+ { "glsl_int_findumsb", "32bit signed int with FindUMsb" },
+ { "glsl_int_uclamp", "32bit signed int with UClamp" },
+ { "glsl_int_umax", "32bit signed int with UMax" },
+ { "glsl_int_umin", "32bit signed int with UMin" },
+ { "glsl_uint_findsmsb", "32bit unsigned int with FindSMsb" },
+ { "glsl_uint_sabs", "32bit unsigned int with SAbs" },
+ { "glsl_uint_sclamp", "32bit unsigned int with SClamp" },
+ { "glsl_uint_smax", "32bit unsigned int with SMax" },
+ { "glsl_uint_smin", "32bit unsigned int with SMin" },
+ { "glsl_uint_ssign", "32bit unsigned int with SSign" },
+ { "int_atomicumax", "32bit unsigned int with UMax" },
+ { "int_atomicumin", "32bit unsigned int with UMin" },
+ { "int_ugreaterthan", "32bit unsigned int with UGreaterThanEqual" },
+ { "int_ugreaterthanequal", "32bit unsigned int with UGreaterThanEqual" },
+ { "int_ulessthan", "32bit unsigned int with ULessThan" },
+ { "int_ulessthanequal", "32bit unsigned int with ULessThanEqual" },
+ { "uint_atomicsmax", "32bit unsigned int with SMax" },
+ { "uint_atomicsmin", "32bit unsigned int with SMin" },
+ { "uint_sdiv", "32bit unsigned int with UMax" },
+ { "uint_smulextended", "32bit unsigned int with SMulExtended" },
+ { "uint_snegate", "32bit unsigned int with SNegate" },
+ };
+ for (unsigned i = 0; i < sizeof(cases)/sizeof(cases[0]) ; ++i)
+ {
+ std::string file = std::string(cases[i].basename) + ".amber";
+ cts_amber::AmberTestCase *testCase = cts_amber::createAmberTestCase(testCtx, cases[i].basename, cases[i].description, data_dir, file);
+
+ tests->addChild(testCase);
+ }
+}
+
+} // anonymous
+
+tcu::TestCaseGroup* createSignedOpTestsGroup (tcu::TestContext& testCtx)
+{
+ // Location of the Amber script files under the data/vulkan/amber source tree.
+ const char* data_dir = "spirv_assembly/instruction/compute/signed_op";
+ return createTestGroup(testCtx, "signed_op", "Signed op over uint values", createSignedOpTests, data_dir);
+}
+
+} // SpirVAssembly
+} // vkt
diff --git a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmSignedOpTests.hpp b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmSignedOpTests.hpp
new file mode 100644
index 0000000..c2b4533
--- /dev/null
+++ b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmSignedOpTests.hpp
@@ -0,0 +1,40 @@
+#ifndef _VKTSPVASMSIGNEDOPTESTS_HPP
+#define _VKTSPVASMSIGNEDOPTESTS_HPP
+/*------------------------------------------------------------------------
+ * Vulkan Conformance Tests
+ * ------------------------
+ *
+ * Copyright (c) 2019 Google LLC
+ * Copyright (c) 2019 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *//*!
+ * \file
+ * \brief SPIR-V signed instruction tests
+ *//*--------------------------------------------------------------------*/
+
+#include "tcuDefs.hpp"
+#include "tcuTestCase.hpp"
+
+namespace vkt
+{
+namespace SpirVAssembly
+{
+
+tcu::TestCaseGroup* createSignedOpTestsGroup (tcu::TestContext& testCtx);
+
+} // SpirVAssembly
+} // vkt
+
+#endif // _VKTSPVASMSIGNEDOPTESTS_HPP
diff --git a/external/vulkancts/mustpass/master/vk-default.txt b/external/vulkancts/mustpass/master/vk-default.txt
index ce8b595..3464ba3 100644
--- a/external/vulkancts/mustpass/master/vk-default.txt
+++ b/external/vulkancts/mustpass/master/vk-default.txt
Binary files differ