[Piglit] [PATCH 47/63] arb_gl_spirv: add tests for different types of varyings and blocks

Alejandro Piñeiro apinheiro at igalia.com
Sat Feb 23 23:45:35 UTC 2019


From: Eleni Maria Stea <estea at igalia.com>

Signed-off-by: Eleni Maria Estea <estea at igalia.com>
Signed-off-by: Alejandro Piñeiro <apinheiro at igalia.com>

v2: (changes made by Alejandro Piñeiro)
   * Change several tests to not use addition of values, don't use
     repeated values, and use more different and complex values, to
     ensure that we are getting the correct values, and not the same
     values by (bad) luck.
   * Change expected value to be green instead of red on several
     tests. There is a kind of informal (and not always applied) rule
     on piglit tests about green==pass color, red==fail
     color.
   * Strip names. Names are optional. It should work without names, so
     it is preferred to have the shader without names.
   * Removed several individual scalar type tests, as all of them are
     already tested on all-scalar test, and partially on
     all-data-types.
   * Removed all individual vecX tests, as all of them are already
     tested with all-data-types test.
---
 .../varying/all-array-types.shader_test       | 326 ++++++++++
 .../varying/all-data-types.shader_test        | 595 ++++++++++++++++++
 .../execution/varying/all-scalar.shader_test  | 306 +++++++++
 .../varying/all-stages-test.shader_test       | 483 ++++++++++++++
 .../execution/varying/block.shader_test       | 236 +++++++
 .../execution/varying/mat/mat-arb.shader_test | 313 +++++++++
 .../execution/varying/mat/mat2.shader_test    | 235 +++++++
 .../execution/varying/mat/mat3.shader_test    | 294 +++++++++
 .../execution/varying/mat/mat4.shader_test    | 358 +++++++++++
 9 files changed, 3146 insertions(+)
 create mode 100644 tests/spec/arb_gl_spirv/execution/varying/all-array-types.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/varying/all-data-types.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/varying/all-scalar.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/varying/all-stages-test.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/varying/block.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/varying/mat/mat-arb.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/varying/mat/mat2.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/varying/mat/mat3.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/varying/mat/mat4.shader_test

diff --git a/tests/spec/arb_gl_spirv/execution/varying/all-array-types.shader_test b/tests/spec/arb_gl_spirv/execution/varying/all-array-types.shader_test
new file mode 100644
index 000000000..9816e4373
--- /dev/null
+++ b/tests/spec/arb_gl_spirv/execution/varying/all-array-types.shader_test
@@ -0,0 +1,326 @@
+[require]
+SPIRV YES
+GL >= 4.5
+GLSL >= 4.50
+GL_ARB_gl_spirv
+
+[vertex shader spirv]
+; Automatically generated from the GLSL by gen_gl_spirv_tests.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 59
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float64
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %main "main" %_ %piglit_vertex %d %f %i %u %gl_VertexID %gl_InstanceID
+               OpSource GLSL 450
+               OpName %_ ""
+               OpMemberDecorate %gl_PerVertex 0 BuiltIn Position
+               OpMemberDecorate %gl_PerVertex 1 BuiltIn PointSize
+               OpMemberDecorate %gl_PerVertex 2 BuiltIn ClipDistance
+               OpMemberDecorate %gl_PerVertex 3 BuiltIn CullDistance
+               OpDecorate %gl_PerVertex Block
+               OpDecorate %piglit_vertex Location 0
+               OpDecorate %d Flat
+               OpDecorate %d Location 0
+               OpDecorate %f Location 6
+               OpDecorate %i Flat
+               OpDecorate %i Location 2
+               OpDecorate %u Flat
+               OpDecorate %u Location 4
+               OpDecorate %gl_VertexID BuiltIn VertexId
+               OpDecorate %gl_InstanceID BuiltIn InstanceId
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_arr_float_uint_1 = OpTypeArray %float %uint_1
+%gl_PerVertex = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
+%_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex
+          %_ = OpVariable %_ptr_Output_gl_PerVertex Output
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Input_v4float = OpTypePointer Input %v4float
+%piglit_vertex = OpVariable %_ptr_Input_v4float Input
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+     %double = OpTypeFloat 64
+     %uint_2 = OpConstant %uint 2
+%_arr_double_uint_2 = OpTypeArray %double %uint_2
+%_ptr_Output__arr_double_uint_2 = OpTypePointer Output %_arr_double_uint_2
+          %d = OpVariable %_ptr_Output__arr_double_uint_2 Output
+%double_1_7976931348623157e_308 = OpConstant %double 1.7976931348623157e+308
+%_ptr_Output_double = OpTypePointer Output %double
+      %int_1 = OpConstant %int 1
+%double_2_2250738585072014en308 = OpConstant %double 2.2250738585072014e-308
+%_arr_float_uint_2 = OpTypeArray %float %uint_2
+%_ptr_Output__arr_float_uint_2 = OpTypePointer Output %_arr_float_uint_2
+          %f = OpVariable %_ptr_Output__arr_float_uint_2 Output
+%float_n7391_61914 = OpConstant %float -7391.61914
+%_ptr_Output_float = OpTypePointer Output %float
+%float_29371_457 = OpConstant %float 29371.457
+%_arr_int_uint_2 = OpTypeArray %int %uint_2
+%_ptr_Output__arr_int_uint_2 = OpTypePointer Output %_arr_int_uint_2
+          %i = OpVariable %_ptr_Output__arr_int_uint_2 Output
+    %int_201 = OpConstant %int 201
+%_ptr_Output_int = OpTypePointer Output %int
+   %int_n123 = OpConstant %int -123
+%_arr_uint_uint_2 = OpTypeArray %uint %uint_2
+%_ptr_Output__arr_uint_uint_2 = OpTypePointer Output %_arr_uint_uint_2
+          %u = OpVariable %_ptr_Output__arr_uint_uint_2 Output
+    %uint_10 = OpConstant %uint 10
+%_ptr_Output_uint = OpTypePointer Output %uint
+   %uint_201 = OpConstant %uint 201
+%_ptr_Input_int = OpTypePointer Input %int
+%gl_VertexID = OpVariable %_ptr_Input_int Input
+%gl_InstanceID = OpVariable %_ptr_Input_int Input
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+         %18 = OpLoad %v4float %piglit_vertex
+         %20 = OpAccessChain %_ptr_Output_v4float %_ %int_0
+               OpStore %20 %18
+         %28 = OpAccessChain %_ptr_Output_double %d %int_0
+               OpStore %28 %double_1_7976931348623157e_308
+         %31 = OpAccessChain %_ptr_Output_double %d %int_1
+               OpStore %31 %double_2_2250738585072014en308
+         %37 = OpAccessChain %_ptr_Output_float %f %int_0
+               OpStore %37 %float_n7391_61914
+         %39 = OpAccessChain %_ptr_Output_float %f %int_1
+               OpStore %39 %float_29371_457
+         %45 = OpAccessChain %_ptr_Output_int %i %int_0
+               OpStore %45 %int_201
+         %47 = OpAccessChain %_ptr_Output_int %i %int_1
+               OpStore %47 %int_n123
+         %53 = OpAccessChain %_ptr_Output_uint %u %int_0
+               OpStore %53 %uint_10
+         %55 = OpAccessChain %_ptr_Output_uint %u %int_1
+               OpStore %55 %uint_201
+               OpReturn
+               OpFunctionEnd
+
+[vertex shader]
+#version 450 core
+
+layout(location = 0) in vec4 piglit_vertex;
+
+layout(location = 0) flat out double d[2];
+layout(location = 2) flat out int i[2];
+layout(location = 4) flat out uint u[2];
+layout(location = 6) out float f[2];
+
+void main()
+{
+	gl_Position = piglit_vertex;
+
+	d[0] = 1.7976931348623157E+308;
+	d[1] = 2.2250738585072014E-308;
+
+	f[0] = -7391.61915007;
+	f[1] = 29371.4563058;
+
+	i[0] = 201;
+	i[1] = -123;
+
+	u[0] = 10;
+	u[1] = 201;
+}
+
+[fragment shader spirv]
+; Automatically generated from the GLSL by gen_gl_spirv_tests.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 95
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float64
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %main "main" %out_color %d %i %u %f
+               OpExecutionMode %main OriginLowerLeft
+               OpSource GLSL 450
+               OpDecorate %out_color Location 0
+               OpDecorate %d Flat
+               OpDecorate %d Location 0
+               OpDecorate %i Flat
+               OpDecorate %i Location 2
+               OpDecorate %u Flat
+               OpDecorate %u Location 4
+               OpDecorate %f Location 6
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+    %float_1 = OpConstant %float 1
+    %float_0 = OpConstant %float 0
+         %12 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+  %out_color = OpVariable %_ptr_Output_v4float Output
+         %15 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
+     %double = OpTypeFloat 64
+       %uint = OpTypeInt 32 0
+     %uint_2 = OpConstant %uint 2
+%_arr_double_uint_2 = OpTypeArray %double %uint_2
+%_ptr_Input__arr_double_uint_2 = OpTypePointer Input %_arr_double_uint_2
+          %d = OpVariable %_ptr_Input__arr_double_uint_2 Input
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Input_double = OpTypePointer Input %double
+%double_1_7976931348623157e_308 = OpConstant %double 1.7976931348623157e+308
+       %bool = OpTypeBool
+      %int_1 = OpConstant %int 1
+%double_2_2250738585072014en308 = OpConstant %double 2.2250738585072014e-308
+%_arr_int_uint_2 = OpTypeArray %int %uint_2
+%_ptr_Input__arr_int_uint_2 = OpTypePointer Input %_arr_int_uint_2
+          %i = OpVariable %_ptr_Input__arr_int_uint_2 Input
+%_ptr_Input_int = OpTypePointer Input %int
+    %int_201 = OpConstant %int 201
+   %int_n123 = OpConstant %int -123
+%_arr_uint_uint_2 = OpTypeArray %uint %uint_2
+%_ptr_Input__arr_uint_uint_2 = OpTypePointer Input %_arr_uint_uint_2
+          %u = OpVariable %_ptr_Input__arr_uint_uint_2 Input
+%_ptr_Input_uint = OpTypePointer Input %uint
+    %uint_10 = OpConstant %uint 10
+   %uint_201 = OpConstant %uint 201
+%_arr_float_uint_2 = OpTypeArray %float %uint_2
+%_ptr_Input__arr_float_uint_2 = OpTypePointer Input %_arr_float_uint_2
+          %f = OpVariable %_ptr_Input__arr_float_uint_2 Input
+%_ptr_Input_float = OpTypePointer Input %float
+%float_n7391_61914 = OpConstant %float -7391.61914
+%float_29371_457 = OpConstant %float 29371.457
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+ %fail_color = OpVariable %_ptr_Function_v4float Function
+               OpStore %fail_color %12
+               OpStore %out_color %15
+         %25 = OpAccessChain %_ptr_Input_double %d %int_0
+         %26 = OpLoad %double %25
+         %29 = OpFOrdNotEqual %bool %26 %double_1_7976931348623157e_308
+               OpSelectionMerge %31 None
+               OpBranchConditional %29 %30 %31
+         %30 = OpLabel
+         %32 = OpLoad %v4float %fail_color
+               OpStore %out_color %32
+               OpBranch %31
+         %31 = OpLabel
+         %34 = OpAccessChain %_ptr_Input_double %d %int_1
+         %35 = OpLoad %double %34
+         %37 = OpFOrdNotEqual %bool %35 %double_2_2250738585072014en308
+               OpSelectionMerge %39 None
+               OpBranchConditional %37 %38 %39
+         %38 = OpLabel
+         %40 = OpLoad %v4float %fail_color
+               OpStore %out_color %40
+               OpBranch %39
+         %39 = OpLabel
+         %45 = OpAccessChain %_ptr_Input_int %i %int_0
+         %46 = OpLoad %int %45
+         %48 = OpINotEqual %bool %46 %int_201
+               OpSelectionMerge %50 None
+               OpBranchConditional %48 %49 %50
+         %49 = OpLabel
+         %51 = OpLoad %v4float %fail_color
+               OpStore %out_color %51
+               OpBranch %50
+         %50 = OpLabel
+         %52 = OpAccessChain %_ptr_Input_int %i %int_1
+         %53 = OpLoad %int %52
+         %55 = OpINotEqual %bool %53 %int_n123
+               OpSelectionMerge %57 None
+               OpBranchConditional %55 %56 %57
+         %56 = OpLabel
+         %58 = OpLoad %v4float %fail_color
+               OpStore %out_color %58
+               OpBranch %57
+         %57 = OpLabel
+         %63 = OpAccessChain %_ptr_Input_uint %u %int_0
+         %64 = OpLoad %uint %63
+         %66 = OpINotEqual %bool %64 %uint_10
+               OpSelectionMerge %68 None
+               OpBranchConditional %66 %67 %68
+         %67 = OpLabel
+         %69 = OpLoad %v4float %fail_color
+               OpStore %out_color %69
+               OpBranch %68
+         %68 = OpLabel
+         %70 = OpAccessChain %_ptr_Input_uint %u %int_1
+         %71 = OpLoad %uint %70
+         %73 = OpINotEqual %bool %71 %uint_201
+               OpSelectionMerge %75 None
+               OpBranchConditional %73 %74 %75
+         %74 = OpLabel
+         %76 = OpLoad %v4float %fail_color
+               OpStore %out_color %76
+               OpBranch %75
+         %75 = OpLabel
+         %81 = OpAccessChain %_ptr_Input_float %f %int_0
+         %82 = OpLoad %float %81
+         %84 = OpFOrdNotEqual %bool %82 %float_n7391_61914
+               OpSelectionMerge %86 None
+               OpBranchConditional %84 %85 %86
+         %85 = OpLabel
+         %87 = OpLoad %v4float %fail_color
+               OpStore %out_color %87
+               OpBranch %86
+         %86 = OpLabel
+         %88 = OpAccessChain %_ptr_Input_float %f %int_1
+         %89 = OpLoad %float %88
+         %91 = OpFOrdNotEqual %bool %89 %float_29371_457
+               OpSelectionMerge %93 None
+               OpBranchConditional %91 %92 %93
+         %92 = OpLabel
+         %94 = OpLoad %v4float %fail_color
+               OpStore %out_color %94
+               OpBranch %93
+         %93 = OpLabel
+               OpReturn
+               OpFunctionEnd
+
+[fragment shader]
+#version 450 core
+
+layout(location = 0) out vec4 out_color;
+
+layout(location = 0) flat in double d[2];
+layout(location = 2) flat in int i[2];
+layout(location = 4) flat in uint u[2];
+layout(location = 6) in float f[2];
+
+void main()
+{
+	vec4 fail_color = vec4(1.0, 0.0, 0.0, 1.0);
+	out_color = vec4(0.0, 1.0, 0.0, 1.0);
+
+	if (d[0] != 1.7976931348623157E+308)
+	   out_color = fail_color;
+
+	if (d[1] != 2.2250738585072014E-308)
+	   out_color = fail_color;
+
+	if (i[0] != 201)
+	   out_color = fail_color;
+
+	if (i[1] != -123)
+	   out_color = fail_color;
+
+	if (u[0] != 10)
+	   out_color = fail_color;
+
+        if (u[1] != 201)
+	   out_color = fail_color;
+
+        if (f[0] != -7391.61915007)
+	   out_color = fail_color;
+
+        if (f[1] != 29371.4563058)
+	   out_color = fail_color;
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_gl_spirv/execution/varying/all-data-types.shader_test b/tests/spec/arb_gl_spirv/execution/varying/all-data-types.shader_test
new file mode 100644
index 000000000..121fac273
--- /dev/null
+++ b/tests/spec/arb_gl_spirv/execution/varying/all-data-types.shader_test
@@ -0,0 +1,595 @@
+[require]
+SPIRV YES
+GL >= 4.5
+GLSL >= 4.50
+GL_ARB_gl_spirv
+
+[vertex shader spirv]
+; Automatically generated from the GLSL by gen_gl_spirv_tests.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 119
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float64
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %main "main" %_ %piglit_vertex %v2 %v3 %v4 %f %i %d %u %m2 %m3 %m4 %m3x4 %gl_VertexID %gl_InstanceID
+               OpSource GLSL 450
+               OpName %_ ""
+               OpMemberDecorate %gl_PerVertex 0 BuiltIn Position
+               OpMemberDecorate %gl_PerVertex 1 BuiltIn PointSize
+               OpMemberDecorate %gl_PerVertex 2 BuiltIn ClipDistance
+               OpMemberDecorate %gl_PerVertex 3 BuiltIn CullDistance
+               OpDecorate %gl_PerVertex Block
+               OpDecorate %piglit_vertex Location 0
+               OpDecorate %v2 Location 0
+               OpDecorate %v3 Location 1
+               OpDecorate %v4 Location 2
+               OpDecorate %f Location 3
+               OpDecorate %i Flat
+               OpDecorate %i Location 4
+               OpDecorate %d Flat
+               OpDecorate %d Location 5
+               OpDecorate %u Flat
+               OpDecorate %u Location 20
+               OpDecorate %m2 Location 6
+               OpDecorate %m3 Location 8
+               OpDecorate %m4 Location 11
+               OpDecorate %m3x4 Location 15
+               OpDecorate %gl_VertexID BuiltIn VertexId
+               OpDecorate %gl_InstanceID BuiltIn InstanceId
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_arr_float_uint_1 = OpTypeArray %float %uint_1
+%gl_PerVertex = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
+%_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex
+          %_ = OpVariable %_ptr_Output_gl_PerVertex Output
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Input_v4float = OpTypePointer Input %v4float
+%piglit_vertex = OpVariable %_ptr_Input_v4float Input
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+    %v2float = OpTypeVector %float 2
+%_ptr_Output_v2float = OpTypePointer Output %v2float
+         %v2 = OpVariable %_ptr_Output_v2float Output
+%float_1848_25549 = OpConstant %float 1848.25549
+%float_12916_126 = OpConstant %float 12916.126
+         %26 = OpConstantComposite %v2float %float_1848_25549 %float_12916_126
+    %v3float = OpTypeVector %float 3
+%_ptr_Output_v3float = OpTypePointer Output %v3float
+         %v3 = OpVariable %_ptr_Output_v3float Output
+%float_n21303_748 = OpConstant %float -21303.748
+%float_11729_6475 = OpConstant %float 11729.6475
+%float_n10231_1807 = OpConstant %float -10231.1807
+         %33 = OpConstantComposite %v3float %float_n21303_748 %float_11729_6475 %float_n10231_1807
+         %v4 = OpVariable %_ptr_Output_v4float Output
+%float_29371_457 = OpConstant %float 29371.457
+%float_7793_47266 = OpConstant %float 7793.47266
+%float_n20661_791 = OpConstant %float -20661.791
+%float_n26402_4414 = OpConstant %float -26402.4414
+         %39 = OpConstantComposite %v4float %float_29371_457 %float_7793_47266 %float_n20661_791 %float_n26402_4414
+%_ptr_Output_float = OpTypePointer Output %float
+          %f = OpVariable %_ptr_Output_float Output
+%float_n15875_874 = OpConstant %float -15875.874
+%_ptr_Output_int = OpTypePointer Output %int
+          %i = OpVariable %_ptr_Output_int Output
+   %int_n222 = OpConstant %int -222
+     %double = OpTypeFloat 64
+%_ptr_Output_double = OpTypePointer Output %double
+          %d = OpVariable %_ptr_Output_double Output
+%double_2_2250738585072014en308 = OpConstant %double 2.2250738585072014e-308
+%_ptr_Output_uint = OpTypePointer Output %uint
+          %u = OpVariable %_ptr_Output_uint Output
+   %uint_333 = OpConstant %uint 333
+%mat2v2float = OpTypeMatrix %v2float 2
+%_ptr_Output_mat2v2float = OpTypePointer Output %mat2v2float
+         %m2 = OpVariable %_ptr_Output_mat2v2float Output
+%float_n29816_0098 = OpConstant %float -29816.0098
+%float_4996_51611 = OpConstant %float 4996.51611
+         %58 = OpConstantComposite %v2float %float_n29816_0098 %float_4996_51611
+%float_22829_4688 = OpConstant %float 22829.4688
+%float_n30383_2031 = OpConstant %float -30383.2031
+         %61 = OpConstantComposite %v2float %float_22829_4688 %float_n30383_2031
+         %62 = OpConstantComposite %mat2v2float %58 %61
+%mat3v3float = OpTypeMatrix %v3float 3
+%_ptr_Output_mat3v3float = OpTypePointer Output %mat3v3float
+         %m3 = OpVariable %_ptr_Output_mat3v3float Output
+%float_22378_3652 = OpConstant %float 22378.3652
+%float_n24870_3477 = OpConstant %float -24870.3477
+%float_19088_668 = OpConstant %float 19088.668
+         %69 = OpConstantComposite %v3float %float_22378_3652 %float_n24870_3477 %float_19088_668
+%float_n2747_33765 = OpConstant %float -2747.33765
+%float_n30325_041 = OpConstant %float -30325.041
+%float_19382_7812 = OpConstant %float 19382.7812
+         %73 = OpConstantComposite %v3float %float_n2747_33765 %float_n30325_041 %float_19382_7812
+%float_28998_5918 = OpConstant %float 28998.5918
+%float_n3839_13696 = OpConstant %float -3839.13696
+%float_19438_668 = OpConstant %float 19438.668
+         %77 = OpConstantComposite %v3float %float_28998_5918 %float_n3839_13696 %float_19438_668
+         %78 = OpConstantComposite %mat3v3float %69 %73 %77
+%mat4v4float = OpTypeMatrix %v4float 4
+%_ptr_Output_mat4v4float = OpTypePointer Output %mat4v4float
+         %m4 = OpVariable %_ptr_Output_mat4v4float Output
+%float_29616_166 = OpConstant %float 29616.166
+%float_n21563_2676 = OpConstant %float -21563.2676
+%float_n3274_39771 = OpConstant %float -3274.39771
+%float_n7391_61914 = OpConstant %float -7391.61914
+         %86 = OpConstantComposite %v4float %float_29616_166 %float_n21563_2676 %float_n3274_39771 %float_n7391_61914
+%float_11556_8564 = OpConstant %float 11556.8564
+%float_20357_9199 = OpConstant %float 20357.9199
+%float_15432_0186 = OpConstant %float 15432.0186
+%float_17385_4688 = OpConstant %float 17385.4688
+         %91 = OpConstantComposite %v4float %float_11556_8564 %float_20357_9199 %float_15432_0186 %float_17385_4688
+%float_21131_9121 = OpConstant %float 21131.9121
+%float_17015_2715 = OpConstant %float 17015.2715
+%float_n30233_4414 = OpConstant %float -30233.4414
+         %95 = OpConstantComposite %v4float %float_21131_9121 %float_17015_2715 %float_n30233_4414 %float_n15875_874
+         %96 = OpConstantComposite %mat4v4float %86 %39 %91 %95
+%mat3v4float = OpTypeMatrix %v4float 3
+%_ptr_Output_mat3v4float = OpTypePointer Output %mat3v4float
+       %m3x4 = OpVariable %_ptr_Output_mat3v4float Output
+%float_20530_7109 = OpConstant %float 20530.7109
+%float_n10508_5107 = OpConstant %float -10508.5107
+%float_n23051_9961 = OpConstant %float -23051.9961
+%float_n23564_0664 = OpConstant %float -23564.0664
+        %104 = OpConstantComposite %v4float %float_20530_7109 %float_n10508_5107 %float_n23051_9961 %float_n23564_0664
+%float_n27681_2891 = OpConstant %float -27681.2891
+%float_9081_78711 = OpConstant %float 9081.78711
+%float_n12496_1973 = OpConstant %float -12496.1973
+%float_n5854_81055 = OpConstant %float -5854.81055
+        %109 = OpConstantComposite %v4float %float_n27681_2891 %float_9081_78711 %float_n12496_1973 %float_n5854_81055
+%float_5217_75732 = OpConstant %float 5217.75732
+%float_26363_8359 = OpConstant %float 26363.8359
+%float_n29557_3516 = OpConstant %float -29557.3516
+%float_30238_998 = OpConstant %float 30238.998
+        %114 = OpConstantComposite %v4float %float_5217_75732 %float_26363_8359 %float_n29557_3516 %float_30238_998
+        %115 = OpConstantComposite %mat3v4float %104 %109 %114
+%_ptr_Input_int = OpTypePointer Input %int
+%gl_VertexID = OpVariable %_ptr_Input_int Input
+%gl_InstanceID = OpVariable %_ptr_Input_int Input
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+         %18 = OpLoad %v4float %piglit_vertex
+         %20 = OpAccessChain %_ptr_Output_v4float %_ %int_0
+               OpStore %20 %18
+               OpStore %v2 %26
+               OpStore %v3 %33
+               OpStore %v4 %39
+               OpStore %f %float_n15875_874
+               OpStore %i %int_n222
+               OpStore %d %double_2_2250738585072014en308
+               OpStore %u %uint_333
+               OpStore %m2 %62
+               OpStore %m3 %78
+               OpStore %m4 %96
+               OpStore %m3x4 %115
+               OpReturn
+               OpFunctionEnd
+
+[vertex shader]
+#version 450 core
+
+layout(location = 0) in vec4 piglit_vertex;
+layout(location = 0) out vec2 v2;
+layout(location = 1) out vec3 v3;
+layout(location = 2) out vec4 v4;
+layout(location = 3) out float f;
+layout(location = 4) out flat int i;
+layout(location = 5) out flat double d;
+layout(location = 6) out mat2 m2;
+layout(location = 8) out mat3 m3;
+layout(location = 11) out mat4 m4;
+layout(location = 15) out mat3x4 m3x4;
+layout(location = 20) out flat uint u;
+
+void main()
+{
+	gl_Position = piglit_vertex;
+
+	v2 = vec2(1848.25552758, 12916.12607);
+	v3 = vec3(-21303.7489128, 11729.6478218, -10231.1810483);
+	v4 = vec4(29371.4563058, 7793.47278553, -20661.7912871, -26402.4415351);
+
+	f = -15875.8741436;
+	i = -222;
+	d = 2.2250738585072014E-308;
+	u = 333;
+
+	m2 = mat2(-29816.0100557, 4996.51593805,
+                  22829.4693217, -30383.203006);
+	m3 = mat3(22378.3645075, -24870.3481651, 19088.6683299,
+                  -2747.33765164, -30325.0400702, 19382.7803769,
+                  28998.5927672, -3839.13702602, 19438.6676432);
+	m4 = mat4(29616.166598, -21563.2666972, -3274.39775692, -7391.61915007,
+                  29371.4563058, 7793.47278553, -20661.7912871, -26402.4415351,
+                  11556.8560616, 20357.9190661, 15432.018204, 17385.4694591,
+                  21131.9116045, 17015.271809, -30233.4408637, -15875.8741436);
+	m3x4 = mat3x4(20530.7108263, -10508.5105669, -23051.9953613,
+                      -23564.0673228, -27681.288716, 9081.78673991,
+                      -12496.1967803, -5854.8105745, 5217.75729,
+                      26363.8367742, -29557.3508507, 30238.9989166);
+}
+
+[fragment shader spirv]
+; Automatically generated from the GLSL by gen_gl_spirv_tests.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 228
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float64
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %main "main" %out_color %v2 %v3 %v4 %f %i %u %d %m2 %m3 %m4 %m3x4
+               OpExecutionMode %main OriginLowerLeft
+               OpSource GLSL 450
+               OpDecorate %out_color Location 0
+               OpDecorate %v2 Location 0
+               OpDecorate %v3 Location 1
+               OpDecorate %v4 Location 2
+               OpDecorate %f Location 3
+               OpDecorate %i Flat
+               OpDecorate %i Location 4
+               OpDecorate %u Flat
+               OpDecorate %u Location 20
+               OpDecorate %d Flat
+               OpDecorate %d Location 5
+               OpDecorate %m2 Location 6
+               OpDecorate %m3 Location 8
+               OpDecorate %m4 Location 11
+               OpDecorate %m3x4 Location 15
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+  %out_color = OpVariable %_ptr_Output_v4float Output
+    %float_0 = OpConstant %float 0
+    %float_1 = OpConstant %float 1
+         %12 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %15 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+    %v2float = OpTypeVector %float 2
+%_ptr_Input_v2float = OpTypePointer Input %v2float
+         %v2 = OpVariable %_ptr_Input_v2float Input
+%float_1848_25549 = OpConstant %float 1848.25549
+%float_12916_126 = OpConstant %float 12916.126
+         %22 = OpConstantComposite %v2float %float_1848_25549 %float_12916_126
+       %bool = OpTypeBool
+     %v2bool = OpTypeVector %bool 2
+    %v3float = OpTypeVector %float 3
+%_ptr_Input_v3float = OpTypePointer Input %v3float
+         %v3 = OpVariable %_ptr_Input_v3float Input
+%float_n21303_748 = OpConstant %float -21303.748
+%float_11729_6475 = OpConstant %float 11729.6475
+%float_n10231_1807 = OpConstant %float -10231.1807
+         %37 = OpConstantComposite %v3float %float_n21303_748 %float_11729_6475 %float_n10231_1807
+     %v3bool = OpTypeVector %bool 3
+%_ptr_Input_v4float = OpTypePointer Input %v4float
+         %v4 = OpVariable %_ptr_Input_v4float Input
+%float_29371_457 = OpConstant %float 29371.457
+%float_7793_47266 = OpConstant %float 7793.47266
+%float_n20661_791 = OpConstant %float -20661.791
+%float_n26402_4414 = OpConstant %float -26402.4414
+         %51 = OpConstantComposite %v4float %float_29371_457 %float_7793_47266 %float_n20661_791 %float_n26402_4414
+     %v4bool = OpTypeVector %bool 4
+%_ptr_Input_float = OpTypePointer Input %float
+          %f = OpVariable %_ptr_Input_float Input
+%float_n15875_874 = OpConstant %float -15875.874
+        %int = OpTypeInt 32 1
+%_ptr_Input_int = OpTypePointer Input %int
+          %i = OpVariable %_ptr_Input_int Input
+   %int_n222 = OpConstant %int -222
+       %uint = OpTypeInt 32 0
+%_ptr_Input_uint = OpTypePointer Input %uint
+          %u = OpVariable %_ptr_Input_uint Input
+   %uint_333 = OpConstant %uint 333
+     %double = OpTypeFloat 64
+%_ptr_Input_double = OpTypePointer Input %double
+          %d = OpVariable %_ptr_Input_double Input
+%double_2_2250738585072014en308 = OpConstant %double 2.2250738585072014e-308
+%mat2v2float = OpTypeMatrix %v2float 2
+%_ptr_Input_mat2v2float = OpTypePointer Input %mat2v2float
+         %m2 = OpVariable %_ptr_Input_mat2v2float Input
+%float_n29816_0098 = OpConstant %float -29816.0098
+%float_4996_51611 = OpConstant %float 4996.51611
+         %99 = OpConstantComposite %v2float %float_n29816_0098 %float_4996_51611
+%float_22829_4688 = OpConstant %float 22829.4688
+%float_n30383_2031 = OpConstant %float -30383.2031
+        %102 = OpConstantComposite %v2float %float_22829_4688 %float_n30383_2031
+        %103 = OpConstantComposite %mat2v2float %99 %102
+%mat3v3float = OpTypeMatrix %v3float 3
+%_ptr_Input_mat3v3float = OpTypePointer Input %mat3v3float
+         %m3 = OpVariable %_ptr_Input_mat3v3float Input
+%float_22378_3652 = OpConstant %float 22378.3652
+%float_n24870_3477 = OpConstant %float -24870.3477
+%float_19088_668 = OpConstant %float 19088.668
+        %123 = OpConstantComposite %v3float %float_22378_3652 %float_n24870_3477 %float_19088_668
+%float_n2747_33765 = OpConstant %float -2747.33765
+%float_n30325_041 = OpConstant %float -30325.041
+%float_19382_7812 = OpConstant %float 19382.7812
+        %127 = OpConstantComposite %v3float %float_n2747_33765 %float_n30325_041 %float_19382_7812
+%float_28998_5918 = OpConstant %float 28998.5918
+%float_n3839_13696 = OpConstant %float -3839.13696
+%float_19438_668 = OpConstant %float 19438.668
+        %131 = OpConstantComposite %v3float %float_28998_5918 %float_n3839_13696 %float_19438_668
+        %132 = OpConstantComposite %mat3v3float %123 %127 %131
+%mat4v4float = OpTypeMatrix %v4float 4
+%_ptr_Input_mat4v4float = OpTypePointer Input %mat4v4float
+         %m4 = OpVariable %_ptr_Input_mat4v4float Input
+%float_29616_166 = OpConstant %float 29616.166
+%float_n21563_2676 = OpConstant %float -21563.2676
+%float_n3274_39771 = OpConstant %float -3274.39771
+%float_n7391_61914 = OpConstant %float -7391.61914
+        %158 = OpConstantComposite %v4float %float_29616_166 %float_n21563_2676 %float_n3274_39771 %float_n7391_61914
+%float_11556_8564 = OpConstant %float 11556.8564
+%float_20357_9199 = OpConstant %float 20357.9199
+%float_15432_0186 = OpConstant %float 15432.0186
+%float_17385_4688 = OpConstant %float 17385.4688
+        %163 = OpConstantComposite %v4float %float_11556_8564 %float_20357_9199 %float_15432_0186 %float_17385_4688
+%float_21131_9121 = OpConstant %float 21131.9121
+%float_17015_2715 = OpConstant %float 17015.2715
+%float_n30233_4414 = OpConstant %float -30233.4414
+        %167 = OpConstantComposite %v4float %float_21131_9121 %float_17015_2715 %float_n30233_4414 %float_n15875_874
+        %168 = OpConstantComposite %mat4v4float %158 %51 %163 %167
+%mat3v4float = OpTypeMatrix %v4float 3
+%_ptr_Input_mat3v4float = OpTypePointer Input %mat3v4float
+       %m3x4 = OpVariable %_ptr_Input_mat3v4float Input
+%float_20530_7109 = OpConstant %float 20530.7109
+%float_n10508_5107 = OpConstant %float -10508.5107
+%float_n23051_9961 = OpConstant %float -23051.9961
+%float_n23564_0664 = OpConstant %float -23564.0664
+        %199 = OpConstantComposite %v4float %float_20530_7109 %float_n10508_5107 %float_n23051_9961 %float_n23564_0664
+%float_n27681_2891 = OpConstant %float -27681.2891
+%float_9081_78711 = OpConstant %float 9081.78711
+%float_n12496_1973 = OpConstant %float -12496.1973
+%float_n5854_81055 = OpConstant %float -5854.81055
+        %204 = OpConstantComposite %v4float %float_n27681_2891 %float_9081_78711 %float_n12496_1973 %float_n5854_81055
+%float_5217_75732 = OpConstant %float 5217.75732
+%float_26363_8359 = OpConstant %float 26363.8359
+%float_n29557_3516 = OpConstant %float -29557.3516
+%float_30238_998 = OpConstant %float 30238.998
+        %209 = OpConstantComposite %v4float %float_5217_75732 %float_26363_8359 %float_n29557_3516 %float_30238_998
+        %210 = OpConstantComposite %mat3v4float %199 %204 %209
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+ %fail_color = OpVariable %_ptr_Function_v4float Function
+               OpStore %out_color %12
+               OpStore %fail_color %15
+         %19 = OpLoad %v2float %v2
+         %25 = OpFOrdNotEqual %v2bool %19 %22
+         %26 = OpAny %bool %25
+               OpSelectionMerge %28 None
+               OpBranchConditional %26 %27 %28
+         %27 = OpLabel
+         %29 = OpLoad %v4float %fail_color
+               OpStore %out_color %29
+               OpBranch %28
+         %28 = OpLabel
+         %33 = OpLoad %v3float %v3
+         %39 = OpFOrdNotEqual %v3bool %33 %37
+         %40 = OpAny %bool %39
+               OpSelectionMerge %42 None
+               OpBranchConditional %40 %41 %42
+         %41 = OpLabel
+         %43 = OpLoad %v4float %fail_color
+               OpStore %out_color %43
+               OpBranch %42
+         %42 = OpLabel
+         %46 = OpLoad %v4float %v4
+         %53 = OpFOrdNotEqual %v4bool %46 %51
+         %54 = OpAny %bool %53
+               OpSelectionMerge %56 None
+               OpBranchConditional %54 %55 %56
+         %55 = OpLabel
+         %57 = OpLoad %v4float %fail_color
+               OpStore %out_color %57
+               OpBranch %56
+         %56 = OpLabel
+         %60 = OpLoad %float %f
+         %62 = OpFOrdNotEqual %bool %60 %float_n15875_874
+               OpSelectionMerge %64 None
+               OpBranchConditional %62 %63 %64
+         %63 = OpLabel
+         %65 = OpLoad %v4float %fail_color
+               OpStore %out_color %65
+               OpBranch %64
+         %64 = OpLabel
+         %69 = OpLoad %int %i
+         %71 = OpINotEqual %bool %69 %int_n222
+               OpSelectionMerge %73 None
+               OpBranchConditional %71 %72 %73
+         %72 = OpLabel
+         %74 = OpLoad %v4float %fail_color
+               OpStore %out_color %74
+               OpBranch %73
+         %73 = OpLabel
+         %78 = OpLoad %uint %u
+         %80 = OpINotEqual %bool %78 %uint_333
+               OpSelectionMerge %82 None
+               OpBranchConditional %80 %81 %82
+         %81 = OpLabel
+         %83 = OpLoad %v4float %fail_color
+               OpStore %out_color %83
+               OpBranch %82
+         %82 = OpLabel
+         %87 = OpLoad %double %d
+         %89 = OpFOrdNotEqual %bool %87 %double_2_2250738585072014en308
+               OpSelectionMerge %91 None
+               OpBranchConditional %89 %90 %91
+         %90 = OpLabel
+         %92 = OpLoad %v4float %fail_color
+               OpStore %out_color %92
+               OpBranch %91
+         %91 = OpLabel
+         %96 = OpLoad %mat2v2float %m2
+        %104 = OpCompositeExtract %v2float %96 0
+        %105 = OpCompositeExtract %v2float %103 0
+        %106 = OpFOrdNotEqual %v2bool %104 %105
+        %107 = OpAny %bool %106
+        %108 = OpCompositeExtract %v2float %96 1
+        %109 = OpCompositeExtract %v2float %103 1
+        %110 = OpFOrdNotEqual %v2bool %108 %109
+        %111 = OpAny %bool %110
+        %112 = OpLogicalOr %bool %107 %111
+               OpSelectionMerge %114 None
+               OpBranchConditional %112 %113 %114
+        %113 = OpLabel
+        %115 = OpLoad %v4float %fail_color
+               OpStore %out_color %115
+               OpBranch %114
+        %114 = OpLabel
+        %119 = OpLoad %mat3v3float %m3
+        %133 = OpCompositeExtract %v3float %119 0
+        %134 = OpCompositeExtract %v3float %132 0
+        %135 = OpFOrdNotEqual %v3bool %133 %134
+        %136 = OpAny %bool %135
+        %137 = OpCompositeExtract %v3float %119 1
+        %138 = OpCompositeExtract %v3float %132 1
+        %139 = OpFOrdNotEqual %v3bool %137 %138
+        %140 = OpAny %bool %139
+        %141 = OpLogicalOr %bool %136 %140
+        %142 = OpCompositeExtract %v3float %119 2
+        %143 = OpCompositeExtract %v3float %132 2
+        %144 = OpFOrdNotEqual %v3bool %142 %143
+        %145 = OpAny %bool %144
+        %146 = OpLogicalOr %bool %141 %145
+               OpSelectionMerge %148 None
+               OpBranchConditional %146 %147 %148
+        %147 = OpLabel
+        %149 = OpLoad %v4float %fail_color
+               OpStore %out_color %149
+               OpBranch %148
+        %148 = OpLabel
+        %153 = OpLoad %mat4v4float %m4
+        %169 = OpCompositeExtract %v4float %153 0
+        %170 = OpCompositeExtract %v4float %168 0
+        %171 = OpFOrdNotEqual %v4bool %169 %170
+        %172 = OpAny %bool %171
+        %173 = OpCompositeExtract %v4float %153 1
+        %174 = OpCompositeExtract %v4float %168 1
+        %175 = OpFOrdNotEqual %v4bool %173 %174
+        %176 = OpAny %bool %175
+        %177 = OpLogicalOr %bool %172 %176
+        %178 = OpCompositeExtract %v4float %153 2
+        %179 = OpCompositeExtract %v4float %168 2
+        %180 = OpFOrdNotEqual %v4bool %178 %179
+        %181 = OpAny %bool %180
+        %182 = OpLogicalOr %bool %177 %181
+        %183 = OpCompositeExtract %v4float %153 3
+        %184 = OpCompositeExtract %v4float %168 3
+        %185 = OpFOrdNotEqual %v4bool %183 %184
+        %186 = OpAny %bool %185
+        %187 = OpLogicalOr %bool %182 %186
+               OpSelectionMerge %189 None
+               OpBranchConditional %187 %188 %189
+        %188 = OpLabel
+        %190 = OpLoad %v4float %fail_color
+               OpStore %out_color %190
+               OpBranch %189
+        %189 = OpLabel
+        %194 = OpLoad %mat3v4float %m3x4
+        %211 = OpCompositeExtract %v4float %194 0
+        %212 = OpCompositeExtract %v4float %210 0
+        %213 = OpFOrdNotEqual %v4bool %211 %212
+        %214 = OpAny %bool %213
+        %215 = OpCompositeExtract %v4float %194 1
+        %216 = OpCompositeExtract %v4float %210 1
+        %217 = OpFOrdNotEqual %v4bool %215 %216
+        %218 = OpAny %bool %217
+        %219 = OpLogicalOr %bool %214 %218
+        %220 = OpCompositeExtract %v4float %194 2
+        %221 = OpCompositeExtract %v4float %210 2
+        %222 = OpFOrdNotEqual %v4bool %220 %221
+        %223 = OpAny %bool %222
+        %224 = OpLogicalOr %bool %219 %223
+               OpSelectionMerge %226 None
+               OpBranchConditional %224 %225 %226
+        %225 = OpLabel
+        %227 = OpLoad %v4float %fail_color
+               OpStore %out_color %227
+               OpBranch %226
+        %226 = OpLabel
+               OpReturn
+               OpFunctionEnd
+
+[fragment shader]
+#version 450 core
+
+layout(location = 0) out vec4 out_color;
+
+layout(location = 0) in vec2 v2;
+layout(location = 1) in vec3 v3;
+layout(location = 2) in vec4 v4;
+layout(location = 3) in float f;
+layout(location = 4) in flat int i;
+layout(location = 5) in flat double d;
+layout(location = 6) in mat2 m2;
+layout(location = 8) in mat3 m3;
+layout(location = 11) in mat4 m4;
+layout(location = 15) in mat3x4 m3x4;
+layout(location = 20) in flat uint u;
+
+void main()
+{
+	out_color = vec4(0.0, 1.0, 0.0, 1.0);
+	vec4 fail_color = vec4(1.0, 0.0, 0.0, 1.0);
+
+	if (v2 != vec2(1848.25552758, 12916.12607))
+	   out_color = fail_color;
+
+	if (v3 != vec3(-21303.7489128, 11729.6478218, -10231.1810483))
+	   out_color = fail_color;
+
+	if (v4 != vec4(29371.4563058, 7793.47278553, -20661.7912871, -26402.4415351))
+	   out_color = fail_color;
+
+	if (f != -15875.8741436)
+	   out_color = fail_color;
+
+	if (i != -222)
+	   out_color = fail_color;
+
+	if (u != 333)
+	   out_color = fail_color;
+
+	if (d != 2.2250738585072014E-308)
+	   out_color = fail_color;
+
+        if (m2 != mat2(-29816.0100557, 4996.51593805,
+                       22829.4693217, -30383.203006)) {
+           out_color = fail_color;
+        }
+
+	if (m3 != mat3(22378.3645075, -24870.3481651, 19088.6683299,
+                       -2747.33765164, -30325.0400702, 19382.7803769,
+                       28998.5927672, -3839.13702602, 19438.6676432)) {
+           out_color = fail_color;
+        }
+
+	if (m4 != mat4(29616.166598, -21563.2666972, -3274.39775692, -7391.61915007,
+                       29371.4563058, 7793.47278553, -20661.7912871, -26402.4415351,
+                       11556.8560616, 20357.9190661, 15432.018204, 17385.4694591,
+                       21131.9116045, 17015.271809, -30233.4408637, -15875.8741436)) {
+           out_color = fail_color;
+        }
+
+	if( m3x4 != mat3x4(20530.7108263, -10508.5105669, -23051.9953613,
+                           -23564.0673228, -27681.288716, 9081.78673991,
+                           -12496.1967803, -5854.8105745, 5217.75729,
+                           26363.8367742, -29557.3508507, 30238.9989166)) {
+           out_color = fail_color;
+        }
+
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_gl_spirv/execution/varying/all-scalar.shader_test b/tests/spec/arb_gl_spirv/execution/varying/all-scalar.shader_test
new file mode 100644
index 000000000..efa4121ed
--- /dev/null
+++ b/tests/spec/arb_gl_spirv/execution/varying/all-scalar.shader_test
@@ -0,0 +1,306 @@
+[require]
+SPIRV YES
+GL >= 4.5
+GLSL >= 4.50
+GL_ARB_gl_spirv
+
+[vertex shader spirv]
+; Automatically generated from the GLSL by gen_gl_spirv_tests.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float64
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %main "main" %_ %piglit_vertex %d0 %d1 %i0 %i1 %u0 %u1 %f0 %f1 %gl_VertexID %gl_InstanceID
+               OpSource GLSL 450
+               OpName %_ ""
+               OpMemberDecorate %gl_PerVertex 0 BuiltIn Position
+               OpMemberDecorate %gl_PerVertex 1 BuiltIn PointSize
+               OpMemberDecorate %gl_PerVertex 2 BuiltIn ClipDistance
+               OpMemberDecorate %gl_PerVertex 3 BuiltIn CullDistance
+               OpDecorate %gl_PerVertex Block
+               OpDecorate %piglit_vertex Location 0
+               OpDecorate %d0 Flat
+               OpDecorate %d0 Location 0
+               OpDecorate %d1 Flat
+               OpDecorate %d1 Location 1
+               OpDecorate %i0 Flat
+               OpDecorate %i0 Location 2
+               OpDecorate %i1 Flat
+               OpDecorate %i1 Location 3
+               OpDecorate %u0 Flat
+               OpDecorate %u0 Location 4
+               OpDecorate %u1 Flat
+               OpDecorate %u1 Location 5
+               OpDecorate %f0 Location 6
+               OpDecorate %f1 Location 7
+               OpDecorate %gl_VertexID BuiltIn VertexId
+               OpDecorate %gl_InstanceID BuiltIn InstanceId
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_arr_float_uint_1 = OpTypeArray %float %uint_1
+%gl_PerVertex = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
+%_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex
+          %_ = OpVariable %_ptr_Output_gl_PerVertex Output
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Input_v4float = OpTypePointer Input %v4float
+%piglit_vertex = OpVariable %_ptr_Input_v4float Input
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+     %double = OpTypeFloat 64
+%_ptr_Output_double = OpTypePointer Output %double
+         %d0 = OpVariable %_ptr_Output_double Output
+%double_1_7976931348623157e_308 = OpConstant %double 1.7976931348623157e+308
+         %d1 = OpVariable %_ptr_Output_double Output
+%double_2_2250738585072014en308 = OpConstant %double 2.2250738585072014e-308
+%_ptr_Output_int = OpTypePointer Output %int
+         %i0 = OpVariable %_ptr_Output_int Output
+    %int_111 = OpConstant %int 111
+         %i1 = OpVariable %_ptr_Output_int Output
+    %int_n33 = OpConstant %int -33
+%_ptr_Output_uint = OpTypePointer Output %uint
+         %u0 = OpVariable %_ptr_Output_uint Output
+    %uint_23 = OpConstant %uint 23
+         %u1 = OpVariable %_ptr_Output_uint Output
+   %uint_444 = OpConstant %uint 444
+%_ptr_Output_float = OpTypePointer Output %float
+         %f0 = OpVariable %_ptr_Output_float Output
+%float_n10231_1807 = OpConstant %float -10231.1807
+         %f1 = OpVariable %_ptr_Output_float Output
+%float_23087_1719 = OpConstant %float 23087.1719
+%_ptr_Input_int = OpTypePointer Input %int
+%gl_VertexID = OpVariable %_ptr_Input_int Input
+%gl_InstanceID = OpVariable %_ptr_Input_int Input
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+         %18 = OpLoad %v4float %piglit_vertex
+         %20 = OpAccessChain %_ptr_Output_v4float %_ %int_0
+               OpStore %20 %18
+               OpStore %d0 %double_1_7976931348623157e_308
+               OpStore %d1 %double_2_2250738585072014en308
+               OpStore %i0 %int_111
+               OpStore %i1 %int_n33
+               OpStore %u0 %uint_23
+               OpStore %u1 %uint_444
+               OpStore %f0 %float_n10231_1807
+               OpStore %f1 %float_23087_1719
+               OpReturn
+               OpFunctionEnd
+
+[vertex shader]
+#version 450 core
+
+layout(location = 0) in vec4 piglit_vertex;
+
+layout(location = 0) flat out double d0;
+layout(location = 1) flat out double d1;
+layout(location = 2) flat out int i0;
+layout(location = 3) flat out int i1;
+layout(location = 4) flat out uint u0;
+layout(location = 5) flat out uint u1;
+layout(location = 6) out float f0;
+layout(location = 7) out float f1;
+
+void main()
+{
+	gl_Position = piglit_vertex;
+
+	d0 = 1.7976931348623157E+308;
+	d1 = 2.2250738585072014E-308;
+
+	i0 = 111;
+	i1 = -33;
+
+	u0 = 23;
+	u1 = 444;
+
+	f0 = -10231.1810483;
+	f1 = 23087.1716182;
+}
+
+[fragment shader spirv]
+; Automatically generated from the GLSL by gen_gl_spirv_tests.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 74
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float64
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %main "main" %out_color %d0 %d1 %i0 %i1 %u0 %f0 %f1 %u1
+               OpExecutionMode %main OriginLowerLeft
+               OpSource GLSL 450
+               OpDecorate %out_color Location 0
+               OpDecorate %d0 Flat
+               OpDecorate %d0 Location 0
+               OpDecorate %d1 Flat
+               OpDecorate %d1 Location 1
+               OpDecorate %i0 Flat
+               OpDecorate %i0 Location 2
+               OpDecorate %i1 Flat
+               OpDecorate %i1 Location 3
+               OpDecorate %u0 Flat
+               OpDecorate %u0 Location 4
+               OpDecorate %f0 Location 6
+               OpDecorate %f1 Location 7
+               OpDecorate %u1 Flat
+               OpDecorate %u1 Location 5
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+  %out_color = OpVariable %_ptr_Output_v4float Output
+    %float_0 = OpConstant %float 0
+    %float_1 = OpConstant %float 1
+         %12 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %15 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+     %double = OpTypeFloat 64
+%_ptr_Input_double = OpTypePointer Input %double
+         %d0 = OpVariable %_ptr_Input_double Input
+%double_1_7976931348623157e_308 = OpConstant %double 1.7976931348623157e+308
+       %bool = OpTypeBool
+         %d1 = OpVariable %_ptr_Input_double Input
+%double_2_2250738585072014en308 = OpConstant %double 2.2250738585072014e-308
+        %int = OpTypeInt 32 1
+%_ptr_Input_int = OpTypePointer Input %int
+         %i0 = OpVariable %_ptr_Input_int Input
+    %int_111 = OpConstant %int 111
+         %i1 = OpVariable %_ptr_Input_int Input
+    %int_n33 = OpConstant %int -33
+       %uint = OpTypeInt 32 0
+%_ptr_Input_uint = OpTypePointer Input %uint
+         %u0 = OpVariable %_ptr_Input_uint Input
+    %uint_23 = OpConstant %uint 23
+%_ptr_Input_float = OpTypePointer Input %float
+         %f0 = OpVariable %_ptr_Input_float Input
+%float_n10231_1807 = OpConstant %float -10231.1807
+         %f1 = OpVariable %_ptr_Input_float Input
+%float_23087_1719 = OpConstant %float 23087.1719
+         %u1 = OpVariable %_ptr_Input_uint Input
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+ %fail_color = OpVariable %_ptr_Function_v4float Function
+               OpStore %out_color %12
+               OpStore %fail_color %15
+         %19 = OpLoad %double %d0
+         %22 = OpFOrdNotEqual %bool %19 %double_1_7976931348623157e_308
+               OpSelectionMerge %24 None
+               OpBranchConditional %22 %23 %24
+         %23 = OpLabel
+         %25 = OpLoad %v4float %fail_color
+               OpStore %out_color %25
+               OpBranch %24
+         %24 = OpLabel
+         %27 = OpLoad %double %d1
+         %29 = OpFOrdNotEqual %bool %27 %double_2_2250738585072014en308
+               OpSelectionMerge %31 None
+               OpBranchConditional %29 %30 %31
+         %30 = OpLabel
+         %32 = OpLoad %v4float %fail_color
+               OpStore %out_color %32
+               OpBranch %31
+         %31 = OpLabel
+         %36 = OpLoad %int %i0
+         %38 = OpINotEqual %bool %36 %int_111
+               OpSelectionMerge %40 None
+               OpBranchConditional %38 %39 %40
+         %39 = OpLabel
+         %41 = OpLoad %v4float %fail_color
+               OpStore %out_color %41
+               OpBranch %40
+         %40 = OpLabel
+         %43 = OpLoad %int %i1
+         %45 = OpINotEqual %bool %43 %int_n33
+               OpSelectionMerge %47 None
+               OpBranchConditional %45 %46 %47
+         %46 = OpLabel
+         %48 = OpLoad %v4float %fail_color
+               OpStore %out_color %48
+               OpBranch %47
+         %47 = OpLabel
+         %52 = OpLoad %uint %u0
+         %54 = OpINotEqual %bool %52 %uint_23
+               OpSelectionMerge %56 None
+               OpBranchConditional %54 %55 %56
+         %55 = OpLabel
+         %57 = OpLoad %v4float %fail_color
+               OpStore %out_color %57
+               OpBranch %56
+         %56 = OpLabel
+         %60 = OpLoad %float %f0
+         %62 = OpFOrdNotEqual %bool %60 %float_n10231_1807
+               OpSelectionMerge %64 None
+               OpBranchConditional %62 %63 %64
+         %63 = OpLabel
+         %65 = OpLoad %v4float %fail_color
+               OpStore %out_color %65
+               OpBranch %64
+         %64 = OpLabel
+         %67 = OpLoad %float %f1
+         %69 = OpFOrdNotEqual %bool %67 %float_23087_1719
+               OpSelectionMerge %71 None
+               OpBranchConditional %69 %70 %71
+         %70 = OpLabel
+         %72 = OpLoad %v4float %fail_color
+               OpStore %out_color %72
+               OpBranch %71
+         %71 = OpLabel
+               OpReturn
+               OpFunctionEnd
+
+[fragment shader]
+#version 450 core
+
+layout(location = 0) out vec4 out_color;
+
+layout(location = 0) flat in double d0;
+layout(location = 1) flat in double d1;
+layout(location = 2) flat in int i0;
+layout(location = 3) flat in int i1;
+layout(location = 4) flat in uint u0;
+layout(location = 5) flat in uint u1;
+layout(location = 6) in float f0;
+layout(location = 7) in float f1;
+
+void main()
+{
+	out_color = vec4(0.0, 1.0, 0.0, 1.0);
+	vec4 fail_color = vec4(1.0, 0.0, 0.0, 1.0);
+
+	if (d0 != 1.7976931348623157E+308)
+	   out_color = fail_color;
+
+	if (d1 != 2.2250738585072014E-308)
+	   out_color = fail_color;
+
+	if (i0 != 111)
+	   out_color = fail_color;
+
+	if (i1 != -33)
+	   out_color = fail_color;
+
+	if (u0 != 23)
+	   out_color = fail_color;
+
+	if (f0 != -10231.1810483)
+	   out_color = fail_color;
+
+	if (f1 != 23087.1716182)
+	   out_color = fail_color;
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_gl_spirv/execution/varying/all-stages-test.shader_test b/tests/spec/arb_gl_spirv/execution/varying/all-stages-test.shader_test
new file mode 100644
index 000000000..8fa2c6ca3
--- /dev/null
+++ b/tests/spec/arb_gl_spirv/execution/varying/all-stages-test.shader_test
@@ -0,0 +1,483 @@
+[require]
+SPIRV YES
+GL >= 4.5
+GLSL >= 4.50
+GL_ARB_gl_spirv
+GL_ARB_tessellation_shader
+
+[vertex shader spirv]
+; Automatically generated from the GLSL by gen_gl_spirv_tests.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 27
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %main "main" %_ %piglit_vertex %f %gl_VertexID %gl_InstanceID
+               OpSource GLSL 450
+               OpName %_ ""
+               OpMemberDecorate %gl_PerVertex 0 BuiltIn Position
+               OpMemberDecorate %gl_PerVertex 1 BuiltIn PointSize
+               OpMemberDecorate %gl_PerVertex 2 BuiltIn ClipDistance
+               OpMemberDecorate %gl_PerVertex 3 BuiltIn CullDistance
+               OpDecorate %gl_PerVertex Block
+               OpDecorate %piglit_vertex Location 0
+               OpDecorate %f Location 0
+               OpDecorate %gl_VertexID BuiltIn VertexId
+               OpDecorate %gl_InstanceID BuiltIn InstanceId
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_arr_float_uint_1 = OpTypeArray %float %uint_1
+%gl_PerVertex = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
+%_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex
+          %_ = OpVariable %_ptr_Output_gl_PerVertex Output
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Input_v4float = OpTypePointer Input %v4float
+%piglit_vertex = OpVariable %_ptr_Input_v4float Input
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+%_ptr_Output_float = OpTypePointer Output %float
+          %f = OpVariable %_ptr_Output_float Output
+    %float_5 = OpConstant %float 5
+%_ptr_Input_int = OpTypePointer Input %int
+%gl_VertexID = OpVariable %_ptr_Input_int Input
+%gl_InstanceID = OpVariable %_ptr_Input_int Input
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+         %18 = OpLoad %v4float %piglit_vertex
+         %20 = OpAccessChain %_ptr_Output_v4float %_ %int_0
+               OpStore %20 %18
+               OpStore %f %float_5
+               OpReturn
+               OpFunctionEnd
+
+[vertex shader]
+#version 450 core
+
+layout(location = 0) in vec4 piglit_vertex;
+layout(location = 0) out mediump float f;
+
+void main()
+{
+	gl_Position = piglit_vertex;
+
+	f = 5.0;
+}
+
+[tessellation control shader spirv]
+; Automatically generated from the GLSL by gen_gl_spirv_tests.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 72
+; Schema: 0
+               OpCapability Tessellation
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint TessellationControl %main "main" %gl_out %gl_InvocationID %gl_in %gl_TessLevelInner %f %gl_TessLevelOuter %tc_out
+               OpExecutionMode %main OutputVertices 3
+               OpSource GLSL 450
+               OpSourceExtension "GL_ARB_tessellation_shader"
+               OpMemberDecorate %gl_PerVertex 0 BuiltIn Position
+               OpMemberDecorate %gl_PerVertex 1 BuiltIn PointSize
+               OpMemberDecorate %gl_PerVertex 2 BuiltIn ClipDistance
+               OpMemberDecorate %gl_PerVertex 3 BuiltIn CullDistance
+               OpDecorate %gl_PerVertex Block
+               OpDecorate %gl_InvocationID BuiltIn InvocationId
+               OpMemberDecorate %gl_PerVertex_0 0 BuiltIn Position
+               OpMemberDecorate %gl_PerVertex_0 1 BuiltIn PointSize
+               OpMemberDecorate %gl_PerVertex_0 2 BuiltIn ClipDistance
+               OpMemberDecorate %gl_PerVertex_0 3 BuiltIn CullDistance
+               OpDecorate %gl_PerVertex_0 Block
+               OpDecorate %gl_TessLevelInner Patch
+               OpDecorate %gl_TessLevelInner BuiltIn TessLevelInner
+               OpDecorate %f Location 0
+               OpDecorate %gl_TessLevelOuter Patch
+               OpDecorate %gl_TessLevelOuter BuiltIn TessLevelOuter
+               OpDecorate %tc_out Location 0
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_arr_float_uint_1 = OpTypeArray %float %uint_1
+%gl_PerVertex = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
+     %uint_3 = OpConstant %uint 3
+%_arr_gl_PerVertex_uint_3 = OpTypeArray %gl_PerVertex %uint_3
+%_ptr_Output__arr_gl_PerVertex_uint_3 = OpTypePointer Output %_arr_gl_PerVertex_uint_3
+     %gl_out = OpVariable %_ptr_Output__arr_gl_PerVertex_uint_3 Output
+        %int = OpTypeInt 32 1
+%_ptr_Input_int = OpTypePointer Input %int
+%gl_InvocationID = OpVariable %_ptr_Input_int Input
+      %int_0 = OpConstant %int 0
+%gl_PerVertex_0 = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
+    %uint_32 = OpConstant %uint 32
+%_arr_gl_PerVertex_0_uint_32 = OpTypeArray %gl_PerVertex_0 %uint_32
+%_ptr_Input__arr_gl_PerVertex_0_uint_32 = OpTypePointer Input %_arr_gl_PerVertex_0_uint_32
+      %gl_in = OpVariable %_ptr_Input__arr_gl_PerVertex_0_uint_32 Input
+%_ptr_Input_v4float = OpTypePointer Input %v4float
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+       %bool = OpTypeBool
+     %uint_2 = OpConstant %uint 2
+%_arr_float_uint_2 = OpTypeArray %float %uint_2
+%_ptr_Output__arr_float_uint_2 = OpTypePointer Output %_arr_float_uint_2
+%gl_TessLevelInner = OpVariable %_ptr_Output__arr_float_uint_2 Output
+%_arr_float_uint_32 = OpTypeArray %float %uint_32
+%_ptr_Input__arr_float_uint_32 = OpTypePointer Input %_arr_float_uint_32
+          %f = OpVariable %_ptr_Input__arr_float_uint_32 Input
+%_ptr_Input_float = OpTypePointer Input %float
+%_ptr_Output_float = OpTypePointer Output %float
+     %uint_4 = OpConstant %uint 4
+%_arr_float_uint_4 = OpTypeArray %float %uint_4
+%_ptr_Output__arr_float_uint_4 = OpTypePointer Output %_arr_float_uint_4
+%gl_TessLevelOuter = OpVariable %_ptr_Output__arr_float_uint_4 Output
+      %int_1 = OpConstant %int 1
+      %int_2 = OpConstant %int 2
+%_arr_float_uint_3 = OpTypeArray %float %uint_3
+%_ptr_Output__arr_float_uint_3 = OpTypePointer Output %_arr_float_uint_3
+     %tc_out = OpVariable %_ptr_Output__arr_float_uint_3 Output
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+         %19 = OpLoad %int %gl_InvocationID
+         %26 = OpLoad %int %gl_InvocationID
+         %28 = OpAccessChain %_ptr_Input_v4float %gl_in %26 %int_0
+         %29 = OpLoad %v4float %28
+         %31 = OpAccessChain %_ptr_Output_v4float %gl_out %19 %int_0
+               OpStore %31 %29
+         %32 = OpLoad %int %gl_InvocationID
+         %34 = OpIEqual %bool %32 %int_0
+               OpSelectionMerge %36 None
+               OpBranchConditional %34 %35 %36
+         %35 = OpLabel
+         %45 = OpAccessChain %_ptr_Input_float %f %int_0
+         %46 = OpLoad %float %45
+         %48 = OpAccessChain %_ptr_Output_float %gl_TessLevelInner %int_0
+               OpStore %48 %46
+         %53 = OpAccessChain %_ptr_Input_float %f %int_0
+         %54 = OpLoad %float %53
+         %55 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_0
+               OpStore %55 %54
+         %57 = OpAccessChain %_ptr_Input_float %f %int_1
+         %58 = OpLoad %float %57
+         %59 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_1
+               OpStore %59 %58
+         %61 = OpAccessChain %_ptr_Input_float %f %int_2
+         %62 = OpLoad %float %61
+         %63 = OpAccessChain %_ptr_Output_float %gl_TessLevelOuter %int_2
+               OpStore %63 %62
+               OpBranch %36
+         %36 = OpLabel
+         %67 = OpLoad %int %gl_InvocationID
+         %68 = OpLoad %int %gl_InvocationID
+         %69 = OpAccessChain %_ptr_Input_float %f %68
+         %70 = OpLoad %float %69
+         %71 = OpAccessChain %_ptr_Output_float %tc_out %67
+               OpStore %71 %70
+               OpReturn
+               OpFunctionEnd
+
+[tessellation control shader]
+#version 450 core
+#extension GL_ARB_tessellation_shader : require
+
+layout(vertices = 3) out;
+layout(location = 0) in mediump float f[];
+layout(location = 0) out mediump float tc_out[];
+
+void main()
+{
+	gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
+
+	if(gl_InvocationID == 0) {
+		gl_TessLevelInner[0] = f[0];
+		gl_TessLevelOuter[0] = f[0];
+		gl_TessLevelOuter[1] = f[1];
+		gl_TessLevelOuter[2] = f[2];
+	}
+
+	tc_out[gl_InvocationID] = f[gl_InvocationID];
+}
+
+[tessellation evaluation shader spirv]
+; Automatically generated from the GLSL by gen_gl_spirv_tests.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 56
+; Schema: 0
+               OpCapability Tessellation
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint TessellationEvaluation %main "main" %_ %gl_TessCoord %gl_in %te_out %tc_out
+               OpExecutionMode %main Triangles
+               OpExecutionMode %main SpacingEqual
+               OpExecutionMode %main VertexOrderCw
+               OpSource GLSL 450
+               OpSourceExtension "GL_ARB_tessellation_shader"
+               OpName %_ ""
+               OpMemberDecorate %gl_PerVertex 0 BuiltIn Position
+               OpMemberDecorate %gl_PerVertex 1 BuiltIn PointSize
+               OpMemberDecorate %gl_PerVertex 2 BuiltIn ClipDistance
+               OpMemberDecorate %gl_PerVertex 3 BuiltIn CullDistance
+               OpDecorate %gl_PerVertex Block
+               OpDecorate %gl_TessCoord BuiltIn TessCoord
+               OpMemberDecorate %gl_PerVertex_0 0 BuiltIn Position
+               OpMemberDecorate %gl_PerVertex_0 1 BuiltIn PointSize
+               OpMemberDecorate %gl_PerVertex_0 2 BuiltIn ClipDistance
+               OpMemberDecorate %gl_PerVertex_0 3 BuiltIn CullDistance
+               OpDecorate %gl_PerVertex_0 Block
+               OpDecorate %te_out Location 0
+               OpDecorate %tc_out Location 0
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_arr_float_uint_1 = OpTypeArray %float %uint_1
+%gl_PerVertex = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
+%_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex
+          %_ = OpVariable %_ptr_Output_gl_PerVertex Output
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+    %v3float = OpTypeVector %float 3
+%_ptr_Input_v3float = OpTypePointer Input %v3float
+%gl_TessCoord = OpVariable %_ptr_Input_v3float Input
+     %uint_0 = OpConstant %uint 0
+%_ptr_Input_float = OpTypePointer Input %float
+%gl_PerVertex_0 = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
+    %uint_32 = OpConstant %uint 32
+%_arr_gl_PerVertex_0_uint_32 = OpTypeArray %gl_PerVertex_0 %uint_32
+%_ptr_Input__arr_gl_PerVertex_0_uint_32 = OpTypePointer Input %_arr_gl_PerVertex_0_uint_32
+      %gl_in = OpVariable %_ptr_Input__arr_gl_PerVertex_0_uint_32 Input
+%_ptr_Input_v4float = OpTypePointer Input %v4float
+      %int_1 = OpConstant %int 1
+     %uint_2 = OpConstant %uint 2
+      %int_2 = OpConstant %int 2
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+%_ptr_Output_float = OpTypePointer Output %float
+     %te_out = OpVariable %_ptr_Output_float Output
+%_arr_float_uint_32 = OpTypeArray %float %uint_32
+%_ptr_Input__arr_float_uint_32 = OpTypePointer Input %_arr_float_uint_32
+     %tc_out = OpVariable %_ptr_Input__arr_float_uint_32 Input
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+         %21 = OpAccessChain %_ptr_Input_float %gl_TessCoord %uint_0
+         %22 = OpLoad %float %21
+         %29 = OpAccessChain %_ptr_Input_v4float %gl_in %int_0 %int_0
+         %30 = OpLoad %v4float %29
+         %31 = OpVectorTimesScalar %v4float %30 %22
+         %32 = OpAccessChain %_ptr_Input_float %gl_TessCoord %uint_1
+         %33 = OpLoad %float %32
+         %35 = OpAccessChain %_ptr_Input_v4float %gl_in %int_1 %int_0
+         %36 = OpLoad %v4float %35
+         %37 = OpVectorTimesScalar %v4float %36 %33
+         %38 = OpFAdd %v4float %31 %37
+         %40 = OpAccessChain %_ptr_Input_float %gl_TessCoord %uint_2
+         %41 = OpLoad %float %40
+         %43 = OpAccessChain %_ptr_Input_v4float %gl_in %int_2 %int_0
+         %44 = OpLoad %v4float %43
+         %45 = OpVectorTimesScalar %v4float %44 %41
+         %46 = OpFAdd %v4float %38 %45
+         %48 = OpAccessChain %_ptr_Output_v4float %_ %int_0
+               OpStore %48 %46
+         %54 = OpAccessChain %_ptr_Input_float %tc_out %int_2
+         %55 = OpLoad %float %54
+               OpStore %te_out %55
+               OpReturn
+               OpFunctionEnd
+
+[tessellation evaluation shader]
+#version 450 core
+#extension GL_ARB_tessellation_shader : require
+
+layout(triangles, equal_spacing, cw) in;
+layout(location = 0) in mediump float tc_out[];
+layout(location = 0) out mediump float te_out;
+
+void main()
+{
+	gl_Position = gl_TessCoord.x * gl_in[0].gl_Position
+				+ gl_TessCoord.y * gl_in[1].gl_Position
+				+ gl_TessCoord.z * gl_in[2].gl_Position;
+
+	te_out = tc_out[2];
+}
+
+[geometry shader spirv]
+; Automatically generated from the GLSL by gen_gl_spirv_tests.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 50
+; Schema: 0
+               OpCapability Geometry
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Geometry %main "main" %geo_out %te_out %_ %gl_in
+               OpExecutionMode %main Triangles
+               OpExecutionMode %main Invocations 1
+               OpExecutionMode %main OutputTriangleStrip
+               OpExecutionMode %main OutputVertices 3
+               OpSource GLSL 450
+               OpName %_ ""
+               OpDecorate %geo_out Location 0
+               OpDecorate %te_out Location 0
+               OpMemberDecorate %gl_PerVertex 0 BuiltIn Position
+               OpMemberDecorate %gl_PerVertex 1 BuiltIn PointSize
+               OpMemberDecorate %gl_PerVertex 2 BuiltIn ClipDistance
+               OpMemberDecorate %gl_PerVertex 3 BuiltIn CullDistance
+               OpDecorate %gl_PerVertex Block
+               OpMemberDecorate %gl_PerVertex_0 0 BuiltIn Position
+               OpMemberDecorate %gl_PerVertex_0 1 BuiltIn PointSize
+               OpMemberDecorate %gl_PerVertex_0 2 BuiltIn ClipDistance
+               OpMemberDecorate %gl_PerVertex_0 3 BuiltIn CullDistance
+               OpDecorate %gl_PerVertex_0 Block
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+%_ptr_Function_int = OpTypePointer Function %int
+      %int_0 = OpConstant %int 0
+      %int_3 = OpConstant %int 3
+       %bool = OpTypeBool
+      %float = OpTypeFloat 32
+%_ptr_Output_float = OpTypePointer Output %float
+    %geo_out = OpVariable %_ptr_Output_float Output
+       %uint = OpTypeInt 32 0
+     %uint_3 = OpConstant %uint 3
+%_arr_float_uint_3 = OpTypeArray %float %uint_3
+%_ptr_Input__arr_float_uint_3 = OpTypePointer Input %_arr_float_uint_3
+     %te_out = OpVariable %_ptr_Input__arr_float_uint_3 Input
+%_ptr_Input_float = OpTypePointer Input %float
+    %v4float = OpTypeVector %float 4
+     %uint_1 = OpConstant %uint 1
+%_arr_float_uint_1 = OpTypeArray %float %uint_1
+%gl_PerVertex = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
+%_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex
+          %_ = OpVariable %_ptr_Output_gl_PerVertex Output
+%gl_PerVertex_0 = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
+%_arr_gl_PerVertex_0_uint_3 = OpTypeArray %gl_PerVertex_0 %uint_3
+%_ptr_Input__arr_gl_PerVertex_0_uint_3 = OpTypePointer Input %_arr_gl_PerVertex_0_uint_3
+      %gl_in = OpVariable %_ptr_Input__arr_gl_PerVertex_0_uint_3 Input
+%_ptr_Input_v4float = OpTypePointer Input %v4float
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+      %int_1 = OpConstant %int 1
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+          %i = OpVariable %_ptr_Function_int Function
+               OpStore %i %int_0
+               OpBranch %10
+         %10 = OpLabel
+               OpLoopMerge %12 %13 None
+               OpBranch %14
+         %14 = OpLabel
+         %15 = OpLoad %int %i
+         %18 = OpSLessThan %bool %15 %int_3
+               OpBranchConditional %18 %11 %12
+         %11 = OpLabel
+         %27 = OpLoad %int %i
+         %29 = OpAccessChain %_ptr_Input_float %te_out %27
+         %30 = OpLoad %float %29
+               OpStore %geo_out %30
+         %41 = OpLoad %int %i
+         %43 = OpAccessChain %_ptr_Input_v4float %gl_in %41 %int_0
+         %44 = OpLoad %v4float %43
+         %46 = OpAccessChain %_ptr_Output_v4float %_ %int_0
+               OpStore %46 %44
+               OpEmitVertex
+               OpBranch %13
+         %13 = OpLabel
+         %47 = OpLoad %int %i
+         %49 = OpIAdd %int %47 %int_1
+               OpStore %i %49
+               OpBranch %10
+         %12 = OpLabel
+               OpReturn
+               OpFunctionEnd
+
+[geometry shader]
+#version 450 core
+
+layout(triangles) in;
+layout(triangle_strip, max_vertices = 3) out;
+
+layout(location = 0) in mediump float te_out[];
+layout(location = 0) out mediump float geo_out;
+
+void main()
+{
+	for(int i = 0; i < gl_in.length(); i++) {
+		geo_out = te_out[i];
+
+		gl_Position = gl_in[i].gl_Position;
+		EmitVertex();
+	}
+}
+
+[fragment shader spirv]
+; Automatically generated from the GLSL by gen_gl_spirv_tests.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 18
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %main "main" %color %geo_out
+               OpExecutionMode %main OriginLowerLeft
+               OpSource GLSL 450
+               OpDecorate %color Location 0
+               OpDecorate %geo_out Location 0
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+      %color = OpVariable %_ptr_Output_v4float Output
+    %float_0 = OpConstant %float 0
+%_ptr_Input_float = OpTypePointer Input %float
+    %geo_out = OpVariable %_ptr_Input_float Input
+    %float_5 = OpConstant %float 5
+    %float_1 = OpConstant %float 1
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+         %13 = OpLoad %float %geo_out
+         %15 = OpFDiv %float %13 %float_5
+         %17 = OpCompositeConstruct %v4float %float_0 %15 %float_0 %float_1
+               OpStore %color %17
+               OpReturn
+               OpFunctionEnd
+
+[fragment shader]
+#version 450 core
+
+layout(location = 0) out vec4 color;
+layout(location = 0) in mediump float geo_out;
+
+void main()
+{
+	color = vec4(0.0, geo_out / 5.0, 0.0, 1.0);
+}
+[vertex data]
+0/float/2
+-1.0 -1.0
+ 1.0 -1.0
+-1.0  1.0
+-1.0  1.0
+ 1.0 -1.0
+ 1.0  1.0
+
+[test]
+clear color 0.1 0.1 0.1 0.1
+clear
+patch parameter vertices 3
+draw arrays GL_PATCHES 0 6
+probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_gl_spirv/execution/varying/block.shader_test b/tests/spec/arb_gl_spirv/execution/varying/block.shader_test
new file mode 100644
index 000000000..97834b594
--- /dev/null
+++ b/tests/spec/arb_gl_spirv/execution/varying/block.shader_test
@@ -0,0 +1,236 @@
+[require]
+SPIRV YES
+GL >= 4.5
+GLSL >= 4.50
+GL_ARB_gl_spirv
+
+[vertex shader spirv]
+; Automatically generated from the GLSL by gen_gl_spirv_tests.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %main "main" %_ %piglit_vertex %b %gl_VertexID %gl_InstanceID
+               OpSource GLSL 450
+               OpName %_ ""
+               OpMemberDecorate %gl_PerVertex 0 BuiltIn Position
+               OpMemberDecorate %gl_PerVertex 1 BuiltIn PointSize
+               OpMemberDecorate %gl_PerVertex 2 BuiltIn ClipDistance
+               OpMemberDecorate %gl_PerVertex 3 BuiltIn CullDistance
+               OpDecorate %gl_PerVertex Block
+               OpDecorate %piglit_vertex Location 0
+               OpMemberDecorate %block 1 Flat
+               OpMemberDecorate %block 2 Flat
+               OpDecorate %block Block
+               OpDecorate %b Location 0
+               OpDecorate %gl_VertexID BuiltIn VertexId
+               OpDecorate %gl_InstanceID BuiltIn InstanceId
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_arr_float_uint_1 = OpTypeArray %float %uint_1
+%gl_PerVertex = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
+%_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex
+          %_ = OpVariable %_ptr_Output_gl_PerVertex Output
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Input_v4float = OpTypePointer Input %v4float
+%piglit_vertex = OpVariable %_ptr_Input_v4float Input
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+      %block = OpTypeStruct %float %uint %int %v4float
+%_ptr_Output_block = OpTypePointer Output %block
+          %b = OpVariable %_ptr_Output_block Output
+%float_28807_2988 = OpConstant %float 28807.2988
+%_ptr_Output_float = OpTypePointer Output %float
+      %int_1 = OpConstant %int 1
+   %uint_232 = OpConstant %uint 232
+%_ptr_Output_uint = OpTypePointer Output %uint
+      %int_2 = OpConstant %int 2
+   %int_n123 = OpConstant %int -123
+%_ptr_Output_int = OpTypePointer Output %int
+      %int_3 = OpConstant %int 3
+%float_n22558_6348 = OpConstant %float -22558.6348
+%float_21400_3809 = OpConstant %float 21400.3809
+%float_n27642_8477 = OpConstant %float -27642.8477
+%float_n5682_01904 = OpConstant %float -5682.01904
+         %40 = OpConstantComposite %v4float %float_n22558_6348 %float_21400_3809 %float_n27642_8477 %float_n5682_01904
+%_ptr_Input_int = OpTypePointer Input %int
+%gl_VertexID = OpVariable %_ptr_Input_int Input
+%gl_InstanceID = OpVariable %_ptr_Input_int Input
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+         %18 = OpLoad %v4float %piglit_vertex
+         %20 = OpAccessChain %_ptr_Output_v4float %_ %int_0
+               OpStore %20 %18
+         %26 = OpAccessChain %_ptr_Output_float %b %int_0
+               OpStore %26 %float_28807_2988
+         %30 = OpAccessChain %_ptr_Output_uint %b %int_1
+               OpStore %30 %uint_232
+         %34 = OpAccessChain %_ptr_Output_int %b %int_2
+               OpStore %34 %int_n123
+         %41 = OpAccessChain %_ptr_Output_v4float %b %int_3
+               OpStore %41 %40
+               OpReturn
+               OpFunctionEnd
+
+[vertex shader]
+#version 450 core
+
+layout(location = 0) in vec4 piglit_vertex;
+layout(location = 0) out block {
+	float f;
+	flat uint u;
+	flat int i;
+	vec4 color;
+} b;
+
+void main()
+{
+	gl_Position = piglit_vertex;
+	b.f = 28807.2986343;
+	b.u = 232;
+	b.i = -123;
+	b.color = vec4(-22558.6354314, 21400.3810636, -27642.8476844, -5682.01881437);
+}
+
+[fragment shader spirv]
+; Automatically generated from the GLSL by gen_gl_spirv_tests.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 64
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %main "main" %out_color %b
+               OpExecutionMode %main OriginLowerLeft
+               OpSource GLSL 450
+               OpDecorate %out_color Location 0
+               OpMemberDecorate %block 1 Flat
+               OpMemberDecorate %block 2 Flat
+               OpDecorate %block Block
+               OpDecorate %b Location 0
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+  %out_color = OpVariable %_ptr_Output_v4float Output
+    %float_0 = OpConstant %float 0
+    %float_1 = OpConstant %float 1
+         %12 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %15 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+       %uint = OpTypeInt 32 0
+        %int = OpTypeInt 32 1
+      %block = OpTypeStruct %float %uint %int %v4float
+%_ptr_Input_block = OpTypePointer Input %block
+          %b = OpVariable %_ptr_Input_block Input
+      %int_0 = OpConstant %int 0
+%_ptr_Input_float = OpTypePointer Input %float
+%float_28807_2988 = OpConstant %float 28807.2988
+       %bool = OpTypeBool
+      %int_1 = OpConstant %int 1
+%_ptr_Input_uint = OpTypePointer Input %uint
+   %uint_232 = OpConstant %uint 232
+      %int_2 = OpConstant %int 2
+%_ptr_Input_int = OpTypePointer Input %int
+   %int_n123 = OpConstant %int -123
+      %int_3 = OpConstant %int 3
+%_ptr_Input_v4float = OpTypePointer Input %v4float
+%float_n22558_6348 = OpConstant %float -22558.6348
+%float_21400_3809 = OpConstant %float 21400.3809
+%float_n27642_8477 = OpConstant %float -27642.8477
+%float_n5682_01904 = OpConstant %float -5682.01904
+         %57 = OpConstantComposite %v4float %float_n22558_6348 %float_21400_3809 %float_n27642_8477 %float_n5682_01904
+     %v4bool = OpTypeVector %bool 4
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+ %fail_color = OpVariable %_ptr_Function_v4float Function
+               OpStore %out_color %12
+               OpStore %fail_color %15
+         %23 = OpAccessChain %_ptr_Input_float %b %int_0
+         %24 = OpLoad %float %23
+         %27 = OpFOrdNotEqual %bool %24 %float_28807_2988
+               OpSelectionMerge %29 None
+               OpBranchConditional %27 %28 %29
+         %28 = OpLabel
+         %30 = OpLoad %v4float %fail_color
+               OpStore %out_color %30
+               OpBranch %29
+         %29 = OpLabel
+         %33 = OpAccessChain %_ptr_Input_uint %b %int_1
+         %34 = OpLoad %uint %33
+         %36 = OpINotEqual %bool %34 %uint_232
+               OpSelectionMerge %38 None
+               OpBranchConditional %36 %37 %38
+         %37 = OpLabel
+         %39 = OpLoad %v4float %fail_color
+               OpStore %out_color %39
+               OpBranch %38
+         %38 = OpLabel
+         %42 = OpAccessChain %_ptr_Input_int %b %int_2
+         %43 = OpLoad %int %42
+         %45 = OpINotEqual %bool %43 %int_n123
+               OpSelectionMerge %47 None
+               OpBranchConditional %45 %46 %47
+         %46 = OpLabel
+         %48 = OpLoad %v4float %fail_color
+               OpStore %out_color %48
+               OpBranch %47
+         %47 = OpLabel
+         %51 = OpAccessChain %_ptr_Input_v4float %b %int_3
+         %52 = OpLoad %v4float %51
+         %59 = OpFOrdNotEqual %v4bool %52 %57
+         %60 = OpAny %bool %59
+               OpSelectionMerge %62 None
+               OpBranchConditional %60 %61 %62
+         %61 = OpLabel
+         %63 = OpLoad %v4float %fail_color
+               OpStore %out_color %63
+               OpBranch %62
+         %62 = OpLabel
+               OpReturn
+               OpFunctionEnd
+
+[fragment shader]
+#version 450 core
+
+layout(location = 0) out vec4 out_color;
+layout(location = 0) in block {
+	float f;
+	flat uint u;
+	flat int i;
+	vec4 color;
+} b;
+
+void main()
+{
+	out_color = vec4(0.0, 1.0, 0.0, 1.0);
+	vec4 fail_color = vec4(1.0, 0.0, 0.0, 1.0);
+
+	if (b.f != 28807.2986343)
+	   out_color = fail_color;
+
+	if (b.u != 232)
+	   out_color = fail_color;
+
+
+	if (b.i != -123)
+	   out_color = fail_color;
+
+	if (b.color != vec4(-22558.6354314, 21400.3810636, -27642.8476844, -5682.01881437))
+	   out_color = fail_color;
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_gl_spirv/execution/varying/mat/mat-arb.shader_test b/tests/spec/arb_gl_spirv/execution/varying/mat/mat-arb.shader_test
new file mode 100644
index 000000000..5019aebeb
--- /dev/null
+++ b/tests/spec/arb_gl_spirv/execution/varying/mat/mat-arb.shader_test
@@ -0,0 +1,313 @@
+[require]
+SPIRV YES
+GL >= 4.5
+GLSL >= 4.50
+GL_ARB_gl_spirv
+
+[vertex shader spirv]
+; Automatically generated from the GLSL by gen_gl_spirv_tests.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 93
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %main "main" %_ %piglit_vertex %m3x4 %m2x3 %gl_VertexID %gl_InstanceID
+               OpSource GLSL 450
+               OpName %_ ""
+               OpMemberDecorate %gl_PerVertex 0 BuiltIn Position
+               OpMemberDecorate %gl_PerVertex 1 BuiltIn PointSize
+               OpMemberDecorate %gl_PerVertex 2 BuiltIn ClipDistance
+               OpMemberDecorate %gl_PerVertex 3 BuiltIn CullDistance
+               OpDecorate %gl_PerVertex Block
+               OpDecorate %piglit_vertex Location 0
+               OpDecorate %m3x4 Location 0
+               OpDecorate %m2x3 Location 4
+               OpDecorate %gl_VertexID BuiltIn VertexId
+               OpDecorate %gl_InstanceID BuiltIn InstanceId
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_arr_float_uint_1 = OpTypeArray %float %uint_1
+%gl_PerVertex = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
+%_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex
+          %_ = OpVariable %_ptr_Output_gl_PerVertex Output
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Input_v4float = OpTypePointer Input %v4float
+%piglit_vertex = OpVariable %_ptr_Input_v4float Input
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+%float_29616_166 = OpConstant %float 29616.166
+%float_n21563_2676 = OpConstant %float -21563.2676
+%float_n3274_39771 = OpConstant %float -3274.39771
+%float_n7391_61914 = OpConstant %float -7391.61914
+         %27 = OpConstantComposite %v4float %float_29616_166 %float_n21563_2676 %float_n3274_39771 %float_n7391_61914
+%float_29371_457 = OpConstant %float 29371.457
+%float_7793_47266 = OpConstant %float 7793.47266
+%float_n20661_791 = OpConstant %float -20661.791
+%float_n26402_4414 = OpConstant %float -26402.4414
+         %33 = OpConstantComposite %v4float %float_29371_457 %float_7793_47266 %float_n20661_791 %float_n26402_4414
+%float_11556_8564 = OpConstant %float 11556.8564
+%float_20357_9199 = OpConstant %float 20357.9199
+%float_15432_0186 = OpConstant %float 15432.0186
+%float_17385_4688 = OpConstant %float 17385.4688
+         %39 = OpConstantComposite %v4float %float_11556_8564 %float_20357_9199 %float_15432_0186 %float_17385_4688
+    %v3float = OpTypeVector %float 3
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+%float_20530_7109 = OpConstant %float 20530.7109
+%float_n10508_5107 = OpConstant %float -10508.5107
+%float_n23051_9961 = OpConstant %float -23051.9961
+         %46 = OpConstantComposite %v3float %float_20530_7109 %float_n10508_5107 %float_n23051_9961
+%float_26363_8359 = OpConstant %float 26363.8359
+%float_n29557_3516 = OpConstant %float -29557.3516
+%float_30238_998 = OpConstant %float 30238.998
+         %51 = OpConstantComposite %v3float %float_26363_8359 %float_n29557_3516 %float_30238_998
+%mat3v4float = OpTypeMatrix %v4float 3
+%_ptr_Output_mat3v4float = OpTypePointer Output %mat3v4float
+       %m3x4 = OpVariable %_ptr_Output_mat3v4float Output
+    %float_1 = OpConstant %float 1
+    %float_0 = OpConstant %float 0
+%mat2v3float = OpTypeMatrix %v3float 2
+%_ptr_Output_mat2v3float = OpTypePointer Output %mat2v3float
+       %m2x3 = OpVariable %_ptr_Output_mat2v3float Output
+%_ptr_Input_int = OpTypePointer Input %int
+%gl_VertexID = OpVariable %_ptr_Input_int Input
+%gl_InstanceID = OpVariable %_ptr_Input_int Input
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+         %v1 = OpVariable %_ptr_Function_v4float Function
+         %v2 = OpVariable %_ptr_Function_v4float Function
+         %v3 = OpVariable %_ptr_Function_v4float Function
+         %v4 = OpVariable %_ptr_Function_v3float Function
+         %v5 = OpVariable %_ptr_Function_v3float Function
+         %18 = OpLoad %v4float %piglit_vertex
+         %20 = OpAccessChain %_ptr_Output_v4float %_ %int_0
+               OpStore %20 %18
+               OpStore %v1 %27
+               OpStore %v2 %33
+               OpStore %v3 %39
+               OpStore %v4 %46
+               OpStore %v5 %51
+         %55 = OpLoad %v4float %v1
+         %56 = OpLoad %v4float %v2
+         %57 = OpLoad %v4float %v3
+         %60 = OpCompositeExtract %float %55 0
+         %61 = OpCompositeExtract %float %55 1
+         %62 = OpCompositeExtract %float %55 2
+         %63 = OpCompositeExtract %float %55 3
+         %64 = OpCompositeExtract %float %56 0
+         %65 = OpCompositeExtract %float %56 1
+         %66 = OpCompositeExtract %float %56 2
+         %67 = OpCompositeExtract %float %56 3
+         %68 = OpCompositeExtract %float %57 0
+         %69 = OpCompositeExtract %float %57 1
+         %70 = OpCompositeExtract %float %57 2
+         %71 = OpCompositeExtract %float %57 3
+         %72 = OpCompositeConstruct %v4float %60 %61 %62 %63
+         %73 = OpCompositeConstruct %v4float %64 %65 %66 %67
+         %74 = OpCompositeConstruct %v4float %68 %69 %70 %71
+         %75 = OpCompositeConstruct %mat3v4float %72 %73 %74
+               OpStore %m3x4 %75
+         %79 = OpLoad %v3float %v4
+         %80 = OpLoad %v3float %v5
+         %81 = OpCompositeExtract %float %79 0
+         %82 = OpCompositeExtract %float %79 1
+         %83 = OpCompositeExtract %float %79 2
+         %84 = OpCompositeExtract %float %80 0
+         %85 = OpCompositeExtract %float %80 1
+         %86 = OpCompositeExtract %float %80 2
+         %87 = OpCompositeConstruct %v3float %81 %82 %83
+         %88 = OpCompositeConstruct %v3float %84 %85 %86
+         %89 = OpCompositeConstruct %mat2v3float %87 %88
+               OpStore %m2x3 %89
+               OpReturn
+               OpFunctionEnd
+
+[vertex shader]
+#version 450 core
+
+layout(location = 0) in vec4 piglit_vertex;
+layout(location = 0) out mat3x4 m3x4;
+layout(location = 4) out mat2x3 m2x3;
+
+void main()
+{
+	gl_Position = piglit_vertex;
+
+	vec4 v1 = vec4(29616.166598, -21563.2666972, -3274.39775692, -7391.61915007);
+	vec4 v2 = vec4(29371.4563058, 7793.47278553, -20661.7912871, -26402.4415351);
+	vec4 v3 = vec4(11556.8560616, 20357.9190661, 15432.018204, 17385.4694591);
+
+	vec3 v4 = vec3(20530.7108263, -10508.5105669, -23051.9953613);
+	vec3 v5 = vec3(26363.8367742, -29557.3508507, 30238.9989166);
+
+	m3x4 = mat3x4(v1, v2, v3);
+	m2x3 = mat2x3(v4, v5);
+}
+
+[fragment shader spirv]
+; Automatically generated from the GLSL by gen_gl_spirv_tests.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 90
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %main "main" %out_color %m3x4 %m2x3
+               OpExecutionMode %main OriginLowerLeft
+               OpSource GLSL 450
+               OpDecorate %out_color Location 0
+               OpDecorate %m3x4 Location 0
+               OpDecorate %m2x3 Location 4
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+  %out_color = OpVariable %_ptr_Output_v4float Output
+    %float_0 = OpConstant %float 0
+    %float_1 = OpConstant %float 1
+         %12 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %15 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+%mat3v4float = OpTypeMatrix %v4float 3
+%_ptr_Input_mat3v4float = OpTypePointer Input %mat3v4float
+       %m3x4 = OpVariable %_ptr_Input_mat3v4float Input
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Input_v4float = OpTypePointer Input %v4float
+%float_29616_166 = OpConstant %float 29616.166
+%float_n21563_2676 = OpConstant %float -21563.2676
+%float_n3274_39771 = OpConstant %float -3274.39771
+%float_n7391_61914 = OpConstant %float -7391.61914
+         %28 = OpConstantComposite %v4float %float_29616_166 %float_n21563_2676 %float_n3274_39771 %float_n7391_61914
+       %bool = OpTypeBool
+     %v4bool = OpTypeVector %bool 4
+      %int_1 = OpConstant %int 1
+%float_29371_457 = OpConstant %float 29371.457
+%float_7793_47266 = OpConstant %float 7793.47266
+%float_n20661_791 = OpConstant %float -20661.791
+%float_n26402_4414 = OpConstant %float -26402.4414
+         %43 = OpConstantComposite %v4float %float_29371_457 %float_7793_47266 %float_n20661_791 %float_n26402_4414
+      %int_2 = OpConstant %int 2
+%float_11556_8564 = OpConstant %float 11556.8564
+%float_20357_9199 = OpConstant %float 20357.9199
+%float_15432_0186 = OpConstant %float 15432.0186
+%float_17385_4688 = OpConstant %float 17385.4688
+         %56 = OpConstantComposite %v4float %float_11556_8564 %float_20357_9199 %float_15432_0186 %float_17385_4688
+    %v3float = OpTypeVector %float 3
+%mat2v3float = OpTypeMatrix %v3float 2
+%_ptr_Input_mat2v3float = OpTypePointer Input %mat2v3float
+       %m2x3 = OpVariable %_ptr_Input_mat2v3float Input
+%_ptr_Input_v3float = OpTypePointer Input %v3float
+%float_20530_7109 = OpConstant %float 20530.7109
+%float_n10508_5107 = OpConstant %float -10508.5107
+%float_n23051_9961 = OpConstant %float -23051.9961
+         %72 = OpConstantComposite %v3float %float_20530_7109 %float_n10508_5107 %float_n23051_9961
+     %v3bool = OpTypeVector %bool 3
+%float_26363_8359 = OpConstant %float 26363.8359
+%float_n29557_3516 = OpConstant %float -29557.3516
+%float_30238_998 = OpConstant %float 30238.998
+         %84 = OpConstantComposite %v3float %float_26363_8359 %float_n29557_3516 %float_30238_998
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+ %fail_color = OpVariable %_ptr_Function_v4float Function
+               OpStore %out_color %12
+               OpStore %fail_color %15
+         %22 = OpAccessChain %_ptr_Input_v4float %m3x4 %int_0
+         %23 = OpLoad %v4float %22
+         %31 = OpFOrdNotEqual %v4bool %23 %28
+         %32 = OpAny %bool %31
+               OpSelectionMerge %34 None
+               OpBranchConditional %32 %33 %34
+         %33 = OpLabel
+         %35 = OpLoad %v4float %fail_color
+               OpStore %out_color %35
+               OpBranch %34
+         %34 = OpLabel
+         %37 = OpAccessChain %_ptr_Input_v4float %m3x4 %int_1
+         %38 = OpLoad %v4float %37
+         %44 = OpFOrdNotEqual %v4bool %38 %43
+         %45 = OpAny %bool %44
+               OpSelectionMerge %47 None
+               OpBranchConditional %45 %46 %47
+         %46 = OpLabel
+         %48 = OpLoad %v4float %fail_color
+               OpStore %out_color %48
+               OpBranch %47
+         %47 = OpLabel
+         %50 = OpAccessChain %_ptr_Input_v4float %m3x4 %int_2
+         %51 = OpLoad %v4float %50
+         %57 = OpFOrdNotEqual %v4bool %51 %56
+         %58 = OpAny %bool %57
+               OpSelectionMerge %60 None
+               OpBranchConditional %58 %59 %60
+         %59 = OpLabel
+         %61 = OpLoad %v4float %fail_color
+               OpStore %out_color %61
+               OpBranch %60
+         %60 = OpLabel
+         %67 = OpAccessChain %_ptr_Input_v3float %m2x3 %int_0
+         %68 = OpLoad %v3float %67
+         %74 = OpFOrdNotEqual %v3bool %68 %72
+         %75 = OpAny %bool %74
+               OpSelectionMerge %77 None
+               OpBranchConditional %75 %76 %77
+         %76 = OpLabel
+         %78 = OpLoad %v4float %fail_color
+               OpStore %out_color %78
+               OpBranch %77
+         %77 = OpLabel
+         %79 = OpAccessChain %_ptr_Input_v3float %m2x3 %int_1
+         %80 = OpLoad %v3float %79
+         %85 = OpFOrdNotEqual %v3bool %80 %84
+         %86 = OpAny %bool %85
+               OpSelectionMerge %88 None
+               OpBranchConditional %86 %87 %88
+         %87 = OpLabel
+         %89 = OpLoad %v4float %fail_color
+               OpStore %out_color %89
+               OpBranch %88
+         %88 = OpLabel
+               OpReturn
+               OpFunctionEnd
+
+[fragment shader]
+#version 450 core
+
+layout(location = 0) out vec4 out_color;
+layout(location = 0) in mat3x4 m3x4;
+layout(location = 4) in mat2x3 m2x3;
+
+void main()
+{
+	out_color = vec4(0.0, 1.0, 0.0, 1.0);
+	vec4 fail_color = vec4(1.0, 0.0, 0.0, 1.0);
+
+	if (m3x4[0] != vec4(29616.166598, -21563.2666972, -3274.39775692, -7391.61915007))
+	   out_color = fail_color;
+
+	if (m3x4[1] != vec4(29371.4563058, 7793.47278553, -20661.7912871, -26402.4415351))
+	   out_color = fail_color;
+
+	if (m3x4[2] != vec4(11556.8560616, 20357.9190661, 15432.018204, 17385.4694591))
+	   out_color = fail_color;
+
+	if (m2x3[0] != vec3(20530.7108263, -10508.5105669, -23051.9953613))
+	   out_color = fail_color;
+
+	if (m2x3[1] != vec3(26363.8367742, -29557.3508507, 30238.9989166))
+	   out_color = fail_color;
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_gl_spirv/execution/varying/mat/mat2.shader_test b/tests/spec/arb_gl_spirv/execution/varying/mat/mat2.shader_test
new file mode 100644
index 000000000..9426da756
--- /dev/null
+++ b/tests/spec/arb_gl_spirv/execution/varying/mat/mat2.shader_test
@@ -0,0 +1,235 @@
+[require]
+SPIRV YES
+GL >= 4.5
+GLSL >= 4.50
+GL_ARB_gl_spirv
+
+[vertex shader spirv]
+; Automatically generated from the GLSL by gen_gl_spirv_tests.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 58
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %main "main" %_ %piglit_vertex %m1 %m2 %gl_VertexID %gl_InstanceID
+               OpSource GLSL 450
+               OpName %_ ""
+               OpMemberDecorate %gl_PerVertex 0 BuiltIn Position
+               OpMemberDecorate %gl_PerVertex 1 BuiltIn PointSize
+               OpMemberDecorate %gl_PerVertex 2 BuiltIn ClipDistance
+               OpMemberDecorate %gl_PerVertex 3 BuiltIn CullDistance
+               OpDecorate %gl_PerVertex Block
+               OpDecorate %piglit_vertex Location 0
+               OpDecorate %m1 Location 0
+               OpDecorate %m2 Location 2
+               OpDecorate %gl_VertexID BuiltIn VertexId
+               OpDecorate %gl_InstanceID BuiltIn InstanceId
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_arr_float_uint_1 = OpTypeArray %float %uint_1
+%gl_PerVertex = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
+%_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex
+          %_ = OpVariable %_ptr_Output_gl_PerVertex Output
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Input_v4float = OpTypePointer Input %v4float
+%piglit_vertex = OpVariable %_ptr_Input_v4float Input
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+    %v2float = OpTypeVector %float 2
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+%float_n10231_1807 = OpConstant %float -10231.1807
+%float_n5854_81055 = OpConstant %float -5854.81055
+         %26 = OpConstantComposite %v2float %float_n10231_1807 %float_n5854_81055
+%float_n26402_4414 = OpConstant %float -26402.4414
+%float_11556_8564 = OpConstant %float 11556.8564
+         %30 = OpConstantComposite %v2float %float_n26402_4414 %float_11556_8564
+%mat2v2float = OpTypeMatrix %v2float 2
+%_ptr_Output_mat2v2float = OpTypePointer Output %mat2v2float
+         %m1 = OpVariable %_ptr_Output_mat2v2float Output
+    %float_1 = OpConstant %float 1
+    %float_0 = OpConstant %float 0
+         %m2 = OpVariable %_ptr_Output_mat2v2float Output
+%_ptr_Input_int = OpTypePointer Input %int
+%gl_VertexID = OpVariable %_ptr_Input_int Input
+%gl_InstanceID = OpVariable %_ptr_Input_int Input
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+         %v1 = OpVariable %_ptr_Function_v2float Function
+         %v2 = OpVariable %_ptr_Function_v2float Function
+         %18 = OpLoad %v4float %piglit_vertex
+         %20 = OpAccessChain %_ptr_Output_v4float %_ %int_0
+               OpStore %20 %18
+               OpStore %v1 %26
+               OpStore %v2 %30
+         %34 = OpLoad %v2float %v1
+         %35 = OpLoad %v2float %v2
+         %38 = OpCompositeExtract %float %34 0
+         %39 = OpCompositeExtract %float %34 1
+         %40 = OpCompositeExtract %float %35 0
+         %41 = OpCompositeExtract %float %35 1
+         %42 = OpCompositeConstruct %v2float %38 %39
+         %43 = OpCompositeConstruct %v2float %40 %41
+         %44 = OpCompositeConstruct %mat2v2float %42 %43
+               OpStore %m1 %44
+         %46 = OpLoad %v2float %v2
+         %47 = OpLoad %v2float %v1
+         %48 = OpCompositeExtract %float %46 0
+         %49 = OpCompositeExtract %float %46 1
+         %50 = OpCompositeExtract %float %47 0
+         %51 = OpCompositeExtract %float %47 1
+         %52 = OpCompositeConstruct %v2float %48 %49
+         %53 = OpCompositeConstruct %v2float %50 %51
+         %54 = OpCompositeConstruct %mat2v2float %52 %53
+               OpStore %m2 %54
+               OpReturn
+               OpFunctionEnd
+
+[vertex shader]
+#version 450 core
+
+layout(location = 0) in vec4 piglit_vertex;
+layout(location = 0) out mat2 m1;
+layout(location = 2) out mat2 m2;
+
+void main()
+{
+	gl_Position = piglit_vertex;
+
+	vec2 v1 = vec2(-10231.1810483, -5854.8105745);
+	vec2 v2 = vec2(-26402.4415351, 11556.8560616);
+
+	m1 = mat2(v1, v2);
+	m2 = mat2(v2, v1);
+}
+
+[fragment shader spirv]
+; Automatically generated from the GLSL by gen_gl_spirv_tests.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 61
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %main "main" %out_color %m1 %m2
+               OpExecutionMode %main OriginLowerLeft
+               OpSource GLSL 450
+               OpDecorate %out_color Location 0
+               OpDecorate %m1 Location 0
+               OpDecorate %m2 Location 2
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+  %out_color = OpVariable %_ptr_Output_v4float Output
+    %float_0 = OpConstant %float 0
+    %float_1 = OpConstant %float 1
+         %12 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %15 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_0
+    %v2float = OpTypeVector %float 2
+%mat2v2float = OpTypeMatrix %v2float 2
+%_ptr_Input_mat2v2float = OpTypePointer Input %mat2v2float
+         %m1 = OpVariable %_ptr_Input_mat2v2float Input
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Input_v2float = OpTypePointer Input %v2float
+%float_n10231_1807 = OpConstant %float -10231.1807
+%float_n5854_81055 = OpConstant %float -5854.81055
+         %27 = OpConstantComposite %v2float %float_n10231_1807 %float_n5854_81055
+       %bool = OpTypeBool
+     %v2bool = OpTypeVector %bool 2
+      %int_1 = OpConstant %int 1
+%float_n26402_4414 = OpConstant %float -26402.4414
+%float_11556_8564 = OpConstant %float 11556.8564
+         %40 = OpConstantComposite %v2float %float_n26402_4414 %float_11556_8564
+         %m2 = OpVariable %_ptr_Input_mat2v2float Input
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+ %fail_color = OpVariable %_ptr_Function_v4float Function
+               OpStore %out_color %12
+               OpStore %fail_color %15
+         %23 = OpAccessChain %_ptr_Input_v2float %m1 %int_0
+         %24 = OpLoad %v2float %23
+         %30 = OpFOrdNotEqual %v2bool %24 %27
+         %31 = OpAny %bool %30
+               OpSelectionMerge %33 None
+               OpBranchConditional %31 %32 %33
+         %32 = OpLabel
+         %34 = OpLoad %v4float %fail_color
+               OpStore %out_color %34
+               OpBranch %33
+         %33 = OpLabel
+         %36 = OpAccessChain %_ptr_Input_v2float %m1 %int_1
+         %37 = OpLoad %v2float %36
+         %41 = OpFOrdNotEqual %v2bool %37 %40
+         %42 = OpAny %bool %41
+               OpSelectionMerge %44 None
+               OpBranchConditional %42 %43 %44
+         %43 = OpLabel
+         %45 = OpLoad %v4float %fail_color
+               OpStore %out_color %45
+               OpBranch %44
+         %44 = OpLabel
+         %47 = OpAccessChain %_ptr_Input_v2float %m2 %int_0
+         %48 = OpLoad %v2float %47
+         %49 = OpFOrdNotEqual %v2bool %48 %40
+         %50 = OpAny %bool %49
+               OpSelectionMerge %52 None
+               OpBranchConditional %50 %51 %52
+         %51 = OpLabel
+         %53 = OpLoad %v4float %fail_color
+               OpStore %out_color %53
+               OpBranch %52
+         %52 = OpLabel
+         %54 = OpAccessChain %_ptr_Input_v2float %m2 %int_1
+         %55 = OpLoad %v2float %54
+         %56 = OpFOrdNotEqual %v2bool %55 %27
+         %57 = OpAny %bool %56
+               OpSelectionMerge %59 None
+               OpBranchConditional %57 %58 %59
+         %58 = OpLabel
+         %60 = OpLoad %v4float %fail_color
+               OpStore %out_color %60
+               OpBranch %59
+         %59 = OpLabel
+               OpReturn
+               OpFunctionEnd
+
+[fragment shader]
+#version 450 core
+
+layout(location = 0) in mat2 m1;
+layout(location = 2) in mat2 m2;
+layout(location = 0) out vec4 out_color;
+
+void main()
+{
+	out_color = vec4(0.0, 1.0, 0.0, 1.0);
+	vec4 fail_color = vec4(1.0, 0.0, 0.0, 0.0);
+
+	if (m1[0] != vec2(-10231.1810483, -5854.8105745))
+	   out_color = fail_color;
+
+	if (m1[1] != vec2(-26402.4415351, 11556.8560616))
+	   out_color = fail_color;
+
+	if (m2[0] != vec2(-26402.4415351, 11556.8560616))
+	   out_color = fail_color;
+
+	if (m2[1] != vec2(-10231.1810483, -5854.8105745))
+	   out_color = fail_color;
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_gl_spirv/execution/varying/mat/mat3.shader_test b/tests/spec/arb_gl_spirv/execution/varying/mat/mat3.shader_test
new file mode 100644
index 000000000..596e5bf24
--- /dev/null
+++ b/tests/spec/arb_gl_spirv/execution/varying/mat/mat3.shader_test
@@ -0,0 +1,294 @@
+[require]
+SPIRV YES
+GL >= 4.5
+GLSL >= 4.50
+GL_ARB_gl_spirv
+
+[vertex shader spirv]
+; Automatically generated from the GLSL by gen_gl_spirv_tests.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 79
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %main "main" %_ %piglit_vertex %m1 %m2 %gl_VertexID %gl_InstanceID
+               OpSource GLSL 450
+               OpName %_ ""
+               OpMemberDecorate %gl_PerVertex 0 BuiltIn Position
+               OpMemberDecorate %gl_PerVertex 1 BuiltIn PointSize
+               OpMemberDecorate %gl_PerVertex 2 BuiltIn ClipDistance
+               OpMemberDecorate %gl_PerVertex 3 BuiltIn CullDistance
+               OpDecorate %gl_PerVertex Block
+               OpDecorate %piglit_vertex Location 0
+               OpDecorate %m1 Location 0
+               OpDecorate %m2 Location 3
+               OpDecorate %gl_VertexID BuiltIn VertexId
+               OpDecorate %gl_InstanceID BuiltIn InstanceId
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_arr_float_uint_1 = OpTypeArray %float %uint_1
+%gl_PerVertex = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
+%_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex
+          %_ = OpVariable %_ptr_Output_gl_PerVertex Output
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Input_v4float = OpTypePointer Input %v4float
+%piglit_vertex = OpVariable %_ptr_Input_v4float Input
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+    %v3float = OpTypeVector %float 3
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+%float_20530_7109 = OpConstant %float 20530.7109
+%float_n10508_5107 = OpConstant %float -10508.5107
+%float_n23051_9961 = OpConstant %float -23051.9961
+         %27 = OpConstantComposite %v3float %float_20530_7109 %float_n10508_5107 %float_n23051_9961
+%float_n23564_0664 = OpConstant %float -23564.0664
+%float_n27681_2891 = OpConstant %float -27681.2891
+%float_9081_78711 = OpConstant %float 9081.78711
+         %32 = OpConstantComposite %v3float %float_n23564_0664 %float_n27681_2891 %float_9081_78711
+%float_n12496_1973 = OpConstant %float -12496.1973
+%float_n5854_81055 = OpConstant %float -5854.81055
+%float_5217_75732 = OpConstant %float 5217.75732
+         %37 = OpConstantComposite %v3float %float_n12496_1973 %float_n5854_81055 %float_5217_75732
+%mat3v3float = OpTypeMatrix %v3float 3
+%_ptr_Output_mat3v3float = OpTypePointer Output %mat3v3float
+         %m1 = OpVariable %_ptr_Output_mat3v3float Output
+    %float_1 = OpConstant %float 1
+    %float_0 = OpConstant %float 0
+         %m2 = OpVariable %_ptr_Output_mat3v3float Output
+%_ptr_Input_int = OpTypePointer Input %int
+%gl_VertexID = OpVariable %_ptr_Input_int Input
+%gl_InstanceID = OpVariable %_ptr_Input_int Input
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+         %v1 = OpVariable %_ptr_Function_v3float Function
+         %v2 = OpVariable %_ptr_Function_v3float Function
+         %v3 = OpVariable %_ptr_Function_v3float Function
+         %18 = OpLoad %v4float %piglit_vertex
+         %20 = OpAccessChain %_ptr_Output_v4float %_ %int_0
+               OpStore %20 %18
+               OpStore %v1 %27
+               OpStore %v2 %32
+               OpStore %v3 %37
+         %41 = OpLoad %v3float %v1
+         %42 = OpLoad %v3float %v2
+         %43 = OpLoad %v3float %v3
+         %46 = OpCompositeExtract %float %41 0
+         %47 = OpCompositeExtract %float %41 1
+         %48 = OpCompositeExtract %float %41 2
+         %49 = OpCompositeExtract %float %42 0
+         %50 = OpCompositeExtract %float %42 1
+         %51 = OpCompositeExtract %float %42 2
+         %52 = OpCompositeExtract %float %43 0
+         %53 = OpCompositeExtract %float %43 1
+         %54 = OpCompositeExtract %float %43 2
+         %55 = OpCompositeConstruct %v3float %46 %47 %48
+         %56 = OpCompositeConstruct %v3float %49 %50 %51
+         %57 = OpCompositeConstruct %v3float %52 %53 %54
+         %58 = OpCompositeConstruct %mat3v3float %55 %56 %57
+               OpStore %m1 %58
+         %60 = OpLoad %v3float %v3
+         %61 = OpLoad %v3float %v2
+         %62 = OpLoad %v3float %v1
+         %63 = OpCompositeExtract %float %60 0
+         %64 = OpCompositeExtract %float %60 1
+         %65 = OpCompositeExtract %float %60 2
+         %66 = OpCompositeExtract %float %61 0
+         %67 = OpCompositeExtract %float %61 1
+         %68 = OpCompositeExtract %float %61 2
+         %69 = OpCompositeExtract %float %62 0
+         %70 = OpCompositeExtract %float %62 1
+         %71 = OpCompositeExtract %float %62 2
+         %72 = OpCompositeConstruct %v3float %63 %64 %65
+         %73 = OpCompositeConstruct %v3float %66 %67 %68
+         %74 = OpCompositeConstruct %v3float %69 %70 %71
+         %75 = OpCompositeConstruct %mat3v3float %72 %73 %74
+               OpStore %m2 %75
+               OpReturn
+               OpFunctionEnd
+
+[vertex shader]
+#version 450 core
+
+layout(location = 0) in vec4 piglit_vertex;
+layout(location = 0) out mat3 m1;
+layout(location = 3) out mat3 m2;
+
+void main()
+{
+	gl_Position = piglit_vertex;
+
+	vec3 v1 = vec3(20530.7108263, -10508.5105669, -23051.9953613);
+	vec3 v2 = vec3(-23564.0673228, -27681.288716, 9081.78673991);
+	vec3 v3 = vec3(-12496.1967803, -5854.8105745, 5217.75729);
+
+	m1 = mat3(v1, v2, v3);
+	m2 = mat3(v3, v2, v1);
+}
+
+[fragment shader spirv]
+; Automatically generated from the GLSL by gen_gl_spirv_tests.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 82
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %main "main" %out_color %m1 %m2
+               OpExecutionMode %main OriginLowerLeft
+               OpSource GLSL 450
+               OpDecorate %out_color Location 0
+               OpDecorate %m1 Location 0
+               OpDecorate %m2 Location 3
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+  %out_color = OpVariable %_ptr_Output_v4float Output
+    %float_0 = OpConstant %float 0
+    %float_1 = OpConstant %float 1
+         %12 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %15 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+    %v3float = OpTypeVector %float 3
+%mat3v3float = OpTypeMatrix %v3float 3
+%_ptr_Input_mat3v3float = OpTypePointer Input %mat3v3float
+         %m1 = OpVariable %_ptr_Input_mat3v3float Input
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Input_v3float = OpTypePointer Input %v3float
+%float_20530_7109 = OpConstant %float 20530.7109
+%float_n10508_5107 = OpConstant %float -10508.5107
+%float_n23051_9961 = OpConstant %float -23051.9961
+         %28 = OpConstantComposite %v3float %float_20530_7109 %float_n10508_5107 %float_n23051_9961
+       %bool = OpTypeBool
+     %v3bool = OpTypeVector %bool 3
+      %int_1 = OpConstant %int 1
+%float_n23564_0664 = OpConstant %float -23564.0664
+%float_n27681_2891 = OpConstant %float -27681.2891
+%float_9081_78711 = OpConstant %float 9081.78711
+         %42 = OpConstantComposite %v3float %float_n23564_0664 %float_n27681_2891 %float_9081_78711
+      %int_2 = OpConstant %int 2
+%float_n12496_1973 = OpConstant %float -12496.1973
+%float_n5854_81055 = OpConstant %float -5854.81055
+%float_5217_75732 = OpConstant %float 5217.75732
+         %54 = OpConstantComposite %v3float %float_n12496_1973 %float_n5854_81055 %float_5217_75732
+         %m2 = OpVariable %_ptr_Input_mat3v3float Input
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+ %fail_color = OpVariable %_ptr_Function_v4float Function
+               OpStore %out_color %12
+               OpStore %fail_color %15
+         %23 = OpAccessChain %_ptr_Input_v3float %m1 %int_0
+         %24 = OpLoad %v3float %23
+         %31 = OpFOrdNotEqual %v3bool %24 %28
+         %32 = OpAny %bool %31
+               OpSelectionMerge %34 None
+               OpBranchConditional %32 %33 %34
+         %33 = OpLabel
+         %35 = OpLoad %v4float %fail_color
+               OpStore %out_color %35
+               OpBranch %34
+         %34 = OpLabel
+         %37 = OpAccessChain %_ptr_Input_v3float %m1 %int_1
+         %38 = OpLoad %v3float %37
+         %43 = OpFOrdNotEqual %v3bool %38 %42
+         %44 = OpAny %bool %43
+               OpSelectionMerge %46 None
+               OpBranchConditional %44 %45 %46
+         %45 = OpLabel
+         %47 = OpLoad %v4float %fail_color
+               OpStore %out_color %47
+               OpBranch %46
+         %46 = OpLabel
+         %49 = OpAccessChain %_ptr_Input_v3float %m1 %int_2
+         %50 = OpLoad %v3float %49
+         %55 = OpFOrdNotEqual %v3bool %50 %54
+         %56 = OpAny %bool %55
+               OpSelectionMerge %58 None
+               OpBranchConditional %56 %57 %58
+         %57 = OpLabel
+         %59 = OpLoad %v4float %fail_color
+               OpStore %out_color %59
+               OpBranch %58
+         %58 = OpLabel
+         %61 = OpAccessChain %_ptr_Input_v3float %m2 %int_2
+         %62 = OpLoad %v3float %61
+         %63 = OpFOrdNotEqual %v3bool %62 %28
+         %64 = OpAny %bool %63
+               OpSelectionMerge %66 None
+               OpBranchConditional %64 %65 %66
+         %65 = OpLabel
+         %67 = OpLoad %v4float %fail_color
+               OpStore %out_color %67
+               OpBranch %66
+         %66 = OpLabel
+         %68 = OpAccessChain %_ptr_Input_v3float %m2 %int_1
+         %69 = OpLoad %v3float %68
+         %70 = OpFOrdNotEqual %v3bool %69 %42
+         %71 = OpAny %bool %70
+               OpSelectionMerge %73 None
+               OpBranchConditional %71 %72 %73
+         %72 = OpLabel
+         %74 = OpLoad %v4float %fail_color
+               OpStore %out_color %74
+               OpBranch %73
+         %73 = OpLabel
+         %75 = OpAccessChain %_ptr_Input_v3float %m2 %int_0
+         %76 = OpLoad %v3float %75
+         %77 = OpFOrdNotEqual %v3bool %76 %54
+         %78 = OpAny %bool %77
+               OpSelectionMerge %80 None
+               OpBranchConditional %78 %79 %80
+         %79 = OpLabel
+         %81 = OpLoad %v4float %fail_color
+               OpStore %out_color %81
+               OpBranch %80
+         %80 = OpLabel
+               OpReturn
+               OpFunctionEnd
+
+[fragment shader]
+#version 450 core
+
+layout(location = 0) in mat3 m1;
+layout(location = 3) in mat3 m2;
+layout(location = 0) out vec4 out_color;
+
+void main()
+{
+	out_color = vec4(0.0, 1.0, 0.0, 1.0);
+	vec4 fail_color = vec4(1.0, 0.0, 0.0, 1.0);
+
+	if (m1[0] != vec3(20530.7108263, -10508.5105669, -23051.9953613))
+	   out_color = fail_color;
+
+	if (m1[1] != vec3(-23564.0673228, -27681.288716, 9081.78673991))
+	   out_color = fail_color;
+
+	if (m1[2] != vec3(-12496.1967803, -5854.8105745, 5217.75729))
+	   out_color = fail_color;
+
+	if (m2[2] != vec3(20530.7108263, -10508.5105669, -23051.9953613))
+	   out_color = fail_color;
+
+	if (m2[1] != vec3(-23564.0673228, -27681.288716, 9081.78673991))
+	   out_color = fail_color;
+
+	if (m2[0] != vec3(-12496.1967803, -5854.8105745, 5217.75729))
+	   out_color = fail_color;
+
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_gl_spirv/execution/varying/mat/mat4.shader_test b/tests/spec/arb_gl_spirv/execution/varying/mat/mat4.shader_test
new file mode 100644
index 000000000..58e0b0ef0
--- /dev/null
+++ b/tests/spec/arb_gl_spirv/execution/varying/mat/mat4.shader_test
@@ -0,0 +1,358 @@
+[require]
+SPIRV YES
+GL >= 4.5
+GLSL >= 4.50
+GL_ARB_gl_spirv
+
+[vertex shader spirv]
+; Automatically generated from the GLSL by gen_gl_spirv_tests.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 105
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %main "main" %_ %piglit_vertex %m1 %m2 %gl_VertexID %gl_InstanceID
+               OpSource GLSL 450
+               OpName %_ ""
+               OpMemberDecorate %gl_PerVertex 0 BuiltIn Position
+               OpMemberDecorate %gl_PerVertex 1 BuiltIn PointSize
+               OpMemberDecorate %gl_PerVertex 2 BuiltIn ClipDistance
+               OpMemberDecorate %gl_PerVertex 3 BuiltIn CullDistance
+               OpDecorate %gl_PerVertex Block
+               OpDecorate %piglit_vertex Location 0
+               OpDecorate %m1 Location 0
+               OpDecorate %m2 Location 4
+               OpDecorate %gl_VertexID BuiltIn VertexId
+               OpDecorate %gl_InstanceID BuiltIn InstanceId
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_arr_float_uint_1 = OpTypeArray %float %uint_1
+%gl_PerVertex = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
+%_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex
+          %_ = OpVariable %_ptr_Output_gl_PerVertex Output
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Input_v4float = OpTypePointer Input %v4float
+%piglit_vertex = OpVariable %_ptr_Input_v4float Input
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+%float_29616_166 = OpConstant %float 29616.166
+%float_n21563_2676 = OpConstant %float -21563.2676
+%float_n3274_39771 = OpConstant %float -3274.39771
+%float_n7391_61914 = OpConstant %float -7391.61914
+         %27 = OpConstantComposite %v4float %float_29616_166 %float_n21563_2676 %float_n3274_39771 %float_n7391_61914
+%float_29371_457 = OpConstant %float 29371.457
+%float_7793_47266 = OpConstant %float 7793.47266
+%float_n20661_791 = OpConstant %float -20661.791
+%float_n26402_4414 = OpConstant %float -26402.4414
+         %33 = OpConstantComposite %v4float %float_29371_457 %float_7793_47266 %float_n20661_791 %float_n26402_4414
+%float_11556_8564 = OpConstant %float 11556.8564
+%float_20357_9199 = OpConstant %float 20357.9199
+%float_15432_0186 = OpConstant %float 15432.0186
+%float_17385_4688 = OpConstant %float 17385.4688
+         %39 = OpConstantComposite %v4float %float_11556_8564 %float_20357_9199 %float_15432_0186 %float_17385_4688
+%float_16690_9727 = OpConstant %float 16690.9727
+%float_n30557_1582 = OpConstant %float -30557.1582
+%float_n16199_5928 = OpConstant %float -16199.5928
+%float_2088_69482 = OpConstant %float 2088.69482
+         %45 = OpConstantComposite %v4float %float_16690_9727 %float_n30557_1582 %float_n16199_5928 %float_2088_69482
+%mat4v4float = OpTypeMatrix %v4float 4
+%_ptr_Output_mat4v4float = OpTypePointer Output %mat4v4float
+         %m1 = OpVariable %_ptr_Output_mat4v4float Output
+    %float_1 = OpConstant %float 1
+    %float_0 = OpConstant %float 0
+         %m2 = OpVariable %_ptr_Output_mat4v4float Output
+%_ptr_Input_int = OpTypePointer Input %int
+%gl_VertexID = OpVariable %_ptr_Input_int Input
+%gl_InstanceID = OpVariable %_ptr_Input_int Input
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+         %v1 = OpVariable %_ptr_Function_v4float Function
+         %v2 = OpVariable %_ptr_Function_v4float Function
+         %v3 = OpVariable %_ptr_Function_v4float Function
+         %v4 = OpVariable %_ptr_Function_v4float Function
+         %18 = OpLoad %v4float %piglit_vertex
+         %20 = OpAccessChain %_ptr_Output_v4float %_ %int_0
+               OpStore %20 %18
+               OpStore %v1 %27
+               OpStore %v2 %33
+               OpStore %v3 %39
+               OpStore %v4 %45
+         %49 = OpLoad %v4float %v1
+         %50 = OpLoad %v4float %v2
+         %51 = OpLoad %v4float %v3
+         %52 = OpLoad %v4float %v4
+         %55 = OpCompositeExtract %float %49 0
+         %56 = OpCompositeExtract %float %49 1
+         %57 = OpCompositeExtract %float %49 2
+         %58 = OpCompositeExtract %float %49 3
+         %59 = OpCompositeExtract %float %50 0
+         %60 = OpCompositeExtract %float %50 1
+         %61 = OpCompositeExtract %float %50 2
+         %62 = OpCompositeExtract %float %50 3
+         %63 = OpCompositeExtract %float %51 0
+         %64 = OpCompositeExtract %float %51 1
+         %65 = OpCompositeExtract %float %51 2
+         %66 = OpCompositeExtract %float %51 3
+         %67 = OpCompositeExtract %float %52 0
+         %68 = OpCompositeExtract %float %52 1
+         %69 = OpCompositeExtract %float %52 2
+         %70 = OpCompositeExtract %float %52 3
+         %71 = OpCompositeConstruct %v4float %55 %56 %57 %58
+         %72 = OpCompositeConstruct %v4float %59 %60 %61 %62
+         %73 = OpCompositeConstruct %v4float %63 %64 %65 %66
+         %74 = OpCompositeConstruct %v4float %67 %68 %69 %70
+         %75 = OpCompositeConstruct %mat4v4float %71 %72 %73 %74
+               OpStore %m1 %75
+         %77 = OpLoad %v4float %v4
+         %78 = OpLoad %v4float %v3
+         %79 = OpLoad %v4float %v2
+         %80 = OpLoad %v4float %v1
+         %81 = OpCompositeExtract %float %77 0
+         %82 = OpCompositeExtract %float %77 1
+         %83 = OpCompositeExtract %float %77 2
+         %84 = OpCompositeExtract %float %77 3
+         %85 = OpCompositeExtract %float %78 0
+         %86 = OpCompositeExtract %float %78 1
+         %87 = OpCompositeExtract %float %78 2
+         %88 = OpCompositeExtract %float %78 3
+         %89 = OpCompositeExtract %float %79 0
+         %90 = OpCompositeExtract %float %79 1
+         %91 = OpCompositeExtract %float %79 2
+         %92 = OpCompositeExtract %float %79 3
+         %93 = OpCompositeExtract %float %80 0
+         %94 = OpCompositeExtract %float %80 1
+         %95 = OpCompositeExtract %float %80 2
+         %96 = OpCompositeExtract %float %80 3
+         %97 = OpCompositeConstruct %v4float %81 %82 %83 %84
+         %98 = OpCompositeConstruct %v4float %85 %86 %87 %88
+         %99 = OpCompositeConstruct %v4float %89 %90 %91 %92
+        %100 = OpCompositeConstruct %v4float %93 %94 %95 %96
+        %101 = OpCompositeConstruct %mat4v4float %97 %98 %99 %100
+               OpStore %m2 %101
+               OpReturn
+               OpFunctionEnd
+
+[vertex shader]
+#version 450 core
+
+layout(location = 0) in vec4 piglit_vertex;
+layout(location = 0) out mat4 m1;
+layout(location = 4) out mat4 m2;
+
+void main()
+{
+	gl_Position = piglit_vertex;
+
+	vec4 v1 = vec4(29616.166598, -21563.2666972, -3274.39775692, -7391.61915007);
+	vec4 v2 = vec4(29371.4563058, 7793.47278553, -20661.7912871, -26402.4415351);
+	vec4 v3 = vec4(11556.8560616, 20357.9190661, 15432.018204, 17385.4694591);
+	vec4 v4 = vec4(16690.9719539, -30557.1591211, -16199.592401, 2088.69494163);
+
+	m1 = mat4(v1, v2, v3, v4);
+	m2 = mat4(v4, v3, v2, v1);
+}
+
+[fragment shader spirv]
+; Automatically generated from the GLSL by gen_gl_spirv_tests.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 104
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %main "main" %out_color %m1 %m2
+               OpExecutionMode %main OriginLowerLeft
+               OpSource GLSL 450
+               OpDecorate %out_color Location 0
+               OpDecorate %m1 Location 0
+               OpDecorate %m2 Location 4
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+  %out_color = OpVariable %_ptr_Output_v4float Output
+    %float_0 = OpConstant %float 0
+    %float_1 = OpConstant %float 1
+         %12 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+         %15 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+%mat4v4float = OpTypeMatrix %v4float 4
+%_ptr_Input_mat4v4float = OpTypePointer Input %mat4v4float
+         %m1 = OpVariable %_ptr_Input_mat4v4float Input
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Input_v4float = OpTypePointer Input %v4float
+%float_29616_166 = OpConstant %float 29616.166
+%float_n21563_2676 = OpConstant %float -21563.2676
+%float_n3274_39771 = OpConstant %float -3274.39771
+%float_n7391_61914 = OpConstant %float -7391.61914
+         %28 = OpConstantComposite %v4float %float_29616_166 %float_n21563_2676 %float_n3274_39771 %float_n7391_61914
+       %bool = OpTypeBool
+     %v4bool = OpTypeVector %bool 4
+      %int_1 = OpConstant %int 1
+%float_29371_457 = OpConstant %float 29371.457
+%float_7793_47266 = OpConstant %float 7793.47266
+%float_n20661_791 = OpConstant %float -20661.791
+%float_n26402_4414 = OpConstant %float -26402.4414
+         %43 = OpConstantComposite %v4float %float_29371_457 %float_7793_47266 %float_n20661_791 %float_n26402_4414
+      %int_2 = OpConstant %int 2
+%float_11556_8564 = OpConstant %float 11556.8564
+%float_20357_9199 = OpConstant %float 20357.9199
+%float_15432_0186 = OpConstant %float 15432.0186
+%float_17385_4688 = OpConstant %float 17385.4688
+         %56 = OpConstantComposite %v4float %float_11556_8564 %float_20357_9199 %float_15432_0186 %float_17385_4688
+      %int_3 = OpConstant %int 3
+%float_16690_9727 = OpConstant %float 16690.9727
+%float_n30557_1582 = OpConstant %float -30557.1582
+%float_n16199_5928 = OpConstant %float -16199.5928
+%float_2088_69482 = OpConstant %float 2088.69482
+         %69 = OpConstantComposite %v4float %float_16690_9727 %float_n30557_1582 %float_n16199_5928 %float_2088_69482
+         %m2 = OpVariable %_ptr_Input_mat4v4float Input
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+ %fail_color = OpVariable %_ptr_Function_v4float Function
+               OpStore %out_color %12
+               OpStore %fail_color %15
+         %22 = OpAccessChain %_ptr_Input_v4float %m1 %int_0
+         %23 = OpLoad %v4float %22
+         %31 = OpFOrdNotEqual %v4bool %23 %28
+         %32 = OpAny %bool %31
+               OpSelectionMerge %34 None
+               OpBranchConditional %32 %33 %34
+         %33 = OpLabel
+         %35 = OpLoad %v4float %fail_color
+               OpStore %out_color %35
+               OpBranch %34
+         %34 = OpLabel
+         %37 = OpAccessChain %_ptr_Input_v4float %m1 %int_1
+         %38 = OpLoad %v4float %37
+         %44 = OpFOrdNotEqual %v4bool %38 %43
+         %45 = OpAny %bool %44
+               OpSelectionMerge %47 None
+               OpBranchConditional %45 %46 %47
+         %46 = OpLabel
+         %48 = OpLoad %v4float %fail_color
+               OpStore %out_color %48
+               OpBranch %47
+         %47 = OpLabel
+         %50 = OpAccessChain %_ptr_Input_v4float %m1 %int_2
+         %51 = OpLoad %v4float %50
+         %57 = OpFOrdNotEqual %v4bool %51 %56
+         %58 = OpAny %bool %57
+               OpSelectionMerge %60 None
+               OpBranchConditional %58 %59 %60
+         %59 = OpLabel
+         %61 = OpLoad %v4float %fail_color
+               OpStore %out_color %61
+               OpBranch %60
+         %60 = OpLabel
+         %63 = OpAccessChain %_ptr_Input_v4float %m1 %int_3
+         %64 = OpLoad %v4float %63
+         %70 = OpFOrdNotEqual %v4bool %64 %69
+         %71 = OpAny %bool %70
+               OpSelectionMerge %73 None
+               OpBranchConditional %71 %72 %73
+         %72 = OpLabel
+         %74 = OpLoad %v4float %fail_color
+               OpStore %out_color %74
+               OpBranch %73
+         %73 = OpLabel
+         %76 = OpAccessChain %_ptr_Input_v4float %m2 %int_3
+         %77 = OpLoad %v4float %76
+         %78 = OpFOrdNotEqual %v4bool %77 %28
+         %79 = OpAny %bool %78
+               OpSelectionMerge %81 None
+               OpBranchConditional %79 %80 %81
+         %80 = OpLabel
+         %82 = OpLoad %v4float %fail_color
+               OpStore %out_color %82
+               OpBranch %81
+         %81 = OpLabel
+         %83 = OpAccessChain %_ptr_Input_v4float %m2 %int_2
+         %84 = OpLoad %v4float %83
+         %85 = OpFOrdNotEqual %v4bool %84 %43
+         %86 = OpAny %bool %85
+               OpSelectionMerge %88 None
+               OpBranchConditional %86 %87 %88
+         %87 = OpLabel
+         %89 = OpLoad %v4float %fail_color
+               OpStore %out_color %89
+               OpBranch %88
+         %88 = OpLabel
+         %90 = OpAccessChain %_ptr_Input_v4float %m2 %int_1
+         %91 = OpLoad %v4float %90
+         %92 = OpFOrdNotEqual %v4bool %91 %56
+         %93 = OpAny %bool %92
+               OpSelectionMerge %95 None
+               OpBranchConditional %93 %94 %95
+         %94 = OpLabel
+         %96 = OpLoad %v4float %fail_color
+               OpStore %out_color %96
+               OpBranch %95
+         %95 = OpLabel
+         %97 = OpAccessChain %_ptr_Input_v4float %m2 %int_0
+         %98 = OpLoad %v4float %97
+         %99 = OpFOrdNotEqual %v4bool %98 %69
+        %100 = OpAny %bool %99
+               OpSelectionMerge %102 None
+               OpBranchConditional %100 %101 %102
+        %101 = OpLabel
+        %103 = OpLoad %v4float %fail_color
+               OpStore %out_color %103
+               OpBranch %102
+        %102 = OpLabel
+               OpReturn
+               OpFunctionEnd
+
+[fragment shader]
+#version 450 core
+
+layout(location = 0) in mat4 m1;
+layout(location = 4) in mat4 m2;
+layout(location = 0) out vec4 out_color;
+
+void main()
+{
+	out_color = vec4(0.0, 1.0, 0.0, 1.0);
+	vec4 fail_color = vec4(1.0, 0.0, 0.0, 1.0);
+
+	if (m1[0] != vec4(29616.166598, -21563.2666972, -3274.39775692, -7391.61915007))
+	   out_color = fail_color;
+
+	if (m1[1] != vec4(29371.4563058, 7793.47278553, -20661.7912871, -26402.4415351))
+	   out_color = fail_color;
+
+	if (m1[2] != vec4(11556.8560616, 20357.9190661, 15432.018204, 17385.4694591))
+	   out_color = fail_color;
+
+	if (m1[3] != vec4(16690.9719539, -30557.1591211, -16199.592401, 2088.69494163))
+	   out_color = fail_color;
+
+	if (m2[3] != vec4(29616.166598, -21563.2666972, -3274.39775692, -7391.61915007))
+	   out_color = fail_color;
+
+	if (m2[2] != vec4(29371.4563058, 7793.47278553, -20661.7912871, -26402.4415351))
+	   out_color = fail_color;
+
+	if (m2[1] != vec4(11556.8560616, 20357.9190661, 15432.018204, 17385.4694591))
+	   out_color = fail_color;
+
+	if (m2[0] != vec4(16690.9719539, -30557.1591211, -16199.592401, 2088.69494163))
+	   out_color = fail_color;
+
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
-- 
2.19.1



More information about the Piglit mailing list