From ed777b0fbdcae90eef3f5a4ae83073d1120c0553 Mon Sep 17 00:00:00 2001 From: Alan Baker Date: Tue, 4 Dec 2018 10:43:23 -0500 Subject: [PATCH] Modify testing to only record validation pass/fail * Changed unit tests to only record known the validation pass/fail status * errors are output as part of the failure message if the result is unexpected * can turn off validation for each test individually * Moved some SPV_KHR_vulkan_memory_model tests to be compiled for Vulkan 1.1 --- Test/baseResults/hlsl.PointSize.geom.out | 5 +- Test/baseResults/hlsl.attributeC11.frag.out | 5 +- Test/baseResults/hlsl.buffer.frag.out | 5 +- Test/baseResults/hlsl.constantbuffer.frag.out | 7 +- Test/baseResults/hlsl.constructimat.frag.out | 5 +- Test/baseResults/hlsl.coverage.frag.out | 5 +- .../hlsl.emptystructreturn.frag.out | 5 +- .../hlsl.emptystructreturn.vert.out | 5 +- .../hlsl.gatherRGBA.offset.dx10.frag.out | 5 +- .../hlsl.gatherRGBA.offsetarray.dx10.frag.out | 5 +- Test/baseResults/hlsl.intrinsics.comp.out | 5 +- .../hlsl.intrinsics.evalfns.frag.out | 5 +- Test/baseResults/hlsl.intrinsics.frag.out | 5 +- Test/baseResults/hlsl.intrinsics.vert.out | 5 +- Test/baseResults/hlsl.matNx1.frag.out | 5 +- Test/baseResults/hlsl.matType.bool.frag.out | 5 +- Test/baseResults/hlsl.matType.frag.out | 5 +- Test/baseResults/hlsl.matType.int.frag.out | 5 +- Test/baseResults/hlsl.matrixSwizzle.vert.out | 6 +- Test/baseResults/hlsl.namespace.frag.out | 5 +- Test/baseResults/hlsl.partialInit.frag.out | 5 +- .../hlsl.samplebias.offset.dx10.frag.out | 5 +- .../hlsl.samplebias.offsetarray.dx10.frag.out | 5 +- .../hlsl.samplecmp.array.dx10.frag.out | 5 +- .../hlsl.samplecmp.basic.dx10.frag.out | 5 +- .../hlsl.samplecmp.offset.dx10.frag.out | 5 +- .../hlsl.samplecmp.offsetarray.dx10.frag.out | 5 +- ...lsl.samplecmplevelzero.array.dx10.frag.out | 5 +- ...lsl.samplecmplevelzero.basic.dx10.frag.out | 5 +- ...sl.samplecmplevelzero.offset.dx10.frag.out | 5 +- ...mplecmplevelzero.offsetarray.dx10.frag.out | 5 +- Test/baseResults/hlsl.semantic.geom.out | 5 +- Test/baseResults/hlsl.struct.frag.out | 5 +- .../hlsl.struct.split.assign.frag.out | 5 +- .../hlsl.structarray.flatten.frag.out | 7 +- .../hlsl.structbuffer.append.fn.frag.out | 5 +- .../hlsl.structbuffer.atomics.frag.out | 5 +- .../baseResults/hlsl.structbuffer.fn.frag.out | 5 +- Test/baseResults/hlsl.texture.struct.frag.out | 5 +- .../hlsl.tristream-append.geom.out | 5 +- Test/baseResults/spv.130.frag.out | 5 +- Test/baseResults/spv.140.frag.out | 5 +- Test/baseResults/spv.400.frag.out | 5 +- Test/baseResults/spv.AofA.frag.out | 7 +- .../spv.controlFlowAttributes.frag.out | 3 +- Test/baseResults/spv.explicittypes.frag.out | 5 +- Test/baseResults/spv.float16.frag.out | 5 +- Test/baseResults/spv.float16Fetch.frag.out | 5 +- Test/baseResults/spv.float32.frag.out | 5 +- Test/baseResults/spv.float64.frag.out | 5 +- .../spv.functionNestedOpaque.vert.out | 7 +- Test/baseResults/spv.image.frag.out | 5 +- .../spv.imageLoadStoreLod.frag.out | 5 +- Test/baseResults/spv.int16.amd.frag.out | 5 +- Test/baseResults/spv.int16.frag.out | 5 +- Test/baseResults/spv.int32.frag.out | 5 +- Test/baseResults/spv.int64.frag.out | 5 +- Test/baseResults/spv.int8.frag.out | 5 +- Test/baseResults/spv.memoryQualifier.frag.out | 5 +- .../spv.multiviewPerViewAttributes.tesc.out | 5 +- Test/baseResults/spv.newTexture.frag.out | 5 +- Test/baseResults/spv.paramMemory.frag.out | 5 +- Test/baseResults/spv.queryL.frag.out | 5 +- .../spv.sampleMaskOverrideCoverage.frag.out | 5 +- Test/baseResults/spv.scalarlayout.frag.out | 5 +- .../spv.scalarlayoutfloat16.frag.out | 5 +- Test/baseResults/spv.separate.frag.out | 5 +- Test/baseResults/spv.shaderBallotAMD.comp.out | 5 +- Test/baseResults/spv.sparseTexture.frag.out | 5 +- .../spv.sparseTextureClamp.frag.out | 5 +- .../spv.stereoViewRendering.tesc.out | 5 +- .../spv.subgroupPartitioned.comp.out | 5 +- .../spv.textureGatherBiasLod.frag.out | 5 +- Test/baseResults/spv.viewportArray2.tesc.out | 5 +- Test/baseResults/spv.vulkan110.int16.frag.out | 5 +- gtests/Config.FromFile.cpp | 1 + gtests/Link.FromFile.Vk.cpp | 10 +-- gtests/Link.FromFile.cpp | 1 + gtests/TestFixture.h | 67 +++++++++++-------- 79 files changed, 120 insertions(+), 341 deletions(-) diff --git a/Test/baseResults/hlsl.PointSize.geom.out b/Test/baseResults/hlsl.PointSize.geom.out index c21008d28..77cdc7db7 100644 --- a/Test/baseResults/hlsl.PointSize.geom.out +++ b/Test/baseResults/hlsl.PointSize.geom.out @@ -69,10 +69,7 @@ output primitive = line_strip 0:? 'ps' ( in 3-element array of uint PointSize) 0:? 'OutputStream.ps' ( out float PointSize) -error: SPIRV-Tools Validation Errors -error: According to the Vulkan spec BuiltIn PointSize variable needs to be a 32-bit float scalar. ID <28> (OpVariable) is not a float scalar. - %29 = OpLoad %_arr_uint_uint_3 %ps_1 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 36 diff --git a/Test/baseResults/hlsl.attributeC11.frag.out b/Test/baseResults/hlsl.attributeC11.frag.out index afc746699..927ea57f1 100644 --- a/Test/baseResults/hlsl.attributeC11.frag.out +++ b/Test/baseResults/hlsl.attributeC11.frag.out @@ -93,10 +93,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=7) out 4-component vector of float) 0:? 'input' (layout( location=8) in 4-component vector of float) -error: SPIRV-Tools Validation Errors -error: Operand 2 of Decorate requires one of these capabilities: InputAttachment - OpDecorate %attach InputAttachmentIndex 4 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 51 diff --git a/Test/baseResults/hlsl.buffer.frag.out b/Test/baseResults/hlsl.buffer.frag.out index 71393f083..1b7e03ff4 100644 --- a/Test/baseResults/hlsl.buffer.frag.out +++ b/Test/baseResults/hlsl.buffer.frag.out @@ -145,10 +145,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.a' (layout( location=0) out 4-component vector of float) 0:? 'input' ( in 4-component vector of float FragCoord) -error: SPIRV-Tools Validation Errors -error: Structure id 50 decorated as BufferBlock for variable in Uniform storage class must follow relaxed storage buffer layout rules: member 7 at offset 128 overlaps previous member ending at offset 171 - %tbufName = OpTypeStruct %v4float %int %float %float %float %float %float %float %mat3v4float %mat3v4float %mat3v4float %mat3v4float - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 73 diff --git a/Test/baseResults/hlsl.constantbuffer.frag.out b/Test/baseResults/hlsl.constantbuffer.frag.out index 052d84e48..8c561dc17 100644 --- a/Test/baseResults/hlsl.constantbuffer.frag.out +++ b/Test/baseResults/hlsl.constantbuffer.frag.out @@ -131,12 +131,7 @@ gl_FragCoord origin is upper left 0:? 'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform int c1}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -error: SPIRV-Tools Validation Errors -error: Uniform OpVariable '18[cb3] 'has illegal type. -From Vulkan spec, section 14.5.2: -Variables identified with the Uniform storage class are used to access transparent buffer backed resources. Such variables must be typed as OpTypeStruct, or an array of this type - %cb3_0 = OpVariable %_ptr_Uniform__arr__arr_cb3_uint_4_uint_2 Uniform - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 66 diff --git a/Test/baseResults/hlsl.constructimat.frag.out b/Test/baseResults/hlsl.constructimat.frag.out index e88c3d8f3..075dabb58 100644 --- a/Test/baseResults/hlsl.constructimat.frag.out +++ b/Test/baseResults/hlsl.constructimat.frag.out @@ -543,10 +543,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? '@entryPointOutput' (layout( location=0) out int) -error: SPIRV-Tools Validation Errors -error: Matrix types can only be parameterized with floating-point types. - %mat4v4int = OpTypeMatrix %v4int 4 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 98 diff --git a/Test/baseResults/hlsl.coverage.frag.out b/Test/baseResults/hlsl.coverage.frag.out index bea2fc0e5..691d64368 100644 --- a/Test/baseResults/hlsl.coverage.frag.out +++ b/Test/baseResults/hlsl.coverage.frag.out @@ -117,10 +117,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.nCoverageMask' ( out 1-element array of uint SampleMaskIn) 0:? '@entryPointOutput.vColor' (layout( location=0) out 4-component vector of float) -error: SPIRV-Tools Validation Errors -error: Input variable id <34> is used by entry point 'main' id <4>, but is not listed as an interface - %i_1 = OpVariable %_ptr_Input_PS_INPUT Input - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 52 diff --git a/Test/baseResults/hlsl.emptystructreturn.frag.out b/Test/baseResults/hlsl.emptystructreturn.frag.out index 34a635c70..1c9953b5f 100644 --- a/Test/baseResults/hlsl.emptystructreturn.frag.out +++ b/Test/baseResults/hlsl.emptystructreturn.frag.out @@ -49,10 +49,7 @@ gl_FragCoord origin is upper left 0:? 'i' ( temp structure{}) 0:? Linker Objects -error: SPIRV-Tools Validation Errors -error: Input variable id <20> is used by entry point 'main' id <4>, but is not listed as an interface - %i_1 = OpVariable %_ptr_Input_ps_in Input - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 27 diff --git a/Test/baseResults/hlsl.emptystructreturn.vert.out b/Test/baseResults/hlsl.emptystructreturn.vert.out index 61704586f..65d326d45 100644 --- a/Test/baseResults/hlsl.emptystructreturn.vert.out +++ b/Test/baseResults/hlsl.emptystructreturn.vert.out @@ -47,10 +47,7 @@ Shader version: 500 0:? 'i' ( temp structure{}) 0:? Linker Objects -error: SPIRV-Tools Validation Errors -error: Input variable id <20> is used by entry point 'main' id <4>, but is not listed as an interface - %i_1 = OpVariable %_ptr_Input_vs_in Input - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 27 diff --git a/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out b/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out index 33c9af43e..892145560 100644 --- a/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out +++ b/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out @@ -1261,10 +1261,7 @@ using depth_any 0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) -error: SPIRV-Tools Validation Errors -error: Expected Image Operand ConstOffsets to be a const object - %90 = OpImageGather %v4float %76 %78 %int_0 ConstOffsets %89 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 399 diff --git a/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out index 22b02e7f4..8520bd655 100644 --- a/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out +++ b/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out @@ -1253,10 +1253,7 @@ using depth_any 0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) -error: SPIRV-Tools Validation Errors -error: Expected Image Operand ConstOffsets to be a const object - %90 = OpImageGather %v4float %76 %78 %int_0 ConstOffsets %89 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 389 diff --git a/Test/baseResults/hlsl.intrinsics.comp.out b/Test/baseResults/hlsl.intrinsics.comp.out index 5058f2365..3329c5cb7 100644 --- a/Test/baseResults/hlsl.intrinsics.comp.out +++ b/Test/baseResults/hlsl.intrinsics.comp.out @@ -715,10 +715,7 @@ local_size = (1, 1, 1) 0:? 'inU0' (layout( location=3) in 4-component vector of uint) 0:? 'inU1' (layout( location=4) in 4-component vector of uint) -error: SPIRV-Tools Validation Errors -error: Expected operand to be vector bool: All - %64 = OpAll %bool %63 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 265 diff --git a/Test/baseResults/hlsl.intrinsics.evalfns.frag.out b/Test/baseResults/hlsl.intrinsics.evalfns.frag.out index 4fd1e7b38..3f69827da 100644 --- a/Test/baseResults/hlsl.intrinsics.evalfns.frag.out +++ b/Test/baseResults/hlsl.intrinsics.evalfns.frag.out @@ -153,10 +153,7 @@ gl_FragCoord origin is upper left 0:? 'inF4' (layout( location=3) in 4-component vector of float) 0:? 'inI2' (layout( location=4) flat in 2-component vector of int) -error: SPIRV-Tools Validation Errors -error: GLSL.std.450 InterpolateAtOffset: expected Interpolant storage class to be Input - %28 = OpExtInst %float %1 InterpolateAtOffset %inF1 %27 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 80 diff --git a/Test/baseResults/hlsl.intrinsics.frag.out b/Test/baseResults/hlsl.intrinsics.frag.out index 20d2bb047..b8add071b 100644 --- a/Test/baseResults/hlsl.intrinsics.frag.out +++ b/Test/baseResults/hlsl.intrinsics.frag.out @@ -5643,10 +5643,7 @@ gl_FragCoord origin is upper left 0:? 'gs_uc4' ( shared 4-component vector of uint) 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) -error: SPIRV-Tools Validation Errors -error: Matrix types can only be parameterized with floating-point types. - %mat2v2bool = OpTypeMatrix %v2bool 2 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 1836 diff --git a/Test/baseResults/hlsl.intrinsics.vert.out b/Test/baseResults/hlsl.intrinsics.vert.out index 195e11d6e..460785e7f 100644 --- a/Test/baseResults/hlsl.intrinsics.vert.out +++ b/Test/baseResults/hlsl.intrinsics.vert.out @@ -2778,10 +2778,7 @@ Shader version: 500 0:413 'inFM3x2' ( in 3X2 matrix of float) 0:? Linker Objects -error: SPIRV-Tools Validation Errors -error: Matrix types can only be parameterized with floating-point types. - %mat2v2bool = OpTypeMatrix %v2bool 2 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 1225 diff --git a/Test/baseResults/hlsl.matNx1.frag.out b/Test/baseResults/hlsl.matNx1.frag.out index 276d4c249..e8e0a7b3d 100644 --- a/Test/baseResults/hlsl.matNx1.frag.out +++ b/Test/baseResults/hlsl.matNx1.frag.out @@ -151,10 +151,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) -error: SPIRV-Tools Validation Errors -error: Illegal number of components (1) for TypeVector - %v1float = OpTypeVector %float 1 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 77 diff --git a/Test/baseResults/hlsl.matType.bool.frag.out b/Test/baseResults/hlsl.matType.bool.frag.out index 900c60fcd..b5543d8f2 100644 --- a/Test/baseResults/hlsl.matType.bool.frag.out +++ b/Test/baseResults/hlsl.matType.bool.frag.out @@ -231,10 +231,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) -error: SPIRV-Tools Validation Errors -error: Illegal number of components (1) for TypeVector - %v1bool = OpTypeVector %bool 1 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 130 diff --git a/Test/baseResults/hlsl.matType.frag.out b/Test/baseResults/hlsl.matType.frag.out index c0d2e4b3f..d3b391b39 100644 --- a/Test/baseResults/hlsl.matType.frag.out +++ b/Test/baseResults/hlsl.matType.frag.out @@ -30,10 +30,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 1-component vector of float f1, uniform 1X1 matrix of float fmat11, uniform 4X1 matrix of float fmat41, uniform 1X2 matrix of float fmat12, uniform 2X3 matrix of double dmat23, uniform 4X4 matrix of int int44}) -error: SPIRV-Tools Validation Errors -error: Illegal number of components (1) for TypeVector - %v1float = OpTypeVector %float 1 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 30 diff --git a/Test/baseResults/hlsl.matType.int.frag.out b/Test/baseResults/hlsl.matType.int.frag.out index 2039dfd57..a1854aa21 100644 --- a/Test/baseResults/hlsl.matType.int.frag.out +++ b/Test/baseResults/hlsl.matType.int.frag.out @@ -397,10 +397,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) -error: SPIRV-Tools Validation Errors -error: Illegal number of components (1) for TypeVector - %v1int = OpTypeVector %int 1 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 232 diff --git a/Test/baseResults/hlsl.matrixSwizzle.vert.out b/Test/baseResults/hlsl.matrixSwizzle.vert.out index abb3e495a..237ce5d4e 100644 --- a/Test/baseResults/hlsl.matrixSwizzle.vert.out +++ b/Test/baseResults/hlsl.matrixSwizzle.vert.out @@ -675,11 +675,7 @@ Shader version: 500 0:? Linker Objects 0:? 'inf' (layout( location=0) in float) -Missing functionality: matrix swizzle -error: SPIRV-Tools Validation Errors -error: OpStore Pointer '42[f3]'s type does not match Object '34's type. - OpStore %f3 %int_0 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 118 diff --git a/Test/baseResults/hlsl.namespace.frag.out b/Test/baseResults/hlsl.namespace.frag.out index 08d959b3e..8df43ad75 100644 --- a/Test/baseResults/hlsl.namespace.frag.out +++ b/Test/baseResults/hlsl.namespace.frag.out @@ -101,10 +101,7 @@ gl_FragCoord origin is upper left 0:? 'N2::gf' ( global float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -error: SPIRV-Tools Validation Errors -error: OpFunctionCall Function 's parameter count does not match the argument count. - %43 = OpFunctionCall %v4float %N2__N3__C1__getVec_ - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 54 diff --git a/Test/baseResults/hlsl.partialInit.frag.out b/Test/baseResults/hlsl.partialInit.frag.out index 2cdbb0fff..6881671e9 100644 --- a/Test/baseResults/hlsl.partialInit.frag.out +++ b/Test/baseResults/hlsl.partialInit.frag.out @@ -398,10 +398,7 @@ gl_FragCoord origin is upper left 0:? 'ci' ( const int) 0:? 0 (const int) -error: SPIRV-Tools Validation Errors -error: If OpTypeBool is stored in conjunction with OpVariable, it can only be used with non-externally visible shader Storage Classes: Workgroup, CrossWorkgroup, Private, and Function - %_entryPointOutput_c = OpVariable %_ptr_Output_bool Output - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 104 diff --git a/Test/baseResults/hlsl.samplebias.offset.dx10.frag.out b/Test/baseResults/hlsl.samplebias.offset.dx10.frag.out index ae492e4d4..5d0b8625d 100644 --- a/Test/baseResults/hlsl.samplebias.offset.dx10.frag.out +++ b/Test/baseResults/hlsl.samplebias.offset.dx10.frag.out @@ -399,10 +399,7 @@ using depth_any 0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) -error: SPIRV-Tools Validation Errors -error: Expected Image Operand Bias to be float scalar - %28 = OpImageSampleImplicitLod %v4float %23 %float_0_100000001 Bias|ConstOffset %int_1 %float_0_5 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 161 diff --git a/Test/baseResults/hlsl.samplebias.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.samplebias.offsetarray.dx10.frag.out index 0cea76706..21112f82c 100644 --- a/Test/baseResults/hlsl.samplebias.offsetarray.dx10.frag.out +++ b/Test/baseResults/hlsl.samplebias.offsetarray.dx10.frag.out @@ -297,10 +297,7 @@ using depth_any 0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) -error: SPIRV-Tools Validation Errors -error: Expected Image Operand Bias to be float scalar - %31 = OpImageSampleImplicitLod %v4float %23 %27 Bias|ConstOffset %int_0 %float_0_5 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 118 diff --git a/Test/baseResults/hlsl.samplecmp.array.dx10.frag.out b/Test/baseResults/hlsl.samplecmp.array.dx10.frag.out index a41481da5..11803c140 100644 --- a/Test/baseResults/hlsl.samplecmp.array.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmp.array.dx10.frag.out @@ -397,10 +397,7 @@ using depth_any 0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) -error: SPIRV-Tools Validation Errors -error: Expected Image 'Sampled Type' to be the same as Result Type - %48 = OpImageSampleDrefImplicitLod %float %43 %46 %47 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 209 diff --git a/Test/baseResults/hlsl.samplecmp.basic.dx10.frag.out b/Test/baseResults/hlsl.samplecmp.basic.dx10.frag.out index e8252d381..b79b3bf40 100644 --- a/Test/baseResults/hlsl.samplecmp.basic.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmp.basic.dx10.frag.out @@ -379,10 +379,7 @@ using depth_any 0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) -error: SPIRV-Tools Validation Errors -error: Expected Image 'Sampled Type' to be the same as Result Type - %41 = OpImageSampleDrefImplicitLod %float %38 %39 %40 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 198 diff --git a/Test/baseResults/hlsl.samplecmp.offset.dx10.frag.out b/Test/baseResults/hlsl.samplecmp.offset.dx10.frag.out index cb4ce3909..157761426 100644 --- a/Test/baseResults/hlsl.samplecmp.offset.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmp.offset.dx10.frag.out @@ -325,10 +325,7 @@ using depth_any 0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) -error: SPIRV-Tools Validation Errors -error: Expected Image 'Sampled Type' to be the same as Result Type - %42 = OpImageSampleDrefImplicitLod %float %39 %40 %41 ConstOffset %int_2 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 167 diff --git a/Test/baseResults/hlsl.samplecmp.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.samplecmp.offsetarray.dx10.frag.out index af2af3f29..9d60e464d 100644 --- a/Test/baseResults/hlsl.samplecmp.offsetarray.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmp.offsetarray.dx10.frag.out @@ -337,10 +337,7 @@ using depth_any 0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) -error: SPIRV-Tools Validation Errors -error: Expected Image 'Sampled Type' to be the same as Result Type - %49 = OpImageSampleDrefImplicitLod %float %44 %47 %48 ConstOffset %int_2 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 178 diff --git a/Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out b/Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out index a0e5a487f..0b5190b34 100644 --- a/Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out @@ -433,10 +433,7 @@ using depth_any 0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) -error: SPIRV-Tools Validation Errors -error: Expected Image 'Sampled Type' to be the same as Result Type - %49 = OpImageSampleDrefExplicitLod %float %44 %47 %48 Lod %float_0 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 210 diff --git a/Test/baseResults/hlsl.samplecmplevelzero.basic.dx10.frag.out b/Test/baseResults/hlsl.samplecmplevelzero.basic.dx10.frag.out index ffe22988e..9e9a85c2c 100644 --- a/Test/baseResults/hlsl.samplecmplevelzero.basic.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmplevelzero.basic.dx10.frag.out @@ -415,10 +415,7 @@ using depth_any 0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) -error: SPIRV-Tools Validation Errors -error: Expected Image 'Sampled Type' to be the same as Result Type - %42 = OpImageSampleDrefExplicitLod %float %39 %40 %41 Lod %float_0 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 199 diff --git a/Test/baseResults/hlsl.samplecmplevelzero.offset.dx10.frag.out b/Test/baseResults/hlsl.samplecmplevelzero.offset.dx10.frag.out index 08e8749f9..6bdb87e15 100644 --- a/Test/baseResults/hlsl.samplecmplevelzero.offset.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmplevelzero.offset.dx10.frag.out @@ -349,10 +349,7 @@ using depth_any 0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) -error: SPIRV-Tools Validation Errors -error: Expected Image 'Sampled Type' to be the same as Result Type - %43 = OpImageSampleDrefExplicitLod %float %40 %41 %42 Lod|ConstOffset %float_0 %int_2 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 168 diff --git a/Test/baseResults/hlsl.samplecmplevelzero.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.samplecmplevelzero.offsetarray.dx10.frag.out index b5c0fc0d7..8231c11a4 100644 --- a/Test/baseResults/hlsl.samplecmplevelzero.offsetarray.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmplevelzero.offsetarray.dx10.frag.out @@ -361,10 +361,7 @@ using depth_any 0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) -error: SPIRV-Tools Validation Errors -error: Expected Image 'Sampled Type' to be the same as Result Type - %50 = OpImageSampleDrefExplicitLod %float %45 %48 %49 Lod|ConstOffset %float_0 %int_2 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 179 diff --git a/Test/baseResults/hlsl.semantic.geom.out b/Test/baseResults/hlsl.semantic.geom.out index e73940bce..773c8aa37 100644 --- a/Test/baseResults/hlsl.semantic.geom.out +++ b/Test/baseResults/hlsl.semantic.geom.out @@ -155,10 +155,7 @@ output primitive = line_strip 0:? 'OutputStream.clip0' ( out 1-element array of float ClipDistance) 0:? 'OutputStream.cull0' ( out 1-element array of float CullDistance) -error: SPIRV-Tools Validation Errors -error: According to the Vulkan spec BuiltIn Position variable needs to be a 4-component 32-bit float vector. ID <20> (OpVariable) is not a float vector. - OpStore %OutputStream_clip0 %25 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 65 diff --git a/Test/baseResults/hlsl.struct.frag.out b/Test/baseResults/hlsl.struct.frag.out index 4ea7bbbd1..4f5fb6f24 100644 --- a/Test/baseResults/hlsl.struct.frag.out +++ b/Test/baseResults/hlsl.struct.frag.out @@ -211,10 +211,7 @@ gl_FragCoord origin is upper left 0:? 's.ff3' (layout( location=6) flat in bool) 0:? 's.ff4' (layout( location=7) in 4-component vector of float) -error: SPIRV-Tools Validation Errors -error: If OpTypeBool is stored in conjunction with OpVariable, it can only be used with non-externally visible shader Storage Classes: Workgroup, CrossWorkgroup, Private, and Function - %s_b = OpVariable %_ptr_Input_bool Input - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 102 diff --git a/Test/baseResults/hlsl.struct.split.assign.frag.out b/Test/baseResults/hlsl.struct.split.assign.frag.out index 0598ac9c4..24c887952 100644 --- a/Test/baseResults/hlsl.struct.split.assign.frag.out +++ b/Test/baseResults/hlsl.struct.split.assign.frag.out @@ -207,10 +207,7 @@ gl_FragCoord origin is upper left 0:? 'input[1].f' (layout( location=2) in float) 0:? 'input[2].f' (layout( location=3) in float) -error: SPIRV-Tools Validation Errors -error: According to the Vulkan spec BuiltIn FragCoord variable needs to be a 4-component 32-bit float vector. ID <41> (OpVariable) is not a float vector. - %input_pos = OpVariable %_ptr_Input__arr_v4float_uint_3 Input - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 66 diff --git a/Test/baseResults/hlsl.structarray.flatten.frag.out b/Test/baseResults/hlsl.structarray.flatten.frag.out index fc66a7cee..e657c469b 100644 --- a/Test/baseResults/hlsl.structarray.flatten.frag.out +++ b/Test/baseResults/hlsl.structarray.flatten.frag.out @@ -155,12 +155,7 @@ gl_FragCoord origin is upper left 0:? 'g_texdata_array2[2].nonopaque_thing' ( uniform int) 0:? 'ps_output.color' (layout( location=0) out 4-component vector of float) -error: SPIRV-Tools Validation Errors -error: UniformConstant OpVariable '65[g_texdata.nonopaque_thing] 'has illegal type. -From Vulkan spec, section 14.5.2: -Variables identified with the UniformConstant storage class are used only as handles to refer to opaque resources. Such variables must be typed as OpTypeImage, OpTypeSampler, OpTypeSampledImage, OpTypeAccelerationStructureNV, or an array of one of these types. - %g_texdata_nonopaque_thing = OpVariable %_ptr_UniformConstant_int UniformConstant - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 80 diff --git a/Test/baseResults/hlsl.structbuffer.append.fn.frag.out b/Test/baseResults/hlsl.structbuffer.append.fn.frag.out index df0865565..c850c10b5 100644 --- a/Test/baseResults/hlsl.structbuffer.append.fn.frag.out +++ b/Test/baseResults/hlsl.structbuffer.append.fn.frag.out @@ -149,10 +149,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? 'pos' (layout( location=0) flat in uint) -error: SPIRV-Tools Validation Errors -error: Structure id 12 decorated as BufferBlock must be explicitly laid out with Offset decorations. - %__0 = OpTypeStruct %uint - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 70 diff --git a/Test/baseResults/hlsl.structbuffer.atomics.frag.out b/Test/baseResults/hlsl.structbuffer.atomics.frag.out index 68d93c187..603bc0fa4 100644 --- a/Test/baseResults/hlsl.structbuffer.atomics.frag.out +++ b/Test/baseResults/hlsl.structbuffer.atomics.frag.out @@ -473,10 +473,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? 'pos' (layout( location=0) flat in uint) -error: SPIRV-Tools Validation Errors -error: AtomicIAdd: expected Value to be of type Result Type - %28 = OpAtomicIAdd %uint %24 %uint_1 %uint_0 %int_1 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 87 diff --git a/Test/baseResults/hlsl.structbuffer.fn.frag.out b/Test/baseResults/hlsl.structbuffer.fn.frag.out index 4b8ee635e..1dcd57196 100644 --- a/Test/baseResults/hlsl.structbuffer.fn.frag.out +++ b/Test/baseResults/hlsl.structbuffer.fn.frag.out @@ -137,10 +137,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? 'pos' (layout( location=0) flat in uint) -error: SPIRV-Tools Validation Errors -error: Structure id 20 decorated as BufferBlock must be explicitly laid out with Offset decorations. - %__1 = OpTypeStruct %uint - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 78 diff --git a/Test/baseResults/hlsl.texture.struct.frag.out b/Test/baseResults/hlsl.texture.struct.frag.out index 62cb57497..607c49e40 100644 --- a/Test/baseResults/hlsl.texture.struct.frag.out +++ b/Test/baseResults/hlsl.texture.struct.frag.out @@ -837,10 +837,7 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2s1a' ( uniform texture2D) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -error: SPIRV-Tools Validation Errors -error: OpStore Pointer '185's type does not match Object '184's type. - OpStore %185 %184 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 240 diff --git a/Test/baseResults/hlsl.tristream-append.geom.out b/Test/baseResults/hlsl.tristream-append.geom.out index c11672495..94344cddf 100644 --- a/Test/baseResults/hlsl.tristream-append.geom.out +++ b/Test/baseResults/hlsl.tristream-append.geom.out @@ -105,10 +105,7 @@ output primitive = triangle_strip 0:? 'TriStream' ( temp structure{}) 0:? Linker Objects -error: SPIRV-Tools Validation Errors -error: Output variable id <23> is used by entry point 'main' id <4>, but is not listed as an interface - %TriStream_1 = OpVariable %_ptr_Output_GSPS_INPUT Output - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 57 diff --git a/Test/baseResults/spv.130.frag.out b/Test/baseResults/spv.130.frag.out index eb02bade5..ab6389c3c 100644 --- a/Test/baseResults/spv.130.frag.out +++ b/Test/baseResults/spv.130.frag.out @@ -1,10 +1,7 @@ spv.130.frag WARNING: 0:31: '#extension' : extension is only partially supported: GL_ARB_gpu_shader5 -error: SPIRV-Tools Validation Errors -error: Capability SampledRect is not allowed by Vulkan 1.0 specification (or requires extension) - OpCapability SampledRect - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 205 diff --git a/Test/baseResults/spv.140.frag.out b/Test/baseResults/spv.140.frag.out index 8a59c2f9b..4c3535181 100644 --- a/Test/baseResults/spv.140.frag.out +++ b/Test/baseResults/spv.140.frag.out @@ -1,8 +1,5 @@ spv.140.frag -error: SPIRV-Tools Validation Errors -error: Capability SampledRect is not allowed by Vulkan 1.0 specification (or requires extension) - OpCapability SampledRect - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 96 diff --git a/Test/baseResults/spv.400.frag.out b/Test/baseResults/spv.400.frag.out index a0583cff8..6275df2c1 100644 --- a/Test/baseResults/spv.400.frag.out +++ b/Test/baseResults/spv.400.frag.out @@ -1,8 +1,5 @@ spv.400.frag -error: SPIRV-Tools Validation Errors -error: Capability SampledRect is not allowed by Vulkan 1.0 specification (or requires extension) - OpCapability SampledRect - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 1118 diff --git a/Test/baseResults/spv.AofA.frag.out b/Test/baseResults/spv.AofA.frag.out index e8572ba98..feb57462c 100644 --- a/Test/baseResults/spv.AofA.frag.out +++ b/Test/baseResults/spv.AofA.frag.out @@ -1,12 +1,7 @@ spv.AofA.frag WARNING: 0:6: '[][]' : Generating SPIR-V array-of-arrays, but Vulkan only supports single array level for this resource -error: SPIRV-Tools Validation Errors -error: Uniform OpVariable '98[nameAofA] 'has illegal type. -From Vulkan spec, section 14.5.2: -Variables identified with the Uniform storage class are used to access transparent buffer backed resources. Such variables must be typed as OpTypeStruct, or an array of this type - %nameAofA = OpVariable %_ptr_Uniform__arr__arr_uAofA_uint_5_uint_3 Uniform - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 104 diff --git a/Test/baseResults/spv.controlFlowAttributes.frag.out b/Test/baseResults/spv.controlFlowAttributes.frag.out index 2f074def2..489522be3 100644 --- a/Test/baseResults/spv.controlFlowAttributes.frag.out +++ b/Test/baseResults/spv.controlFlowAttributes.frag.out @@ -7,8 +7,7 @@ WARNING: 0:24: '' : attribute with arguments not recognized, skipping WARNING: 0:25: '' : attribute with arguments not recognized, skipping WARNING: 0:26: '' : attribute with arguments not recognized, skipping -error: SPIRV-Tools Validation Errors -error: Invalid loop control operand: 4 has invalid mask component 4 +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 118 diff --git a/Test/baseResults/spv.explicittypes.frag.out b/Test/baseResults/spv.explicittypes.frag.out index 1b5bcf011..f3ca41193 100644 --- a/Test/baseResults/spv.explicittypes.frag.out +++ b/Test/baseResults/spv.explicittypes.frag.out @@ -1,8 +1,5 @@ spv.explicittypes.frag -error: SPIRV-Tools Validation Errors -error: Capability Float16 is not allowed by Vulkan 1.1 specification (or requires extension) - OpCapability Float16 - +Validation failed // Module Version 10300 // Generated by (magic number): 80007 // Id's are bound by 576 diff --git a/Test/baseResults/spv.float16.frag.out b/Test/baseResults/spv.float16.frag.out index 37c66390e..9c0233ebb 100644 --- a/Test/baseResults/spv.float16.frag.out +++ b/Test/baseResults/spv.float16.frag.out @@ -1,8 +1,5 @@ spv.float16.frag -error: SPIRV-Tools Validation Errors -error: Capability Float16 is not allowed by Vulkan 1.0 specification (or requires extension) - OpCapability Float16 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 534 diff --git a/Test/baseResults/spv.float16Fetch.frag.out b/Test/baseResults/spv.float16Fetch.frag.out index 7632737ac..45c80fec3 100644 --- a/Test/baseResults/spv.float16Fetch.frag.out +++ b/Test/baseResults/spv.float16Fetch.frag.out @@ -1,8 +1,5 @@ spv.float16Fetch.frag -error: SPIRV-Tools Validation Errors -error: Capability Float16 is not allowed by Vulkan 1.0 specification (or requires extension) - OpCapability Float16 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 5923 diff --git a/Test/baseResults/spv.float32.frag.out b/Test/baseResults/spv.float32.frag.out index 3f07e4e9a..6856eb828 100644 --- a/Test/baseResults/spv.float32.frag.out +++ b/Test/baseResults/spv.float32.frag.out @@ -1,8 +1,5 @@ spv.float32.frag -error: SPIRV-Tools Validation Errors -error: Capability Float16 is not allowed by Vulkan 1.1 specification (or requires extension) - OpCapability Float16 - +Validation failed // Module Version 10300 // Generated by (magic number): 80007 // Id's are bound by 533 diff --git a/Test/baseResults/spv.float64.frag.out b/Test/baseResults/spv.float64.frag.out index 6c0bfe7c9..f8dd2d193 100644 --- a/Test/baseResults/spv.float64.frag.out +++ b/Test/baseResults/spv.float64.frag.out @@ -1,8 +1,5 @@ spv.float64.frag -error: SPIRV-Tools Validation Errors -error: Capability Float16 is not allowed by Vulkan 1.1 specification (or requires extension) - OpCapability Float16 - +Validation failed // Module Version 10300 // Generated by (magic number): 80007 // Id's are bound by 524 diff --git a/Test/baseResults/spv.functionNestedOpaque.vert.out b/Test/baseResults/spv.functionNestedOpaque.vert.out index ff94077f5..df590c197 100644 --- a/Test/baseResults/spv.functionNestedOpaque.vert.out +++ b/Test/baseResults/spv.functionNestedOpaque.vert.out @@ -1,10 +1,5 @@ spv.functionNestedOpaque.vert -error: SPIRV-Tools Validation Errors -error: UniformConstant OpVariable '36[si] 'has illegal type. -From Vulkan spec, section 14.5.2: -Variables identified with the UniformConstant storage class are used only as handles to refer to opaque resources. Such variables must be typed as OpTypeImage, OpTypeSampler, OpTypeSampledImage, OpTypeAccelerationStructureNV, or an array of one of these types. - %si = OpVariable %_ptr_UniformConstant_S UniformConstant - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 39 diff --git a/Test/baseResults/spv.image.frag.out b/Test/baseResults/spv.image.frag.out index a54418011..0fefd01ac 100644 --- a/Test/baseResults/spv.image.frag.out +++ b/Test/baseResults/spv.image.frag.out @@ -1,8 +1,5 @@ spv.image.frag -error: SPIRV-Tools Validation Errors -error: Capability ImageRect is not allowed by Vulkan 1.0 specification (or requires extension) - OpCapability ImageRect - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 395 diff --git a/Test/baseResults/spv.imageLoadStoreLod.frag.out b/Test/baseResults/spv.imageLoadStoreLod.frag.out index db9177d08..28cd4f964 100644 --- a/Test/baseResults/spv.imageLoadStoreLod.frag.out +++ b/Test/baseResults/spv.imageLoadStoreLod.frag.out @@ -1,8 +1,5 @@ spv.imageLoadStoreLod.frag -error: SPIRV-Tools Validation Errors -error: Image Operand Lod can only be used with ExplicitLod opcodes and OpImageFetch - %19 = OpImageRead %v4float %15 %int_1 Lod %int_3 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 82 diff --git a/Test/baseResults/spv.int16.amd.frag.out b/Test/baseResults/spv.int16.amd.frag.out index 0e3323bfc..4451baf9e 100644 --- a/Test/baseResults/spv.int16.amd.frag.out +++ b/Test/baseResults/spv.int16.amd.frag.out @@ -1,8 +1,5 @@ spv.int16.amd.frag -error: SPIRV-Tools Validation Errors -error: Capability Float16 is not allowed by Vulkan 1.0 specification (or requires extension) - OpCapability Float16 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 560 diff --git a/Test/baseResults/spv.int16.frag.out b/Test/baseResults/spv.int16.frag.out index 3cc5bf691..cd5e26294 100644 --- a/Test/baseResults/spv.int16.frag.out +++ b/Test/baseResults/spv.int16.frag.out @@ -1,8 +1,5 @@ spv.int16.frag -error: SPIRV-Tools Validation Errors -error: Capability Float16 is not allowed by Vulkan 1.0 specification (or requires extension) - OpCapability Float16 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 523 diff --git a/Test/baseResults/spv.int32.frag.out b/Test/baseResults/spv.int32.frag.out index 8fd736e84..afa649c8d 100644 --- a/Test/baseResults/spv.int32.frag.out +++ b/Test/baseResults/spv.int32.frag.out @@ -1,8 +1,5 @@ spv.int32.frag -error: SPIRV-Tools Validation Errors -error: Capability Float16 is not allowed by Vulkan 1.1 specification (or requires extension) - OpCapability Float16 - +Validation failed // Module Version 10300 // Generated by (magic number): 80007 // Id's are bound by 493 diff --git a/Test/baseResults/spv.int64.frag.out b/Test/baseResults/spv.int64.frag.out index 013934ca2..b1375a666 100644 --- a/Test/baseResults/spv.int64.frag.out +++ b/Test/baseResults/spv.int64.frag.out @@ -1,8 +1,5 @@ spv.int64.frag -error: SPIRV-Tools Validation Errors -error: OpDecorate SpecId decoration target '1' is not a scalar specialization constant. - OpDecorate %su64inc SpecId 105 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 489 diff --git a/Test/baseResults/spv.int8.frag.out b/Test/baseResults/spv.int8.frag.out index b94bd48ec..b5c0618b9 100644 --- a/Test/baseResults/spv.int8.frag.out +++ b/Test/baseResults/spv.int8.frag.out @@ -1,8 +1,5 @@ spv.int8.frag -error: SPIRV-Tools Validation Errors -error: Capability Float16 is not allowed by Vulkan 1.1 specification (or requires extension) - OpCapability Float16 - +Validation failed // Module Version 10300 // Generated by (magic number): 80007 // Id's are bound by 518 diff --git a/Test/baseResults/spv.memoryQualifier.frag.out b/Test/baseResults/spv.memoryQualifier.frag.out index 4113cc950..760b5871a 100644 --- a/Test/baseResults/spv.memoryQualifier.frag.out +++ b/Test/baseResults/spv.memoryQualifier.frag.out @@ -1,8 +1,5 @@ spv.memoryQualifier.frag -error: SPIRV-Tools Validation Errors -error: Capability ImageRect is not allowed by Vulkan 1.0 specification (or requires extension) - OpCapability ImageRect - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 97 diff --git a/Test/baseResults/spv.multiviewPerViewAttributes.tesc.out b/Test/baseResults/spv.multiviewPerViewAttributes.tesc.out index 7874b9464..16bea3db2 100644 --- a/Test/baseResults/spv.multiviewPerViewAttributes.tesc.out +++ b/Test/baseResults/spv.multiviewPerViewAttributes.tesc.out @@ -1,8 +1,5 @@ spv.multiviewPerViewAttributes.tesc -error: SPIRV-Tools Validation Errors -error: OpMemberName Member '5' index is larger than Type '27[gl_PositionPerViewNV]'s member count. - OpMemberName %gl_PerVertex_0 5 "gl_PositionPerViewNV" - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 37 diff --git a/Test/baseResults/spv.newTexture.frag.out b/Test/baseResults/spv.newTexture.frag.out index 5e462bed4..1f91e4243 100644 --- a/Test/baseResults/spv.newTexture.frag.out +++ b/Test/baseResults/spv.newTexture.frag.out @@ -1,8 +1,5 @@ spv.newTexture.frag -error: SPIRV-Tools Validation Errors -error: Capability SampledRect is not allowed by Vulkan 1.0 specification (or requires extension) - OpCapability SampledRect - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 284 diff --git a/Test/baseResults/spv.paramMemory.frag.out b/Test/baseResults/spv.paramMemory.frag.out index a7e627a2c..02a485200 100644 --- a/Test/baseResults/spv.paramMemory.frag.out +++ b/Test/baseResults/spv.paramMemory.frag.out @@ -1,8 +1,5 @@ spv.paramMemory.frag -error: SPIRV-Tools Validation Errors -error: OpFunctionCall Argument '38[image1]'s type does not match Function '8's parameter type. - %41 = OpFunctionCall %v4float %image_load_I21_vi2_ %image1 %param - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 69 diff --git a/Test/baseResults/spv.queryL.frag.out b/Test/baseResults/spv.queryL.frag.out index b737a35b7..50829b35f 100644 --- a/Test/baseResults/spv.queryL.frag.out +++ b/Test/baseResults/spv.queryL.frag.out @@ -1,8 +1,5 @@ spv.queryL.frag -error: SPIRV-Tools Validation Errors -error: Capability SampledRect is not allowed by Vulkan 1.0 specification (or requires extension) - OpCapability SampledRect - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 224 diff --git a/Test/baseResults/spv.sampleMaskOverrideCoverage.frag.out b/Test/baseResults/spv.sampleMaskOverrideCoverage.frag.out index ae7e8241b..84b763ba2 100644 --- a/Test/baseResults/spv.sampleMaskOverrideCoverage.frag.out +++ b/Test/baseResults/spv.sampleMaskOverrideCoverage.frag.out @@ -1,8 +1,5 @@ spv.sampleMaskOverrideCoverage.frag -error: SPIRV-Tools Validation Errors -error: Operand 2 of Decorate requires one of these capabilities: SampleMaskOverrideCoverageNV - OpDecorate %gl_SampleMask OverrideCoverageNV - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 20 diff --git a/Test/baseResults/spv.scalarlayout.frag.out b/Test/baseResults/spv.scalarlayout.frag.out index 2935e1a09..86dfc97b6 100644 --- a/Test/baseResults/spv.scalarlayout.frag.out +++ b/Test/baseResults/spv.scalarlayout.frag.out @@ -1,8 +1,5 @@ spv.scalarlayout.frag -error: SPIRV-Tools Validation Errors -error: Structure id 17 decorated as Block for variable in Uniform storage class must follow standard uniform buffer layout rules: member 1 at offset 4 is not aligned to 8 - %B1 = OpTypeStruct %float %v2float %v3float %_arr_float_uint_2 %mat2v3float %_arr_mat2v3float_uint_2 %float %S %_arr_S_uint_2 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 20 diff --git a/Test/baseResults/spv.scalarlayoutfloat16.frag.out b/Test/baseResults/spv.scalarlayoutfloat16.frag.out index 9118636f2..a3b924ae8 100644 --- a/Test/baseResults/spv.scalarlayoutfloat16.frag.out +++ b/Test/baseResults/spv.scalarlayoutfloat16.frag.out @@ -1,8 +1,5 @@ spv.scalarlayoutfloat16.frag -error: SPIRV-Tools Validation Errors -error: Structure id 15 decorated as Block for variable in Uniform storage class must follow standard uniform buffer layout rules: member 1 at offset 2 is not aligned to 4 - %B1 = OpTypeStruct %half %v2half %v3half %_arr_half_uint_2 %half %S %_arr_S_uint_2 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 18 diff --git a/Test/baseResults/spv.separate.frag.out b/Test/baseResults/spv.separate.frag.out index b9fefd709..654f854f8 100644 --- a/Test/baseResults/spv.separate.frag.out +++ b/Test/baseResults/spv.separate.frag.out @@ -1,8 +1,5 @@ spv.separate.frag -error: SPIRV-Tools Validation Errors -error: Capability SampledRect is not allowed by Vulkan 1.0 specification (or requires extension) - OpCapability SampledRect - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 319 diff --git a/Test/baseResults/spv.shaderBallotAMD.comp.out b/Test/baseResults/spv.shaderBallotAMD.comp.out index 5219a3a42..f3fbc9ff9 100644 --- a/Test/baseResults/spv.shaderBallotAMD.comp.out +++ b/Test/baseResults/spv.shaderBallotAMD.comp.out @@ -1,8 +1,5 @@ spv.shaderBallotAMD.comp -error: SPIRV-Tools Validation Errors -error: Capability Float16 is not allowed by Vulkan 1.0 specification (or requires extension) - OpCapability Float16 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 1343 diff --git a/Test/baseResults/spv.sparseTexture.frag.out b/Test/baseResults/spv.sparseTexture.frag.out index 78a2c2e75..4b39ff570 100644 --- a/Test/baseResults/spv.sparseTexture.frag.out +++ b/Test/baseResults/spv.sparseTexture.frag.out @@ -1,8 +1,5 @@ spv.sparseTexture.frag -error: SPIRV-Tools Validation Errors -error: Capability SampledRect is not allowed by Vulkan 1.0 specification (or requires extension) - OpCapability SampledRect - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 438 diff --git a/Test/baseResults/spv.sparseTextureClamp.frag.out b/Test/baseResults/spv.sparseTextureClamp.frag.out index fe210f749..5b33c5004 100644 --- a/Test/baseResults/spv.sparseTextureClamp.frag.out +++ b/Test/baseResults/spv.sparseTextureClamp.frag.out @@ -1,8 +1,5 @@ spv.sparseTextureClamp.frag -error: SPIRV-Tools Validation Errors -error: Capability SampledRect is not allowed by Vulkan 1.0 specification (or requires extension) - OpCapability SampledRect - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 360 diff --git a/Test/baseResults/spv.stereoViewRendering.tesc.out b/Test/baseResults/spv.stereoViewRendering.tesc.out index 732e5b4ca..03b20f959 100644 --- a/Test/baseResults/spv.stereoViewRendering.tesc.out +++ b/Test/baseResults/spv.stereoViewRendering.tesc.out @@ -1,8 +1,5 @@ spv.stereoViewRendering.tesc -error: SPIRV-Tools Validation Errors -error: When BuiltIn decoration is applied to a structure-type member, all members of that structure type must also be decorated with BuiltIn (No allowed mixing of built-in variables and non-built-in variables within a single structure). Structure id 27 does not meet this requirement. - %gl_PerVertex_0 = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1 %v4float - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 38 diff --git a/Test/baseResults/spv.subgroupPartitioned.comp.out b/Test/baseResults/spv.subgroupPartitioned.comp.out index e967df4a2..ab4e0c266 100644 --- a/Test/baseResults/spv.subgroupPartitioned.comp.out +++ b/Test/baseResults/spv.subgroupPartitioned.comp.out @@ -1,8 +1,5 @@ spv.subgroupPartitioned.comp -error: SPIRV-Tools Validation Errors -error: Opcode GroupNonUniformFAdd requires one of these capabilities: GroupNonUniformArithmetic GroupNonUniformClustered - %179 = OpGroupNonUniformFAdd %float %uint_3 PartitionedReduceNV %176 %177 - +Validation failed // Module Version 10300 // Generated by (magic number): 80007 // Id's are bound by 2506 diff --git a/Test/baseResults/spv.textureGatherBiasLod.frag.out b/Test/baseResults/spv.textureGatherBiasLod.frag.out index d01515dc5..ee16656d4 100644 --- a/Test/baseResults/spv.textureGatherBiasLod.frag.out +++ b/Test/baseResults/spv.textureGatherBiasLod.frag.out @@ -1,8 +1,5 @@ spv.textureGatherBiasLod.frag -error: SPIRV-Tools Validation Errors -error: Image Operand Bias can only be used with ImplicitLod opcodes - %27 = OpImageGather %v4float %17 %21 %int_0 Bias %26 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 298 diff --git a/Test/baseResults/spv.viewportArray2.tesc.out b/Test/baseResults/spv.viewportArray2.tesc.out index b14179ece..a4016d401 100644 --- a/Test/baseResults/spv.viewportArray2.tesc.out +++ b/Test/baseResults/spv.viewportArray2.tesc.out @@ -1,8 +1,5 @@ spv.viewportArray2.tesc -error: SPIRV-Tools Validation Errors -error: Vulkan spec allows BuiltIn ViewportIndex to be used only with Vertex, TessellationEvaluation, Geometry, or Fragment execution models. ID <0> (OpStore) is referencing ID <22> (OpVariable) which is decorated with BuiltIn ViewportIndex in function <4> called with execution model TessellationControl. - OpStore %gl_ViewportIndex %int_2 - +Validation failed // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 25 diff --git a/Test/baseResults/spv.vulkan110.int16.frag.out b/Test/baseResults/spv.vulkan110.int16.frag.out index 1a51c26ee..e6938960d 100644 --- a/Test/baseResults/spv.vulkan110.int16.frag.out +++ b/Test/baseResults/spv.vulkan110.int16.frag.out @@ -1,8 +1,5 @@ spv.vulkan110.int16.frag -error: SPIRV-Tools Validation Errors -error: Capability Float16 is not allowed by Vulkan 1.1 specification (or requires extension) - OpCapability Float16 - +Validation failed // Module Version 10300 // Generated by (magic number): 80007 // Id's are bound by 523 diff --git a/gtests/Config.FromFile.cpp b/gtests/Config.FromFile.cpp index f3a27724d..dccf5d687 100644 --- a/gtests/Config.FromFile.cpp +++ b/gtests/Config.FromFile.cpp @@ -51,6 +51,7 @@ TEST_P(ConfigTest, FromFile) { TestCaseSpec testCase = GetParam(); GlslangResult result; + result.validationResult = true; // Get the contents for input shader and limit configurations. std::string shaderContents, configContents; diff --git a/gtests/Link.FromFile.Vk.cpp b/gtests/Link.FromFile.Vk.cpp index 22892f0b4..4a88203e8 100644 --- a/gtests/Link.FromFile.Vk.cpp +++ b/gtests/Link.FromFile.Vk.cpp @@ -77,17 +77,16 @@ TEST_P(LinkTestVulkan, FromFile) if (success && (controls & EShMsgSpvRules)) { spv::SpvBuildLogger logger; std::vector spirv_binary; - glslang::SpvOptions options; - options.disableOptimizer = true; - options.validate = true; + options().disableOptimizer = true; glslang::GlslangToSpv(*program.getIntermediate(shaders.front()->getStage()), - spirv_binary, &logger, &options); + spirv_binary, &logger, &options()); std::ostringstream disassembly_stream; spv::Parameterize(); spv::Disassemble(disassembly_stream, spirv_binary); result.spirvWarningsErrors = logger.getAllMessages(); result.spirv = disassembly_stream.str(); + result.validationResult = !options().validate || logger.getAllMessages().empty(); } std::ostringstream stream; @@ -99,7 +98,8 @@ TEST_P(LinkTestVulkan, FromFile) std::string expectedOutput; tryLoadFile(expectedOutputFname, "expected output", &expectedOutput); - checkEqAndUpdateIfRequested(expectedOutput, stream.str(), expectedOutputFname); + checkEqAndUpdateIfRequested(expectedOutput, stream.str(), expectedOutputFname, + result.spirvWarningsErrors); } // clang-format off diff --git a/gtests/Link.FromFile.cpp b/gtests/Link.FromFile.cpp index ab845bf59..49d021af2 100644 --- a/gtests/Link.FromFile.cpp +++ b/gtests/Link.FromFile.cpp @@ -50,6 +50,7 @@ TEST_P(LinkTest, FromFile) const size_t fileCount = fileNames.size(); const EShMessages controls = DeriveOptions(Source::GLSL, Semantics::OpenGL, Target::AST); GlslangResult result; + result.validationResult = true; // Compile each input shader file. std::vector> shaders; diff --git a/gtests/TestFixture.h b/gtests/TestFixture.h index 3329fa3c2..a3a8eb124 100755 --- a/gtests/TestFixture.h +++ b/gtests/TestFixture.h @@ -111,7 +111,10 @@ public: : defaultVersion(100), defaultProfile(ENoProfile), forceVersionProfile(false), - isForwardCompatible(false) {} + isForwardCompatible(false) { + // Perform validation by default. + validatorOptions.validate = true; + } // Tries to load the contents from the file at the given |path|. On success, // writes the contents into |contents|. On failure, errors out. @@ -137,15 +140,18 @@ public: // write |real| to the given file named as |fname| if update mode is on. void checkEqAndUpdateIfRequested(const std::string& expected, const std::string& real, - const std::string& fname) + const std::string& fname, + const std::string& errorsAndWarnings = "") { // In order to output the message we want under proper circumstances, // we need the following operator<< stuff. EXPECT_EQ(expected, real) << (GlobalTestSettings.updateMode ? ("Mismatch found and update mode turned on - " - "flushing expected result output.") - : ""); + "flushing expected result output.\n") + : "") + << "The following warnings/errors occurred:\n" + << errorsAndWarnings; // Update the expected output file if requested. // It looks weird to duplicate the comparison between expected_output @@ -168,6 +174,7 @@ public: std::vector shaderResults; std::string linkingOutput; std::string linkingError; + bool validationResult; std::string spirvWarningsErrors; std::string spirv; // Optional SPIR-V disassembly text. }; @@ -241,21 +248,20 @@ public: if (success && (controls & EShMsgSpvRules)) { std::vector spirv_binary; - glslang::SpvOptions options; - options.disableOptimizer = !enableOptimizer; - options.validate = true; + options().disableOptimizer = !enableOptimizer; glslang::GlslangToSpv(*program.getIntermediate(stage), - spirv_binary, &logger, &options); + spirv_binary, &logger, &options()); std::ostringstream disassembly_stream; spv::Parameterize(); spv::Disassemble(disassembly_stream, spirv_binary); + bool validation_result = !options().validate || logger.getAllMessages().empty(); return {{{shaderName, shader.getInfoLog(), shader.getInfoDebugLog()},}, program.getInfoLog(), program.getInfoDebugLog(), - logger.getAllMessages(), disassembly_stream.str()}; + validation_result, logger.getAllMessages(), disassembly_stream.str()}; } else { return {{{shaderName, shader.getInfoLog(), shader.getInfoDebugLog()},}, - program.getInfoLog(), program.getInfoDebugLog(), "", ""}; + program.getInfoLog(), program.getInfoDebugLog(), true, "", ""}; } } @@ -299,20 +305,19 @@ public: if (success && (controls & EShMsgSpvRules)) { std::vector spirv_binary; - glslang::SpvOptions options; - options.validate = true; glslang::GlslangToSpv(*program.getIntermediate(stage), - spirv_binary, &logger, &options); + spirv_binary, &logger, &options()); std::ostringstream disassembly_stream; spv::Parameterize(); spv::Disassemble(disassembly_stream, spirv_binary); + bool validation_result = !options().validate || logger.getAllMessages().empty(); return {{{shaderName, shader.getInfoLog(), shader.getInfoDebugLog()},}, program.getInfoLog(), program.getInfoDebugLog(), - logger.getAllMessages(), disassembly_stream.str()}; + validation_result, logger.getAllMessages(), disassembly_stream.str()}; } else { return {{{shaderName, shader.getInfoLog(), shader.getInfoDebugLog()},}, - program.getInfoLog(), program.getInfoDebugLog(), "", ""}; + program.getInfoLog(), program.getInfoDebugLog(), true, "", ""}; } } @@ -341,22 +346,21 @@ public: if (success && (controls & EShMsgSpvRules)) { std::vector spirv_binary; - glslang::SpvOptions options; - options.validate = true; glslang::GlslangToSpv(*program.getIntermediate(stage), - spirv_binary, &logger, &options); + spirv_binary, &logger, &options()); spv::spirvbin_t(0 /*verbosity*/).remap(spirv_binary, remapOptions); std::ostringstream disassembly_stream; spv::Parameterize(); spv::Disassemble(disassembly_stream, spirv_binary); + bool validation_result = !options().validate || logger.getAllMessages().empty(); return {{{shaderName, shader.getInfoLog(), shader.getInfoDebugLog()},}, program.getInfoLog(), program.getInfoDebugLog(), - logger.getAllMessages(), disassembly_stream.str()}; + validation_result, logger.getAllMessages(), disassembly_stream.str()}; } else { return {{{shaderName, shader.getInfoLog(), shader.getInfoDebugLog()},}, - program.getInfoLog(), program.getInfoDebugLog(), "", ""}; + program.getInfoLog(), program.getInfoDebugLog(), true, "", ""}; } } @@ -377,9 +381,9 @@ public: return {{{shaderName, "", ""},}, "", "", - "", disassembly_stream.str()}; + true, "", disassembly_stream.str()}; } else { - return {{{shaderName, "", ""},}, "", "", "", ""}; + return {{{shaderName, "", ""},}, "", "", true, "", ""}; } } @@ -398,7 +402,9 @@ public: } outputIfNotEmpty(result.linkingOutput); outputIfNotEmpty(result.linkingError); - *stream << result.spirvWarningsErrors; + if (!result.validationResult) { + *stream << "Validation failed\n"; + } if (controls & EShMsgSpvRules) { *stream @@ -438,7 +444,7 @@ public: outputResultToStream(&stream, result, controls); checkEqAndUpdateIfRequested(expectedOutput, stream.str(), - expectedOutputFname); + expectedOutputFname, result.spirvWarningsErrors); } void loadFileCompileFlattenUniformsAndCheck(const std::string& testDir, @@ -465,7 +471,7 @@ public: outputResultToStream(&stream, result, controls); checkEqAndUpdateIfRequested(expectedOutput, stream.str(), - expectedOutputFname); + expectedOutputFname, result.spirvWarningsErrors); } void loadFileCompileIoMapAndCheck(const std::string& testDir, @@ -502,7 +508,7 @@ public: outputResultToStream(&stream, result, controls); checkEqAndUpdateIfRequested(expectedOutput, stream.str(), - expectedOutputFname); + expectedOutputFname, result.spirvWarningsErrors); } void loadFileCompileRemapAndCheck(const std::string& testDir, @@ -529,7 +535,7 @@ public: outputResultToStream(&stream, result, controls); checkEqAndUpdateIfRequested(expectedOutput, stream.str(), - expectedOutputFname); + expectedOutputFname, result.spirvWarningsErrors); } void loadFileRemapAndCheck(const std::string& testDir, @@ -556,7 +562,7 @@ public: outputResultToStream(&stream, result, controls); checkEqAndUpdateIfRequested(expectedOutput, stream.str(), - expectedOutputFname); + expectedOutputFname, result.spirvWarningsErrors); } // Preprocesses the given |source| code. On success, returns true, the @@ -636,14 +642,17 @@ public: outputResultToStream(&stream, result, controls); checkEqAndUpdateIfRequested(expectedOutput, stream.str(), - expectedOutputFname); + expectedOutputFname, result.spirvWarningsErrors); } + glslang::SpvOptions& options() { return validatorOptions; } + private: const int defaultVersion; const EProfile defaultProfile; const bool forceVersionProfile; const bool isForwardCompatible; + glslang::SpvOptions validatorOptions; }; } // namespace glslangtest