[22/63] arb_gl_spirv: Add ARB_program_interface_query tests

Submitted by apinheiro on Feb. 23, 2019, 11:45 p.m.

Details

Message ID 20190223234551.21111-23-apinheiro@igalia.com
State New
Headers show
Series "ARB_gl_spirv full series" ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

apinheiro Feb. 23, 2019, 11:45 p.m.
From: Antia Puentes <apuentes@igalia.com>

Added tests to check that the ARB_program_interface_query queries
involving names behave as described in the ARB_gl_spirv extension.

The SPIR-V used do not contain names. As names are optional in SPIR-V
this is useful to test the behaviour of the name related queries when
no name reflection is available.

Adds also tests to check that the queries not involving names work as
normally, as defined in the ARB_gl_spirv_extension specification.
---
 .../aggregate-types-name-queries.shader_test  | 225 +++++++++++++
 .../aggregate-types-other-queries.shader_test | 309 ++++++++++++++++++
 .../atomic-counter-other-queries.shader_test  | 286 ++++++++++++++++
 .../simple-types-name-queries.shader_test     | 242 ++++++++++++++
 .../simple-types-other-queries.shader_test    | 297 +++++++++++++++++
 .../ubo-matrices-other-queries.shader_test    | 175 ++++++++++
 ...o-nested-structs-other-queries.shader_test | 232 +++++++++++++
 7 files changed, 1766 insertions(+)
 create mode 100644 tests/spec/arb_gl_spirv/execution/queries/program-interface/aggregate-types-name-queries.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/queries/program-interface/aggregate-types-other-queries.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/queries/program-interface/atomic-counter-other-queries.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/queries/program-interface/simple-types-name-queries.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/queries/program-interface/simple-types-other-queries.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/queries/program-interface/ubo-matrices-other-queries.shader_test
 create mode 100644 tests/spec/arb_gl_spirv/execution/queries/program-interface/ubo-nested-structs-other-queries.shader_test

Patch hide | download patch | download mbox

diff --git a/tests/spec/arb_gl_spirv/execution/queries/program-interface/aggregate-types-name-queries.shader_test b/tests/spec/arb_gl_spirv/execution/queries/program-interface/aggregate-types-name-queries.shader_test
new file mode 100644
index 000000000..10e1577c4
--- /dev/null
+++ b/tests/spec/arb_gl_spirv/execution/queries/program-interface/aggregate-types-name-queries.shader_test
@@ -0,0 +1,225 @@ 
+# Tests the program interface queries related with names over aggregate
+# types (arrays, structs, arrays of arrays) in shaders constructed from
+# SPIR-V binaries where no name reflection information is available.
+#
+# ATOMIC_COUNTER_BUFFER interface is excluded, since active atomic
+# counter buffer resources are not assigned name strings
+# (ARB_program_interface_query) so that interface is not an allowed argument in
+# such queries.
+#
+# Queries which accept 'name' as parameter like GetProgramResourceIndex,
+# GetProgramResourceLocation and GetProgramResourceLocationIndex are tested in
+# another file.
+#
+# ARB_gl_spirv:
+#
+# 22. How do the program interface query APIs work when no name reflection
+#     information is available?
+#
+#    RESOLVED: The following naturally follows from the specification:
+#
+#    GetProgramInterfaceiv(.., pname=MAX_NAME_LENGTH, ..) -> params = 1
+#    ...
+#    GetProgramResourceName(.., length, name) -> length=0, name = ""
+#    GetProgramResourceiv(.., props=NAME_LENGTH, ..) -> params = 1
+#    ...
+
+[require]
+SPIRV ONLY
+GL >= 3.3
+GLSL >= 4.50
+GL_ARB_gl_spirv
+
+[vertex shader passthrough]
+
+[fragment shader spirv]
+; Automatically generated from the GLSL by shader_test_spirv.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 Fragment %main "main" %outColor
+               OpExecutionMode %main OriginLowerLeft
+               OpSource GLSL 450
+               OpDecorate %outColor Location 0
+               OpDecorate %u Location 1
+               OpDecorate %u DescriptorSet 0
+               OpDecorate %u Binding 1
+               OpDecorate %_arr_v4float_uint_2 ArrayStride 16
+               OpDecorate %_arr__arr_v4float_uint_2_uint_3 ArrayStride 32
+               OpDecorate %_arr__arr__arr_v4float_uint_2_uint_3_uint_2 ArrayStride 96
+               OpDecorate %_arr_v4float_uint_2_0 ArrayStride 16
+               OpDecorate %_arr__arr_v4float_uint_2_0_uint_2 ArrayStride 32
+               OpMemberDecorate %ComponentsBlock 0 Offset 0
+               OpMemberDecorate %ComponentsBlock 1 Offset 192
+               OpDecorate %ComponentsBlock Block
+               OpDecorate %components DescriptorSet 0
+               OpDecorate %components Binding 5
+               OpMemberDecorate %parts_0 0 Offset 0
+               OpMemberDecorate %parts_0 1 Offset 16
+               OpMemberDecorate %SSBOComponentsBlock 0 Offset 0
+               OpDecorate %SSBOComponentsBlock BufferBlock
+               OpDecorate %ssbo_components DescriptorSet 0
+               OpDecorate %ssbo_components Binding 0
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+   %outColor = OpVariable %_ptr_Output_v4float Output
+      %parts = OpTypeStruct %v4float %v4float
+%_ptr_UniformConstant_parts = OpTypePointer UniformConstant %parts
+          %u = OpVariable %_ptr_UniformConstant_parts UniformConstant
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_UniformConstant_v4float = OpTypePointer UniformConstant %v4float
+       %uint = OpTypeInt 32 0
+     %uint_2 = OpConstant %uint 2
+%_arr_v4float_uint_2 = OpTypeArray %v4float %uint_2
+     %uint_3 = OpConstant %uint 3
+%_arr__arr_v4float_uint_2_uint_3 = OpTypeArray %_arr_v4float_uint_2 %uint_3
+%_arr__arr__arr_v4float_uint_2_uint_3_uint_2 = OpTypeArray %_arr__arr_v4float_uint_2_uint_3 %uint_2
+%_arr_v4float_uint_2_0 = OpTypeArray %v4float %uint_2
+%_arr__arr_v4float_uint_2_0_uint_2 = OpTypeArray %_arr_v4float_uint_2_0 %uint_2
+%ComponentsBlock = OpTypeStruct %_arr__arr__arr_v4float_uint_2_uint_3_uint_2 %_arr__arr_v4float_uint_2_0_uint_2
+%_arr_ComponentsBlock_uint_2 = OpTypeArray %ComponentsBlock %uint_2
+%_ptr_Uniform__arr_ComponentsBlock_uint_2 = OpTypePointer Uniform %_arr_ComponentsBlock_uint_2
+ %components = OpVariable %_ptr_Uniform__arr_ComponentsBlock_uint_2 Uniform
+      %int_1 = OpConstant %int 1
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+    %parts_0 = OpTypeStruct %v4float %v4float
+%SSBOComponentsBlock = OpTypeStruct %parts_0
+%_ptr_Uniform_SSBOComponentsBlock = OpTypePointer Uniform %SSBOComponentsBlock
+%ssbo_components = OpVariable %_ptr_Uniform_SSBOComponentsBlock Uniform
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+         %16 = OpAccessChain %_ptr_UniformConstant_v4float %u %int_0
+         %17 = OpLoad %v4float %16
+         %32 = OpAccessChain %_ptr_Uniform_v4float %components %int_0 %int_0 %int_1 %int_1 %int_1
+         %33 = OpLoad %v4float %32
+         %34 = OpFAdd %v4float %17 %33
+         %35 = OpAccessChain %_ptr_Uniform_v4float %components %int_0 %int_1 %int_1 %int_1
+         %36 = OpLoad %v4float %35
+         %37 = OpFAdd %v4float %34 %36
+         %42 = OpAccessChain %_ptr_Uniform_v4float %ssbo_components %int_0 %int_1
+         %43 = OpLoad %v4float %42
+         %44 = OpFAdd %v4float %37 %43
+               OpStore %outColor %44
+               OpReturn
+               OpFunctionEnd
+
+[fragment shader]
+#version 450
+
+struct parts {
+        vec4 u1;
+        vec4 u2;
+};
+
+layout (location = 1) uniform parts u;
+
+layout (location = 0) out vec4 outColor;
+
+layout (binding = 5, std140) uniform ComponentsBlock
+ {
+    vec4 c1[2][3][2];
+    vec4 c2[2][2];
+ } components[2];
+
+layout (binding = 0) buffer SSBOComponentsBlock
+ {
+    parts s1;
+ } ssbo_components;
+
+void main()
+{
+    outColor = u.u1 +
+               components[0].c1[1][1][1] +
+               components[0].c2[1][1] +
+	       ssbo_components.s1.u2;
+}
+
+[test]
+clear color 1.0 0.0 0.0 0.0
+clear
+
+# Initialization --
+
+# ComponentsBlock
+block binding 5
+block array index 0
+block offset 144
+uniform vec4 ComponentsBlock.c1[1][1][1] 0.1 0.2 0.3 0.4
+block offset 240
+uniform vec4 ComponentsBlock.c2[1][1] 0.1 0.2 0.0 0.0
+
+# u
+uniform vec4 1 0.0 0.1 0.3 0.0
+uniform vec4 2 0.0 0.0 0.0 0.0
+
+# SSBOComponentsBlock
+block binding 0
+ssbo 0 32
+# u2
+ssbo 0 subdata float 16 0.0
+ssbo 0 subdata float 20 0.0
+ssbo 0 subdata float 24 0.1
+ssbo 0 subdata float 28 0.0
+
+# Queries --
+
+# - GetProgramInterfaceiv(.., pname=MAX_NAME_LENGTH, ..) -> params = 1
+
+verify program_interface_query interface GL_PROGRAM_INPUT        GL_MAX_NAME_LENGTH 1
+verify program_interface_query interface GL_PROGRAM_OUTPUT       GL_MAX_NAME_LENGTH 1
+verify program_interface_query interface GL_UNIFORM_BLOCK        GL_MAX_NAME_LENGTH 1
+verify program_interface_query interface GL_SHADER_STORAGE_BLOCK GL_MAX_NAME_LENGTH 1
+verify program_interface_query interface GL_UNIFORM              GL_MAX_NAME_LENGTH 1
+verify program_interface_query interface GL_BUFFER_VARIABLE      GL_MAX_NAME_LENGTH 1
+
+# - GetProgramResourceName(.., length, name) -> length=0, name = ""
+
+verify program_interface_query resourceName GL_PROGRAM_INPUT        (0 0)   0 ""
+verify program_interface_query resourceName GL_PROGRAM_OUTPUT       (0 0)   0 ""
+verify program_interface_query resourceName GL_UNIFORM_BLOCK        (5)     0 ""
+verify program_interface_query resourceName GL_UNIFORM_BLOCK        (6)     0 ""
+verify program_interface_query resourceName GL_SHADER_STORAGE_BLOCK (0)     0 ""
+verify program_interface_query resourceName GL_UNIFORM              (var 1) 0 ""
+verify program_interface_query resourceName GL_UNIFORM              (var 2) 0 ""
+verify program_interface_query resourceName GL_UNIFORM              (5 0)   0 ""
+verify program_interface_query resourceName GL_UNIFORM              (5 32)  0 ""
+verify program_interface_query resourceName GL_UNIFORM              (5 64)  0 ""
+verify program_interface_query resourceName GL_UNIFORM              (5 96)  0 ""
+verify program_interface_query resourceName GL_UNIFORM              (5 128) 0 ""
+verify program_interface_query resourceName GL_UNIFORM              (5 160) 0 ""
+verify program_interface_query resourceName GL_UNIFORM              (5 192) 0 ""
+verify program_interface_query resourceName GL_UNIFORM              (5 224) 0 ""
+verify program_interface_query resourceName GL_BUFFER_VARIABLE      (0 0)   0 ""
+verify program_interface_query resourceName GL_BUFFER_VARIABLE      (0 16)  0 ""
+
+# - GetProgramResourceiv(.., props=NAME_LENGTH, ..) -> params = 1
+
+verify program_interface_query resourceByData GL_PROGRAM_INPUT        (0 0)   GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT       (0 0)   GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK        (5)     GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK        (6)     GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_SHADER_STORAGE_BLOCK (0)     GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_UNIFORM              (var 1) GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_UNIFORM              (var 2) GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_UNIFORM              (5 0)   GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_UNIFORM              (5 32)  GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_UNIFORM              (5 64)  GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_UNIFORM              (5 96)  GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_UNIFORM              (5 128) GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_UNIFORM              (5 160) GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_UNIFORM              (5 192) GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_UNIFORM              (5 224) GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE      (0 0)   GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE      (0 16)  GL_NAME_LENGTH 1
+
+draw rect -1 -1 2 2
+probe all rgba 0.2 0.5 0.7 0.4
diff --git a/tests/spec/arb_gl_spirv/execution/queries/program-interface/aggregate-types-other-queries.shader_test b/tests/spec/arb_gl_spirv/execution/queries/program-interface/aggregate-types-other-queries.shader_test
new file mode 100644
index 000000000..c064f8d28
--- /dev/null
+++ b/tests/spec/arb_gl_spirv/execution/queries/program-interface/aggregate-types-other-queries.shader_test
@@ -0,0 +1,309 @@ 
+# Tests the program interface queries not related with names over
+# aggregate types (arrays, structs, arrays of arrays) in shaders
+# constructed from SPIR-V binaries where no name reflection information
+# is available.
+#
+# ARB_gl_spirv:
+#
+# 19. How should the program interface query operations behave for program
+#    objects created from SPIR-V shaders?
+#
+#   C) Allow as much as possible to work "naturally". You can query for
+#   the number of active resources, and for details about them. Anything
+#   that doesn't query by name will work as expected... If everything
+#   is specified a-priori by location/binding/offset/index/component
+#   in the shader, this may be sufficient.
+#
+#   RESOLVED.  Pick (c), but also allow debug names to be returned if an
+#   implementation wants to.
+
+[require]
+SPIRV ONLY
+GL >= 3.3
+GLSL >= 4.50
+GL_ARB_gl_spirv
+
+[vertex shader passthrough]
+
+[fragment shader spirv]
+; Automatically generated from the GLSL by shader_test_spirv.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 Fragment %main "main" %outColor
+               OpExecutionMode %main OriginLowerLeft
+               OpSource GLSL 450
+               OpDecorate %outColor Location 0
+               OpDecorate %u Location 1
+               OpDecorate %u DescriptorSet 0
+               OpDecorate %u Binding 1
+               OpDecorate %_arr_v4float_uint_2 ArrayStride 16
+               OpDecorate %_arr__arr_v4float_uint_2_uint_3 ArrayStride 32
+               OpDecorate %_arr__arr__arr_v4float_uint_2_uint_3_uint_2 ArrayStride 96
+               OpDecorate %_arr_v4float_uint_2_0 ArrayStride 16
+               OpDecorate %_arr__arr_v4float_uint_2_0_uint_2 ArrayStride 32
+               OpMemberDecorate %ComponentsBlock 0 Offset 0
+               OpMemberDecorate %ComponentsBlock 1 Offset 192
+               OpDecorate %ComponentsBlock Block
+               OpDecorate %components DescriptorSet 0
+               OpDecorate %components Binding 5
+               OpMemberDecorate %parts_0 0 Offset 0
+               OpMemberDecorate %parts_0 1 Offset 16
+               OpMemberDecorate %SSBOComponentsBlock 0 Offset 0
+               OpDecorate %SSBOComponentsBlock BufferBlock
+               OpDecorate %ssbo_components DescriptorSet 0
+               OpDecorate %ssbo_components Binding 0
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+   %outColor = OpVariable %_ptr_Output_v4float Output
+      %parts = OpTypeStruct %v4float %v4float
+%_ptr_UniformConstant_parts = OpTypePointer UniformConstant %parts
+          %u = OpVariable %_ptr_UniformConstant_parts UniformConstant
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_UniformConstant_v4float = OpTypePointer UniformConstant %v4float
+       %uint = OpTypeInt 32 0
+     %uint_2 = OpConstant %uint 2
+%_arr_v4float_uint_2 = OpTypeArray %v4float %uint_2
+     %uint_3 = OpConstant %uint 3
+%_arr__arr_v4float_uint_2_uint_3 = OpTypeArray %_arr_v4float_uint_2 %uint_3
+%_arr__arr__arr_v4float_uint_2_uint_3_uint_2 = OpTypeArray %_arr__arr_v4float_uint_2_uint_3 %uint_2
+%_arr_v4float_uint_2_0 = OpTypeArray %v4float %uint_2
+%_arr__arr_v4float_uint_2_0_uint_2 = OpTypeArray %_arr_v4float_uint_2_0 %uint_2
+%ComponentsBlock = OpTypeStruct %_arr__arr__arr_v4float_uint_2_uint_3_uint_2 %_arr__arr_v4float_uint_2_0_uint_2
+%_arr_ComponentsBlock_uint_2 = OpTypeArray %ComponentsBlock %uint_2
+%_ptr_Uniform__arr_ComponentsBlock_uint_2 = OpTypePointer Uniform %_arr_ComponentsBlock_uint_2
+ %components = OpVariable %_ptr_Uniform__arr_ComponentsBlock_uint_2 Uniform
+      %int_1 = OpConstant %int 1
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+    %parts_0 = OpTypeStruct %v4float %v4float
+%SSBOComponentsBlock = OpTypeStruct %parts_0
+%_ptr_Uniform_SSBOComponentsBlock = OpTypePointer Uniform %SSBOComponentsBlock
+%ssbo_components = OpVariable %_ptr_Uniform_SSBOComponentsBlock Uniform
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+         %16 = OpAccessChain %_ptr_UniformConstant_v4float %u %int_0
+         %17 = OpLoad %v4float %16
+         %32 = OpAccessChain %_ptr_Uniform_v4float %components %int_0 %int_0 %int_1 %int_1 %int_1
+         %33 = OpLoad %v4float %32
+         %34 = OpFAdd %v4float %17 %33
+         %35 = OpAccessChain %_ptr_Uniform_v4float %components %int_1 %int_1 %int_1 %int_1
+         %36 = OpLoad %v4float %35
+         %37 = OpFAdd %v4float %34 %36
+         %42 = OpAccessChain %_ptr_Uniform_v4float %ssbo_components %int_0 %int_1
+         %43 = OpLoad %v4float %42
+         %44 = OpFAdd %v4float %37 %43
+               OpStore %outColor %44
+               OpReturn
+               OpFunctionEnd
+
+[fragment shader]
+#version 450
+
+struct parts {
+        vec4 u1;
+        vec4 u2;
+};
+
+layout (location = 1) uniform parts u;
+
+layout (location = 0) out vec4 outColor;
+
+layout (binding = 5, std140) uniform ComponentsBlock
+ {
+    vec4 c1[2][3][2];
+    vec4 c2[2][2];
+ } components[2];
+
+layout (binding = 0) buffer SSBOComponentsBlock
+ {
+    parts s1;
+ } ssbo_components;
+
+void main()
+{
+    outColor = u.u1 +
+               components[0].c1[1][1][1] +
+               components[1].c2[1][1] +
+	       ssbo_components.s1.u2;
+}
+
+[test]
+clear color 1.0 0.0 0.0 0.0
+clear
+
+# Initialization --
+
+# ComponentsBlock
+block binding 5
+block array index 0
+block offset 144
+uniform vec4 ComponentsBlock.c1[1][1][1] 0.1 0.2 0.3 0.4
+block array index 1
+block offset 240
+uniform vec4 ComponentsBlock.c2[1][1] 0.1 0.2 0.0 0.0
+
+# u
+uniform vec4 1 0.0 0.1 0.3 0.0
+uniform vec4 2 0.0 0.0 0.0 0.0
+
+# SSBOComponentsBlock
+block binding 0
+ssbo 0 32
+# u2
+ssbo 0 subdata float 16 0.0
+ssbo 0 subdata float 20 0.0
+ssbo 0 subdata float 24 0.1
+ssbo 0 subdata float 28 0.0
+
+# Queries --
+
+# - GetProgramInterfaceiv
+
+verify program_interface_query interface GL_PROGRAM_INPUT        GL_ACTIVE_RESOURCES 1
+verify program_interface_query interface GL_PROGRAM_OUTPUT       GL_ACTIVE_RESOURCES 1
+verify program_interface_query interface GL_UNIFORM_BLOCK        GL_ACTIVE_RESOURCES 2
+verify program_interface_query interface GL_SHADER_STORAGE_BLOCK GL_ACTIVE_RESOURCES 1
+verify program_interface_query interface GL_UNIFORM              GL_ACTIVE_RESOURCES 10
+verify program_interface_query interface GL_BUFFER_VARIABLE      GL_ACTIVE_RESOURCES 2
+
+verify program_interface_query interface GL_UNIFORM_BLOCK        GL_MAX_NUM_ACTIVE_VARIABLES 8
+verify program_interface_query interface GL_SHADER_STORAGE_BLOCK GL_MAX_NUM_ACTIVE_VARIABLES 2
+
+# - GetProgramResourceiv
+
+# Uniform resource: u.u1
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_TYPE GL_FLOAT_VEC4
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_BLOCK_INDEX -1
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_OFFSET -1
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_ARRAY_SIZE 1
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_ARRAY_STRIDE -1
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_MATRIX_STRIDE -1
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_IS_ROW_MAJOR 0
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_ATOMIC_COUNTER_BUFFER_INDEX -1
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_LOCATION 1
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_REFERENCED_BY_VERTEX_SHADER          0
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_REFERENCED_BY_COMPUTE_SHADER         0
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_REFERENCED_BY_TESS_CONTROL_SHADER    0
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_REFERENCED_BY_GEOMETRY_SHADER        0
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_REFERENCED_BY_FRAGMENT_SHADER        1
+
+# Uniform resource: ComponentsBlock.c1[1][1]
+verify program_interface_query resourceByData GL_UNIFORM (5 128) GL_TYPE GL_FLOAT_VEC4
+verify program_interface_query resourceByData GL_UNIFORM (5 128) GL_ARRAY_SIZE 2
+verify program_interface_query resourceByData GL_UNIFORM (5 128) GL_OFFSET 128
+verify program_interface_query resourceByData GL_UNIFORM (5 128) GL_ARRAY_STRIDE 16
+verify program_interface_query resourceByData GL_UNIFORM (5 128) GL_MATRIX_STRIDE 0
+verify program_interface_query resourceByData GL_UNIFORM (5 128) GL_IS_ROW_MAJOR 0
+verify program_interface_query resourceByData GL_UNIFORM (5 128) GL_ATOMIC_COUNTER_BUFFER_INDEX -1
+verify program_interface_query resourceByData GL_UNIFORM (5 128) GL_LOCATION -1
+verify program_interface_query resourceByData GL_UNIFORM (5 128) GL_REFERENCED_BY_VERTEX_SHADER          0
+verify program_interface_query resourceByData GL_UNIFORM (5 128) GL_REFERENCED_BY_COMPUTE_SHADER         0
+verify program_interface_query resourceByData GL_UNIFORM (5 128) GL_REFERENCED_BY_TESS_CONTROL_SHADER    0
+verify program_interface_query resourceByData GL_UNIFORM (5 128) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (5 128) GL_REFERENCED_BY_GEOMETRY_SHADER        0
+verify program_interface_query resourceByData GL_UNIFORM (5 128) GL_REFERENCED_BY_FRAGMENT_SHADER        1
+
+# Uniform resource: ComponentsBlock.c2[1]
+verify program_interface_query resourceByData GL_UNIFORM (5 224) GL_TYPE GL_FLOAT_VEC4
+verify program_interface_query resourceByData GL_UNIFORM (5 224) GL_ARRAY_SIZE 2
+verify program_interface_query resourceByData GL_UNIFORM (5 224) GL_OFFSET 224
+verify program_interface_query resourceByData GL_UNIFORM (5 224) GL_ARRAY_STRIDE 16
+verify program_interface_query resourceByData GL_UNIFORM (5 224) GL_MATRIX_STRIDE 0
+verify program_interface_query resourceByData GL_UNIFORM (5 224) GL_IS_ROW_MAJOR 0
+verify program_interface_query resourceByData GL_UNIFORM (5 224) GL_ATOMIC_COUNTER_BUFFER_INDEX -1
+verify program_interface_query resourceByData GL_UNIFORM (5 224) GL_LOCATION -1
+verify program_interface_query resourceByData GL_UNIFORM (5 224) GL_REFERENCED_BY_VERTEX_SHADER          0
+verify program_interface_query resourceByData GL_UNIFORM (5 224) GL_REFERENCED_BY_COMPUTE_SHADER         0
+verify program_interface_query resourceByData GL_UNIFORM (5 224) GL_REFERENCED_BY_TESS_CONTROL_SHADER    0
+verify program_interface_query resourceByData GL_UNIFORM (5 224) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (5 224) GL_REFERENCED_BY_GEOMETRY_SHADER        0
+verify program_interface_query resourceByData GL_UNIFORM (5 224) GL_REFERENCED_BY_FRAGMENT_SHADER        1
+
+# UBO resource: ComponentsBlock[0]
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (5) GL_BUFFER_BINDING       5
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (5) GL_BUFFER_DATA_SIZE     256
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (5) GL_NUM_ACTIVE_VARIABLES 8
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (5) GL_REFERENCED_BY_VERTEX_SHADER          0
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (5) GL_REFERENCED_BY_COMPUTE_SHADER         0
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (5) GL_REFERENCED_BY_TESS_CONTROL_SHADER    0
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (5) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (5) GL_REFERENCED_BY_GEOMETRY_SHADER        0
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (5) GL_REFERENCED_BY_FRAGMENT_SHADER        1
+
+# UBO resource: ComponentsBlock[1]
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (6) GL_BUFFER_BINDING       6
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (6) GL_BUFFER_DATA_SIZE     256
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (6) GL_NUM_ACTIVE_VARIABLES 8
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (6) GL_REFERENCED_BY_VERTEX_SHADER          0
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (6) GL_REFERENCED_BY_COMPUTE_SHADER         0
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (6) GL_REFERENCED_BY_TESS_CONTROL_SHADER    0
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (6) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (6) GL_REFERENCED_BY_GEOMETRY_SHADER        0
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (6) GL_REFERENCED_BY_FRAGMENT_SHADER        1
+
+# Buffer variable resource: SSBOComponentsBlock.s1.u2
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_TYPE GL_FLOAT_VEC4
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_ARRAY_SIZE 1
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_OFFSET 16
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_ARRAY_STRIDE 0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_MATRIX_STRIDE 0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_IS_ROW_MAJOR 0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_REFERENCED_BY_VERTEX_SHADER          0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_REFERENCED_BY_COMPUTE_SHADER         0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_REFERENCED_BY_TESS_CONTROL_SHADER    0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_REFERENCED_BY_GEOMETRY_SHADER        0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_REFERENCED_BY_FRAGMENT_SHADER        1
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_TOP_LEVEL_ARRAY_SIZE   1
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_TOP_LEVEL_ARRAY_STRIDE 0
+
+# SSBO resource: SSBOComponentsBlock
+verify program_interface_query resourceByData GL_SHADER_STORAGE_BLOCK (0) GL_BUFFER_BINDING 0
+verify program_interface_query resourceByData GL_SHADER_STORAGE_BLOCK (0) GL_BUFFER_DATA_SIZE 32
+verify program_interface_query resourceByData GL_SHADER_STORAGE_BLOCK (0) GL_NUM_ACTIVE_VARIABLES 2
+verify program_interface_query resourceByData GL_SHADER_STORAGE_BLOCK (0) GL_REFERENCED_BY_VERTEX_SHADER          0
+verify program_interface_query resourceByData GL_SHADER_STORAGE_BLOCK (0) GL_REFERENCED_BY_COMPUTE_SHADER         0
+verify program_interface_query resourceByData GL_SHADER_STORAGE_BLOCK (0) GL_REFERENCED_BY_TESS_CONTROL_SHADER    0
+verify program_interface_query resourceByData GL_SHADER_STORAGE_BLOCK (0) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_SHADER_STORAGE_BLOCK (0) GL_REFERENCED_BY_GEOMETRY_SHADER        0
+verify program_interface_query resourceByData GL_SHADER_STORAGE_BLOCK (0) GL_REFERENCED_BY_FRAGMENT_SHADER        1
+
+# Input: piglit_vertex
+verify program_interface_query resourceByData GL_PROGRAM_INPUT (0 0) GL_TYPE GL_FLOAT_VEC4
+verify program_interface_query resourceByData GL_PROGRAM_INPUT (0 0) GL_ARRAY_SIZE 1
+verify program_interface_query resourceByData GL_PROGRAM_INPUT (0 0) GL_REFERENCED_BY_VERTEX_SHADER 1
+verify program_interface_query resourceByData GL_PROGRAM_INPUT (0 0) GL_REFERENCED_BY_COMPUTE_SHADER 0
+verify program_interface_query resourceByData GL_PROGRAM_INPUT (0 0) GL_REFERENCED_BY_TESS_CONTROL_SHADER 0
+verify program_interface_query resourceByData GL_PROGRAM_INPUT (0 0) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_PROGRAM_INPUT (0 0) GL_REFERENCED_BY_GEOMETRY_SHADER 0
+verify program_interface_query resourceByData GL_PROGRAM_INPUT (0 0) GL_REFERENCED_BY_FRAGMENT_SHADER 0
+verify program_interface_query resourceByData GL_PROGRAM_INPUT (0 0) GL_LOCATION 0
+verify program_interface_query resourceByData GL_PROGRAM_INPUT (0 0) GL_LOCATION_COMPONENT 0
+verify program_interface_query resourceByData GL_PROGRAM_INPUT (0 0) GL_IS_PER_PATCH 0
+
+# Output: outColor
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_TYPE GL_FLOAT_VEC4
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_ARRAY_SIZE 1
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_REFERENCED_BY_VERTEX_SHADER          0
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_REFERENCED_BY_COMPUTE_SHADER         0
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_REFERENCED_BY_TESS_CONTROL_SHADER    0
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_REFERENCED_BY_GEOMETRY_SHADER        0
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_REFERENCED_BY_FRAGMENT_SHADER        1
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_LOCATION 0
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_LOCATION_COMPONENT 0
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_LOCATION_INDEX 0
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_IS_PER_PATCH 0
+
+draw rect -1 -1 2 2
+probe all rgba 0.2 0.5 0.7 0.4
diff --git a/tests/spec/arb_gl_spirv/execution/queries/program-interface/atomic-counter-other-queries.shader_test b/tests/spec/arb_gl_spirv/execution/queries/program-interface/atomic-counter-other-queries.shader_test
new file mode 100644
index 000000000..fe18cbc6f
--- /dev/null
+++ b/tests/spec/arb_gl_spirv/execution/queries/program-interface/atomic-counter-other-queries.shader_test
@@ -0,0 +1,286 @@ 
+# Tests the program interface ATOMIC_COUNTER_BUFFER and UNIFORM atomic
+# counters in shaders constructed from SPIR-V binaries where no name
+# reflection information is available.
+#
+# Queries related with names are excluded because they are not permitted
+# for the ATOMIC_COUNTER_BUFFER interface.
+#
+# ARB_gl_spirv:
+#
+# 19. How should the program interface query operations behave for program
+#    objects created from SPIR-V shaders?
+#
+#   C) Allow as much as possible to work "naturally". You can query for
+#   the number of active resources, and for details about them. Anything
+#   that doesn't query by name will work as expected... If everything
+#   is specified a-priori by location/binding/offset/index/component
+#   in the shader, this may be sufficient.
+#
+#   RESOLVED.  Pick (c), but also allow debug names to be returned if an
+#   implementation wants to.
+
+[require]
+SPIRV ONLY
+GL >= 3.3
+GLSL >= 4.50
+GL_ARB_gl_spirv
+GL_ARB_shader_atomic_counters
+
+[vertex shader passthrough]
+
+[fragment shader spirv]
+; Automatically generated from the GLSL by shader_test_spirv.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 71
+; Schema: 0
+               OpCapability Shader
+               OpCapability AtomicStorage
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %main "main" %color
+               OpExecutionMode %main OriginLowerLeft
+               OpSource GLSL 450
+               OpSourceExtension "GL_ARB_shader_atomic_counters"
+               OpDecorate %a0 Offset 0
+               OpDecorate %a0 DescriptorSet 0
+               OpDecorate %a0 Binding 0
+               OpDecorate %b0 Offset 0
+               OpDecorate %b0 DescriptorSet 0
+               OpDecorate %b0 Binding 1
+               OpDecorate %b1 Offset 4
+               OpDecorate %b1 DescriptorSet 0
+               OpDecorate %b1 Binding 1
+               OpDecorate %idx Location 3
+               OpDecorate %idx DescriptorSet 0
+               OpDecorate %idx Binding 6
+               OpDecorate %a0_expected Location 0
+               OpDecorate %a0_expected DescriptorSet 0
+               OpDecorate %a0_expected Binding 3
+               OpDecorate %color Location 0
+               OpDecorate %b0_expected Location 1
+               OpDecorate %b0_expected DescriptorSet 0
+               OpDecorate %b0_expected Binding 4
+               OpDecorate %b1_expected Location 2
+               OpDecorate %b1_expected DescriptorSet 0
+               OpDecorate %b1_expected Binding 5
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+%_ptr_Function_uint = OpTypePointer Function %uint
+%_ptr_AtomicCounter_uint = OpTypePointer AtomicCounter %uint
+         %a0 = OpVariable %_ptr_AtomicCounter_uint AtomicCounter
+     %uint_1 = OpConstant %uint 1
+     %uint_0 = OpConstant %uint 0
+         %b0 = OpVariable %_ptr_AtomicCounter_uint AtomicCounter
+     %uint_2 = OpConstant %uint 2
+%_arr_uint_uint_2 = OpTypeArray %uint %uint_2
+%_ptr_AtomicCounter__arr_uint_uint_2 = OpTypePointer AtomicCounter %_arr_uint_uint_2
+         %b1 = OpVariable %_ptr_AtomicCounter__arr_uint_uint_2 AtomicCounter
+%_ptr_UniformConstant_uint = OpTypePointer UniformConstant %uint
+        %idx = OpVariable %_ptr_UniformConstant_uint UniformConstant
+%a0_expected = OpVariable %_ptr_UniformConstant_uint UniformConstant
+       %bool = OpTypeBool
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+      %color = OpVariable %_ptr_Output_v4float Output
+    %float_1 = OpConstant %float 1
+    %float_0 = OpConstant %float 0
+  %float_255 = OpConstant %float 255
+%b0_expected = OpVariable %_ptr_UniformConstant_uint UniformConstant
+%float_0_100000001 = OpConstant %float 0.100000001
+%b1_expected = OpVariable %_ptr_UniformConstant_uint UniformConstant
+%float_0_200000003 = OpConstant %float 0.200000003
+         %70 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+     %old_a0 = OpVariable %_ptr_Function_uint Function
+     %old_b0 = OpVariable %_ptr_Function_uint Function
+     %old_b1 = OpVariable %_ptr_Function_uint Function
+         %13 = OpAtomicIIncrement %uint %a0 %uint_1 %uint_0
+               OpStore %old_a0 %13
+         %16 = OpAtomicIIncrement %uint %b0 %uint_1 %uint_0
+               OpStore %old_b0 %16
+         %24 = OpLoad %uint %idx
+         %25 = OpAccessChain %_ptr_AtomicCounter_uint %b1 %24
+         %26 = OpAtomicIIncrement %uint %25 %uint_1 %uint_0
+               OpStore %old_b1 %26
+         %27 = OpLoad %uint %old_a0
+         %29 = OpLoad %uint %a0_expected
+         %31 = OpINotEqual %bool %27 %29
+               OpSelectionMerge %33 None
+               OpBranchConditional %31 %32 %33
+         %32 = OpLabel
+         %40 = OpLoad %uint %old_a0
+         %41 = OpConvertUToF %float %40
+         %43 = OpFDiv %float %41 %float_255
+         %44 = OpCompositeConstruct %v4float %float_1 %float_0 %43 %float_1
+               OpStore %color %44
+               OpReturn
+         %33 = OpLabel
+         %46 = OpLoad %uint %old_b0
+         %48 = OpLoad %uint %b0_expected
+         %49 = OpINotEqual %bool %46 %48
+               OpSelectionMerge %51 None
+               OpBranchConditional %49 %50 %51
+         %50 = OpLabel
+         %53 = OpLoad %uint %old_b0
+         %54 = OpConvertUToF %float %53
+         %55 = OpFDiv %float %54 %float_255
+         %56 = OpCompositeConstruct %v4float %float_1 %float_0_100000001 %55 %float_1
+               OpStore %color %56
+               OpReturn
+         %51 = OpLabel
+         %58 = OpLoad %uint %old_b1
+         %60 = OpLoad %uint %b1_expected
+         %61 = OpINotEqual %bool %58 %60
+               OpSelectionMerge %63 None
+               OpBranchConditional %61 %62 %63
+         %62 = OpLabel
+         %65 = OpLoad %uint %old_b1
+         %66 = OpConvertUToF %float %65
+         %67 = OpFDiv %float %66 %float_255
+         %68 = OpCompositeConstruct %v4float %float_1 %float_0_200000003 %67 %float_1
+               OpStore %color %68
+               OpReturn
+         %63 = OpLabel
+               OpStore %color %70
+               OpReturn
+               OpFunctionEnd
+
+[fragment shader]
+#version 450
+#extension GL_ARB_shader_atomic_counters: require
+
+layout(binding = 0, offset = 0) uniform atomic_uint a0;
+layout(binding = 1, offset = 0) uniform atomic_uint b0;
+layout(binding = 1, offset = 4) uniform atomic_uint b1[2];
+
+layout(location = 0) uniform uint a0_expected;
+layout(location = 1) uniform uint b0_expected;
+layout(location = 2) uniform uint b1_expected;
+layout(location = 3) uniform uint idx;
+
+out vec4 color;
+
+void main()
+{
+	uint old_a0 = atomicCounterIncrement(a0);
+	uint old_b0 = atomicCounterIncrement(b0);
+	uint old_b1 = atomicCounterIncrement(b1[idx]);
+
+	if (old_a0 != a0_expected) {
+		color = vec4(1.0, 0.0, float(old_a0) / 255.0, 1.0);
+		return;
+	}
+	if (old_b0 != b0_expected) {
+		color = vec4(1.0, 0.1, float(old_b0) / 255.0, 1.0);
+		return;
+	}
+	if (old_b1 != b1_expected) {
+		color = vec4(1.0, 0.2, float(old_b1) / 255.0, 1.0);
+		return;
+	}
+	color = vec4(0.0, 1.0, 0.0, 1.0);
+}
+
+[test]
+atomic counter buffer 0 1
+atomic counter buffer 1 3
+
+clear color 0.0 0.0 0.0 0.0
+clear
+
+atomic counter 0 0 17
+atomic counter 1 0 31
+atomic counter 1 1 4
+atomic counter 1 2 9
+
+uniform uint 0 17
+uniform uint 1 31
+uniform uint 3 1
+uniform uint 2 9
+
+# Queries
+# -------
+
+verify program_interface_query interface GL_ATOMIC_COUNTER_BUFFER GL_ACTIVE_RESOURCES 2
+verify program_interface_query interface GL_ATOMIC_COUNTER_BUFFER GL_MAX_NUM_ACTIVE_VARIABLES 2
+
+# Atomic counter: a0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 0 0) GL_TYPE GL_UNSIGNED_INT_ATOMIC_COUNTER
+verify program_interface_query resourceByData GL_UNIFORM (atomic 0 0) GL_ARRAY_SIZE 1
+verify program_interface_query resourceByData GL_UNIFORM (atomic 0 0) GL_OFFSET 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 0 0) GL_BLOCK_INDEX -1
+verify program_interface_query resourceByData GL_UNIFORM (atomic 0 0) GL_ARRAY_STRIDE 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 0 0) GL_MATRIX_STRIDE 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 0 0) GL_IS_ROW_MAJOR 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 0 0) GL_ATOMIC_COUNTER_BUFFER_INDEX 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 0 0) GL_REFERENCED_BY_VERTEX_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 0 0) GL_REFERENCED_BY_COMPUTE_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 0 0) GL_REFERENCED_BY_TESS_CONTROL_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 0 0) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 0 0) GL_REFERENCED_BY_GEOMETRY_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 0 0) GL_REFERENCED_BY_FRAGMENT_SHADER 1
+verify program_interface_query resourceByData GL_UNIFORM (atomic 0 0) GL_LOCATION -1
+
+# Atomic counter: b0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 0) GL_TYPE GL_UNSIGNED_INT_ATOMIC_COUNTER
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 0) GL_ARRAY_SIZE 1
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 0) GL_OFFSET 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 0) GL_BLOCK_INDEX -1
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 0) GL_ARRAY_STRIDE 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 0) GL_MATRIX_STRIDE 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 0) GL_IS_ROW_MAJOR 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 0) GL_ATOMIC_COUNTER_BUFFER_INDEX 1
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 0) GL_REFERENCED_BY_VERTEX_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 0) GL_REFERENCED_BY_COMPUTE_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 0) GL_REFERENCED_BY_TESS_CONTROL_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 0) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 0) GL_REFERENCED_BY_GEOMETRY_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 0) GL_REFERENCED_BY_FRAGMENT_SHADER 1
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 0) GL_LOCATION -1
+
+# Atomic counter: b1
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 4) GL_TYPE GL_UNSIGNED_INT_ATOMIC_COUNTER
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 4) GL_ARRAY_SIZE 2
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 4) GL_OFFSET 4
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 4) GL_BLOCK_INDEX -1
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 4) GL_ARRAY_STRIDE 4
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 4) GL_MATRIX_STRIDE 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 4) GL_IS_ROW_MAJOR 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 4) GL_ATOMIC_COUNTER_BUFFER_INDEX 1
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 4) GL_REFERENCED_BY_VERTEX_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 4) GL_REFERENCED_BY_COMPUTE_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 4) GL_REFERENCED_BY_TESS_CONTROL_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 4) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 4) GL_REFERENCED_BY_GEOMETRY_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 4) GL_REFERENCED_BY_FRAGMENT_SHADER 1
+verify program_interface_query resourceByData GL_UNIFORM (atomic 1 4) GL_LOCATION -1
+
+# Atomic counter buffer
+verify program_interface_query resourceByData GL_ATOMIC_COUNTER_BUFFER (0) GL_BUFFER_BINDING 0
+verify program_interface_query resourceByData GL_ATOMIC_COUNTER_BUFFER (0) GL_BUFFER_DATA_SIZE 4
+verify program_interface_query resourceByData GL_ATOMIC_COUNTER_BUFFER (0) GL_NUM_ACTIVE_VARIABLES 1
+verify program_interface_query resourceByData GL_ATOMIC_COUNTER_BUFFER (0) GL_REFERENCED_BY_VERTEX_SHADER 0
+verify program_interface_query resourceByData GL_ATOMIC_COUNTER_BUFFER (0) GL_REFERENCED_BY_COMPUTE_SHADER 0
+verify program_interface_query resourceByData GL_ATOMIC_COUNTER_BUFFER (0) GL_REFERENCED_BY_TESS_CONTROL_SHADER 0
+verify program_interface_query resourceByData GL_ATOMIC_COUNTER_BUFFER (0) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_ATOMIC_COUNTER_BUFFER (0) GL_REFERENCED_BY_GEOMETRY_SHADER 0
+verify program_interface_query resourceByData GL_ATOMIC_COUNTER_BUFFER (0) GL_REFERENCED_BY_FRAGMENT_SHADER 1
+
+# Atomic counter buffer
+verify program_interface_query resourceByData GL_ATOMIC_COUNTER_BUFFER (1) GL_BUFFER_BINDING 1
+verify program_interface_query resourceByData GL_ATOMIC_COUNTER_BUFFER (1) GL_BUFFER_DATA_SIZE 12
+verify program_interface_query resourceByData GL_ATOMIC_COUNTER_BUFFER (1) GL_NUM_ACTIVE_VARIABLES 2
+verify program_interface_query resourceByData GL_ATOMIC_COUNTER_BUFFER (1) GL_REFERENCED_BY_VERTEX_SHADER 0
+verify program_interface_query resourceByData GL_ATOMIC_COUNTER_BUFFER (1) GL_REFERENCED_BY_COMPUTE_SHADER 0
+verify program_interface_query resourceByData GL_ATOMIC_COUNTER_BUFFER (1) GL_REFERENCED_BY_TESS_CONTROL_SHADER 0
+verify program_interface_query resourceByData GL_ATOMIC_COUNTER_BUFFER (1) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_ATOMIC_COUNTER_BUFFER (1) GL_REFERENCED_BY_GEOMETRY_SHADER 0
+verify program_interface_query resourceByData GL_ATOMIC_COUNTER_BUFFER (1) GL_REFERENCED_BY_FRAGMENT_SHADER 1
+
+draw rect ortho 0 0 1 1
+probe rgba 0 0 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_gl_spirv/execution/queries/program-interface/simple-types-name-queries.shader_test b/tests/spec/arb_gl_spirv/execution/queries/program-interface/simple-types-name-queries.shader_test
new file mode 100644
index 000000000..a0ac5af0d
--- /dev/null
+++ b/tests/spec/arb_gl_spirv/execution/queries/program-interface/simple-types-name-queries.shader_test
@@ -0,0 +1,242 @@ 
+# Tests the program interface queries related with names in shaders
+# constructed from SPIR-V binaries where no name reflection information
+# is available.
+#
+# ATOMIC_COUNTER_BUFFER interface is excluded, since active atomic
+# counter buffer resources are not assigned name strings
+# (ARB_program_interface_query) so that interface is not an allowed argument in
+# such queries.
+#
+# ARB_gl_spirv:
+#
+# 22. How do the program interface query APIs work when no name reflection
+#     information is available?
+#
+#    RESOLVED: The following naturally follows from the specification:
+#
+#    GetProgramInterfaceiv(.., pname=MAX_NAME_LENGTH, ..) -> params = 1
+#    GetProgramResourceIndex(.., name) -> INVALID_INDEX
+#    GetProgramResourceName(.., length, name) -> length=0, name = ""
+#    GetProgramResourceiv(.., props=NAME_LENGTH, ..) -> params = 1
+#    GetProgramResourceLocation(.., name) -> -1
+#    GetProgramResourceLocationIndex(.., name) -> -1
+#    ...
+
+[require]
+SPIRV ONLY
+GL >= 3.3
+GLSL >= 4.50
+GL_ARB_gl_spirv
+
+[vertex shader passthrough]
+
+[fragment shader spirv]
+; Automatically generated from the GLSL by shader_test_spirv.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %main "main" %outColor
+               OpExecutionMode %main OriginLowerLeft
+               OpSource GLSL 450
+               OpDecorate %outColor Location 0
+               OpDecorate %u1 Location 1
+               OpDecorate %u1 DescriptorSet 0
+               OpDecorate %u1 Binding 1
+               OpMemberDecorate %ComponentsBlock 0 Offset 0
+               OpMemberDecorate %ComponentsBlock 1 Offset 16
+               OpDecorate %ComponentsBlock Block
+               OpDecorate %components DescriptorSet 0
+               OpDecorate %components Binding 5
+               OpMemberDecorate %SSBOComponentsBlock 0 Offset 0
+               OpMemberDecorate %SSBOComponentsBlock 1 Offset 16
+               OpDecorate %SSBOComponentsBlock BufferBlock
+               OpDecorate %ssbo_components DescriptorSet 0
+               OpDecorate %ssbo_components Binding 0
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+   %outColor = OpVariable %_ptr_Output_v4float Output
+%_ptr_UniformConstant_v4float = OpTypePointer UniformConstant %v4float
+         %u1 = OpVariable %_ptr_UniformConstant_v4float UniformConstant
+    %v2float = OpTypeVector %float 2
+%ComponentsBlock = OpTypeStruct %v4float %v2float
+%_ptr_Uniform_ComponentsBlock = OpTypePointer Uniform %ComponentsBlock
+ %components = OpVariable %_ptr_Uniform_ComponentsBlock Uniform
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+      %int_1 = OpConstant %int 1
+%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
+%SSBOComponentsBlock = OpTypeStruct %v4float %v2float
+%_ptr_Uniform_SSBOComponentsBlock = OpTypePointer Uniform %SSBOComponentsBlock
+%ssbo_components = OpVariable %_ptr_Uniform_SSBOComponentsBlock Uniform
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+         %12 = OpLoad %v4float %u1
+         %20 = OpAccessChain %_ptr_Uniform_v4float %components %int_0
+         %21 = OpLoad %v4float %20
+         %22 = OpFAdd %v4float %12 %21
+         %25 = OpAccessChain %_ptr_Uniform_v2float %components %int_1
+         %26 = OpLoad %v2float %25
+         %30 = OpAccessChain %_ptr_Uniform_v2float %ssbo_components %int_1
+         %31 = OpLoad %v2float %30
+         %32 = OpCompositeExtract %float %26 0
+         %33 = OpCompositeExtract %float %26 1
+         %34 = OpCompositeExtract %float %31 0
+         %35 = OpCompositeExtract %float %31 1
+         %36 = OpCompositeConstruct %v4float %32 %33 %34 %35
+         %37 = OpFAdd %v4float %22 %36
+               OpStore %outColor %37
+               OpReturn
+               OpFunctionEnd
+
+[fragment shader]
+#version 450
+
+layout (location = 0) out vec4 outColor;
+
+layout (location = 1) uniform vec4 u1;
+
+layout (binding = 5) uniform ComponentsBlock
+ {
+    vec4 c1;
+    vec2 c2;
+ } components;
+
+layout (binding = 0) buffer SSBOComponentsBlock
+ {
+    vec4 s1;
+    vec2 s2;
+ } ssbo_components;
+
+void main()
+{
+    outColor = u1 + components.c1 + vec4(components.c2, ssbo_components.s2);
+}
+
+[test]
+clear color 1.0 0.0 0.0 0.0
+clear
+
+# Initialization --
+
+# ComponentsBlock
+block binding 5
+block offset 0
+uniform vec4 ComponentsBlock.c1 0.1 0.2 0.3 0.4
+block offset 16
+uniform vec2 ComponentsBlock.c2 0.1 0.2
+
+# u1
+uniform vec4 1 0.0 0.1 0.3 0.0
+
+# SSBOComponentsBlock
+block binding 0
+ssbo 0 32 # size, aligned to 16
+# s1
+ssbo 0 subdata float 0  0.1
+ssbo 0 subdata float 4  0.2
+ssbo 0 subdata float 8  0.3
+ssbo 0 subdata float 12 0.4
+# s2
+ssbo 0 subdata float 16 0.1
+ssbo 0 subdata float 20 0.0
+
+# Queries --
+
+# - GetProgramInterfaceiv(.., pname=MAX_NAME_LENGTH, ..) -> params = 1
+
+verify program_interface_query interface GL_PROGRAM_INPUT        GL_MAX_NAME_LENGTH 1
+verify program_interface_query interface GL_PROGRAM_OUTPUT       GL_MAX_NAME_LENGTH 1
+verify program_interface_query interface GL_UNIFORM              GL_MAX_NAME_LENGTH 1
+verify program_interface_query interface GL_UNIFORM_BLOCK        GL_MAX_NAME_LENGTH 1
+verify program_interface_query interface GL_SHADER_STORAGE_BLOCK GL_MAX_NAME_LENGTH 1
+verify program_interface_query interface GL_BUFFER_VARIABLE      GL_MAX_NAME_LENGTH 1
+
+# Subroutines
+#
+# ARB_gl_spirv
+#
+# 25. What about subroutine queries based on names?
+
+#    RESOLVED. SPIR-V does not currently support subroutines, so it is not
+#    possibly to have any active subroutines from a SPIR-V based shader,
+#    and thus there is never anything to report.
+
+verify program_interface_query interface GL_VERTEX_SUBROUTINE                  GL_MAX_NAME_LENGTH 0
+verify program_interface_query interface GL_FRAGMENT_SUBROUTINE                GL_MAX_NAME_LENGTH 0
+verify program_interface_query interface GL_GEOMETRY_SUBROUTINE                GL_MAX_NAME_LENGTH 0
+verify program_interface_query interface GL_COMPUTE_SUBROUTINE                 GL_MAX_NAME_LENGTH 0
+verify program_interface_query interface GL_TESS_CONTROL_SUBROUTINE            GL_MAX_NAME_LENGTH 0
+verify program_interface_query interface GL_TESS_EVALUATION_SUBROUTINE         GL_MAX_NAME_LENGTH 0
+verify program_interface_query interface GL_VERTEX_SUBROUTINE_UNIFORM          GL_MAX_NAME_LENGTH 0
+verify program_interface_query interface GL_FRAGMENT_SUBROUTINE_UNIFORM        GL_MAX_NAME_LENGTH 0
+verify program_interface_query interface GL_GEOMETRY_SUBROUTINE_UNIFORM        GL_MAX_NAME_LENGTH 0
+verify program_interface_query interface GL_COMPUTE_SUBROUTINE_UNIFORM         GL_MAX_NAME_LENGTH 0
+verify program_interface_query interface GL_TESS_CONTROL_SUBROUTINE_UNIFORM    GL_MAX_NAME_LENGTH 0
+verify program_interface_query interface GL_TESS_EVALUATION_SUBROUTINE_UNIFORM GL_MAX_NAME_LENGTH 0
+
+# - GetProgramResourceIndex(.., name) -> INVALID_INDEX
+
+verify program_interface_query resourceIndex GL_PROGRAM_INPUT        "" GL_INVALID_INDEX
+verify program_interface_query resourceIndex GL_PROGRAM_OUTPUT       "" GL_INVALID_INDEX
+verify program_interface_query resourceIndex GL_UNIFORM              "" GL_INVALID_INDEX
+verify program_interface_query resourceIndex GL_UNIFORM_BLOCK        "" GL_INVALID_INDEX
+verify program_interface_query resourceIndex GL_SHADER_STORAGE_BLOCK "" GL_INVALID_INDEX
+verify program_interface_query resourceIndex GL_BUFFER_VARIABLE      "" GL_INVALID_INDEX
+
+verify program_interface_query resourceIndex GL_PROGRAM_INPUT        "nonexistent" GL_INVALID_INDEX
+verify program_interface_query resourceIndex GL_PROGRAM_OUTPUT       "nonexistent" GL_INVALID_INDEX
+verify program_interface_query resourceIndex GL_UNIFORM              "nonexistent" GL_INVALID_INDEX
+verify program_interface_query resourceIndex GL_UNIFORM_BLOCK        "nonexistent" GL_INVALID_INDEX
+verify program_interface_query resourceIndex GL_SHADER_STORAGE_BLOCK "nonexistent" GL_INVALID_INDEX
+verify program_interface_query resourceIndex GL_BUFFER_VARIABLE      "nonexistent" GL_INVALID_INDEX
+
+# - GetProgramResourceLocation(.., name) -> -1
+
+verify program_interface_query resourceLocation GL_PROGRAM_INPUT  "" -1
+verify program_interface_query resourceLocation GL_PROGRAM_OUTPUT "" -1
+verify program_interface_query resourceLocation GL_UNIFORM        "" -1
+
+verify program_interface_query resourceLocation GL_PROGRAM_INPUT  "nonexistent" -1
+verify program_interface_query resourceLocation GL_PROGRAM_OUTPUT "nonexistent" -1
+verify program_interface_query resourceLocation GL_UNIFORM        "nonexistent" -1
+
+# - GetProgramResourceLocationIndex(.., name) -> -1
+
+verify program_interface_query resourceLocationIndex GL_PROGRAM_OUTPUT "" -1
+verify program_interface_query resourceLocationIndex GL_PROGRAM_OUTPUT "nonexistent" -1
+
+# - GetProgramResourceName(.., length, name) -> length=0, name = ""
+
+verify program_interface_query resourceName GL_PROGRAM_INPUT        (0 0)   0 ""
+verify program_interface_query resourceName GL_PROGRAM_OUTPUT       (0 0)   0 ""
+verify program_interface_query resourceName GL_UNIFORM_BLOCK        (5)     0 ""
+verify program_interface_query resourceName GL_SHADER_STORAGE_BLOCK (0)     0 ""
+verify program_interface_query resourceName GL_UNIFORM              (var 1) 0 ""
+verify program_interface_query resourceName GL_UNIFORM              (5 0)   0 ""
+verify program_interface_query resourceName GL_UNIFORM              (5 16)  0 ""
+verify program_interface_query resourceName GL_BUFFER_VARIABLE      (0 0)   0 ""
+verify program_interface_query resourceName GL_BUFFER_VARIABLE      (0 16)  0 ""
+
+# - GetProgramResourceiv(.., props=NAME_LENGTH, ..) -> params = 1
+
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT       (0 0)   GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_PROGRAM_INPUT        (0 0)   GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK        (5)     GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_SHADER_STORAGE_BLOCK (0)     GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_UNIFORM              (var 1) GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_UNIFORM              (5 0)   GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_UNIFORM              (5 16)  GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE      (0 0)   GL_NAME_LENGTH 1
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE      (0 16)  GL_NAME_LENGTH 1
+
+draw rect -1 -1 2 2
+probe all rgba 0.2 0.5 0.7 0.4
diff --git a/tests/spec/arb_gl_spirv/execution/queries/program-interface/simple-types-other-queries.shader_test b/tests/spec/arb_gl_spirv/execution/queries/program-interface/simple-types-other-queries.shader_test
new file mode 100644
index 000000000..488c6a221
--- /dev/null
+++ b/tests/spec/arb_gl_spirv/execution/queries/program-interface/simple-types-other-queries.shader_test
@@ -0,0 +1,297 @@ 
+# Tests the program interface queries not related with names in shaders
+# constructed from SPIR-V binaries where no name reflection information
+# is available.
+#
+# ARB_gl_spirv:
+#
+# 19. How should the program interface query operations behave for program
+#    objects created from SPIR-V shaders?
+#
+#   C) Allow as much as possible to work "naturally". You can query for
+#   the number of active resources, and for details about them. Anything
+#   that doesn't query by name will work as expected... If everything
+#   is specified a-priori by location/binding/offset/index/component
+#   in the shader, this may be sufficient.
+#
+#   RESOLVED.  Pick (c), but also allow debug names to be returned if an
+#   implementation wants to.
+
+[require]
+SPIRV ONLY
+GL >= 3.3
+GLSL >= 4.50
+GL_ARB_gl_spirv
+
+[vertex shader passthrough]
+
+[fragment shader spirv]
+; Automatically generated from the GLSL by shader_test_spirv.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %main "main" %outColor
+               OpExecutionMode %main OriginLowerLeft
+               OpSource GLSL 450
+               OpDecorate %outColor Location 0
+               OpDecorate %u1 Location 1
+               OpDecorate %u1 DescriptorSet 0
+               OpDecorate %u1 Binding 1
+               OpMemberDecorate %ComponentsBlock 0 Offset 0
+               OpMemberDecorate %ComponentsBlock 1 Offset 16
+               OpDecorate %ComponentsBlock Block
+               OpDecorate %components DescriptorSet 0
+               OpDecorate %components Binding 5
+               OpMemberDecorate %SSBOComponentsBlock 0 Offset 0
+               OpMemberDecorate %SSBOComponentsBlock 1 Offset 16
+               OpDecorate %SSBOComponentsBlock BufferBlock
+               OpDecorate %ssbo_components DescriptorSet 0
+               OpDecorate %ssbo_components Binding 0
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+   %outColor = OpVariable %_ptr_Output_v4float Output
+%_ptr_UniformConstant_v4float = OpTypePointer UniformConstant %v4float
+         %u1 = OpVariable %_ptr_UniformConstant_v4float UniformConstant
+    %v2float = OpTypeVector %float 2
+%ComponentsBlock = OpTypeStruct %v4float %v2float
+%_ptr_Uniform_ComponentsBlock = OpTypePointer Uniform %ComponentsBlock
+ %components = OpVariable %_ptr_Uniform_ComponentsBlock Uniform
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+      %int_1 = OpConstant %int 1
+%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
+%SSBOComponentsBlock = OpTypeStruct %v4float %v2float
+%_ptr_Uniform_SSBOComponentsBlock = OpTypePointer Uniform %SSBOComponentsBlock
+%ssbo_components = OpVariable %_ptr_Uniform_SSBOComponentsBlock Uniform
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+         %12 = OpLoad %v4float %u1
+         %20 = OpAccessChain %_ptr_Uniform_v4float %components %int_0
+         %21 = OpLoad %v4float %20
+         %22 = OpFAdd %v4float %12 %21
+         %25 = OpAccessChain %_ptr_Uniform_v2float %components %int_1
+         %26 = OpLoad %v2float %25
+         %30 = OpAccessChain %_ptr_Uniform_v2float %ssbo_components %int_1
+         %31 = OpLoad %v2float %30
+         %32 = OpCompositeExtract %float %26 0
+         %33 = OpCompositeExtract %float %26 1
+         %34 = OpCompositeExtract %float %31 0
+         %35 = OpCompositeExtract %float %31 1
+         %36 = OpCompositeConstruct %v4float %32 %33 %34 %35
+         %37 = OpFAdd %v4float %22 %36
+               OpStore %outColor %37
+               OpReturn
+               OpFunctionEnd
+
+[fragment shader]
+#version 450
+
+layout (location = 0) out vec4 outColor;
+layout (location = 1) uniform vec4 u1;
+
+layout (binding = 5) uniform ComponentsBlock
+ {
+    vec4 c1;
+    vec2 c2;
+ } components;
+
+layout (binding = 0) buffer SSBOComponentsBlock
+ {
+    vec4 s1;
+    vec2 s2;
+ } ssbo_components;
+
+void main()
+{
+    outColor = u1 + components.c1 + vec4(components.c2, ssbo_components.s2);
+}
+
+[test]
+clear color 1.0 0.0 0.0 0.0
+clear
+
+# Initialization --
+
+# ComponentsBlock
+block binding 5
+block offset 0
+uniform vec4 ComponentsBlock.c1 0.1 0.2 0.3 0.4
+block offset 16
+uniform vec2 ComponentsBlock.c2 0.1 0.2
+
+# u1
+uniform vec4 1 0.0 0.1 0.3 0.0
+
+# SSBOComponentsBlock
+block binding 0
+ssbo 0 32 # size, aligned to 16
+# s1
+ssbo 0 subdata float 0  0.1
+ssbo 0 subdata float 4  0.2
+ssbo 0 subdata float 8  0.3
+ssbo 0 subdata float 12 0.4
+# s2
+ssbo 0 subdata float 16 0.1
+ssbo 0 subdata float 20 0.0
+
+# Queries --
+
+# - GetProgramInterfaceiv
+
+verify program_interface_query interface GL_PROGRAM_INPUT        GL_ACTIVE_RESOURCES 1
+verify program_interface_query interface GL_PROGRAM_OUTPUT       GL_ACTIVE_RESOURCES 1
+verify program_interface_query interface GL_UNIFORM_BLOCK        GL_ACTIVE_RESOURCES 1
+verify program_interface_query interface GL_SHADER_STORAGE_BLOCK GL_ACTIVE_RESOURCES 1
+verify program_interface_query interface GL_UNIFORM              GL_ACTIVE_RESOURCES 3
+verify program_interface_query interface GL_BUFFER_VARIABLE      GL_ACTIVE_RESOURCES 2
+
+verify program_interface_query interface GL_UNIFORM_BLOCK        GL_MAX_NUM_ACTIVE_VARIABLES 2
+verify program_interface_query interface GL_SHADER_STORAGE_BLOCK GL_MAX_NUM_ACTIVE_VARIABLES 2
+
+# Subroutines are not supported in SPIRV.
+verify program_interface_query interface GL_VERTEX_SUBROUTINE_UNIFORM   GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0
+verify program_interface_query interface GL_GEOMETRY_SUBROUTINE_UNIFORM GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0
+verify program_interface_query interface GL_FRAGMENT_SUBROUTINE_UNIFORM GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0
+
+# - GetProgramResourceiv
+
+# Uniform: u1
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_TYPE GL_FLOAT_VEC4
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_ARRAY_SIZE 1
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_OFFSET -1
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_BLOCK_INDEX -1
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_ARRAY_STRIDE -1
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_MATRIX_STRIDE -1
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_IS_ROW_MAJOR 0
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_ATOMIC_COUNTER_BUFFER_INDEX -1
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_REFERENCED_BY_VERTEX_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_REFERENCED_BY_COMPUTE_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_REFERENCED_BY_TESS_CONTROL_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_REFERENCED_BY_GEOMETRY_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_REFERENCED_BY_FRAGMENT_SHADER 1
+verify program_interface_query resourceByData GL_UNIFORM (var 1) GL_LOCATION 1
+
+# UBO member: ComponentsBlock.c1
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_TYPE GL_FLOAT_VEC4
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_ARRAY_SIZE 1
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_OFFSET 0
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_ARRAY_STRIDE 0
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_MATRIX_STRIDE 0
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_IS_ROW_MAJOR 0
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_ATOMIC_COUNTER_BUFFER_INDEX -1
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_REFERENCED_BY_VERTEX_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_REFERENCED_BY_COMPUTE_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_REFERENCED_BY_TESS_CONTROL_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_REFERENCED_BY_GEOMETRY_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_REFERENCED_BY_FRAGMENT_SHADER 1
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_LOCATION -1
+
+# UBO member: ComponentsBlock.c2
+verify program_interface_query resourceByData GL_UNIFORM (5 16) GL_TYPE GL_FLOAT_VEC2
+verify program_interface_query resourceByData GL_UNIFORM (5 16) GL_ARRAY_SIZE 1
+verify program_interface_query resourceByData GL_UNIFORM (5 16) GL_OFFSET 16
+verify program_interface_query resourceByData GL_UNIFORM (5 16) GL_ARRAY_STRIDE 0
+verify program_interface_query resourceByData GL_UNIFORM (5 16) GL_MATRIX_STRIDE 0
+verify program_interface_query resourceByData GL_UNIFORM (5 16) GL_IS_ROW_MAJOR 0
+verify program_interface_query resourceByData GL_UNIFORM (5 16) GL_ATOMIC_COUNTER_BUFFER_INDEX -1
+verify program_interface_query resourceByData GL_UNIFORM (5 16) GL_REFERENCED_BY_VERTEX_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (5 16) GL_REFERENCED_BY_COMPUTE_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (5 16) GL_REFERENCED_BY_TESS_CONTROL_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (5 16) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (5 16) GL_REFERENCED_BY_GEOMETRY_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (5 16) GL_REFERENCED_BY_FRAGMENT_SHADER 1
+verify program_interface_query resourceByData GL_UNIFORM (5 16) GL_LOCATION -1
+
+# UBO: ComponentsBlock
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (5) GL_BUFFER_BINDING 5
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (5) GL_BUFFER_DATA_SIZE 32
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (5) GL_NUM_ACTIVE_VARIABLES 2
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (5) GL_REFERENCED_BY_VERTEX_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (5) GL_REFERENCED_BY_COMPUTE_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (5) GL_REFERENCED_BY_TESS_CONTROL_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (5) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (5) GL_REFERENCED_BY_GEOMETRY_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (5) GL_REFERENCED_BY_FRAGMENT_SHADER 1
+
+# SSBO member: SSBOComponentsBlock.s1
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 0) GL_TYPE GL_FLOAT_VEC4
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 0) GL_ARRAY_SIZE 1
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 0) GL_OFFSET 0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 0) GL_ARRAY_STRIDE 0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 0) GL_MATRIX_STRIDE 0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 0) GL_IS_ROW_MAJOR 0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 0) GL_REFERENCED_BY_VERTEX_SHADER 0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 0) GL_REFERENCED_BY_COMPUTE_SHADER 0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 0) GL_REFERENCED_BY_TESS_CONTROL_SHADER 0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 0) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 0) GL_REFERENCED_BY_GEOMETRY_SHADER 0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 0) GL_REFERENCED_BY_FRAGMENT_SHADER 1
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 0) GL_TOP_LEVEL_ARRAY_SIZE 1
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 0) GL_TOP_LEVEL_ARRAY_STRIDE 0
+
+# SSBO member: SSBOComponentsBlock.s2
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_TYPE GL_FLOAT_VEC2
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_ARRAY_SIZE 1
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_OFFSET 16
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_ARRAY_STRIDE 0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_MATRIX_STRIDE 0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_IS_ROW_MAJOR 0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_REFERENCED_BY_VERTEX_SHADER 0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_REFERENCED_BY_COMPUTE_SHADER 0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_REFERENCED_BY_TESS_CONTROL_SHADER 0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_REFERENCED_BY_GEOMETRY_SHADER 0
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_REFERENCED_BY_FRAGMENT_SHADER 1
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_TOP_LEVEL_ARRAY_SIZE 1
+verify program_interface_query resourceByData GL_BUFFER_VARIABLE (0 16) GL_TOP_LEVEL_ARRAY_STRIDE 0
+
+# SSBO: SSBOComponentsBlock
+verify program_interface_query resourceByData GL_SHADER_STORAGE_BLOCK (0) GL_BUFFER_BINDING 0
+verify program_interface_query resourceByData GL_SHADER_STORAGE_BLOCK (0) GL_BUFFER_DATA_SIZE 32
+verify program_interface_query resourceByData GL_SHADER_STORAGE_BLOCK (0) GL_NUM_ACTIVE_VARIABLES 2
+verify program_interface_query resourceByData GL_SHADER_STORAGE_BLOCK (0) GL_REFERENCED_BY_VERTEX_SHADER 0
+verify program_interface_query resourceByData GL_SHADER_STORAGE_BLOCK (0) GL_REFERENCED_BY_COMPUTE_SHADER 0
+verify program_interface_query resourceByData GL_SHADER_STORAGE_BLOCK (0) GL_REFERENCED_BY_TESS_CONTROL_SHADER 0
+verify program_interface_query resourceByData GL_SHADER_STORAGE_BLOCK (0) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_SHADER_STORAGE_BLOCK (0) GL_REFERENCED_BY_GEOMETRY_SHADER 0
+verify program_interface_query resourceByData GL_SHADER_STORAGE_BLOCK (0) GL_REFERENCED_BY_FRAGMENT_SHADER 1
+
+# Input: piglit_vertex
+verify program_interface_query resourceByData GL_PROGRAM_INPUT (0 0) GL_TYPE GL_FLOAT_VEC4
+verify program_interface_query resourceByData GL_PROGRAM_INPUT (0 0) GL_ARRAY_SIZE 1
+verify program_interface_query resourceByData GL_PROGRAM_INPUT (0 0) GL_REFERENCED_BY_VERTEX_SHADER 1
+verify program_interface_query resourceByData GL_PROGRAM_INPUT (0 0) GL_REFERENCED_BY_COMPUTE_SHADER 0
+verify program_interface_query resourceByData GL_PROGRAM_INPUT (0 0) GL_REFERENCED_BY_TESS_CONTROL_SHADER 0
+verify program_interface_query resourceByData GL_PROGRAM_INPUT (0 0) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_PROGRAM_INPUT (0 0) GL_REFERENCED_BY_GEOMETRY_SHADER 0
+verify program_interface_query resourceByData GL_PROGRAM_INPUT (0 0) GL_REFERENCED_BY_FRAGMENT_SHADER 0
+verify program_interface_query resourceByData GL_PROGRAM_INPUT (0 0) GL_LOCATION 0
+verify program_interface_query resourceByData GL_PROGRAM_INPUT (0 0) GL_LOCATION_COMPONENT 0
+verify program_interface_query resourceByData GL_PROGRAM_INPUT (0 0) GL_IS_PER_PATCH 0
+
+# Output: outColor
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_TYPE GL_FLOAT_VEC4
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_ARRAY_SIZE 1
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_REFERENCED_BY_VERTEX_SHADER 0
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_REFERENCED_BY_COMPUTE_SHADER 0
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_REFERENCED_BY_TESS_CONTROL_SHADER 0
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_REFERENCED_BY_GEOMETRY_SHADER 0
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_REFERENCED_BY_FRAGMENT_SHADER 1
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_LOCATION 0
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_LOCATION_COMPONENT 0
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_LOCATION_INDEX 0
+verify program_interface_query resourceByData GL_PROGRAM_OUTPUT (0 0) GL_IS_PER_PATCH 0
+
+draw rect -1 -1 2 2
+probe all rgba 0.2 0.5 0.7 0.4
diff --git a/tests/spec/arb_gl_spirv/execution/queries/program-interface/ubo-matrices-other-queries.shader_test b/tests/spec/arb_gl_spirv/execution/queries/program-interface/ubo-matrices-other-queries.shader_test
new file mode 100644
index 000000000..11a23a7f2
--- /dev/null
+++ b/tests/spec/arb_gl_spirv/execution/queries/program-interface/ubo-matrices-other-queries.shader_test
@@ -0,0 +1,175 @@ 
+# Tests the program interface queries not related with names over
+# matrices in UBOs (IS_ROW_MAJOR, MATRIX_STRIDE, TYPE) in shaders
+# constructed from SPIR-V binaries where no name reflection information
+# is available.
+#
+# ARB_gl_spirv:
+#
+# 19. How should the program interface query operations behave for program
+#    objects created from SPIR-V shaders?
+#
+#   C) Allow as much as possible to work "naturally". You can query for
+#   the number of active resources, and for details about them. Anything
+#   that doesn't query by name will work as expected... If everything
+#   is specified a-priori by location/binding/offset/index/component
+#   in the shader, this may be sufficient.
+#
+#   RESOLVED.  Pick (c), but also allow debug names to be returned if an
+#   implementation wants to.
+
+[require]
+SPIRV ONLY
+GL >= 4.5
+GLSL >= 4.50
+GL_ARB_gl_spirv
+
+[vertex shader passthrough]
+
+[fragment shader spirv]
+; Automatically generated from the GLSL by shader_test_spirv.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 Fragment %main "main" %out_color
+               OpExecutionMode %main OriginLowerLeft
+               OpSource GLSL 450
+               OpDecorate %out_color Location 0
+               OpMemberDecorate %ComponentsBlock1 0 RowMajor
+               OpMemberDecorate %ComponentsBlock1 0 Offset 0
+               OpMemberDecorate %ComponentsBlock1 0 MatrixStride 16
+               OpDecorate %ComponentsBlock1 Block
+               OpDecorate %components1 DescriptorSet 0
+               OpDecorate %components1 Binding 0
+               OpMemberDecorate %ComponentsBlock2 0 ColMajor
+               OpMemberDecorate %ComponentsBlock2 0 Offset 0
+               OpMemberDecorate %ComponentsBlock2 0 MatrixStride 16
+               OpDecorate %ComponentsBlock2 Block
+               OpDecorate %components2 DescriptorSet 0
+               OpDecorate %components2 Binding 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
+%mat4v4float = OpTypeMatrix %v4float 4
+%ComponentsBlock1 = OpTypeStruct %mat4v4float
+%_ptr_Uniform_ComponentsBlock1 = OpTypePointer Uniform %ComponentsBlock1
+%components1 = OpVariable %_ptr_Uniform_ComponentsBlock1 Uniform
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+      %int_3 = OpConstant %int 3
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_Uniform_float = OpTypePointer Uniform %float
+     %uint_1 = OpConstant %uint 1
+     %uint_2 = OpConstant %uint 2
+     %uint_3 = OpConstant %uint 3
+%ComponentsBlock2 = OpTypeStruct %mat4v4float
+%_ptr_Uniform_ComponentsBlock2 = OpTypePointer Uniform %ComponentsBlock2
+%components2 = OpVariable %_ptr_Uniform_ComponentsBlock2 Uniform
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+         %20 = OpAccessChain %_ptr_Uniform_float %components1 %int_0 %int_3 %uint_0
+         %21 = OpLoad %float %20
+         %23 = OpAccessChain %_ptr_Uniform_float %components1 %int_0 %int_3 %uint_1
+         %24 = OpLoad %float %23
+         %26 = OpAccessChain %_ptr_Uniform_float %components1 %int_0 %int_3 %uint_2
+         %27 = OpLoad %float %26
+         %29 = OpAccessChain %_ptr_Uniform_float %components1 %int_0 %int_3 %uint_3
+         %30 = OpLoad %float %29
+         %31 = OpCompositeConstruct %v4float %21 %24 %27 %30
+         %35 = OpAccessChain %_ptr_Uniform_float %components2 %int_0 %int_3 %uint_0
+         %36 = OpLoad %float %35
+         %37 = OpAccessChain %_ptr_Uniform_float %components2 %int_0 %int_3 %uint_1
+         %38 = OpLoad %float %37
+         %39 = OpAccessChain %_ptr_Uniform_float %components2 %int_0 %int_3 %uint_2
+         %40 = OpLoad %float %39
+         %41 = OpAccessChain %_ptr_Uniform_float %components2 %int_0 %int_3 %uint_3
+         %42 = OpLoad %float %41
+         %43 = OpCompositeConstruct %v4float %36 %38 %40 %42
+         %44 = OpFAdd %v4float %31 %43
+               OpStore %out_color %44
+               OpReturn
+               OpFunctionEnd
+
+[fragment shader]
+#version 450 core
+
+layout(location = 0) out vec4 out_color;
+
+layout (binding = 0, row_major) uniform ComponentsBlock1 {
+    mat4 matrix;
+} components1;
+
+layout (binding = 5, column_major) uniform ComponentsBlock2 {
+    mat4 matrix;
+} components2;
+
+void main()
+{
+    out_color =
+        vec4(components1.matrix[3][0], components1.matrix[3][1], components1.matrix[3][2], components1.matrix[3][3])
+      + vec4(components2.matrix[3][0], components2.matrix[3][1], components2.matrix[3][2], components2.matrix[3][3]);
+}
+
+[test]
+
+block binding 0
+block offset 0
+block matrix stride 16
+block row major 1
+uniform mat4 ComponentsBlock1.matrix 0.11 0.12 0.13 0.14 0.21 0.22 0.23 0.24 0.31 0.32 0.33 0.34 0.41 0.42 0.43 0.44
+
+block binding 5
+block offset 0
+block matrix stride 16
+block row major 0
+uniform mat4 ComponentsBlock2.matrix 0.11 0.12 0.13 0.14 0.21 0.22 0.23 0.24 0.31 0.32 0.33 0.34 0.41 0.42 0.43 0.44
+
+# Queries
+
+verify program_interface_query interface GL_PROGRAM_INPUT        GL_ACTIVE_RESOURCES 1
+verify program_interface_query interface GL_PROGRAM_OUTPUT       GL_ACTIVE_RESOURCES 1
+verify program_interface_query interface GL_UNIFORM_BLOCK        GL_ACTIVE_RESOURCES 2
+verify program_interface_query interface GL_UNIFORM              GL_ACTIVE_RESOURCES 2
+
+verify program_interface_query interface GL_UNIFORM_BLOCK        GL_MAX_NUM_ACTIVE_VARIABLES 1
+
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_TYPE GL_FLOAT_MAT4
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_ARRAY_SIZE 1
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_OFFSET 0
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_ARRAY_STRIDE 0
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_MATRIX_STRIDE 16
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_IS_ROW_MAJOR 1
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_ATOMIC_COUNTER_BUFFER_INDEX -1
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_LOCATION -1
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_REFERENCED_BY_VERTEX_SHADER          0
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_REFERENCED_BY_COMPUTE_SHADER         0
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_REFERENCED_BY_TESS_CONTROL_SHADER    0
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_REFERENCED_BY_GEOMETRY_SHADER        0
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_REFERENCED_BY_FRAGMENT_SHADER        1
+
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_TYPE GL_FLOAT_MAT4
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_ARRAY_SIZE 1
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_OFFSET 0
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_ARRAY_STRIDE 0
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_MATRIX_STRIDE 16
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_IS_ROW_MAJOR 0
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_ATOMIC_COUNTER_BUFFER_INDEX -1
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_LOCATION -1
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_REFERENCED_BY_VERTEX_SHADER          0
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_REFERENCED_BY_COMPUTE_SHADER         0
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_REFERENCED_BY_TESS_CONTROL_SHADER    0
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_REFERENCED_BY_GEOMETRY_SHADER        0
+verify program_interface_query resourceByData GL_UNIFORM (5 0) GL_REFERENCED_BY_FRAGMENT_SHADER        1
+
+draw rect -1 -1 2 2
+probe all rgba 0.82 0.84 0.86 0.88
diff --git a/tests/spec/arb_gl_spirv/execution/queries/program-interface/ubo-nested-structs-other-queries.shader_test b/tests/spec/arb_gl_spirv/execution/queries/program-interface/ubo-nested-structs-other-queries.shader_test
new file mode 100644
index 000000000..00c015699
--- /dev/null
+++ b/tests/spec/arb_gl_spirv/execution/queries/program-interface/ubo-nested-structs-other-queries.shader_test
@@ -0,0 +1,232 @@ 
+# Tests the program interface queries not related with names over
+# an UBO containing nested structs in a shader constructed from SPIR-V
+# binaries where no name reflection information is available.
+#
+# ARB_gl_spirv:
+#
+# 19. How should the program interface query operations behave for program
+#    objects created from SPIR-V shaders?
+#
+#   C) Allow as much as possible to work "naturally". You can query for
+#   the number of active resources, and for details about them. Anything
+#   that doesn't query by name will work as expected... If everything
+#   is specified a-priori by location/binding/offset/index/component
+#   in the shader, this may be sufficient.
+#
+#   RESOLVED.  Pick (c), but also allow debug names to be returned if an
+#   implementation wants to.
+
+[require]
+SPIRV ONLY
+GL >= 3.3
+GLSL >= 4.50
+GL_ARB_gl_spirv
+
+[vertex shader passthrough]
+
+[fragment shader spirv]
+; Automatically generated from the GLSL by shader_test_spirv.py. DO NOT EDIT
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 7
+; Bound: 51
+; Schema: 0
+               OpCapability Shader
+          %1 = OpExtInstImport "GLSL.std.450"
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Fragment %main "main" %outColor
+               OpExecutionMode %main OriginLowerLeft
+               OpSource GLSL 450
+               OpDecorate %outColor Location 0
+               OpDecorate %_arr_v2float_uint_2 ArrayStride 16
+               OpMemberDecorate %parts 0 Offset 0
+               OpMemberDecorate %parts 1 Offset 16
+               OpDecorate %_arr_parts_uint_2 ArrayStride 48
+               OpMemberDecorate %parts2 0 Offset 0
+               OpMemberDecorate %parts2 1 Offset 48
+               OpDecorate %_arr_parts2_uint_2 ArrayStride 144
+               OpMemberDecorate %block 0 Offset 0
+               OpDecorate %block Block
+               OpDecorate %ubo DescriptorSet 0
+               OpDecorate %ubo Binding 0
+       %void = OpTypeVoid
+          %3 = OpTypeFunction %void
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+   %outColor = OpVariable %_ptr_Output_v4float Output
+    %v2float = OpTypeVector %float 2
+       %uint = OpTypeInt 32 0
+     %uint_2 = OpConstant %uint 2
+%_arr_v2float_uint_2 = OpTypeArray %v2float %uint_2
+      %parts = OpTypeStruct %v4float %_arr_v2float_uint_2
+%_arr_parts_uint_2 = OpTypeArray %parts %uint_2
+     %parts2 = OpTypeStruct %parts %_arr_parts_uint_2
+%_arr_parts2_uint_2 = OpTypeArray %parts2 %uint_2
+      %block = OpTypeStruct %_arr_parts2_uint_2
+%_ptr_Uniform_block = OpTypePointer Uniform %block
+        %ubo = OpVariable %_ptr_Uniform_block Uniform
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+      %int_1 = OpConstant %int 1
+%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
+       %main = OpFunction %void None %3
+          %5 = OpLabel
+         %24 = OpAccessChain %_ptr_Uniform_v4float %ubo %int_0 %int_0 %int_0 %int_0
+         %25 = OpLoad %v4float %24
+         %28 = OpAccessChain %_ptr_Uniform_v2float %ubo %int_0 %int_0 %int_0 %int_1 %int_0
+         %29 = OpLoad %v2float %28
+         %30 = OpAccessChain %_ptr_Uniform_v2float %ubo %int_0 %int_0 %int_0 %int_1 %int_1
+         %31 = OpLoad %v2float %30
+         %32 = OpCompositeExtract %float %29 0
+         %33 = OpCompositeExtract %float %29 1
+         %34 = OpCompositeExtract %float %31 0
+         %35 = OpCompositeExtract %float %31 1
+         %36 = OpCompositeConstruct %v4float %32 %33 %34 %35
+         %37 = OpFAdd %v4float %25 %36
+         %38 = OpAccessChain %_ptr_Uniform_v4float %ubo %int_0 %int_1 %int_1 %int_0 %int_0
+         %39 = OpLoad %v4float %38
+         %40 = OpFAdd %v4float %37 %39
+         %41 = OpAccessChain %_ptr_Uniform_v2float %ubo %int_0 %int_0 %int_1 %int_1 %int_1 %int_0
+         %42 = OpLoad %v2float %41
+         %43 = OpAccessChain %_ptr_Uniform_v2float %ubo %int_0 %int_1 %int_1 %int_1 %int_1 %int_1
+         %44 = OpLoad %v2float %43
+         %45 = OpCompositeExtract %float %42 0
+         %46 = OpCompositeExtract %float %42 1
+         %47 = OpCompositeExtract %float %44 0
+         %48 = OpCompositeExtract %float %44 1
+         %49 = OpCompositeConstruct %v4float %45 %46 %47 %48
+         %50 = OpFAdd %v4float %40 %49
+               OpStore %outColor %50
+               OpReturn
+               OpFunctionEnd
+
+[fragment shader]
+#version 450
+
+struct parts {
+       vec4 u1;
+       vec2 u2[2];
+};
+
+struct parts2 {
+       parts s1;
+       parts s2[2];
+};
+
+
+layout (location = 0) out vec4 outColor;
+
+layout (binding = 0, std140) uniform block {
+    parts2 s[2];
+} ubo;
+
+void main()
+{
+    outColor = ubo.s[0].s1.u1 + vec4(ubo.s[0].s1.u2[0], ubo.s[0].s1.u2[1]) +
+               ubo.s[1].s2[0].u1 + vec4(ubo.s[0].s2[1].u2[0], ubo.s[1].s2[1].u2[1]);
+}
+
+[test]
+clear color 1.0 0.0 0.0 0.0
+clear
+
+# Initialization --
+
+block binding 0
+block offset 0
+uniform vec4 ubo.s[0].s1.u1 0.0 0.2 0.0 0.1
+block offset 16
+uniform vec2 ubo.s[0].s1.u2[0] 0.1 0.0
+block offset 32
+uniform vec2 ubo.s[0].s1.u2[1] 0.3 0.2
+block offset 112
+uniform vec2 ubo.s[0].s2[1].u2[0] 0.0 0.1
+block offset 192
+uniform vec4 ubo.s[1].s2[0].u1 0.1 0.2 0.2 0.0
+block offset 272
+uniform vec2 ubo.s[1].s2[1].u2[1] 0.2 0.1
+
+# Queries
+
+verify program_interface_query interface GL_UNIFORM_BLOCK        GL_ACTIVE_RESOURCES 1
+verify program_interface_query interface GL_UNIFORM              GL_ACTIVE_RESOURCES 12
+
+# - Uniform block
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (0) GL_BUFFER_BINDING 0
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (0) GL_BUFFER_DATA_SIZE 288
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (0) GL_NUM_ACTIVE_VARIABLES 12
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (0) GL_REFERENCED_BY_VERTEX_SHADER          0
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (0) GL_REFERENCED_BY_COMPUTE_SHADER         0
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (0) GL_REFERENCED_BY_TESS_CONTROL_SHADER    0
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (0) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (0) GL_REFERENCED_BY_GEOMETRY_SHADER        0
+verify program_interface_query resourceByData GL_UNIFORM_BLOCK (0) GL_REFERENCED_BY_FRAGMENT_SHADER        1
+
+# - Uniforms
+
+# block.s[0].s1.u1
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_TYPE GL_FLOAT_VEC4
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_BLOCK_INDEX 0
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_OFFSET 0
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_ARRAY_SIZE 1
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_ARRAY_STRIDE 0
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_MATRIX_STRIDE 0
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_IS_ROW_MAJOR 0
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_ATOMIC_COUNTER_BUFFER_INDEX -1
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_LOCATION -1
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_REFERENCED_BY_VERTEX_SHADER          0
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_REFERENCED_BY_COMPUTE_SHADER         0
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_REFERENCED_BY_TESS_CONTROL_SHADER    0
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_REFERENCED_BY_GEOMETRY_SHADER        0
+verify program_interface_query resourceByData GL_UNIFORM (0 0) GL_REFERENCED_BY_FRAGMENT_SHADER        1
+
+# block.s[0].s1.u2
+verify program_interface_query resourceByData GL_UNIFORM (0 16) GL_TYPE GL_FLOAT_VEC2
+verify program_interface_query resourceByData GL_UNIFORM (0 16) GL_ARRAY_SIZE 2
+verify program_interface_query resourceByData GL_UNIFORM (0 16) GL_ARRAY_STRIDE 16
+
+# block.s[0].s2[0].u1
+verify program_interface_query resourceByData GL_UNIFORM (0 48) GL_TYPE GL_FLOAT_VEC4
+
+# block.s[0].s2[0].u2
+verify program_interface_query resourceByData GL_UNIFORM (0 64) GL_TYPE GL_FLOAT_VEC2
+verify program_interface_query resourceByData GL_UNIFORM (0 64) GL_ARRAY_SIZE 2
+verify program_interface_query resourceByData GL_UNIFORM (0 64) GL_ARRAY_STRIDE 16
+
+# block.s[0].s2[1].u1
+verify program_interface_query resourceByData GL_UNIFORM (0 96) GL_TYPE GL_FLOAT_VEC4
+
+# block.s[0].s2[1].u2
+verify program_interface_query resourceByData GL_UNIFORM (0 112) GL_TYPE GL_FLOAT_VEC2
+verify program_interface_query resourceByData GL_UNIFORM (0 112) GL_ARRAY_SIZE 2
+verify program_interface_query resourceByData GL_UNIFORM (0 112) GL_ARRAY_STRIDE 16
+
+# block.s[1].s1.u1
+verify program_interface_query resourceByData GL_UNIFORM (0 144) GL_TYPE GL_FLOAT_VEC4
+
+# block.s[1].s1.u2
+verify program_interface_query resourceByData GL_UNIFORM (0 160) GL_TYPE GL_FLOAT_VEC2
+verify program_interface_query resourceByData GL_UNIFORM (0 160) GL_ARRAY_SIZE 2
+verify program_interface_query resourceByData GL_UNIFORM (0 160) GL_ARRAY_STRIDE 16
+
+# block.s[1].s2[0].u1
+verify program_interface_query resourceByData GL_UNIFORM (0 192) GL_TYPE GL_FLOAT_VEC4
+
+# block.s[1].s2[0].u2
+verify program_interface_query resourceByData GL_UNIFORM (0 208) GL_TYPE GL_FLOAT_VEC2
+verify program_interface_query resourceByData GL_UNIFORM (0 208) GL_ARRAY_SIZE 2
+verify program_interface_query resourceByData GL_UNIFORM (0 208) GL_ARRAY_STRIDE 16
+
+# block.s[1].s2[1].u1
+verify program_interface_query resourceByData GL_UNIFORM (0 240) GL_TYPE GL_FLOAT_VEC4
+
+# block.s[1].s2[0].u2
+verify program_interface_query resourceByData GL_UNIFORM (0 256) GL_TYPE GL_FLOAT_VEC2
+verify program_interface_query resourceByData GL_UNIFORM (0 256) GL_ARRAY_SIZE 2
+verify program_interface_query resourceByData GL_UNIFORM (0 256) GL_ARRAY_STRIDE 16
+
+draw rect -1 -1 2 2
+probe all rgba 0.2 0.5 0.7 0.4