From cc14f2d3292ffa9f2a8d076f77e8dcd9a484c155 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Wed, 22 Aug 2018 17:17:07 -0600 Subject: [PATCH] SPV: Add SPIRV-Tools validator. This needs the latest SPIR-Tools. --- SPIRV/GlslangToSpv.cpp | 45 +++++++++++++++++++ Test/baseResults/hlsl.PointSize.geom.out | 4 ++ Test/baseResults/hlsl.attributeC11.frag.out | 4 ++ Test/baseResults/hlsl.buffer.frag.out | 4 ++ Test/baseResults/hlsl.constantbuffer.frag.out | 4 ++ Test/baseResults/hlsl.constructimat.frag.out | 4 ++ Test/baseResults/hlsl.coverage.frag.out | 4 ++ .../hlsl.emptystructreturn.frag.out | 4 ++ .../hlsl.emptystructreturn.vert.out | 4 ++ Test/baseResults/hlsl.float1.frag.out | 4 ++ .../hlsl.gatherRGBA.offset.dx10.frag.out | 4 ++ .../hlsl.gatherRGBA.offsetarray.dx10.frag.out | 4 ++ Test/baseResults/hlsl.intrinsics.comp.out | 4 ++ .../hlsl.intrinsics.evalfns.frag.out | 4 ++ Test/baseResults/hlsl.intrinsics.frag.out | 4 ++ Test/baseResults/hlsl.intrinsics.vert.out | 4 ++ Test/baseResults/hlsl.matNx1.frag.out | 4 ++ Test/baseResults/hlsl.matType.bool.frag.out | 4 ++ Test/baseResults/hlsl.matType.frag.out | 4 ++ Test/baseResults/hlsl.matType.int.frag.out | 4 ++ Test/baseResults/hlsl.matrixSwizzle.vert.out | 4 ++ Test/baseResults/hlsl.namespace.frag.out | 4 ++ .../hlsl.samplebias.offset.dx10.frag.out | 4 ++ .../hlsl.samplebias.offsetarray.dx10.frag.out | 4 ++ .../hlsl.samplecmp.array.dx10.frag.out | 4 ++ .../hlsl.samplecmp.basic.dx10.frag.out | 4 ++ .../hlsl.samplecmp.offset.dx10.frag.out | 4 ++ .../hlsl.samplecmp.offsetarray.dx10.frag.out | 4 ++ ...lsl.samplecmplevelzero.array.dx10.frag.out | 4 ++ ...lsl.samplecmplevelzero.basic.dx10.frag.out | 4 ++ ...sl.samplecmplevelzero.offset.dx10.frag.out | 4 ++ ...mplecmplevelzero.offsetarray.dx10.frag.out | 4 ++ Test/baseResults/hlsl.semantic.geom.out | 4 ++ .../hlsl.struct.split.assign.frag.out | 4 ++ .../hlsl.structbuffer.append.fn.frag.out | 4 ++ .../hlsl.structbuffer.atomics.frag.out | 4 ++ .../hlsl.structbuffer.byte.frag.out | 4 ++ .../hlsl.structbuffer.coherent.frag.out | 4 ++ .../baseResults/hlsl.structbuffer.fn.frag.out | 4 ++ Test/baseResults/hlsl.structbuffer.frag.out | 4 ++ .../baseResults/hlsl.structbuffer.rw.frag.out | 4 ++ .../hlsl.structbuffer.rwbyte.frag.out | 4 ++ Test/baseResults/hlsl.texture.struct.frag.out | 4 ++ .../hlsl.tristream-append.geom.out | 4 ++ Test/baseResults/spv.130.frag.out | 4 ++ Test/baseResults/spv.140.frag.out | 4 ++ Test/baseResults/spv.150.geom.out | 4 ++ Test/baseResults/spv.400.frag.out | 4 ++ Test/baseResults/spv.420.geom.out | 4 ++ Test/baseResults/spv.AofA.frag.out | 4 ++ Test/baseResults/spv.atomicInt64.comp.out | 4 ++ Test/baseResults/spv.builtInXFB.vert.out | 4 ++ .../spv.controlFlowAttributes.frag.out | 2 + Test/baseResults/spv.debugInfo.1.1.frag.out | 2 + Test/baseResults/spv.explicittypes.frag.out | 4 ++ Test/baseResults/spv.float16.frag.out | 4 ++ Test/baseResults/spv.float16Fetch.frag.out | 4 ++ Test/baseResults/spv.float32.frag.out | 4 ++ Test/baseResults/spv.float64.frag.out | 4 ++ Test/baseResults/spv.image.frag.out | 4 ++ .../spv.imageLoadStoreLod.frag.out | 4 ++ Test/baseResults/spv.int16.amd.frag.out | 4 ++ Test/baseResults/spv.int16.frag.out | 4 ++ Test/baseResults/spv.int32.frag.out | 4 ++ Test/baseResults/spv.int8.frag.out | 4 ++ Test/baseResults/spv.memoryQualifier.frag.out | 4 ++ .../spv.multiviewPerViewAttributes.tesc.out | 4 ++ Test/baseResults/spv.newTexture.frag.out | 4 ++ Test/baseResults/spv.paramMemory.frag.out | 4 ++ Test/baseResults/spv.queryL.frag.out | 4 ++ .../spv.sampleMaskOverrideCoverage.frag.out | 4 ++ Test/baseResults/spv.separate.frag.out | 4 ++ Test/baseResults/spv.shaderBallotAMD.comp.out | 4 ++ Test/baseResults/spv.sparseTexture.frag.out | 4 ++ .../spv.sparseTextureClamp.frag.out | 4 ++ .../spv.stereoViewRendering.tesc.out | 4 ++ .../spv.subgroupPartitioned.comp.out | 4 ++ .../spv.textureGatherBiasLod.frag.out | 4 ++ Test/baseResults/spv.viewportArray2.tesc.out | 4 ++ Test/baseResults/spv.vulkan110.int16.frag.out | 4 ++ Test/baseResults/spv.xfb.vert.out | 4 ++ Test/baseResults/spv.xfb2.vert.out | 4 ++ Test/baseResults/spv.xfb3.vert.out | 4 ++ known_good.json | 2 +- 84 files changed, 370 insertions(+), 1 deletion(-) mode change 100644 => 100755 known_good.json diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 88569f5f..eedb8e05 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -56,6 +56,7 @@ namespace spv { #if ENABLE_OPT #include "spirv-tools/optimizer.hpp" + #include "spirv-tools/libspirv.h" #endif #if ENABLE_OPT @@ -7005,7 +7006,49 @@ void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector 0) + return spv_target_env::SPV_ENV_OPENGL_4_5; + + logger->missingFunctionality("Target version for SPIRV-Tools validator"); + return spv_target_env::SPV_ENV_UNIVERSAL_1_0; +} + // Apply the SPIRV-Tools validator to generated SPIR-V. +void SpirvToolsValidate(const glslang::TIntermediate& intermediate, std::vector& spirv, + spv::SpvBuildLogger* logger) +{ + // validate + spv_context context = spvContextCreate(MapToSpirvToolsEnv(intermediate.getSpv(), logger)); + spv_const_binary_t binary = { spirv.data(), spirv.size() }; + spv_diagnostic diagnostic = nullptr; + spv_validator_options options = spvValidatorOptionsCreate(); + spvValidatorOptionsSetRelaxBlockLayout(options, intermediate.usingHlslOffsets()); + spvValidateWithOptions(context, options, &binary, &diagnostic); + + // report + if (diagnostic != nullptr) { + logger->error("SPIRV-Tools Validation Errors"); + logger->error(diagnostic->error); + } + + // tear down + spvValidatorOptionsDestroy(options); + spvDiagnosticDestroy(diagnostic); + spvContextDestroy(context); +} + +// Apply the SPIRV-Tools optimizer to generated SPIR-V, for the purpose of +// legalizing HLSL SPIR-V. void SpirvToolsLegalize(const glslang::TIntermediate& intermediate, std::vector& spirv, spv::SpvBuildLogger* logger, const SpvOptions* options) { @@ -7097,6 +7140,8 @@ void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vectoroptimizeSize) && diff --git a/Test/baseResults/hlsl.PointSize.geom.out b/Test/baseResults/hlsl.PointSize.geom.out index 0d18f1fd..c21008d2 100755 --- a/Test/baseResults/hlsl.PointSize.geom.out +++ b/Test/baseResults/hlsl.PointSize.geom.out @@ -69,6 +69,10 @@ 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 + // 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 becb5006..afc74669 100755 --- a/Test/baseResults/hlsl.attributeC11.frag.out +++ b/Test/baseResults/hlsl.attributeC11.frag.out @@ -93,6 +93,10 @@ 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 + // 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 8d2c5147..4528d98b 100755 --- a/Test/baseResults/hlsl.buffer.frag.out +++ b/Test/baseResults/hlsl.buffer.frag.out @@ -145,6 +145,10 @@ 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 standard 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 + // 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 4b5c6b1c..4185ea95 100644 --- a/Test/baseResults/hlsl.constantbuffer.frag.out +++ b/Test/baseResults/hlsl.constantbuffer.frag.out @@ -131,6 +131,10 @@ 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: Only a single level of array is allowed for descriptor set variables + %cb3_0 = OpVariable %_ptr_Uniform__arr__arr_cb3_uint_4_uint_2 Uniform + // 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 c36ff6d0..e88c3d8f 100644 --- a/Test/baseResults/hlsl.constructimat.frag.out +++ b/Test/baseResults/hlsl.constructimat.frag.out @@ -543,6 +543,10 @@ 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 + // 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 8afc59af..bea2fc0e 100644 --- a/Test/baseResults/hlsl.coverage.frag.out +++ b/Test/baseResults/hlsl.coverage.frag.out @@ -117,6 +117,10 @@ 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 + // 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 8c8b62bb..34a635c7 100644 --- a/Test/baseResults/hlsl.emptystructreturn.frag.out +++ b/Test/baseResults/hlsl.emptystructreturn.frag.out @@ -49,6 +49,10 @@ 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 + // 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 b2aaf5ee..61704586 100644 --- a/Test/baseResults/hlsl.emptystructreturn.vert.out +++ b/Test/baseResults/hlsl.emptystructreturn.vert.out @@ -47,6 +47,10 @@ 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 + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 27 diff --git a/Test/baseResults/hlsl.float1.frag.out b/Test/baseResults/hlsl.float1.frag.out index 78621231..31febfd4 100755 --- a/Test/baseResults/hlsl.float1.frag.out +++ b/Test/baseResults/hlsl.float1.frag.out @@ -64,6 +64,10 @@ gl_FragCoord origin is upper left 0:? 'f1' ( global 1-component vector of float) 0:? 'scalar' ( global float) +error: SPIRV-Tools Validation Errors +error: Expected int scalar or vector type as Result Type: IMul + %20 = OpIMul %float %18 %19 + // 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 49fda31a..33c9af43 100644 --- a/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out +++ b/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out @@ -1261,6 +1261,10 @@ 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 + // 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 9de1a972..22b02e7f 100644 --- a/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out +++ b/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out @@ -1253,6 +1253,10 @@ 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 + // 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 a5b543cb..5058f236 100644 --- a/Test/baseResults/hlsl.intrinsics.comp.out +++ b/Test/baseResults/hlsl.intrinsics.comp.out @@ -715,6 +715,10 @@ 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 + // 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 e7865627..4fd1e7b3 100644 --- a/Test/baseResults/hlsl.intrinsics.evalfns.frag.out +++ b/Test/baseResults/hlsl.intrinsics.evalfns.frag.out @@ -153,6 +153,10 @@ 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 + // 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 20eb0321..20d2bb04 100644 --- a/Test/baseResults/hlsl.intrinsics.frag.out +++ b/Test/baseResults/hlsl.intrinsics.frag.out @@ -5643,6 +5643,10 @@ 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 + // 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 8e7e3ec6..195e11d6 100644 --- a/Test/baseResults/hlsl.intrinsics.vert.out +++ b/Test/baseResults/hlsl.intrinsics.vert.out @@ -2778,6 +2778,10 @@ 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 + // 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 109362e4..276d4c24 100644 --- a/Test/baseResults/hlsl.matNx1.frag.out +++ b/Test/baseResults/hlsl.matNx1.frag.out @@ -151,6 +151,10 @@ 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 + // 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 82575b04..900c60fc 100644 --- a/Test/baseResults/hlsl.matType.bool.frag.out +++ b/Test/baseResults/hlsl.matType.bool.frag.out @@ -231,6 +231,10 @@ 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 + // 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 958b37e0..c0d2e4b3 100755 --- a/Test/baseResults/hlsl.matType.frag.out +++ b/Test/baseResults/hlsl.matType.frag.out @@ -30,6 +30,10 @@ 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 + // 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 b8d29ac0..2039dfd5 100644 --- a/Test/baseResults/hlsl.matType.int.frag.out +++ b/Test/baseResults/hlsl.matType.int.frag.out @@ -397,6 +397,10 @@ 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 + // 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 9bf7e560..abb3e495 100755 --- a/Test/baseResults/hlsl.matrixSwizzle.vert.out +++ b/Test/baseResults/hlsl.matrixSwizzle.vert.out @@ -676,6 +676,10 @@ Shader version: 500 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 + // 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 bfb82dad..08d959b3 100755 --- a/Test/baseResults/hlsl.namespace.frag.out +++ b/Test/baseResults/hlsl.namespace.frag.out @@ -101,6 +101,10 @@ 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_ + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 54 diff --git a/Test/baseResults/hlsl.samplebias.offset.dx10.frag.out b/Test/baseResults/hlsl.samplebias.offset.dx10.frag.out index 73d69dcb..ae492e4d 100644 --- a/Test/baseResults/hlsl.samplebias.offset.dx10.frag.out +++ b/Test/baseResults/hlsl.samplebias.offset.dx10.frag.out @@ -399,6 +399,10 @@ 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 + // 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 0a7a66b2..0cea7670 100644 --- a/Test/baseResults/hlsl.samplebias.offsetarray.dx10.frag.out +++ b/Test/baseResults/hlsl.samplebias.offsetarray.dx10.frag.out @@ -297,6 +297,10 @@ 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 + // 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 f8f20ca2..a41481da 100644 --- a/Test/baseResults/hlsl.samplecmp.array.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmp.array.dx10.frag.out @@ -397,6 +397,10 @@ 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 + // 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 9862297f..e8252d38 100644 --- a/Test/baseResults/hlsl.samplecmp.basic.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmp.basic.dx10.frag.out @@ -379,6 +379,10 @@ 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 + // 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 f0ba4449..cb4ce390 100644 --- a/Test/baseResults/hlsl.samplecmp.offset.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmp.offset.dx10.frag.out @@ -325,6 +325,10 @@ 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 + // 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 ae6078ca..af2af3f2 100644 --- a/Test/baseResults/hlsl.samplecmp.offsetarray.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmp.offsetarray.dx10.frag.out @@ -337,6 +337,10 @@ 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 + // 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 ae5b1189..a0e5a487 100644 --- a/Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out @@ -433,6 +433,10 @@ 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 + // 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 53ecbf2e..ffe22988 100644 --- a/Test/baseResults/hlsl.samplecmplevelzero.basic.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmplevelzero.basic.dx10.frag.out @@ -415,6 +415,10 @@ 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 + // 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 1d4f2cde..08e8749f 100644 --- a/Test/baseResults/hlsl.samplecmplevelzero.offset.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmplevelzero.offset.dx10.frag.out @@ -349,6 +349,10 @@ 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 + // 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 dea66633..b5c0fc0d 100644 --- a/Test/baseResults/hlsl.samplecmplevelzero.offsetarray.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmplevelzero.offsetarray.dx10.frag.out @@ -361,6 +361,10 @@ 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 + // 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 1c1a9c0a..e73940bc 100755 --- a/Test/baseResults/hlsl.semantic.geom.out +++ b/Test/baseResults/hlsl.semantic.geom.out @@ -155,6 +155,10 @@ 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 + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 65 diff --git a/Test/baseResults/hlsl.struct.split.assign.frag.out b/Test/baseResults/hlsl.struct.split.assign.frag.out index 3454eb6d..0598ac9c 100644 --- a/Test/baseResults/hlsl.struct.split.assign.frag.out +++ b/Test/baseResults/hlsl.struct.split.assign.frag.out @@ -207,6 +207,10 @@ 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 + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 66 diff --git a/Test/baseResults/hlsl.structbuffer.append.fn.frag.out b/Test/baseResults/hlsl.structbuffer.append.fn.frag.out index 9beadc72..df086556 100644 --- a/Test/baseResults/hlsl.structbuffer.append.fn.frag.out +++ b/Test/baseResults/hlsl.structbuffer.append.fn.frag.out @@ -149,6 +149,10 @@ 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 + // 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 d78f77ed..68d93c18 100644 --- a/Test/baseResults/hlsl.structbuffer.atomics.frag.out +++ b/Test/baseResults/hlsl.structbuffer.atomics.frag.out @@ -473,6 +473,10 @@ 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 + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 87 diff --git a/Test/baseResults/hlsl.structbuffer.byte.frag.out b/Test/baseResults/hlsl.structbuffer.byte.frag.out index 862ebbef..49958a65 100644 --- a/Test/baseResults/hlsl.structbuffer.byte.frag.out +++ b/Test/baseResults/hlsl.structbuffer.byte.frag.out @@ -323,6 +323,10 @@ 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: OpStore Pointer '14[size]'s type does not match Object '20's type. + OpStore %size %20 + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 114 diff --git a/Test/baseResults/hlsl.structbuffer.coherent.frag.out b/Test/baseResults/hlsl.structbuffer.coherent.frag.out index 18de2a8d..1d11b647 100644 --- a/Test/baseResults/hlsl.structbuffer.coherent.frag.out +++ b/Test/baseResults/hlsl.structbuffer.coherent.frag.out @@ -175,6 +175,10 @@ 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: OpStore Pointer '26[size]'s type does not match Object '33's type. + OpStore %size %33 + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 78 diff --git a/Test/baseResults/hlsl.structbuffer.fn.frag.out b/Test/baseResults/hlsl.structbuffer.fn.frag.out index 4bbc550d..4b8ee635 100644 --- a/Test/baseResults/hlsl.structbuffer.fn.frag.out +++ b/Test/baseResults/hlsl.structbuffer.fn.frag.out @@ -137,6 +137,10 @@ 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 + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 78 diff --git a/Test/baseResults/hlsl.structbuffer.frag.out b/Test/baseResults/hlsl.structbuffer.frag.out index 5f6e8eec..e058d112 100644 --- a/Test/baseResults/hlsl.structbuffer.frag.out +++ b/Test/baseResults/hlsl.structbuffer.frag.out @@ -187,6 +187,10 @@ 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: OpStore Pointer '43[size]'s type does not match Object '44's type. + OpStore %size %44 + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 96 diff --git a/Test/baseResults/hlsl.structbuffer.rw.frag.out b/Test/baseResults/hlsl.structbuffer.rw.frag.out index ccf295bd..7fbd1502 100644 --- a/Test/baseResults/hlsl.structbuffer.rw.frag.out +++ b/Test/baseResults/hlsl.structbuffer.rw.frag.out @@ -175,6 +175,10 @@ 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: OpStore Pointer '26[size]'s type does not match Object '33's type. + OpStore %size %33 + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 78 diff --git a/Test/baseResults/hlsl.structbuffer.rwbyte.frag.out b/Test/baseResults/hlsl.structbuffer.rwbyte.frag.out index 9f1b5b32..ed27c893 100644 --- a/Test/baseResults/hlsl.structbuffer.rwbyte.frag.out +++ b/Test/baseResults/hlsl.structbuffer.rwbyte.frag.out @@ -1003,6 +1003,10 @@ 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: OpStore Pointer '14[size]'s type does not match Object '20's type. + OpStore %size %20 + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 239 diff --git a/Test/baseResults/hlsl.texture.struct.frag.out b/Test/baseResults/hlsl.texture.struct.frag.out index 0778f506..62cb5749 100644 --- a/Test/baseResults/hlsl.texture.struct.frag.out +++ b/Test/baseResults/hlsl.texture.struct.frag.out @@ -837,6 +837,10 @@ 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 + // 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 be6ca9cd..c1167249 100644 --- a/Test/baseResults/hlsl.tristream-append.geom.out +++ b/Test/baseResults/hlsl.tristream-append.geom.out @@ -105,6 +105,10 @@ 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 + // 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 d1a626d8..eb02bade 100644 --- a/Test/baseResults/spv.130.frag.out +++ b/Test/baseResults/spv.130.frag.out @@ -1,6 +1,10 @@ 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 + // 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 89bf4899..8a59c2f9 100755 --- a/Test/baseResults/spv.140.frag.out +++ b/Test/baseResults/spv.140.frag.out @@ -1,4 +1,8 @@ spv.140.frag +error: SPIRV-Tools Validation Errors +error: Capability SampledRect is not allowed by Vulkan 1.0 specification (or requires extension) + OpCapability SampledRect + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 96 diff --git a/Test/baseResults/spv.150.geom.out b/Test/baseResults/spv.150.geom.out index f7597938..70dadf5d 100755 --- a/Test/baseResults/spv.150.geom.out +++ b/Test/baseResults/spv.150.geom.out @@ -1,4 +1,8 @@ spv.150.geom +error: SPIRV-Tools Validation Errors +error: Capability GeometryStreams is not allowed by Vulkan 1.0 specification (or requires extension) + OpCapability GeometryStreams + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 71 diff --git a/Test/baseResults/spv.400.frag.out b/Test/baseResults/spv.400.frag.out index 9cb2c63a..a0583cff 100644 --- a/Test/baseResults/spv.400.frag.out +++ b/Test/baseResults/spv.400.frag.out @@ -1,4 +1,8 @@ spv.400.frag +error: SPIRV-Tools Validation Errors +error: Capability SampledRect is not allowed by Vulkan 1.0 specification (or requires extension) + OpCapability SampledRect + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 1118 diff --git a/Test/baseResults/spv.420.geom.out b/Test/baseResults/spv.420.geom.out index 74a4f0b3..45f235f4 100644 --- a/Test/baseResults/spv.420.geom.out +++ b/Test/baseResults/spv.420.geom.out @@ -1,4 +1,8 @@ spv.420.geom +error: SPIRV-Tools Validation Errors +error: Capability GeometryStreams is not allowed by Vulkan 1.0 specification (or requires extension) + OpCapability GeometryStreams + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 72 diff --git a/Test/baseResults/spv.AofA.frag.out b/Test/baseResults/spv.AofA.frag.out index a19fae92..798f083a 100644 --- a/Test/baseResults/spv.AofA.frag.out +++ b/Test/baseResults/spv.AofA.frag.out @@ -1,6 +1,10 @@ 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: Only a single level of array is allowed for descriptor set variables + %nameAofA = OpVariable %_ptr_Uniform__arr__arr_uAofA_uint_5_uint_3 Uniform + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 104 diff --git a/Test/baseResults/spv.atomicInt64.comp.out b/Test/baseResults/spv.atomicInt64.comp.out index 9c66aecc..a273c669 100644 --- a/Test/baseResults/spv.atomicInt64.comp.out +++ b/Test/baseResults/spv.atomicInt64.comp.out @@ -1,4 +1,8 @@ spv.atomicInt64.comp +error: SPIRV-Tools Validation Errors +error: Capability Int64Atomics is not allowed by Vulkan 1.0 specification (or requires extension) + OpCapability Int64Atomics + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 149 diff --git a/Test/baseResults/spv.builtInXFB.vert.out b/Test/baseResults/spv.builtInXFB.vert.out index 556a698c..f175a19f 100755 --- a/Test/baseResults/spv.builtInXFB.vert.out +++ b/Test/baseResults/spv.builtInXFB.vert.out @@ -1,4 +1,8 @@ spv.builtInXFB.vert +error: SPIRV-Tools Validation Errors +error: Capability TransformFeedback is not allowed by Vulkan 1.0 specification (or requires extension) + OpCapability TransformFeedback + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 21 diff --git a/Test/baseResults/spv.controlFlowAttributes.frag.out b/Test/baseResults/spv.controlFlowAttributes.frag.out index eb253822..2f074def 100755 --- a/Test/baseResults/spv.controlFlowAttributes.frag.out +++ b/Test/baseResults/spv.controlFlowAttributes.frag.out @@ -7,6 +7,8 @@ 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 // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 118 diff --git a/Test/baseResults/spv.debugInfo.1.1.frag.out b/Test/baseResults/spv.debugInfo.1.1.frag.out index facaf9e9..7ba00522 100644 --- a/Test/baseResults/spv.debugInfo.1.1.frag.out +++ b/Test/baseResults/spv.debugInfo.1.1.frag.out @@ -1,4 +1,6 @@ spv.debugInfo.frag +error: SPIRV-Tools Validation Errors +error: Invalid SPIR-V binary version 1.3 for target environment SPIR-V 1.0 (under OpenGL 4.5 semantics). // Module Version 10300 // Generated by (magic number): 80007 // Id's are bound by 124 diff --git a/Test/baseResults/spv.explicittypes.frag.out b/Test/baseResults/spv.explicittypes.frag.out index 6f7f2b9e..44f5ddd3 100755 --- a/Test/baseResults/spv.explicittypes.frag.out +++ b/Test/baseResults/spv.explicittypes.frag.out @@ -1,4 +1,8 @@ spv.explicittypes.frag +error: SPIRV-Tools Validation Errors +error: Capability Float16 is not allowed by Vulkan 1.1 specification (or requires extension) + OpCapability Float16 + // 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 b6d37f45..b9ca3397 100644 --- a/Test/baseResults/spv.float16.frag.out +++ b/Test/baseResults/spv.float16.frag.out @@ -1,4 +1,8 @@ spv.float16.frag +error: SPIRV-Tools Validation Errors +error: Capability Float16 is not allowed by Vulkan 1.0 specification (or requires extension) + OpCapability Float16 + // 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 67ddd61b..857ca6fa 100644 --- a/Test/baseResults/spv.float16Fetch.frag.out +++ b/Test/baseResults/spv.float16Fetch.frag.out @@ -1,4 +1,8 @@ spv.float16Fetch.frag +error: SPIRV-Tools Validation Errors +error: Capability Float16 is not allowed by Vulkan 1.0 specification (or requires extension) + OpCapability Float16 + // 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 40c6677f..9ee7d7f9 100644 --- a/Test/baseResults/spv.float32.frag.out +++ b/Test/baseResults/spv.float32.frag.out @@ -1,4 +1,8 @@ spv.float32.frag +error: SPIRV-Tools Validation Errors +error: Capability Float16 is not allowed by Vulkan 1.1 specification (or requires extension) + OpCapability Float16 + // 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 49139548..3f095c1f 100644 --- a/Test/baseResults/spv.float64.frag.out +++ b/Test/baseResults/spv.float64.frag.out @@ -1,4 +1,8 @@ spv.float64.frag +error: SPIRV-Tools Validation Errors +error: Capability Float16 is not allowed by Vulkan 1.1 specification (or requires extension) + OpCapability Float16 + // Module Version 10300 // Generated by (magic number): 80007 // Id's are bound by 524 diff --git a/Test/baseResults/spv.image.frag.out b/Test/baseResults/spv.image.frag.out index 2c35a0c2..2f925b3f 100644 --- a/Test/baseResults/spv.image.frag.out +++ b/Test/baseResults/spv.image.frag.out @@ -1,4 +1,8 @@ spv.image.frag +error: SPIRV-Tools Validation Errors +error: Capability ImageRect is not allowed by Vulkan 1.0 specification (or requires extension) + OpCapability ImageRect + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 376 diff --git a/Test/baseResults/spv.imageLoadStoreLod.frag.out b/Test/baseResults/spv.imageLoadStoreLod.frag.out index 4c65a367..db9177d0 100644 --- a/Test/baseResults/spv.imageLoadStoreLod.frag.out +++ b/Test/baseResults/spv.imageLoadStoreLod.frag.out @@ -1,4 +1,8 @@ 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 + // 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 c404375b..ab086147 100644 --- a/Test/baseResults/spv.int16.amd.frag.out +++ b/Test/baseResults/spv.int16.amd.frag.out @@ -1,4 +1,8 @@ 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 + // 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 84128ab4..11818b75 100644 --- a/Test/baseResults/spv.int16.frag.out +++ b/Test/baseResults/spv.int16.frag.out @@ -1,4 +1,8 @@ spv.int16.frag +error: SPIRV-Tools Validation Errors +error: Capability Float16 is not allowed by Vulkan 1.0 specification (or requires extension) + OpCapability Float16 + // 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 d72de0de..3b934284 100644 --- a/Test/baseResults/spv.int32.frag.out +++ b/Test/baseResults/spv.int32.frag.out @@ -1,4 +1,8 @@ spv.int32.frag +error: SPIRV-Tools Validation Errors +error: Capability Float16 is not allowed by Vulkan 1.1 specification (or requires extension) + OpCapability Float16 + // Module Version 10300 // Generated by (magic number): 80007 // Id's are bound by 493 diff --git a/Test/baseResults/spv.int8.frag.out b/Test/baseResults/spv.int8.frag.out index 14922b2b..1c65384f 100644 --- a/Test/baseResults/spv.int8.frag.out +++ b/Test/baseResults/spv.int8.frag.out @@ -1,4 +1,8 @@ spv.int8.frag +error: SPIRV-Tools Validation Errors +error: Capability Float16 is not allowed by Vulkan 1.1 specification (or requires extension) + OpCapability Float16 + // 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 02783b98..4113cc95 100644 --- a/Test/baseResults/spv.memoryQualifier.frag.out +++ b/Test/baseResults/spv.memoryQualifier.frag.out @@ -1,4 +1,8 @@ spv.memoryQualifier.frag +error: SPIRV-Tools Validation Errors +error: Capability ImageRect is not allowed by Vulkan 1.0 specification (or requires extension) + OpCapability ImageRect + // 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 5d4508be..7874b946 100644 --- a/Test/baseResults/spv.multiviewPerViewAttributes.tesc.out +++ b/Test/baseResults/spv.multiviewPerViewAttributes.tesc.out @@ -1,4 +1,8 @@ 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" + // 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 5ddd8a54..5e462bed 100755 --- a/Test/baseResults/spv.newTexture.frag.out +++ b/Test/baseResults/spv.newTexture.frag.out @@ -1,4 +1,8 @@ spv.newTexture.frag +error: SPIRV-Tools Validation Errors +error: Capability SampledRect is not allowed by Vulkan 1.0 specification (or requires extension) + OpCapability SampledRect + // 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 b593ce9c..a7e627a2 100755 --- a/Test/baseResults/spv.paramMemory.frag.out +++ b/Test/baseResults/spv.paramMemory.frag.out @@ -1,4 +1,8 @@ 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 + // 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 33f0d95c..b737a35b 100755 --- a/Test/baseResults/spv.queryL.frag.out +++ b/Test/baseResults/spv.queryL.frag.out @@ -1,4 +1,8 @@ spv.queryL.frag +error: SPIRV-Tools Validation Errors +error: Capability SampledRect is not allowed by Vulkan 1.0 specification (or requires extension) + OpCapability SampledRect + // 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 470cd423..ae7e8241 100644 --- a/Test/baseResults/spv.sampleMaskOverrideCoverage.frag.out +++ b/Test/baseResults/spv.sampleMaskOverrideCoverage.frag.out @@ -1,4 +1,8 @@ spv.sampleMaskOverrideCoverage.frag +error: SPIRV-Tools Validation Errors +error: Operand 2 of Decorate requires one of these capabilities: SampleMaskOverrideCoverageNV + OpDecorate %gl_SampleMask OverrideCoverageNV + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 20 diff --git a/Test/baseResults/spv.separate.frag.out b/Test/baseResults/spv.separate.frag.out index 346de530..b9fefd70 100644 --- a/Test/baseResults/spv.separate.frag.out +++ b/Test/baseResults/spv.separate.frag.out @@ -1,4 +1,8 @@ spv.separate.frag +error: SPIRV-Tools Validation Errors +error: Capability SampledRect is not allowed by Vulkan 1.0 specification (or requires extension) + OpCapability SampledRect + // 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 df70095c..a28791e6 100644 --- a/Test/baseResults/spv.shaderBallotAMD.comp.out +++ b/Test/baseResults/spv.shaderBallotAMD.comp.out @@ -1,4 +1,8 @@ spv.shaderBallotAMD.comp +error: SPIRV-Tools Validation Errors +error: Capability Float16 is not allowed by Vulkan 1.0 specification (or requires extension) + OpCapability Float16 + // 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 d94f6438..78a2c2e7 100644 --- a/Test/baseResults/spv.sparseTexture.frag.out +++ b/Test/baseResults/spv.sparseTexture.frag.out @@ -1,4 +1,8 @@ spv.sparseTexture.frag +error: SPIRV-Tools Validation Errors +error: Capability SampledRect is not allowed by Vulkan 1.0 specification (or requires extension) + OpCapability SampledRect + // 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 f63fd2f5..fe210f74 100644 --- a/Test/baseResults/spv.sparseTextureClamp.frag.out +++ b/Test/baseResults/spv.sparseTextureClamp.frag.out @@ -1,4 +1,8 @@ spv.sparseTextureClamp.frag +error: SPIRV-Tools Validation Errors +error: Capability SampledRect is not allowed by Vulkan 1.0 specification (or requires extension) + OpCapability SampledRect + // 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 c01467e7..732e5b4c 100644 --- a/Test/baseResults/spv.stereoViewRendering.tesc.out +++ b/Test/baseResults/spv.stereoViewRendering.tesc.out @@ -1,4 +1,8 @@ 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 + // 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 527a62e6..f65d9962 100755 --- a/Test/baseResults/spv.subgroupPartitioned.comp.out +++ b/Test/baseResults/spv.subgroupPartitioned.comp.out @@ -1,4 +1,8 @@ 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 + // 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 faa4dba2..d01515dc 100644 --- a/Test/baseResults/spv.textureGatherBiasLod.frag.out +++ b/Test/baseResults/spv.textureGatherBiasLod.frag.out @@ -1,4 +1,8 @@ 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 + // 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 a9c9ba25..b14179ec 100644 --- a/Test/baseResults/spv.viewportArray2.tesc.out +++ b/Test/baseResults/spv.viewportArray2.tesc.out @@ -1,4 +1,8 @@ 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 + // 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 b6936f8c..9141e4ec 100755 --- a/Test/baseResults/spv.vulkan110.int16.frag.out +++ b/Test/baseResults/spv.vulkan110.int16.frag.out @@ -1,4 +1,8 @@ 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 + // Module Version 10300 // Generated by (magic number): 80007 // Id's are bound by 523 diff --git a/Test/baseResults/spv.xfb.vert.out b/Test/baseResults/spv.xfb.vert.out index 3cd93d50..68633e1f 100755 --- a/Test/baseResults/spv.xfb.vert.out +++ b/Test/baseResults/spv.xfb.vert.out @@ -1,4 +1,8 @@ spv.xfb.vert +error: SPIRV-Tools Validation Errors +error: Capability TransformFeedback is not allowed by Vulkan 1.0 specification (or requires extension) + OpCapability TransformFeedback + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 16 diff --git a/Test/baseResults/spv.xfb2.vert.out b/Test/baseResults/spv.xfb2.vert.out index a8551a1a..6dc39872 100755 --- a/Test/baseResults/spv.xfb2.vert.out +++ b/Test/baseResults/spv.xfb2.vert.out @@ -1,4 +1,8 @@ spv.xfb2.vert +error: SPIRV-Tools Validation Errors +error: Capability TransformFeedback is not allowed by Vulkan 1.0 specification (or requires extension) + OpCapability TransformFeedback + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 35 diff --git a/Test/baseResults/spv.xfb3.vert.out b/Test/baseResults/spv.xfb3.vert.out index 0218847e..1d526aa9 100755 --- a/Test/baseResults/spv.xfb3.vert.out +++ b/Test/baseResults/spv.xfb3.vert.out @@ -1,4 +1,8 @@ spv.xfb3.vert +error: SPIRV-Tools Validation Errors +error: Capability TransformFeedback is not allowed by Vulkan 1.0 specification (or requires extension) + OpCapability TransformFeedback + // Module Version 10000 // Generated by (magic number): 80007 // Id's are bound by 35 diff --git a/known_good.json b/known_good.json old mode 100644 new mode 100755 index 0445eabc..e7a83ce7 --- a/known_good.json +++ b/known_good.json @@ -5,7 +5,7 @@ "site" : "github", "subrepo" : "KhronosGroup/SPIRV-Tools", "subdir" : "External/spirv-tools", - "commit" : "714bf84e58abd9573488fc365707fb8f288ca73c" + "commit" : "6d27a8350fbc339909834a6ef339c805cb1ab69b" }, { "name" : "spirv-tools/external/spirv-headers",