[Piglit] [PATCH 08/17] arb_gl_spirv: add complex ubo test with matrices
Alejandro PiƱeiro
apinheiro at igalia.com
Sat Sep 15 16:22:46 UTC 2018
UBO test using several matrices on one block. All possible size
combination, mixing row and column major.
---
.../execution/ubo/matrix/complex.shader_test | 624 +++++++++++++++++++++
1 file changed, 624 insertions(+)
create mode 100644 tests/spec/arb_gl_spirv/execution/ubo/matrix/complex.shader_test
diff --git a/tests/spec/arb_gl_spirv/execution/ubo/matrix/complex.shader_test b/tests/spec/arb_gl_spirv/execution/ubo/matrix/complex.shader_test
new file mode 100644
index 000000000..2692bf080
--- /dev/null
+++ b/tests/spec/arb_gl_spirv/execution/ubo/matrix/complex.shader_test
@@ -0,0 +1,624 @@
+# UBO test using several matrices on one block. All possible size
+# combination, mixing row and column major.
+
+[require]
+SPIRV YES
+GL >= 3.3
+GLSL >= 3.30
+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: 359
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %main "main" %outColor
+ OpExecutionMode %main OriginLowerLeft
+ OpSource GLSL 450
+ OpName %_ ""
+ OpMemberDecorate %ComponentsBlock 0 RowMajor
+ OpMemberDecorate %ComponentsBlock 0 Offset 0
+ OpMemberDecorate %ComponentsBlock 0 MatrixStride 16
+ OpMemberDecorate %ComponentsBlock 1 ColMajor
+ OpMemberDecorate %ComponentsBlock 1 Offset 32
+ OpMemberDecorate %ComponentsBlock 1 MatrixStride 16
+ OpMemberDecorate %ComponentsBlock 2 ColMajor
+ OpMemberDecorate %ComponentsBlock 2 Offset 64
+ OpMemberDecorate %ComponentsBlock 2 MatrixStride 16
+ OpMemberDecorate %ComponentsBlock 3 ColMajor
+ OpMemberDecorate %ComponentsBlock 3 Offset 96
+ OpMemberDecorate %ComponentsBlock 3 MatrixStride 16
+ OpMemberDecorate %ComponentsBlock 4 RowMajor
+ OpMemberDecorate %ComponentsBlock 4 Offset 144
+ OpMemberDecorate %ComponentsBlock 4 MatrixStride 16
+ OpMemberDecorate %ComponentsBlock 5 ColMajor
+ OpMemberDecorate %ComponentsBlock 5 Offset 192
+ OpMemberDecorate %ComponentsBlock 5 MatrixStride 16
+ OpMemberDecorate %ComponentsBlock 6 ColMajor
+ OpMemberDecorate %ComponentsBlock 6 Offset 240
+ OpMemberDecorate %ComponentsBlock 6 MatrixStride 16
+ OpMemberDecorate %ComponentsBlock 7 ColMajor
+ OpMemberDecorate %ComponentsBlock 7 Offset 304
+ OpMemberDecorate %ComponentsBlock 7 MatrixStride 16
+ OpMemberDecorate %ComponentsBlock 8 ColMajor
+ OpMemberDecorate %ComponentsBlock 8 Offset 368
+ OpMemberDecorate %ComponentsBlock 8 MatrixStride 16
+ OpDecorate %ComponentsBlock Block
+ OpDecorate %_ DescriptorSet 0
+ OpDecorate %_ Binding 5
+ OpDecorate %outColor Location 0
+ %void = OpTypeVoid
+ %3 = OpTypeFunction %void
+ %bool = OpTypeBool
+%_ptr_Function_bool = OpTypePointer Function %bool
+ %true = OpConstantTrue %bool
+ %float = OpTypeFloat 32
+ %v2float = OpTypeVector %float 2
+%mat2v2float = OpTypeMatrix %v2float 2
+ %v3float = OpTypeVector %float 3
+%mat2v3float = OpTypeMatrix %v3float 2
+ %v4float = OpTypeVector %float 4
+%mat2v4float = OpTypeMatrix %v4float 2
+%mat3v2float = OpTypeMatrix %v2float 3
+%mat3v3float = OpTypeMatrix %v3float 3
+%mat3v4float = OpTypeMatrix %v4float 3
+%mat4v2float = OpTypeMatrix %v2float 4
+%mat4v3float = OpTypeMatrix %v3float 4
+%mat4v4float = OpTypeMatrix %v4float 4
+%ComponentsBlock = OpTypeStruct %mat2v2float %mat2v3float %mat2v4float %mat3v2float %mat3v3float %mat3v4float %mat4v2float %mat4v3float %mat4v4float
+%_ptr_Uniform_ComponentsBlock = OpTypePointer Uniform %ComponentsBlock
+ %_ = OpVariable %_ptr_Uniform_ComponentsBlock Uniform
+ %int = OpTypeInt 32 1
+ %int_0 = OpConstant %int 0
+%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
+%float_n29816_0098 = OpConstant %float -29816.0098
+%float_4996_51611 = OpConstant %float 4996.51611
+ %33 = OpConstantComposite %v2float %float_n29816_0098 %float_4996_51611
+ %v2bool = OpTypeVector %bool 2
+ %int_1 = OpConstant %int 1
+%float_22829_4688 = OpConstant %float 22829.4688
+%float_n30383_2031 = OpConstant %float -30383.2031
+ %45 = OpConstantComposite %v2float %float_22829_4688 %float_n30383_2031
+ %false = OpConstantFalse %bool
+%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float
+%float_5720_54443 = OpConstant %float 5720.54443
+%float_n21857_1582 = OpConstant %float -21857.1582
+%float_n711_078674 = OpConstant %float -711.078674
+ %58 = OpConstantComposite %v3float %float_5720_54443 %float_n21857_1582 %float_n711_078674
+ %v3bool = OpTypeVector %bool 3
+%float_8904_7334 = OpConstant %float 8904.7334
+%float_3164_0835 = OpConstant %float 3164.0835
+%float_20808_1934 = OpConstant %float 20808.1934
+ %70 = OpConstantComposite %v3float %float_8904_7334 %float_3164_0835 %float_20808_1934
+ %int_2 = OpConstant %int 2
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%float_16690_9727 = OpConstant %float 16690.9727
+%float_n30557_1582 = OpConstant %float -30557.1582
+%float_n16199_5928 = OpConstant %float -16199.5928
+%float_2088_69482 = OpConstant %float 2088.69482
+ %84 = OpConstantComposite %v4float %float_16690_9727 %float_n30557_1582 %float_n16199_5928 %float_2088_69482
+ %v4bool = OpTypeVector %bool 4
+%float_n19489_2891 = OpConstant %float -19489.2891
+%float_n9086_43652 = OpConstant %float -9086.43652
+%float_12059_6426 = OpConstant %float 12059.6426
+%float_n15518_0596 = OpConstant %float -15518.0596
+ %97 = OpConstantComposite %v4float %float_n19489_2891 %float_n9086_43652 %float_12059_6426 %float_n15518_0596
+ %int_3 = OpConstant %int 3
+%float_31933_2734 = OpConstant %float 31933.2734
+%float_n11642_8975 = OpConstant %float -11642.8975
+ %108 = OpConstantComposite %v2float %float_31933_2734 %float_n11642_8975
+%float_9012_23633 = OpConstant %float 9012.23633
+%float_n6150_84961 = OpConstant %float -6150.84961
+ %118 = OpConstantComposite %v2float %float_9012_23633 %float_n6150_84961
+%float_n10267_4893 = OpConstant %float -10267.4893
+%float_26495_5859 = OpConstant %float 26495.5859
+ %129 = OpConstantComposite %v2float %float_n10267_4893 %float_26495_5859
+ %int_4 = OpConstant %int 4
+%float_22378_3652 = OpConstant %float 22378.3652
+%float_n24870_3477 = OpConstant %float -24870.3477
+%float_19088_668 = OpConstant %float 19088.668
+ %141 = OpConstantComposite %v3float %float_22378_3652 %float_n24870_3477 %float_19088_668
+%float_n2747_33765 = OpConstant %float -2747.33765
+%float_n30325_041 = OpConstant %float -30325.041
+%float_19382_7812 = OpConstant %float 19382.7812
+ %152 = OpConstantComposite %v3float %float_n2747_33765 %float_n30325_041 %float_19382_7812
+%float_28998_5918 = OpConstant %float 28998.5918
+%float_n3839_13696 = OpConstant %float -3839.13696
+%float_19438_668 = OpConstant %float 19438.668
+ %164 = OpConstantComposite %v3float %float_28998_5918 %float_n3839_13696 %float_19438_668
+ %int_5 = OpConstant %int 5
+%float_28807_2988 = OpConstant %float 28807.2988
+%float_24690_0781 = OpConstant %float 24690.0781
+%float_n22558_6348 = OpConstant %float -22558.6348
+%float_21400_3809 = OpConstant %float 21400.3809
+ %177 = OpConstantComposite %v4float %float_28807_2988 %float_24690_0781 %float_n22558_6348 %float_21400_3809
+%float_n27642_8477 = OpConstant %float -27642.8477
+%float_n5682_01904 = OpConstant %float -5682.01904
+%float_4575_7998 = OpConstant %float 4575.7998
+%float_14191_6123 = OpConstant %float 14191.6123
+ %189 = OpConstantComposite %v4float %float_n27642_8477 %float_n5682_01904 %float_4575_7998 %float_14191_6123
+%float_n30199_3086 = OpConstant %float -30199.3086
+%float_n31303_4219 = OpConstant %float -31303.4219
+%float_n30798_1797 = OpConstant %float -30798.1797
+%float_n16440_0312 = OpConstant %float -16440.0312
+ %202 = OpConstantComposite %v4float %float_n30199_3086 %float_n31303_4219 %float_n30798_1797 %float_n16440_0312
+ %int_6 = OpConstant %int 6
+%float_1848_25549 = OpConstant %float 1848.25549
+%float_n2268_96582 = OpConstant %float -2268.96582
+ %213 = OpConstantComposite %v2float %float_1848_25549 %float_n2268_96582
+%float_n1441_44067 = OpConstant %float -1441.44067
+%float_12916_126 = OpConstant %float 12916.126
+ %223 = OpConstantComposite %v2float %float_n1441_44067 %float_12916_126
+%float_23087_1719 = OpConstant %float 23087.1719
+%float_n21303_748 = OpConstant %float -21303.748
+ %234 = OpConstantComposite %v2float %float_23087_1719 %float_n21303_748
+%float_n10231_1807 = OpConstant %float -10231.1807
+%float_11729_6475 = OpConstant %float 11729.6475
+ %245 = OpConstantComposite %v2float %float_n10231_1807 %float_11729_6475
+ %int_7 = OpConstant %int 7
+%float_20530_7109 = OpConstant %float 20530.7109
+%float_n10508_5107 = OpConstant %float -10508.5107
+%float_n23051_9961 = OpConstant %float -23051.9961
+ %257 = OpConstantComposite %v3float %float_20530_7109 %float_n10508_5107 %float_n23051_9961
+%float_n23564_0664 = OpConstant %float -23564.0664
+%float_n27681_2891 = OpConstant %float -27681.2891
+%float_9081_78711 = OpConstant %float 9081.78711
+ %268 = OpConstantComposite %v3float %float_n23564_0664 %float_n27681_2891 %float_9081_78711
+%float_n12496_1973 = OpConstant %float -12496.1973
+%float_n5854_81055 = OpConstant %float -5854.81055
+%float_5217_75732 = OpConstant %float 5217.75732
+ %280 = OpConstantComposite %v3float %float_n12496_1973 %float_n5854_81055 %float_5217_75732
+%float_26363_8359 = OpConstant %float 26363.8359
+%float_n29557_3516 = OpConstant %float -29557.3516
+%float_30238_998 = OpConstant %float 30238.998
+ %292 = OpConstantComposite %v3float %float_26363_8359 %float_n29557_3516 %float_30238_998
+ %int_8 = OpConstant %int 8
+%float_29616_166 = OpConstant %float 29616.166
+%float_n21563_2676 = OpConstant %float -21563.2676
+%float_n3274_39771 = OpConstant %float -3274.39771
+%float_n7391_61914 = OpConstant %float -7391.61914
+ %305 = OpConstantComposite %v4float %float_29616_166 %float_n21563_2676 %float_n3274_39771 %float_n7391_61914
+%float_29371_457 = OpConstant %float 29371.457
+%float_7793_47266 = OpConstant %float 7793.47266
+%float_n20661_791 = OpConstant %float -20661.791
+%float_n26402_4414 = OpConstant %float -26402.4414
+ %317 = OpConstantComposite %v4float %float_29371_457 %float_7793_47266 %float_n20661_791 %float_n26402_4414
+%float_11556_8564 = OpConstant %float 11556.8564
+%float_20357_9199 = OpConstant %float 20357.9199
+%float_15432_0186 = OpConstant %float 15432.0186
+%float_17385_4688 = OpConstant %float 17385.4688
+ %330 = OpConstantComposite %v4float %float_11556_8564 %float_20357_9199 %float_15432_0186 %float_17385_4688
+%float_21131_9121 = OpConstant %float 21131.9121
+%float_17015_2715 = OpConstant %float 17015.2715
+%float_n30233_4414 = OpConstant %float -30233.4414
+%float_n15875_874 = OpConstant %float -15875.874
+ %343 = OpConstantComposite %v4float %float_21131_9121 %float_17015_2715 %float_n30233_4414 %float_n15875_874
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+ %outColor = OpVariable %_ptr_Output_v4float Output
+ %float_0 = OpConstant %float 0
+ %float_1 = OpConstant %float 1
+ %356 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_0
+ %358 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_0
+ %main = OpFunction %void None %3
+ %5 = OpLabel
+ %pass = OpVariable %_ptr_Function_bool Function
+ OpStore %pass %true
+ %29 = OpAccessChain %_ptr_Uniform_v2float %_ %int_0 %int_0
+ %30 = OpLoad %v2float %29
+ %35 = OpFOrdNotEqual %v2bool %30 %33
+ %36 = OpAny %bool %35
+ %37 = OpLogicalNot %bool %36
+ OpSelectionMerge %39 None
+ OpBranchConditional %37 %38 %39
+ %38 = OpLabel
+ %41 = OpAccessChain %_ptr_Uniform_v2float %_ %int_0 %int_1
+ %42 = OpLoad %v2float %41
+ %46 = OpFOrdNotEqual %v2bool %42 %45
+ %47 = OpAny %bool %46
+ OpBranch %39
+ %39 = OpLabel
+ %48 = OpPhi %bool %36 %5 %47 %38
+ OpSelectionMerge %50 None
+ OpBranchConditional %48 %49 %50
+ %49 = OpLabel
+ OpStore %pass %false
+ OpBranch %50
+ %50 = OpLabel
+ %53 = OpAccessChain %_ptr_Uniform_v3float %_ %int_1 %int_0
+ %54 = OpLoad %v3float %53
+ %60 = OpFOrdNotEqual %v3bool %54 %58
+ %61 = OpAny %bool %60
+ %62 = OpLogicalNot %bool %61
+ OpSelectionMerge %64 None
+ OpBranchConditional %62 %63 %64
+ %63 = OpLabel
+ %65 = OpAccessChain %_ptr_Uniform_v3float %_ %int_1 %int_1
+ %66 = OpLoad %v3float %65
+ %71 = OpFOrdNotEqual %v3bool %66 %70
+ %72 = OpAny %bool %71
+ OpBranch %64
+ %64 = OpLabel
+ %73 = OpPhi %bool %61 %50 %72 %63
+ OpSelectionMerge %75 None
+ OpBranchConditional %73 %74 %75
+ %74 = OpLabel
+ OpStore %pass %false
+ OpBranch %75
+ %75 = OpLabel
+ %78 = OpAccessChain %_ptr_Uniform_v4float %_ %int_2 %int_0
+ %79 = OpLoad %v4float %78
+ %86 = OpFOrdNotEqual %v4bool %79 %84
+ %87 = OpAny %bool %86
+ %88 = OpLogicalNot %bool %87
+ OpSelectionMerge %90 None
+ OpBranchConditional %88 %89 %90
+ %89 = OpLabel
+ %91 = OpAccessChain %_ptr_Uniform_v4float %_ %int_2 %int_1
+ %92 = OpLoad %v4float %91
+ %98 = OpFOrdNotEqual %v4bool %92 %97
+ %99 = OpAny %bool %98
+ OpBranch %90
+ %90 = OpLabel
+ %100 = OpPhi %bool %87 %75 %99 %89
+ OpSelectionMerge %102 None
+ OpBranchConditional %100 %101 %102
+ %101 = OpLabel
+ OpStore %pass %false
+ OpBranch %102
+ %102 = OpLabel
+ %104 = OpAccessChain %_ptr_Uniform_v2float %_ %int_3 %int_0
+ %105 = OpLoad %v2float %104
+ %109 = OpFOrdNotEqual %v2bool %105 %108
+ %110 = OpAny %bool %109
+ %111 = OpLogicalNot %bool %110
+ OpSelectionMerge %113 None
+ OpBranchConditional %111 %112 %113
+ %112 = OpLabel
+ %114 = OpAccessChain %_ptr_Uniform_v2float %_ %int_3 %int_1
+ %115 = OpLoad %v2float %114
+ %119 = OpFOrdNotEqual %v2bool %115 %118
+ %120 = OpAny %bool %119
+ OpBranch %113
+ %113 = OpLabel
+ %121 = OpPhi %bool %110 %102 %120 %112
+ %122 = OpLogicalNot %bool %121
+ OpSelectionMerge %124 None
+ OpBranchConditional %122 %123 %124
+ %123 = OpLabel
+ %125 = OpAccessChain %_ptr_Uniform_v2float %_ %int_3 %int_2
+ %126 = OpLoad %v2float %125
+ %130 = OpFOrdNotEqual %v2bool %126 %129
+ %131 = OpAny %bool %130
+ OpBranch %124
+ %124 = OpLabel
+ %132 = OpPhi %bool %121 %113 %131 %123
+ OpSelectionMerge %134 None
+ OpBranchConditional %132 %133 %134
+ %133 = OpLabel
+ OpStore %pass %false
+ OpBranch %134
+ %134 = OpLabel
+ %136 = OpAccessChain %_ptr_Uniform_v3float %_ %int_4 %int_0
+ %137 = OpLoad %v3float %136
+ %142 = OpFOrdNotEqual %v3bool %137 %141
+ %143 = OpAny %bool %142
+ %144 = OpLogicalNot %bool %143
+ OpSelectionMerge %146 None
+ OpBranchConditional %144 %145 %146
+ %145 = OpLabel
+ %147 = OpAccessChain %_ptr_Uniform_v3float %_ %int_4 %int_1
+ %148 = OpLoad %v3float %147
+ %153 = OpFOrdNotEqual %v3bool %148 %152
+ %154 = OpAny %bool %153
+ OpBranch %146
+ %146 = OpLabel
+ %155 = OpPhi %bool %143 %134 %154 %145
+ %156 = OpLogicalNot %bool %155
+ OpSelectionMerge %158 None
+ OpBranchConditional %156 %157 %158
+ %157 = OpLabel
+ %159 = OpAccessChain %_ptr_Uniform_v3float %_ %int_4 %int_2
+ %160 = OpLoad %v3float %159
+ %165 = OpFOrdNotEqual %v3bool %160 %164
+ %166 = OpAny %bool %165
+ OpBranch %158
+ %158 = OpLabel
+ %167 = OpPhi %bool %155 %146 %166 %157
+ OpSelectionMerge %169 None
+ OpBranchConditional %167 %168 %169
+ %168 = OpLabel
+ OpStore %pass %false
+ OpBranch %169
+ %169 = OpLabel
+ %171 = OpAccessChain %_ptr_Uniform_v4float %_ %int_5 %int_0
+ %172 = OpLoad %v4float %171
+ %178 = OpFOrdNotEqual %v4bool %172 %177
+ %179 = OpAny %bool %178
+ %180 = OpLogicalNot %bool %179
+ OpSelectionMerge %182 None
+ OpBranchConditional %180 %181 %182
+ %181 = OpLabel
+ %183 = OpAccessChain %_ptr_Uniform_v4float %_ %int_5 %int_1
+ %184 = OpLoad %v4float %183
+ %190 = OpFOrdNotEqual %v4bool %184 %189
+ %191 = OpAny %bool %190
+ OpBranch %182
+ %182 = OpLabel
+ %192 = OpPhi %bool %179 %169 %191 %181
+ %193 = OpLogicalNot %bool %192
+ OpSelectionMerge %195 None
+ OpBranchConditional %193 %194 %195
+ %194 = OpLabel
+ %196 = OpAccessChain %_ptr_Uniform_v4float %_ %int_5 %int_2
+ %197 = OpLoad %v4float %196
+ %203 = OpFOrdNotEqual %v4bool %197 %202
+ %204 = OpAny %bool %203
+ OpBranch %195
+ %195 = OpLabel
+ %205 = OpPhi %bool %192 %182 %204 %194
+ OpSelectionMerge %207 None
+ OpBranchConditional %205 %206 %207
+ %206 = OpLabel
+ OpStore %pass %false
+ OpBranch %207
+ %207 = OpLabel
+ %209 = OpAccessChain %_ptr_Uniform_v2float %_ %int_6 %int_0
+ %210 = OpLoad %v2float %209
+ %214 = OpFOrdNotEqual %v2bool %210 %213
+ %215 = OpAny %bool %214
+ %216 = OpLogicalNot %bool %215
+ OpSelectionMerge %218 None
+ OpBranchConditional %216 %217 %218
+ %217 = OpLabel
+ %219 = OpAccessChain %_ptr_Uniform_v2float %_ %int_6 %int_1
+ %220 = OpLoad %v2float %219
+ %224 = OpFOrdNotEqual %v2bool %220 %223
+ %225 = OpAny %bool %224
+ OpBranch %218
+ %218 = OpLabel
+ %226 = OpPhi %bool %215 %207 %225 %217
+ %227 = OpLogicalNot %bool %226
+ OpSelectionMerge %229 None
+ OpBranchConditional %227 %228 %229
+ %228 = OpLabel
+ %230 = OpAccessChain %_ptr_Uniform_v2float %_ %int_6 %int_2
+ %231 = OpLoad %v2float %230
+ %235 = OpFOrdNotEqual %v2bool %231 %234
+ %236 = OpAny %bool %235
+ OpBranch %229
+ %229 = OpLabel
+ %237 = OpPhi %bool %226 %218 %236 %228
+ %238 = OpLogicalNot %bool %237
+ OpSelectionMerge %240 None
+ OpBranchConditional %238 %239 %240
+ %239 = OpLabel
+ %241 = OpAccessChain %_ptr_Uniform_v2float %_ %int_6 %int_3
+ %242 = OpLoad %v2float %241
+ %246 = OpFOrdNotEqual %v2bool %242 %245
+ %247 = OpAny %bool %246
+ OpBranch %240
+ %240 = OpLabel
+ %248 = OpPhi %bool %237 %229 %247 %239
+ OpSelectionMerge %250 None
+ OpBranchConditional %248 %249 %250
+ %249 = OpLabel
+ OpStore %pass %false
+ OpBranch %250
+ %250 = OpLabel
+ %252 = OpAccessChain %_ptr_Uniform_v3float %_ %int_7 %int_0
+ %253 = OpLoad %v3float %252
+ %258 = OpFOrdNotEqual %v3bool %253 %257
+ %259 = OpAny %bool %258
+ %260 = OpLogicalNot %bool %259
+ OpSelectionMerge %262 None
+ OpBranchConditional %260 %261 %262
+ %261 = OpLabel
+ %263 = OpAccessChain %_ptr_Uniform_v3float %_ %int_7 %int_1
+ %264 = OpLoad %v3float %263
+ %269 = OpFOrdNotEqual %v3bool %264 %268
+ %270 = OpAny %bool %269
+ OpBranch %262
+ %262 = OpLabel
+ %271 = OpPhi %bool %259 %250 %270 %261
+ %272 = OpLogicalNot %bool %271
+ OpSelectionMerge %274 None
+ OpBranchConditional %272 %273 %274
+ %273 = OpLabel
+ %275 = OpAccessChain %_ptr_Uniform_v3float %_ %int_7 %int_2
+ %276 = OpLoad %v3float %275
+ %281 = OpFOrdNotEqual %v3bool %276 %280
+ %282 = OpAny %bool %281
+ OpBranch %274
+ %274 = OpLabel
+ %283 = OpPhi %bool %271 %262 %282 %273
+ %284 = OpLogicalNot %bool %283
+ OpSelectionMerge %286 None
+ OpBranchConditional %284 %285 %286
+ %285 = OpLabel
+ %287 = OpAccessChain %_ptr_Uniform_v3float %_ %int_7 %int_3
+ %288 = OpLoad %v3float %287
+ %293 = OpFOrdNotEqual %v3bool %288 %292
+ %294 = OpAny %bool %293
+ OpBranch %286
+ %286 = OpLabel
+ %295 = OpPhi %bool %283 %274 %294 %285
+ OpSelectionMerge %297 None
+ OpBranchConditional %295 %296 %297
+ %296 = OpLabel
+ OpStore %pass %false
+ OpBranch %297
+ %297 = OpLabel
+ %299 = OpAccessChain %_ptr_Uniform_v4float %_ %int_8 %int_0
+ %300 = OpLoad %v4float %299
+ %306 = OpFOrdNotEqual %v4bool %300 %305
+ %307 = OpAny %bool %306
+ %308 = OpLogicalNot %bool %307
+ OpSelectionMerge %310 None
+ OpBranchConditional %308 %309 %310
+ %309 = OpLabel
+ %311 = OpAccessChain %_ptr_Uniform_v4float %_ %int_8 %int_1
+ %312 = OpLoad %v4float %311
+ %318 = OpFOrdNotEqual %v4bool %312 %317
+ %319 = OpAny %bool %318
+ OpBranch %310
+ %310 = OpLabel
+ %320 = OpPhi %bool %307 %297 %319 %309
+ %321 = OpLogicalNot %bool %320
+ OpSelectionMerge %323 None
+ OpBranchConditional %321 %322 %323
+ %322 = OpLabel
+ %324 = OpAccessChain %_ptr_Uniform_v4float %_ %int_8 %int_2
+ %325 = OpLoad %v4float %324
+ %331 = OpFOrdNotEqual %v4bool %325 %330
+ %332 = OpAny %bool %331
+ OpBranch %323
+ %323 = OpLabel
+ %333 = OpPhi %bool %320 %310 %332 %322
+ %334 = OpLogicalNot %bool %333
+ OpSelectionMerge %336 None
+ OpBranchConditional %334 %335 %336
+ %335 = OpLabel
+ %337 = OpAccessChain %_ptr_Uniform_v4float %_ %int_8 %int_3
+ %338 = OpLoad %v4float %337
+ %344 = OpFOrdNotEqual %v4bool %338 %343
+ %345 = OpAny %bool %344
+ OpBranch %336
+ %336 = OpLabel
+ %346 = OpPhi %bool %333 %323 %345 %335
+ OpSelectionMerge %348 None
+ OpBranchConditional %346 %347 %348
+ %347 = OpLabel
+ OpStore %pass %false
+ OpBranch %348
+ %348 = OpLabel
+ %349 = OpLoad %bool %pass
+ OpSelectionMerge %351 None
+ OpBranchConditional %349 %350 %357
+ %350 = OpLabel
+ OpStore %outColor %356
+ OpBranch %351
+ %357 = OpLabel
+ OpStore %outColor %358
+ OpBranch %351
+ %351 = OpLabel
+ OpReturn
+ OpFunctionEnd
+
+[fragment shader]
+
+#version 450
+
+layout (location = 0) out vec4 outColor;
+layout (std140, binding = 5) uniform ComponentsBlock
+ {
+ layout (row_major) mat2x2 m22;
+ layout (column_major) mat2x3 m23;
+ layout (column_major) mat2x4 m24;
+ layout (column_major) mat3x2 m32;
+ layout (row_major) mat3x3 m33;
+ layout (column_major) mat3x4 m34;
+ layout (column_major) mat4x2 m42;
+ layout (column_major) mat4x3 m43;
+ layout (column_major) mat4x4 m44;
+ };
+
+void main()
+{
+ bool pass = true;
+
+ if (m22[0] != vec2(-29816.0100557, 4996.51593805) ||
+ m22[1] != vec2(22829.4693217, -30383.203006))
+ pass = false;
+
+ if (m23[0] != vec3(5720.54428931, -21857.1581292, -711.078644999) ||
+ m23[1] != vec3(8904.73374533, 3164.08349737, 20808.1933471))
+ pass = false;
+
+ if (m24[0] != vec4(16690.9719539, -30557.1591211, -16199.592401, 2088.69494163) ||
+ m24[1] != vec4(-19489.2885786, -9086.43642329, 12059.643061, -15518.0593576))
+ pass = false;
+
+ if (m32[0] != vec2(31933.27393, -11642.8972152) ||
+ m32[1] != vec2(9012.23624018, -6150.84975967) ||
+ m32[2] != vec2(-10267.4895552, 26495.5859007))
+ pass = false;
+
+ if (m33[0] != vec3(22378.3645075, -24870.3481651, 19088.6683299) ||
+ m33[1] != vec3(-2747.33765164, -30325.0400702, 19382.7803769) ||
+ m33[2] != vec3(28998.5927672, -3839.13702602, 19438.6676432))
+ pass = false;
+
+ if (m34[0] != vec4(28807.2986343, 24690.0772412, -22558.6354314, 21400.3810636) ||
+ m34[1] != vec4(-27642.8476844, -5682.01881437, 4575.7996643, 14191.6120546) ||
+ m34[2] != vec4(-30199.3084764, -31303.4210269, -30798.1801328, -16440.0318151))
+ pass = false;
+
+ if (m42[0] != vec2(1848.25552758, -2268.96586557) ||
+ m42[1] != vec2(-1441.44065003, 12916.12607) ||
+ m42[2] != vec2(23087.1716182, -21303.7489128) ||
+ m42[3] != vec2(-10231.1810483, 11729.6478218))
+ pass = false;
+
+ if (m43[0] != vec3(20530.7108263, -10508.5105669, -23051.9953613) ||
+ m43[1] != vec3(-23564.0673228, -27681.288716, 9081.78673991) ||
+ m43[2] != vec3(-12496.1967803, -5854.8105745, 5217.75729) ||
+ m43[3] != vec3(26363.8367742, -29557.3508507, 30238.9989166))
+ pass = false;
+
+ if (m44[0] != vec4(29616.166598, -21563.2666972, -3274.39775692, -7391.61915007) ||
+ m44[1] != vec4(29371.4563058, 7793.47278553, -20661.7912871, -26402.4415351) ||
+ m44[2] != vec4(11556.8560616, 20357.9190661, 15432.018204, 17385.4694591) ||
+ m44[3] != vec4(21131.9116045, 17015.271809, -30233.4408637, -15875.8741436))
+ pass = false;
+
+
+ if (pass)
+ outColor = vec4(0.0, 1.0, 0.0, 0.0);
+ else
+ outColor = vec4(1.0, 0.0, 0.0, 0.0);
+}
+
+[test]
+clear color 0.0 0.0 0.0 0.0
+clear
+
+block binding 5
+block row major 1
+block matrix stride 16
+block offset 0
+uniform mat2x2 m22 -29816.0100557 4996.51593805 22829.4693217 -30383.203006
+block row major 0
+block offset 32
+uniform mat2x3 m23 5720.54428931 -21857.1581292 -711.078644999 8904.73374533 3164.08349737 20808.1933471
+block offset 64
+uniform mat2x4 m24 16690.9719539 -30557.1591211 -16199.592401 2088.69494163 -19489.2885786 -9086.43642329 12059.643061 -15518.0593576
+block offset 96
+uniform mat3x2 m32 31933.27393 -11642.8972152 9012.23624018 -6150.84975967 -10267.4895552 26495.5859007
+block row major 1
+block offset 144
+uniform mat3x3 m33 22378.3645075 -24870.3481651 19088.6683299 -2747.33765164 -30325.0400702 19382.7803769 28998.5927672 -3839.13702602 19438.6676432
+block row major 0
+block offset 192
+uniform mat3x4 m34 28807.2986343 24690.0772412 -22558.6354314 21400.3810636 -27642.8476844 -5682.01881437 4575.7996643 14191.6120546 -30199.3084764 -31303.4210269 -30798.1801328 -16440.0318151
+block offset 240
+uniform mat4x2 m42 1848.25552758 -2268.96586557 -1441.44065003 12916.12607 23087.1716182 -21303.7489128 -10231.1810483 11729.6478218
+block offset 304
+uniform mat4x3 m43 20530.7108263 -10508.5105669 -23051.9953613 -23564.0673228 -27681.288716 9081.78673991 -12496.1967803 -5854.8105745 5217.75729 26363.8367742 -29557.3508507 30238.9989166
+block offset 368
+uniform mat4x4 m44 29616.166598 -21563.2666972 -3274.39775692 -7391.61915007 29371.4563058 7793.47278553 -20661.7912871 -26402.4415351 11556.8560616 20357.9190661 15432.018204 17385.4694591 21131.9116045 17015.271809 -30233.4408637 -15875.8741436
+
+
+verify program_interface_query GL_UNIFORM_BLOCK ComponentsBlock GL_NUM_ACTIVE_VARIABLES 9
+verify program_interface_query GL_UNIFORM_BLOCK ComponentsBlock GL_BUFFER_DATA_SIZE 432
+
+verify program_query GL_ACTIVE_UNIFORMS 9
+
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 0.0
--
2.14.1
More information about the Piglit
mailing list