diff --git a/3rdparty/glslang/SPIRV/GlslangToSpv.cpp b/3rdparty/glslang/SPIRV/GlslangToSpv.cpp index 4c1dbd4a5..b72f7aebb 100755 --- a/3rdparty/glslang/SPIRV/GlslangToSpv.cpp +++ b/3rdparty/glslang/SPIRV/GlslangToSpv.cpp @@ -1594,7 +1594,7 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol) bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::TIntermBinary* node) { - builder.setLine(node->getLoc().line); + builder.setLine(node->getLoc().line, node->getLoc().getFilename()); SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder); if (node->getType().getQualifier().isSpecConstant()) @@ -1789,7 +1789,7 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TIntermUnary* node) { - builder.setLine(node->getLoc().line); + builder.setLine(node->getLoc().line, node->getLoc().getFilename()); SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder); if (node->getType().getQualifier().isSpecConstant()) @@ -2053,7 +2053,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt return false; case glslang::EOpFunctionCall: { - builder.setLine(node->getLoc().line); + builder.setLine(node->getLoc().line, node->getLoc().getFilename()); if (node->isUserDefined()) result = handleUserFunctionCall(node); // assert(result); // this can happen for bad shaders because the call graph completeness checking is not yet done @@ -2172,7 +2172,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt case glslang::EOpConstructStruct: case glslang::EOpConstructTextureSampler: { - builder.setLine(node->getLoc().line); + builder.setLine(node->getLoc().line, node->getLoc().getFilename()); std::vector arguments; translateArguments(*node, arguments); spv::Id constructed; @@ -2317,7 +2317,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt right->traverse(this); spv::Id rightId = accessChainLoad(right->getType()); - builder.setLine(node->getLoc().line); + builder.setLine(node->getLoc().line, node->getLoc().getFilename()); OpDecorations decorations = { precision, TranslateNoContractionDecoration(node->getType().getQualifier()), TranslateNonUniformDecoration(node->getType().getQualifier()) }; @@ -2405,12 +2405,12 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt if (lvalue) operands.push_back(builder.accessChainGetLValue()); else { - builder.setLine(node->getLoc().line); + builder.setLine(node->getLoc().line, node->getLoc().getFilename()); operands.push_back(accessChainLoad(glslangOperands[arg]->getAsTyped()->getType())); } } - builder.setLine(node->getLoc().line); + builder.setLine(node->getLoc().line, node->getLoc().getFilename()); if (atomic) { // Handle all atomics result = createAtomicOperation(node->getOp(), precision, resultType(), operands, node->getBasicType()); @@ -2511,7 +2511,7 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang node->getFalseBlock()->traverse(this); spv::Id falseValue = accessChainLoad(node->getTrueBlock()->getAsTyped()->getType()); - builder.setLine(node->getLoc().line); + builder.setLine(node->getLoc().line, node->getLoc().getFilename()); // done if void if (node->getBasicType() == glslang::EbtVoid) @@ -2685,7 +2685,7 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn // by a block-ending branch. But we don't want to put any other body/test // instructions in it, since the body/test may have arbitrary instructions, // including merges of its own. - builder.setLine(node->getLoc().line); + builder.setLine(node->getLoc().line, node->getLoc().getFilename()); builder.setBuildPoint(&blocks.head); builder.createLoopMerge(&blocks.merge, &blocks.continue_target, control, dependencyLength); if (node->testFirst() && node->getTest()) { @@ -2709,7 +2709,7 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn node->getTerminal()->traverse(this); builder.createBranch(&blocks.head); } else { - builder.setLine(node->getLoc().line); + builder.setLine(node->getLoc().line, node->getLoc().getFilename()); builder.createBranch(&blocks.body); breakForLoop.push(true); @@ -2744,7 +2744,7 @@ bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::T if (node->getExpression()) node->getExpression()->traverse(this); - builder.setLine(node->getLoc().line); + builder.setLine(node->getLoc().line, node->getLoc().getFilename()); switch (node->getFlowOp()) { case glslang::EOpKill: @@ -3913,7 +3913,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO if (! node->isImage() && ! node->isTexture()) return spv::NoResult; - builder.setLine(node->getLoc().line); + builder.setLine(node->getLoc().line, node->getLoc().getFilename()); // Process a GLSL texturing op (will be SPV image) diff --git a/3rdparty/glslang/SPIRV/SpvBuilder.cpp b/3rdparty/glslang/SPIRV/SpvBuilder.cpp index 951d10492..aff654062 100755 --- a/3rdparty/glslang/SPIRV/SpvBuilder.cpp +++ b/3rdparty/glslang/SPIRV/SpvBuilder.cpp @@ -60,6 +60,7 @@ Builder::Builder(unsigned int spvVersion, unsigned int magicNumber, SpvBuildLogg sourceVersion(0), sourceFileStringId(NoResult), currentLine(0), + currentFile(nullptr), emitOpLines(false), addressModel(AddressingModelLogical), memoryModel(MemoryModelGLSL450), @@ -87,8 +88,9 @@ Id Builder::import(const char* name) return import->getResultId(); } -// Emit an OpLine if we've been asked to emit OpLines and the line number -// has changed since the last time, and is a valid line number. +// Emit instruction for non-filename-based #line directives (ie. no filename +// seen yet): emit an OpLine if we've been asked to emit OpLines and the line +// number has changed since the last time, and is a valid line number. void Builder::setLine(int lineNum) { if (lineNum != 0 && lineNum != currentLine) { @@ -98,6 +100,38 @@ void Builder::setLine(int lineNum) } } +// If no filename, do non-filename-based #line emit. Else do filename-based emit. +// Emit OpLine if we've been asked to emit OpLines and the line number or filename +// has changed since the last time, and line number is valid. +void Builder::setLine(int lineNum, const char* filename) +{ + if (filename == nullptr) { + setLine(lineNum); + return; + } + if ((lineNum != 0 && lineNum != currentLine) || currentFile == nullptr || + strncmp(filename, currentFile, strlen(currentFile) + 1) != 0) { + currentLine = lineNum; + currentFile = filename; + if (emitOpLines) { + // If filename previously seen, use its id, else create a string + // and put it in the map. + auto sItr = stringIds.find(filename); + if (sItr != stringIds.end()) { + addLine(sItr->second, currentLine, 0); + } else { + Instruction* fileString = + new Instruction(getUniqueId(), NoType, OpString); + fileString->addStringOperand(filename); + spv::Id stringId = fileString->getResultId(); + strings.push_back(std::unique_ptr(fileString)); + addLine(stringId, currentLine, 0); + stringIds[filename] = stringId; + } + } + } +} + void Builder::addLine(Id fileName, int lineNum, int column) { Instruction* line = new Instruction(OpLine); diff --git a/3rdparty/glslang/SPIRV/SpvBuilder.h b/3rdparty/glslang/SPIRV/SpvBuilder.h index 7c1d421b3..d74d6f8c1 100644 --- a/3rdparty/glslang/SPIRV/SpvBuilder.h +++ b/3rdparty/glslang/SPIRV/SpvBuilder.h @@ -77,9 +77,11 @@ public: void setSourceFile(const std::string& file) { Instruction* fileString = new Instruction(getUniqueId(), NoType, OpString); - fileString->addStringOperand(file.c_str()); + const char* file_c_str = file.c_str(); + fileString->addStringOperand(file_c_str); sourceFileStringId = fileString->getResultId(); strings.push_back(std::unique_ptr(fileString)); + stringIds[file_c_str] = sourceFileStringId; } void setSourceText(const std::string& text) { sourceText = text; } void addSourceExtension(const char* ext) { sourceExtensions.push_back(ext); } @@ -106,9 +108,16 @@ public: return id; } - // Log the current line, and if different than the last one, - // issue a new OpLine, using the current file name. + // Generate OpLine for non-filename-based #line directives (ie no filename + // seen yet): Log the current line, and if different than the last one, + // issue a new OpLine using the new line and current source file name. void setLine(int line); + + // If filename null, generate OpLine for non-filename-based line directives, + // else do filename-based: Log the current line and file, and if different + // than the last one, issue a new OpLine using the new line and file + // name. + void setLine(int line, const char* filename); // Low-level OpLine. See setLine() for a layered helper. void addLine(Id fileName, int line, int column); @@ -658,6 +667,7 @@ public: spv::Id sourceFileStringId; std::string sourceText; int currentLine; + const char* currentFile; bool emitOpLines; std::set extensions; std::vector sourceExtensions; @@ -695,6 +705,9 @@ public: // Our loop stack. std::stack loops; + // map from strings to their string ids + std::unordered_map stringIds; + // The stream for outputting warnings and errors. SpvBuildLogger* logger; }; // end Builder class diff --git a/3rdparty/glslang/StandAlone/StandAlone.cpp b/3rdparty/glslang/StandAlone/StandAlone.cpp index 060428bf1..42a46cee0 100755 --- a/3rdparty/glslang/StandAlone/StandAlone.cpp +++ b/3rdparty/glslang/StandAlone/StandAlone.cpp @@ -160,6 +160,7 @@ const char* sourceEntryPointName = nullptr; const char* shaderStageName = nullptr; const char* variableName = nullptr; bool HlslEnable16BitTypes = false; +bool HlslDX9compatible = false; std::vector IncludeDirectoryList; // Source environment @@ -509,6 +510,8 @@ void ProcessArguments(std::vector>& workItem Options |= EOptionHlslIoMapping; } else if (lowerword == "hlsl-enable-16bit-types") { HlslEnable16BitTypes = true; + } else if (lowerword == "hlsl-dx9-compatible") { + HlslDX9compatible = true; } else if (lowerword == "invert-y" || // synonyms lowerword == "iy") { Options |= EOptionInvertY; @@ -815,6 +818,8 @@ void SetMessageOptions(EShMessages& messages) messages = (EShMessages)(messages | EShMsgHlslEnable16BitTypes); if ((Options & EOptionOptimizeDisable) || !ENABLE_OPT) messages = (EShMessages)(messages | EShMsgHlslLegalization); + if (HlslDX9compatible) + messages = (EShMessages)(messages | EShMsgHlslDX9Compatible); } // @@ -1509,6 +1514,7 @@ void usage() " works independently of source language\n" " --hlsl-iomap perform IO mapping in HLSL register space\n" " --hlsl-enable-16bit-types allow 16-bit types in SPIR-V for HLSL\n" + " --hlsl-dx9-compatible interprets sampler declarations as a texture/sampler combo like DirectX9 would." " --invert-y | --iy invert position.Y output in vertex shader\n" " --keep-uncalled | --ku don't eliminate uncalled functions\n" " --no-storage-format | --nsf use Unknown image format\n" diff --git a/3rdparty/glslang/Test/baseResults/120.frag.out b/3rdparty/glslang/Test/baseResults/120.frag.out index 8909f16f4..835cd9e7c 100644 --- a/3rdparty/glslang/Test/baseResults/120.frag.out +++ b/3rdparty/glslang/Test/baseResults/120.frag.out @@ -54,8 +54,8 @@ ERROR: 0:244: ':' : wrong operand types: no operation ':' exists that takes a l ERROR: 0:245: ':' : wrong operand types: no operation ':' exists that takes a left-hand operand of type ' const int' and a right operand of type ' global void' (or there is no acceptable conversion) ERROR: 0:248: 'half floating-point suffix' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_half_float -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_float16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_float16 ERROR: 0:248: '' : syntax error, unexpected IDENTIFIER, expecting COMMA or SEMICOLON ERROR: 55 compilation errors. No code generated. diff --git a/3rdparty/glslang/Test/baseResults/constantUnaryConversion.comp.out b/3rdparty/glslang/Test/baseResults/constantUnaryConversion.comp.out index de705e442..4117e93f3 100644 --- a/3rdparty/glslang/Test/baseResults/constantUnaryConversion.comp.out +++ b/3rdparty/glslang/Test/baseResults/constantUnaryConversion.comp.out @@ -1,6 +1,6 @@ constantUnaryConversion.comp Shader version: 450 -Requested GL_KHX_shader_explicit_arithmetic_types +Requested GL_EXT_shader_explicit_arithmetic_types local_size = (1, 1, 1) 0:? Sequence 0:48 Function Definition: main( ( global void) @@ -324,7 +324,7 @@ Linked compute stage: Shader version: 450 -Requested GL_KHX_shader_explicit_arithmetic_types +Requested GL_EXT_shader_explicit_arithmetic_types local_size = (1, 1, 1) 0:? Sequence 0:48 Function Definition: main( ( global void) diff --git a/3rdparty/glslang/Test/baseResults/findFunction.frag.out b/3rdparty/glslang/Test/baseResults/findFunction.frag.out index ec4f3e46d..cc9b15a1d 100644 --- a/3rdparty/glslang/Test/baseResults/findFunction.frag.out +++ b/3rdparty/glslang/Test/baseResults/findFunction.frag.out @@ -11,7 +11,7 @@ ERROR: 8 compilation errors. No code generated. Shader version: 450 -Requested GL_KHX_shader_explicit_arithmetic_types +Requested GL_EXT_shader_explicit_arithmetic_types ERROR: node is still EOpNull! 0:5 Function Definition: func(i81;i161;i161; ( global int64_t) 0:5 Function Parameters: @@ -137,7 +137,7 @@ Linked fragment stage: Shader version: 450 -Requested GL_KHX_shader_explicit_arithmetic_types +Requested GL_EXT_shader_explicit_arithmetic_types ERROR: node is still EOpNull! 0:10 Function Definition: func(i81;i161;i1; ( global int64_t) 0:10 Function Parameters: diff --git a/3rdparty/glslang/Test/baseResults/hlsl.PointSize.geom.out b/3rdparty/glslang/Test/baseResults/hlsl.PointSize.geom.out index c21008d28..77cdc7db7 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.PointSize.geom.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.attributeC11.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.attributeC11.frag.out index afc746699..927ea57f1 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.attributeC11.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.buffer.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.buffer.frag.out index 71393f083..1b7e03ff4 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.buffer.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.constantbuffer.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.constantbuffer.frag.out index 052d84e48..8c561dc17 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.constantbuffer.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.constructimat.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.constructimat.frag.out index e88c3d8f3..075dabb58 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.constructimat.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.coverage.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.coverage.frag.out index bea2fc0e5..691d64368 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.coverage.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.emptystructreturn.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.emptystructreturn.frag.out index 34a635c70..1c9953b5f 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.emptystructreturn.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.emptystructreturn.vert.out b/3rdparty/glslang/Test/baseResults/hlsl.emptystructreturn.vert.out index 61704586f..65d326d45 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.emptystructreturn.vert.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out index 33c9af43e..892145560 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out index 22b02e7f4..8520bd655 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.comp.out b/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.comp.out index 5058f2365..3329c5cb7 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.comp.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.evalfns.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.evalfns.frag.out index 4fd1e7b38..3f69827da 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.evalfns.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.frag.out index 20d2bb047..b8add071b 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.vert.out b/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.vert.out index 195e11d6e..460785e7f 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.vert.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.matNx1.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.matNx1.frag.out index 276d4c249..e8e0a7b3d 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.matNx1.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.matType.bool.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.matType.bool.frag.out index 900c60fcd..b5543d8f2 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.matType.bool.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.matType.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.matType.frag.out index c0d2e4b3f..d3b391b39 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.matType.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.matType.int.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.matType.int.frag.out index 2039dfd57..a1854aa21 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.matType.int.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.matrixSwizzle.vert.out b/3rdparty/glslang/Test/baseResults/hlsl.matrixSwizzle.vert.out index abb3e495a..237ce5d4e 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.matrixSwizzle.vert.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.namespace.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.namespace.frag.out index 08d959b3e..8df43ad75 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.namespace.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.partialInit.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.partialInit.frag.out index 2cdbb0fff..6881671e9 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.partialInit.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.pp.line2.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.pp.line2.frag.out new file mode 100644 index 000000000..478440a09 --- /dev/null +++ b/3rdparty/glslang/Test/baseResults/hlsl.pp.line2.frag.out @@ -0,0 +1,183 @@ +hlsl.pp.line2.frag +// Module Version 10000 +// Generated by (magic number): 80007 +// Id's are bound by 80 + + Capability Shader + 2: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 5 "MainPs" 71 75 + ExecutionMode 5 OriginUpperLeft + 1: String "hlsl.pp.line2.frag" + 17: String "foo.frag" + 32: String "foo.h" + 42: String "foo2.h" + Source HLSL 500 1 "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed entry-point MainPs +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed hlsl-offsets +#line 1 +#line 1 "foo.frag" +Texture2D g_tColor[ 128 ] ; + +layout (push_constant) cbuffer PerViewConstantBuffer_t +{ + uint g_nDataIdx; + uint g_nDataIdx2; + bool g_B; +} ; + +SamplerState g_sAniso; + +struct PS_INPUT +{ + float2 vTextureCoords : TEXCOORD2 ; +} ; + +struct PS_OUTPUT +{ + float4 vColor : SV_Target0 ; +} ; + +PS_OUTPUT MainPs ( PS_INPUT i ) +{ + PS_OUTPUT ps_output ; + + uint u; +#line 47 + if (g_B) +#line 3 "foo.h" + u = g_nDataIdx; + else +#line 67 + u = g_nDataIdx2; +#line 7 "foo2.h" + ps_output . vColor = g_tColor [ u ] . Sample ( g_sAniso , i . vTextureCoords . xy ); +#line 105 + return ps_output ; +} + +" + Name 5 "MainPs" + Name 9 "PS_INPUT" + MemberName 9(PS_INPUT) 0 "vTextureCoords" + Name 12 "PS_OUTPUT" + MemberName 12(PS_OUTPUT) 0 "vColor" + Name 15 "@MainPs(struct-PS_INPUT-vf21;" + Name 14 "i" + Name 19 "PerViewConstantBuffer_t" + MemberName 19(PerViewConstantBuffer_t) 0 "g_nDataIdx" + MemberName 19(PerViewConstantBuffer_t) 1 "g_nDataIdx2" + MemberName 19(PerViewConstantBuffer_t) 2 "g_B" + Name 21 "" + Name 34 "u" + Name 44 "ps_output" + Name 49 "g_tColor" + Name 56 "g_sAniso" + Name 69 "i" + Name 71 "i.vTextureCoords" + Name 75 "@entryPointOutput.vColor" + Name 76 "param" + MemberDecorate 19(PerViewConstantBuffer_t) 0 Offset 0 + MemberDecorate 19(PerViewConstantBuffer_t) 1 Offset 4 + MemberDecorate 19(PerViewConstantBuffer_t) 2 Offset 8 + Decorate 19(PerViewConstantBuffer_t) Block + Decorate 49(g_tColor) DescriptorSet 0 + Decorate 56(g_sAniso) DescriptorSet 0 + Decorate 71(i.vTextureCoords) Location 0 + Decorate 75(@entryPointOutput.vColor) Location 0 + 3: TypeVoid + 4: TypeFunction 3 + 7: TypeFloat 32 + 8: TypeVector 7(float) 2 + 9(PS_INPUT): TypeStruct 8(fvec2) + 10: TypePointer Function 9(PS_INPUT) + 11: TypeVector 7(float) 4 + 12(PS_OUTPUT): TypeStruct 11(fvec4) + 13: TypeFunction 12(PS_OUTPUT) 10(ptr) + 18: TypeInt 32 0 +19(PerViewConstantBuffer_t): TypeStruct 18(int) 18(int) 18(int) + 20: TypePointer PushConstant 19(PerViewConstantBuffer_t) + 21: 20(ptr) Variable PushConstant + 22: TypeInt 32 1 + 23: 22(int) Constant 2 + 24: TypePointer PushConstant 18(int) + 27: TypeBool + 28: 18(int) Constant 0 + 33: TypePointer Function 18(int) + 35: 22(int) Constant 0 + 39: 22(int) Constant 1 + 43: TypePointer Function 12(PS_OUTPUT) + 45: TypeImage 7(float) 2D sampled format:Unknown + 46: 18(int) Constant 128 + 47: TypeArray 45 46 + 48: TypePointer UniformConstant 47 + 49(g_tColor): 48(ptr) Variable UniformConstant + 51: TypePointer UniformConstant 45 + 54: TypeSampler + 55: TypePointer UniformConstant 54 + 56(g_sAniso): 55(ptr) Variable UniformConstant + 58: TypeSampledImage 45 + 60: TypePointer Function 8(fvec2) + 64: TypePointer Function 11(fvec4) + 70: TypePointer Input 8(fvec2) +71(i.vTextureCoords): 70(ptr) Variable Input + 74: TypePointer Output 11(fvec4) +75(@entryPointOutput.vColor): 74(ptr) Variable Output + 5(MainPs): 3 Function None 4 + 6: Label + 69(i): 10(ptr) Variable Function + 76(param): 10(ptr) Variable Function + Line 17 23 0 + 72: 8(fvec2) Load 71(i.vTextureCoords) + 73: 60(ptr) AccessChain 69(i) 35 + Store 73 72 + 77: 9(PS_INPUT) Load 69(i) + Store 76(param) 77 + 78:12(PS_OUTPUT) FunctionCall 15(@MainPs(struct-PS_INPUT-vf21;) 76(param) + 79: 11(fvec4) CompositeExtract 78 0 + Store 75(@entryPointOutput.vColor) 79 + Return + FunctionEnd +15(@MainPs(struct-PS_INPUT-vf21;):12(PS_OUTPUT) Function None 13 + 14(i): 10(ptr) FunctionParameter + 16: Label + 34(u): 33(ptr) Variable Function + 44(ps_output): 43(ptr) Variable Function + Line 17 47 0 + 25: 24(ptr) AccessChain 21 23 + 26: 18(int) Load 25 + 29: 27(bool) INotEqual 26 28 + SelectionMerge 31 None + BranchConditional 29 30 38 + 30: Label + Line 32 3 0 + 36: 24(ptr) AccessChain 21 35 + 37: 18(int) Load 36 + Store 34(u) 37 + Branch 31 + 38: Label + Line 32 67 0 + 40: 24(ptr) AccessChain 21 39 + 41: 18(int) Load 40 + Store 34(u) 41 + Branch 31 + 31: Label + Line 42 7 0 + 50: 18(int) Load 34(u) + 52: 51(ptr) AccessChain 49(g_tColor) 50 + 53: 45 Load 52 + 57: 54 Load 56(g_sAniso) + 59: 58 SampledImage 53 57 + 61: 60(ptr) AccessChain 14(i) 35 + 62: 8(fvec2) Load 61 + 63: 11(fvec4) ImageSampleImplicitLod 59 62 + 65: 64(ptr) AccessChain 44(ps_output) 35 + Store 65 63 + Line 42 105 0 + 66:12(PS_OUTPUT) Load 44(ps_output) + ReturnValue 66 + FunctionEnd diff --git a/3rdparty/glslang/Test/baseResults/hlsl.pp.line3.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.pp.line3.frag.out new file mode 100644 index 000000000..5aa2699e1 --- /dev/null +++ b/3rdparty/glslang/Test/baseResults/hlsl.pp.line3.frag.out @@ -0,0 +1,172 @@ +hlsl.pp.line3.frag +// Module Version 10000 +// Generated by (magic number): 80007 +// Id's are bound by 78 + + Capability Shader + 2: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 5 "MainPs" 69 73 + ExecutionMode 5 OriginUpperLeft + 1: String "hlsl.pp.line3.frag" + 31: String "./i1.h" + Source HLSL 500 1 "// OpModuleProcessed entry-point MainPs +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed hlsl-offsets +#line 1 +Texture2D g_tColor[ 128 ] ; + +layout (push_constant) cbuffer PerViewConstantBuffer_t +{ + uint g_nDataIdx; + uint g_nDataIdx2; + bool g_B; +} ; + +SamplerState g_sAniso; + +struct PS_INPUT +{ + float2 vTextureCoords : TEXCOORD2 ; +} ; + +struct PS_OUTPUT +{ + float4 vColor : SV_Target0 ; +} ; + +PS_OUTPUT MainPs ( PS_INPUT i ) +{ + PS_OUTPUT ps_output ; + + uint u; + if (g_B) +#include "i1.h" + else + u = g_nDataIdx2; + ps_output . vColor = g_tColor [ u ] . Sample ( g_sAniso , i . vTextureCoords . xy ); + return ps_output ; +} + +" + Name 5 "MainPs" + Name 9 "PS_INPUT" + MemberName 9(PS_INPUT) 0 "vTextureCoords" + Name 12 "PS_OUTPUT" + MemberName 12(PS_OUTPUT) 0 "vColor" + Name 15 "@MainPs(struct-PS_INPUT-vf21;" + Name 14 "i" + Name 18 "PerViewConstantBuffer_t" + MemberName 18(PerViewConstantBuffer_t) 0 "g_nDataIdx" + MemberName 18(PerViewConstantBuffer_t) 1 "g_nDataIdx2" + MemberName 18(PerViewConstantBuffer_t) 2 "g_B" + Name 20 "" + Name 33 "u" + Name 42 "ps_output" + Name 47 "g_tColor" + Name 54 "g_sAniso" + Name 67 "i" + Name 69 "i.vTextureCoords" + Name 73 "@entryPointOutput.vColor" + Name 74 "param" + MemberDecorate 18(PerViewConstantBuffer_t) 0 Offset 0 + MemberDecorate 18(PerViewConstantBuffer_t) 1 Offset 4 + MemberDecorate 18(PerViewConstantBuffer_t) 2 Offset 8 + Decorate 18(PerViewConstantBuffer_t) Block + Decorate 47(g_tColor) DescriptorSet 0 + Decorate 54(g_sAniso) DescriptorSet 0 + Decorate 69(i.vTextureCoords) Location 0 + Decorate 73(@entryPointOutput.vColor) Location 0 + 3: TypeVoid + 4: TypeFunction 3 + 7: TypeFloat 32 + 8: TypeVector 7(float) 2 + 9(PS_INPUT): TypeStruct 8(fvec2) + 10: TypePointer Function 9(PS_INPUT) + 11: TypeVector 7(float) 4 + 12(PS_OUTPUT): TypeStruct 11(fvec4) + 13: TypeFunction 12(PS_OUTPUT) 10(ptr) + 17: TypeInt 32 0 +18(PerViewConstantBuffer_t): TypeStruct 17(int) 17(int) 17(int) + 19: TypePointer PushConstant 18(PerViewConstantBuffer_t) + 20: 19(ptr) Variable PushConstant + 21: TypeInt 32 1 + 22: 21(int) Constant 2 + 23: TypePointer PushConstant 17(int) + 26: TypeBool + 27: 17(int) Constant 0 + 32: TypePointer Function 17(int) + 34: 21(int) Constant 0 + 38: 21(int) Constant 1 + 41: TypePointer Function 12(PS_OUTPUT) + 43: TypeImage 7(float) 2D sampled format:Unknown + 44: 17(int) Constant 128 + 45: TypeArray 43 44 + 46: TypePointer UniformConstant 45 + 47(g_tColor): 46(ptr) Variable UniformConstant + 49: TypePointer UniformConstant 43 + 52: TypeSampler + 53: TypePointer UniformConstant 52 + 54(g_sAniso): 53(ptr) Variable UniformConstant + 56: TypeSampledImage 43 + 58: TypePointer Function 8(fvec2) + 62: TypePointer Function 11(fvec4) + 68: TypePointer Input 8(fvec2) +69(i.vTextureCoords): 68(ptr) Variable Input + 72: TypePointer Output 11(fvec4) +73(@entryPointOutput.vColor): 72(ptr) Variable Output + 5(MainPs): 3 Function None 4 + 6: Label + 67(i): 10(ptr) Variable Function + 74(param): 10(ptr) Variable Function + Line 1 23 0 + 70: 8(fvec2) Load 69(i.vTextureCoords) + 71: 58(ptr) AccessChain 67(i) 34 + Store 71 70 + 75: 9(PS_INPUT) Load 67(i) + Store 74(param) 75 + 76:12(PS_OUTPUT) FunctionCall 15(@MainPs(struct-PS_INPUT-vf21;) 74(param) + 77: 11(fvec4) CompositeExtract 76 0 + Store 73(@entryPointOutput.vColor) 77 + Return + FunctionEnd +15(@MainPs(struct-PS_INPUT-vf21;):12(PS_OUTPUT) Function None 13 + 14(i): 10(ptr) FunctionParameter + 16: Label + 33(u): 32(ptr) Variable Function + 42(ps_output): 41(ptr) Variable Function + Line 1 27 0 + 24: 23(ptr) AccessChain 20 22 + 25: 17(int) Load 24 + 28: 26(bool) INotEqual 25 27 + SelectionMerge 30 None + BranchConditional 28 29 37 + 29: Label + Line 31 1 0 + 35: 23(ptr) AccessChain 20 34 + 36: 17(int) Load 35 + Store 33(u) 36 + Branch 30 + 37: Label + Line 1 30 0 + 39: 23(ptr) AccessChain 20 38 + 40: 17(int) Load 39 + Store 33(u) 40 + Branch 30 + 30: Label + Line 1 31 0 + 48: 17(int) Load 33(u) + 50: 49(ptr) AccessChain 47(g_tColor) 48 + 51: 43 Load 50 + 55: 52 Load 54(g_sAniso) + 57: 56 SampledImage 51 55 + 59: 58(ptr) AccessChain 14(i) 34 + 60: 8(fvec2) Load 59 + 61: 11(fvec4) ImageSampleImplicitLod 57 60 + 63: 62(ptr) AccessChain 42(ps_output) 34 + Store 63 61 + Line 1 32 0 + 64:12(PS_OUTPUT) Load 42(ps_output) + ReturnValue 64 + FunctionEnd diff --git a/3rdparty/glslang/Test/baseResults/hlsl.sample.dx9.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.sample.dx9.frag.out new file mode 100644 index 000000000..7b3432af2 --- /dev/null +++ b/3rdparty/glslang/Test/baseResults/hlsl.sample.dx9.frag.out @@ -0,0 +1,592 @@ +hlsl.sample.dx9.frag +Shader version: 500 +gl_FragCoord origin is upper left +using depth_any +0:? Sequence +0:15 Function Definition: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:15 Function Parameters: +0:? Sequence +0:18 Sequence +0:18 move second child to first child ( temp 4-component vector of float) +0:18 'ColorOut' ( temp 4-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:20 add second child into first child ( temp 4-component vector of float) +0:20 'ColorOut' ( temp 4-component vector of float) +0:20 texture ( temp 4-component vector of float) +0:20 'g_sam' (layout( binding=0) uniform sampler2D) +0:? Constant: +0:? 0.400000 +0:? 0.300000 +0:21 add second child into first child ( temp 4-component vector of float) +0:21 'ColorOut' ( temp 4-component vector of float) +0:21 texture ( temp 4-component vector of float) +0:21 'g_sam1D' (layout( binding=1) uniform sampler1D) +0:21 Constant: +0:21 0.500000 +0:22 add second child into first child ( temp 4-component vector of float) +0:22 'ColorOut' ( temp 4-component vector of float) +0:22 texture ( temp 4-component vector of float) +0:22 'g_sam2D' (layout( binding=2) uniform sampler2D) +0:? Constant: +0:? 0.500000 +0:? 0.600000 +0:23 add second child into first child ( temp 4-component vector of float) +0:23 'ColorOut' ( temp 4-component vector of float) +0:23 texture ( temp 4-component vector of float) +0:23 'g_sam3D' (layout( binding=3) uniform sampler3D) +0:? Constant: +0:? 0.500000 +0:? 0.600000 +0:? 0.400000 +0:24 add second child into first child ( temp 4-component vector of float) +0:24 'ColorOut' ( temp 4-component vector of float) +0:24 texture ( temp 4-component vector of float) +0:24 'g_samCube' (layout( binding=4) uniform samplerCube) +0:? Constant: +0:? 0.500000 +0:? 0.600000 +0:? 0.400000 +0:26 add second child into first child ( temp 4-component vector of float) +0:26 'ColorOut' ( temp 4-component vector of float) +0:26 textureLod ( temp 4-component vector of float) +0:26 'g_sam' (layout( binding=0) uniform sampler2D) +0:26 Construct vec2 ( temp 2-component vector of float) +0:? Constant: +0:? 0.400000 +0:? 0.300000 +0:? 0.000000 +0:? 0.000000 +0:26 direct index ( temp float) +0:? Constant: +0:? 0.400000 +0:? 0.300000 +0:? 0.000000 +0:? 0.000000 +0:26 Constant: +0:26 3 (const int) +0:27 add second child into first child ( temp 4-component vector of float) +0:27 'ColorOut' ( temp 4-component vector of float) +0:27 textureLod ( temp 4-component vector of float) +0:27 'g_sam1D' (layout( binding=1) uniform sampler1D) +0:27 Construct float ( temp float) +0:? Constant: +0:? 0.500000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:27 direct index ( temp float) +0:? Constant: +0:? 0.500000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:27 Constant: +0:27 3 (const int) +0:28 add second child into first child ( temp 4-component vector of float) +0:28 'ColorOut' ( temp 4-component vector of float) +0:28 textureLod ( temp 4-component vector of float) +0:28 'g_sam2D' (layout( binding=2) uniform sampler2D) +0:28 Construct vec2 ( temp 2-component vector of float) +0:? Constant: +0:? 0.500000 +0:? 0.600000 +0:? 0.000000 +0:? 0.000000 +0:28 direct index ( temp float) +0:? Constant: +0:? 0.500000 +0:? 0.600000 +0:? 0.000000 +0:? 0.000000 +0:28 Constant: +0:28 3 (const int) +0:29 add second child into first child ( temp 4-component vector of float) +0:29 'ColorOut' ( temp 4-component vector of float) +0:29 textureLod ( temp 4-component vector of float) +0:29 'g_sam3D' (layout( binding=3) uniform sampler3D) +0:29 Construct vec3 ( temp 3-component vector of float) +0:? Constant: +0:? 0.500000 +0:? 0.600000 +0:? 0.400000 +0:? 0.000000 +0:29 direct index ( temp float) +0:? Constant: +0:? 0.500000 +0:? 0.600000 +0:? 0.400000 +0:? 0.000000 +0:29 Constant: +0:29 3 (const int) +0:30 add second child into first child ( temp 4-component vector of float) +0:30 'ColorOut' ( temp 4-component vector of float) +0:30 textureLod ( temp 4-component vector of float) +0:30 'g_samCube' (layout( binding=4) uniform samplerCube) +0:30 Construct vec3 ( temp 3-component vector of float) +0:? Constant: +0:? 0.500000 +0:? 0.600000 +0:? 0.400000 +0:? 0.000000 +0:30 direct index ( temp float) +0:? Constant: +0:? 0.500000 +0:? 0.600000 +0:? 0.400000 +0:? 0.000000 +0:30 Constant: +0:30 3 (const int) +0:32 move second child to first child ( temp 4-component vector of float) +0:32 Color: direct index for structure ( temp 4-component vector of float) +0:32 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:32 Constant: +0:32 0 (const int) +0:32 divide ( temp 4-component vector of float) +0:32 'ColorOut' ( temp 4-component vector of float) +0:32 Constant: +0:32 10.000000 +0:33 move second child to first child ( temp float) +0:33 Depth: direct index for structure ( temp float) +0:33 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:33 Constant: +0:33 1 (const int) +0:33 Constant: +0:33 1.000000 +0:35 Branch: Return with expression +0:35 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:15 Function Definition: main( ( temp void) +0:15 Function Parameters: +0:? Sequence +0:15 Sequence +0:15 move second child to first child ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:15 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:15 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:15 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) +0:15 Color: direct index for structure ( temp 4-component vector of float) +0:15 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:15 Constant: +0:15 0 (const int) +0:15 move second child to first child ( temp float) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:15 Depth: direct index for structure ( temp float) +0:15 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:15 Constant: +0:15 1 (const int) +0:? Linker Objects +0:? 'g_sam' (layout( binding=0) uniform sampler2D) +0:? 'g_sam1D' (layout( binding=1) uniform sampler1D) +0:? 'g_sam2D' (layout( binding=2) uniform sampler2D) +0:? 'g_sam3D' (layout( binding=3) uniform sampler3D) +0:? 'g_samCube' (layout( binding=4) uniform samplerCube) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) + + +Linked fragment stage: + + +Shader version: 500 +gl_FragCoord origin is upper left +using depth_any +0:? Sequence +0:15 Function Definition: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:15 Function Parameters: +0:? Sequence +0:18 Sequence +0:18 move second child to first child ( temp 4-component vector of float) +0:18 'ColorOut' ( temp 4-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:20 add second child into first child ( temp 4-component vector of float) +0:20 'ColorOut' ( temp 4-component vector of float) +0:20 texture ( temp 4-component vector of float) +0:20 'g_sam' (layout( binding=0) uniform sampler2D) +0:? Constant: +0:? 0.400000 +0:? 0.300000 +0:21 add second child into first child ( temp 4-component vector of float) +0:21 'ColorOut' ( temp 4-component vector of float) +0:21 texture ( temp 4-component vector of float) +0:21 'g_sam1D' (layout( binding=1) uniform sampler1D) +0:21 Constant: +0:21 0.500000 +0:22 add second child into first child ( temp 4-component vector of float) +0:22 'ColorOut' ( temp 4-component vector of float) +0:22 texture ( temp 4-component vector of float) +0:22 'g_sam2D' (layout( binding=2) uniform sampler2D) +0:? Constant: +0:? 0.500000 +0:? 0.600000 +0:23 add second child into first child ( temp 4-component vector of float) +0:23 'ColorOut' ( temp 4-component vector of float) +0:23 texture ( temp 4-component vector of float) +0:23 'g_sam3D' (layout( binding=3) uniform sampler3D) +0:? Constant: +0:? 0.500000 +0:? 0.600000 +0:? 0.400000 +0:24 add second child into first child ( temp 4-component vector of float) +0:24 'ColorOut' ( temp 4-component vector of float) +0:24 texture ( temp 4-component vector of float) +0:24 'g_samCube' (layout( binding=4) uniform samplerCube) +0:? Constant: +0:? 0.500000 +0:? 0.600000 +0:? 0.400000 +0:26 add second child into first child ( temp 4-component vector of float) +0:26 'ColorOut' ( temp 4-component vector of float) +0:26 textureLod ( temp 4-component vector of float) +0:26 'g_sam' (layout( binding=0) uniform sampler2D) +0:26 Construct vec2 ( temp 2-component vector of float) +0:? Constant: +0:? 0.400000 +0:? 0.300000 +0:? 0.000000 +0:? 0.000000 +0:26 direct index ( temp float) +0:? Constant: +0:? 0.400000 +0:? 0.300000 +0:? 0.000000 +0:? 0.000000 +0:26 Constant: +0:26 3 (const int) +0:27 add second child into first child ( temp 4-component vector of float) +0:27 'ColorOut' ( temp 4-component vector of float) +0:27 textureLod ( temp 4-component vector of float) +0:27 'g_sam1D' (layout( binding=1) uniform sampler1D) +0:27 Construct float ( temp float) +0:? Constant: +0:? 0.500000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:27 direct index ( temp float) +0:? Constant: +0:? 0.500000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:27 Constant: +0:27 3 (const int) +0:28 add second child into first child ( temp 4-component vector of float) +0:28 'ColorOut' ( temp 4-component vector of float) +0:28 textureLod ( temp 4-component vector of float) +0:28 'g_sam2D' (layout( binding=2) uniform sampler2D) +0:28 Construct vec2 ( temp 2-component vector of float) +0:? Constant: +0:? 0.500000 +0:? 0.600000 +0:? 0.000000 +0:? 0.000000 +0:28 direct index ( temp float) +0:? Constant: +0:? 0.500000 +0:? 0.600000 +0:? 0.000000 +0:? 0.000000 +0:28 Constant: +0:28 3 (const int) +0:29 add second child into first child ( temp 4-component vector of float) +0:29 'ColorOut' ( temp 4-component vector of float) +0:29 textureLod ( temp 4-component vector of float) +0:29 'g_sam3D' (layout( binding=3) uniform sampler3D) +0:29 Construct vec3 ( temp 3-component vector of float) +0:? Constant: +0:? 0.500000 +0:? 0.600000 +0:? 0.400000 +0:? 0.000000 +0:29 direct index ( temp float) +0:? Constant: +0:? 0.500000 +0:? 0.600000 +0:? 0.400000 +0:? 0.000000 +0:29 Constant: +0:29 3 (const int) +0:30 add second child into first child ( temp 4-component vector of float) +0:30 'ColorOut' ( temp 4-component vector of float) +0:30 textureLod ( temp 4-component vector of float) +0:30 'g_samCube' (layout( binding=4) uniform samplerCube) +0:30 Construct vec3 ( temp 3-component vector of float) +0:? Constant: +0:? 0.500000 +0:? 0.600000 +0:? 0.400000 +0:? 0.000000 +0:30 direct index ( temp float) +0:? Constant: +0:? 0.500000 +0:? 0.600000 +0:? 0.400000 +0:? 0.000000 +0:30 Constant: +0:30 3 (const int) +0:32 move second child to first child ( temp 4-component vector of float) +0:32 Color: direct index for structure ( temp 4-component vector of float) +0:32 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:32 Constant: +0:32 0 (const int) +0:32 divide ( temp 4-component vector of float) +0:32 'ColorOut' ( temp 4-component vector of float) +0:32 Constant: +0:32 10.000000 +0:33 move second child to first child ( temp float) +0:33 Depth: direct index for structure ( temp float) +0:33 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:33 Constant: +0:33 1 (const int) +0:33 Constant: +0:33 1.000000 +0:35 Branch: Return with expression +0:35 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:15 Function Definition: main( ( temp void) +0:15 Function Parameters: +0:? Sequence +0:15 Sequence +0:15 move second child to first child ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:15 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:15 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:15 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) +0:15 Color: direct index for structure ( temp 4-component vector of float) +0:15 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:15 Constant: +0:15 0 (const int) +0:15 move second child to first child ( temp float) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:15 Depth: direct index for structure ( temp float) +0:15 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:15 Constant: +0:15 1 (const int) +0:? Linker Objects +0:? 'g_sam' (layout( binding=0) uniform sampler2D) +0:? 'g_sam1D' (layout( binding=1) uniform sampler1D) +0:? 'g_sam2D' (layout( binding=2) uniform sampler2D) +0:? 'g_sam3D' (layout( binding=3) uniform sampler3D) +0:? 'g_samCube' (layout( binding=4) uniform samplerCube) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) + +// Module Version 10000 +// Generated by (magic number): 80007 +// Id's are bound by 135 + + Capability Shader + Capability Sampled1D + 2: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 5 "main" 128 132 + ExecutionMode 5 OriginUpperLeft + ExecutionMode 5 DepthReplacing + 1: String "" + Source HLSL 500 1 "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed entry-point main +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed hlsl-offsets +#line 1 +" + Name 5 "main" + Name 9 "PS_OUTPUT" + MemberName 9(PS_OUTPUT) 0 "Color" + MemberName 9(PS_OUTPUT) 1 "Depth" + Name 11 "@main(" + Name 14 "ColorOut" + Name 20 "g_sam" + Name 32 "g_sam1D" + Name 38 "g_sam2D" + Name 48 "g_sam3D" + Name 58 "g_samCube" + Name 110 "psout" + Name 125 "flattenTemp" + Name 128 "@entryPointOutput.Color" + Name 132 "@entryPointOutput.Depth" + Decorate 20(g_sam) DescriptorSet 0 + Decorate 20(g_sam) Binding 0 + Decorate 32(g_sam1D) DescriptorSet 0 + Decorate 32(g_sam1D) Binding 1 + Decorate 38(g_sam2D) DescriptorSet 0 + Decorate 38(g_sam2D) Binding 2 + Decorate 48(g_sam3D) DescriptorSet 0 + Decorate 48(g_sam3D) Binding 3 + Decorate 58(g_samCube) DescriptorSet 0 + Decorate 58(g_samCube) Binding 4 + Decorate 128(@entryPointOutput.Color) Location 0 + Decorate 132(@entryPointOutput.Depth) BuiltIn FragDepth + 3: TypeVoid + 4: TypeFunction 3 + 7: TypeFloat 32 + 8: TypeVector 7(float) 4 + 9(PS_OUTPUT): TypeStruct 8(fvec4) 7(float) + 10: TypeFunction 9(PS_OUTPUT) + 13: TypePointer Function 8(fvec4) + 15: 7(float) Constant 0 + 16: 8(fvec4) ConstantComposite 15 15 15 15 + 17: TypeImage 7(float) 2D sampled format:Unknown + 18: TypeSampledImage 17 + 19: TypePointer UniformConstant 18 + 20(g_sam): 19(ptr) Variable UniformConstant + 22: TypeVector 7(float) 2 + 23: 7(float) Constant 1053609165 + 24: 7(float) Constant 1050253722 + 25: 22(fvec2) ConstantComposite 23 24 + 29: TypeImage 7(float) 1D sampled format:Unknown + 30: TypeSampledImage 29 + 31: TypePointer UniformConstant 30 + 32(g_sam1D): 31(ptr) Variable UniformConstant + 34: 7(float) Constant 1056964608 + 38(g_sam2D): 19(ptr) Variable UniformConstant + 40: 7(float) Constant 1058642330 + 41: 22(fvec2) ConstantComposite 34 40 + 45: TypeImage 7(float) 3D sampled format:Unknown + 46: TypeSampledImage 45 + 47: TypePointer UniformConstant 46 + 48(g_sam3D): 47(ptr) Variable UniformConstant + 50: TypeVector 7(float) 3 + 51: 50(fvec3) ConstantComposite 34 40 23 + 55: TypeImage 7(float) Cube sampled format:Unknown + 56: TypeSampledImage 55 + 57: TypePointer UniformConstant 56 + 58(g_samCube): 57(ptr) Variable UniformConstant + 64: 8(fvec4) ConstantComposite 23 24 15 15 + 68: TypeInt 32 0 + 69: 68(int) Constant 3 + 75: 8(fvec4) ConstantComposite 34 15 15 15 + 82: 8(fvec4) ConstantComposite 34 40 15 15 + 91: 8(fvec4) ConstantComposite 34 40 23 15 + 109: TypePointer Function 9(PS_OUTPUT) + 111: TypeInt 32 1 + 112: 111(int) Constant 0 + 114: 7(float) Constant 1092616192 + 118: 111(int) Constant 1 + 119: 7(float) Constant 1065353216 + 120: TypePointer Function 7(float) + 127: TypePointer Output 8(fvec4) +128(@entryPointOutput.Color): 127(ptr) Variable Output + 131: TypePointer Output 7(float) +132(@entryPointOutput.Depth): 131(ptr) Variable Output + 5(main): 3 Function None 4 + 6: Label +125(flattenTemp): 109(ptr) Variable Function + Line 1 15 0 + 126:9(PS_OUTPUT) FunctionCall 11(@main() + Store 125(flattenTemp) 126 + 129: 13(ptr) AccessChain 125(flattenTemp) 112 + 130: 8(fvec4) Load 129 + Store 128(@entryPointOutput.Color) 130 + 133: 120(ptr) AccessChain 125(flattenTemp) 118 + 134: 7(float) Load 133 + Store 132(@entryPointOutput.Depth) 134 + Return + FunctionEnd + 11(@main():9(PS_OUTPUT) Function None 10 + 12: Label + 14(ColorOut): 13(ptr) Variable Function + 110(psout): 109(ptr) Variable Function + Line 1 18 0 + Store 14(ColorOut) 16 + Line 1 20 0 + 21: 18 Load 20(g_sam) + 26: 8(fvec4) ImageSampleImplicitLod 21 25 + 27: 8(fvec4) Load 14(ColorOut) + 28: 8(fvec4) FAdd 27 26 + Store 14(ColorOut) 28 + Line 1 21 0 + 33: 30 Load 32(g_sam1D) + 35: 8(fvec4) ImageSampleImplicitLod 33 34 + 36: 8(fvec4) Load 14(ColorOut) + 37: 8(fvec4) FAdd 36 35 + Store 14(ColorOut) 37 + Line 1 22 0 + 39: 18 Load 38(g_sam2D) + 42: 8(fvec4) ImageSampleImplicitLod 39 41 + 43: 8(fvec4) Load 14(ColorOut) + 44: 8(fvec4) FAdd 43 42 + Store 14(ColorOut) 44 + Line 1 23 0 + 49: 46 Load 48(g_sam3D) + 52: 8(fvec4) ImageSampleImplicitLod 49 51 + 53: 8(fvec4) Load 14(ColorOut) + 54: 8(fvec4) FAdd 53 52 + Store 14(ColorOut) 54 + Line 1 24 0 + 59: 56 Load 58(g_samCube) + 60: 8(fvec4) ImageSampleImplicitLod 59 51 + 61: 8(fvec4) Load 14(ColorOut) + 62: 8(fvec4) FAdd 61 60 + Store 14(ColorOut) 62 + Line 1 26 0 + 63: 18 Load 20(g_sam) + 65: 7(float) CompositeExtract 64 0 + 66: 7(float) CompositeExtract 64 1 + 67: 22(fvec2) CompositeConstruct 65 66 + 70: 7(float) CompositeExtract 64 3 + 71: 8(fvec4) ImageSampleExplicitLod 63 67 Lod 70 + 72: 8(fvec4) Load 14(ColorOut) + 73: 8(fvec4) FAdd 72 71 + Store 14(ColorOut) 73 + Line 1 27 0 + 74: 30 Load 32(g_sam1D) + 76: 7(float) CompositeExtract 75 0 + 77: 7(float) CompositeExtract 75 3 + 78: 8(fvec4) ImageSampleExplicitLod 74 76 Lod 77 + 79: 8(fvec4) Load 14(ColorOut) + 80: 8(fvec4) FAdd 79 78 + Store 14(ColorOut) 80 + Line 1 28 0 + 81: 18 Load 38(g_sam2D) + 83: 7(float) CompositeExtract 82 0 + 84: 7(float) CompositeExtract 82 1 + 85: 22(fvec2) CompositeConstruct 83 84 + 86: 7(float) CompositeExtract 82 3 + 87: 8(fvec4) ImageSampleExplicitLod 81 85 Lod 86 + 88: 8(fvec4) Load 14(ColorOut) + 89: 8(fvec4) FAdd 88 87 + Store 14(ColorOut) 89 + Line 1 29 0 + 90: 46 Load 48(g_sam3D) + 92: 7(float) CompositeExtract 91 0 + 93: 7(float) CompositeExtract 91 1 + 94: 7(float) CompositeExtract 91 2 + 95: 50(fvec3) CompositeConstruct 92 93 94 + 96: 7(float) CompositeExtract 91 3 + 97: 8(fvec4) ImageSampleExplicitLod 90 95 Lod 96 + 98: 8(fvec4) Load 14(ColorOut) + 99: 8(fvec4) FAdd 98 97 + Store 14(ColorOut) 99 + Line 1 30 0 + 100: 56 Load 58(g_samCube) + 101: 7(float) CompositeExtract 91 0 + 102: 7(float) CompositeExtract 91 1 + 103: 7(float) CompositeExtract 91 2 + 104: 50(fvec3) CompositeConstruct 101 102 103 + 105: 7(float) CompositeExtract 91 3 + 106: 8(fvec4) ImageSampleExplicitLod 100 104 Lod 105 + 107: 8(fvec4) Load 14(ColorOut) + 108: 8(fvec4) FAdd 107 106 + Store 14(ColorOut) 108 + Line 1 32 0 + 113: 8(fvec4) Load 14(ColorOut) + 115: 8(fvec4) CompositeConstruct 114 114 114 114 + 116: 8(fvec4) FDiv 113 115 + 117: 13(ptr) AccessChain 110(psout) 112 + Store 117 116 + Line 1 33 0 + 121: 120(ptr) AccessChain 110(psout) 118 + Store 121 119 + Line 1 35 0 + 122:9(PS_OUTPUT) Load 110(psout) + ReturnValue 122 + FunctionEnd diff --git a/3rdparty/glslang/Test/baseResults/hlsl.sample.dx9.vert.out b/3rdparty/glslang/Test/baseResults/hlsl.sample.dx9.vert.out new file mode 100644 index 000000000..732b04398 --- /dev/null +++ b/3rdparty/glslang/Test/baseResults/hlsl.sample.dx9.vert.out @@ -0,0 +1,261 @@ +hlsl.sample.dx9.vert +Shader version: 500 +0:? Sequence +0:11 Function Definition: @main( ( temp structure{ temp 4-component vector of float Pos}) +0:11 Function Parameters: +0:? Sequence +0:14 Sequence +0:14 move second child to first child ( temp 4-component vector of float) +0:14 'PosOut' ( temp 4-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:16 add second child into first child ( temp 4-component vector of float) +0:16 'PosOut' ( temp 4-component vector of float) +0:16 textureLod ( temp 4-component vector of float) +0:16 'g_sam' (layout( binding=0) uniform sampler2D) +0:16 Construct vec2 ( temp 2-component vector of float) +0:? Constant: +0:? 0.300000 +0:? 0.400000 +0:? 0.000000 +0:? 1.000000 +0:16 direct index ( temp float) +0:? Constant: +0:? 0.300000 +0:? 0.400000 +0:? 0.000000 +0:? 1.000000 +0:16 Constant: +0:16 3 (const int) +0:17 add second child into first child ( temp 4-component vector of float) +0:17 'PosOut' ( temp 4-component vector of float) +0:17 textureLod ( temp 4-component vector of float) +0:17 'g_sam2D' (layout( binding=1) uniform sampler2D) +0:17 Construct vec2 ( temp 2-component vector of float) +0:? Constant: +0:? 0.500000 +0:? 0.600000 +0:? 0.000000 +0:? 1.000000 +0:17 direct index ( temp float) +0:? Constant: +0:? 0.500000 +0:? 0.600000 +0:? 0.000000 +0:? 1.000000 +0:17 Constant: +0:17 3 (const int) +0:19 move second child to first child ( temp 4-component vector of float) +0:19 Pos: direct index for structure ( temp 4-component vector of float) +0:19 'vsout' ( temp structure{ temp 4-component vector of float Pos}) +0:19 Constant: +0:19 0 (const int) +0:19 divide ( temp 4-component vector of float) +0:19 'PosOut' ( temp 4-component vector of float) +0:19 Constant: +0:19 2.000000 +0:21 Branch: Return with expression +0:21 'vsout' ( temp structure{ temp 4-component vector of float Pos}) +0:11 Function Definition: main( ( temp void) +0:11 Function Parameters: +0:? Sequence +0:11 Sequence +0:11 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) +0:11 Pos: direct index for structure ( temp 4-component vector of float) +0:11 Function Call: @main( ( temp structure{ temp 4-component vector of float Pos}) +0:11 Constant: +0:11 0 (const int) +0:? Linker Objects +0:? 'g_sam' (layout( binding=0) uniform sampler2D) +0:? 'g_sam2D' (layout( binding=1) uniform sampler2D) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) + + +Linked vertex stage: + + +Shader version: 500 +0:? Sequence +0:11 Function Definition: @main( ( temp structure{ temp 4-component vector of float Pos}) +0:11 Function Parameters: +0:? Sequence +0:14 Sequence +0:14 move second child to first child ( temp 4-component vector of float) +0:14 'PosOut' ( temp 4-component vector of float) +0:? Constant: +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:? 0.000000 +0:16 add second child into first child ( temp 4-component vector of float) +0:16 'PosOut' ( temp 4-component vector of float) +0:16 textureLod ( temp 4-component vector of float) +0:16 'g_sam' (layout( binding=0) uniform sampler2D) +0:16 Construct vec2 ( temp 2-component vector of float) +0:? Constant: +0:? 0.300000 +0:? 0.400000 +0:? 0.000000 +0:? 1.000000 +0:16 direct index ( temp float) +0:? Constant: +0:? 0.300000 +0:? 0.400000 +0:? 0.000000 +0:? 1.000000 +0:16 Constant: +0:16 3 (const int) +0:17 add second child into first child ( temp 4-component vector of float) +0:17 'PosOut' ( temp 4-component vector of float) +0:17 textureLod ( temp 4-component vector of float) +0:17 'g_sam2D' (layout( binding=1) uniform sampler2D) +0:17 Construct vec2 ( temp 2-component vector of float) +0:? Constant: +0:? 0.500000 +0:? 0.600000 +0:? 0.000000 +0:? 1.000000 +0:17 direct index ( temp float) +0:? Constant: +0:? 0.500000 +0:? 0.600000 +0:? 0.000000 +0:? 1.000000 +0:17 Constant: +0:17 3 (const int) +0:19 move second child to first child ( temp 4-component vector of float) +0:19 Pos: direct index for structure ( temp 4-component vector of float) +0:19 'vsout' ( temp structure{ temp 4-component vector of float Pos}) +0:19 Constant: +0:19 0 (const int) +0:19 divide ( temp 4-component vector of float) +0:19 'PosOut' ( temp 4-component vector of float) +0:19 Constant: +0:19 2.000000 +0:21 Branch: Return with expression +0:21 'vsout' ( temp structure{ temp 4-component vector of float Pos}) +0:11 Function Definition: main( ( temp void) +0:11 Function Parameters: +0:? Sequence +0:11 Sequence +0:11 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) +0:11 Pos: direct index for structure ( temp 4-component vector of float) +0:11 Function Call: @main( ( temp structure{ temp 4-component vector of float Pos}) +0:11 Constant: +0:11 0 (const int) +0:? Linker Objects +0:? 'g_sam' (layout( binding=0) uniform sampler2D) +0:? 'g_sam2D' (layout( binding=1) uniform sampler2D) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) + +// Module Version 10000 +// Generated by (magic number): 80007 +// Id's are bound by 64 + + Capability Shader + 2: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Vertex 5 "main" 61 + 1: String "" + Source HLSL 500 1 "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed entry-point main +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed hlsl-offsets +#line 1 +" + Name 5 "main" + Name 9 "VS_OUTPUT" + MemberName 9(VS_OUTPUT) 0 "Pos" + Name 11 "@main(" + Name 14 "PosOut" + Name 20 "g_sam" + Name 36 "g_sam2D" + Name 49 "vsout" + Name 61 "@entryPointOutput.Pos" + Decorate 20(g_sam) DescriptorSet 0 + Decorate 20(g_sam) Binding 0 + Decorate 36(g_sam2D) DescriptorSet 0 + Decorate 36(g_sam2D) Binding 1 + Decorate 61(@entryPointOutput.Pos) BuiltIn Position + 3: TypeVoid + 4: TypeFunction 3 + 7: TypeFloat 32 + 8: TypeVector 7(float) 4 + 9(VS_OUTPUT): TypeStruct 8(fvec4) + 10: TypeFunction 9(VS_OUTPUT) + 13: TypePointer Function 8(fvec4) + 15: 7(float) Constant 0 + 16: 8(fvec4) ConstantComposite 15 15 15 15 + 17: TypeImage 7(float) 2D sampled format:Unknown + 18: TypeSampledImage 17 + 19: TypePointer UniformConstant 18 + 20(g_sam): 19(ptr) Variable UniformConstant + 22: 7(float) Constant 1050253722 + 23: 7(float) Constant 1053609165 + 24: 7(float) Constant 1065353216 + 25: 8(fvec4) ConstantComposite 22 23 15 24 + 26: TypeVector 7(float) 2 + 30: TypeInt 32 0 + 31: 30(int) Constant 3 + 36(g_sam2D): 19(ptr) Variable UniformConstant + 38: 7(float) Constant 1056964608 + 39: 7(float) Constant 1058642330 + 40: 8(fvec4) ConstantComposite 38 39 15 24 + 48: TypePointer Function 9(VS_OUTPUT) + 50: TypeInt 32 1 + 51: 50(int) Constant 0 + 53: 7(float) Constant 1073741824 + 60: TypePointer Output 8(fvec4) +61(@entryPointOutput.Pos): 60(ptr) Variable Output + 5(main): 3 Function None 4 + 6: Label + Line 1 11 0 + 62:9(VS_OUTPUT) FunctionCall 11(@main() + 63: 8(fvec4) CompositeExtract 62 0 + Store 61(@entryPointOutput.Pos) 63 + Return + FunctionEnd + 11(@main():9(VS_OUTPUT) Function None 10 + 12: Label + 14(PosOut): 13(ptr) Variable Function + 49(vsout): 48(ptr) Variable Function + Line 1 14 0 + Store 14(PosOut) 16 + Line 1 16 0 + 21: 18 Load 20(g_sam) + 27: 7(float) CompositeExtract 25 0 + 28: 7(float) CompositeExtract 25 1 + 29: 26(fvec2) CompositeConstruct 27 28 + 32: 7(float) CompositeExtract 25 3 + 33: 8(fvec4) ImageSampleExplicitLod 21 29 Lod 32 + 34: 8(fvec4) Load 14(PosOut) + 35: 8(fvec4) FAdd 34 33 + Store 14(PosOut) 35 + Line 1 17 0 + 37: 18 Load 36(g_sam2D) + 41: 7(float) CompositeExtract 40 0 + 42: 7(float) CompositeExtract 40 1 + 43: 26(fvec2) CompositeConstruct 41 42 + 44: 7(float) CompositeExtract 40 3 + 45: 8(fvec4) ImageSampleExplicitLod 37 43 Lod 44 + 46: 8(fvec4) Load 14(PosOut) + 47: 8(fvec4) FAdd 46 45 + Store 14(PosOut) 47 + Line 1 19 0 + 52: 8(fvec4) Load 14(PosOut) + 54: 8(fvec4) CompositeConstruct 53 53 53 53 + 55: 8(fvec4) FDiv 52 54 + 56: 13(ptr) AccessChain 49(vsout) 51 + Store 56 55 + Line 1 21 0 + 57:9(VS_OUTPUT) Load 49(vsout) + ReturnValue 57 + FunctionEnd diff --git a/3rdparty/glslang/Test/baseResults/hlsl.samplebias.offset.dx10.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.samplebias.offset.dx10.frag.out index ae492e4d4..5d0b8625d 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.samplebias.offset.dx10.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.samplebias.offsetarray.dx10.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.samplebias.offsetarray.dx10.frag.out index 0cea76706..21112f82c 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.samplebias.offsetarray.dx10.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.array.dx10.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.array.dx10.frag.out index a41481da5..11803c140 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.array.dx10.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.basic.dx10.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.basic.dx10.frag.out index e8252d381..b79b3bf40 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.basic.dx10.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.offset.dx10.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.offset.dx10.frag.out index cb4ce3909..157761426 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.offset.dx10.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.offsetarray.dx10.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.offsetarray.dx10.frag.out index af2af3f29..9d60e464d 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.offsetarray.dx10.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out index a0e5a487f..0b5190b34 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.basic.dx10.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.basic.dx10.frag.out index ffe22988e..9e9a85c2c 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.basic.dx10.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.offset.dx10.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.offset.dx10.frag.out index 08e8749f9..6bdb87e15 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.offset.dx10.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.offsetarray.dx10.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.offsetarray.dx10.frag.out index b5c0fc0d7..8231c11a4 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.offsetarray.dx10.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.semantic.geom.out b/3rdparty/glslang/Test/baseResults/hlsl.semantic.geom.out index e73940bce..773c8aa37 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.semantic.geom.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.struct.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.struct.frag.out index 4ea7bbbd1..4f5fb6f24 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.struct.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.struct.split.assign.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.struct.split.assign.frag.out index 0598ac9c4..24c887952 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.struct.split.assign.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.structarray.flatten.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.structarray.flatten.frag.out index fc66a7cee..e657c469b 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.structarray.flatten.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.append.fn.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.append.fn.frag.out index df0865565..c850c10b5 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.append.fn.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.atomics.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.atomics.frag.out index 68d93c187..603bc0fa4 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.atomics.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.fn.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.fn.frag.out index 4b8ee635e..1dcd57196 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.fn.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.texture.struct.frag.out b/3rdparty/glslang/Test/baseResults/hlsl.texture.struct.frag.out index 62cb57497..607c49e40 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.texture.struct.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/hlsl.tristream-append.geom.out b/3rdparty/glslang/Test/baseResults/hlsl.tristream-append.geom.out index c11672495..94344cddf 100644 --- a/3rdparty/glslang/Test/baseResults/hlsl.tristream-append.geom.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.130.frag.out b/3rdparty/glslang/Test/baseResults/spv.130.frag.out index eb02bade5..ab6389c3c 100644 --- a/3rdparty/glslang/Test/baseResults/spv.130.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.140.frag.out b/3rdparty/glslang/Test/baseResults/spv.140.frag.out index 8a59c2f9b..4c3535181 100644 --- a/3rdparty/glslang/Test/baseResults/spv.140.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.16bitstorage_Error-int.frag.out b/3rdparty/glslang/Test/baseResults/spv.16bitstorage_Error-int.frag.out index 40552583f..d6a0c1327 100644 --- a/3rdparty/glslang/Test/baseResults/spv.16bitstorage_Error-int.frag.out +++ b/3rdparty/glslang/Test/baseResults/spv.16bitstorage_Error-int.frag.out @@ -1,88 +1,88 @@ spv.16bitstorage_Error-int.frag ERROR: 0:54: 'structure: (u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:58: 'return: can't use with structs containing int16' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:61: 'int16_t: (u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:74: '[: does not operate on types containing (u)int16' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:75: '.: can't swizzle types containing (u)int16' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:76: 'built-in function: (u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:76: 'built-in function: (u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:76: 'built-in function: (u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:77: 'built-in function: (u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:77: 'built-in function: (u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:78: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform int16_t' and a right operand of type 'layout( column_major std140 offset=0) uniform int16_t' (or there is no acceptable conversion) ERROR: 0:79: '-' : wrong operand type no operation '-' exists that takes an operand of type layout( column_major std140 offset=0) uniform int16_t (or there is no acceptable conversion) ERROR: 0:80: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform int16_t' and a right operand of type ' const int' (or there is no acceptable conversion) ERROR: 0:81: '.: can't swizzle types containing (u)int16' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:82: '=: can't use with structs containing int16' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:83: 'qualifier: (u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:84: 'qualifier: (u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:85: 'qualifier: (u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:86: '==' : wrong operand types: no operation '==' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform int16_t' and a right operand of type 'layout( column_major std140 offset=0) uniform int16_t' (or there is no acceptable conversion) ERROR: 0:87: '=: can't use with arrays containing int16' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:88: 'constructor: 16-bit vectors only take vector types' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:89: 'constructor: 16-bit arrays not supported' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:89: 'constructor: 16-bit vectors only take vector types' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:92: 'constructor: can't construct structure containing 16-bit type' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:93: 'func2' : no matching overloaded function found ERROR: 0:99: '' : syntax error, unexpected IDENTIFIER ERROR: 26 compilation errors. No code generated. diff --git a/3rdparty/glslang/Test/baseResults/spv.16bitstorage_Error-uint.frag.out b/3rdparty/glslang/Test/baseResults/spv.16bitstorage_Error-uint.frag.out index bff46d444..bac902ee8 100644 --- a/3rdparty/glslang/Test/baseResults/spv.16bitstorage_Error-uint.frag.out +++ b/3rdparty/glslang/Test/baseResults/spv.16bitstorage_Error-uint.frag.out @@ -1,88 +1,88 @@ spv.16bitstorage_Error-uint.frag ERROR: 0:54: 'structure: (u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:58: 'return: can't use with structs containing uint16' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:61: 'uint16_t: (u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:74: '[: does not operate on types containing (u)int16' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:75: '.: can't swizzle types containing (u)int16' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:76: 'built-in function: (u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:76: 'built-in function: (u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:76: 'built-in function: (u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:77: 'built-in function: (u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:77: 'built-in function: (u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:78: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform uint16_t' and a right operand of type 'layout( column_major std140 offset=0) uniform uint16_t' (or there is no acceptable conversion) ERROR: 0:79: '-' : wrong operand type no operation '-' exists that takes an operand of type layout( column_major std140 offset=0) uniform uint16_t (or there is no acceptable conversion) ERROR: 0:80: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform uint16_t' and a right operand of type ' const int' (or there is no acceptable conversion) ERROR: 0:81: '.: can't swizzle types containing (u)int16' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:82: '=: can't use with structs containing uint16' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:83: 'qualifier: (u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:84: 'qualifier: (u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:85: 'qualifier: (u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:86: '==' : wrong operand types: no operation '==' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform uint16_t' and a right operand of type 'layout( column_major std140 offset=0) uniform uint16_t' (or there is no acceptable conversion) ERROR: 0:87: '=: can't use with arrays containing uint16' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:88: 'constructor: 16-bit vectors only take vector types' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:89: 'constructor: 16-bit arrays not supported' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:89: 'constructor: 16-bit vectors only take vector types' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:92: 'constructor: can't construct structure containing 16-bit type' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_int16 -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int16 ERROR: 0:93: 'func2' : no matching overloaded function found ERROR: 0:99: '' : syntax error, unexpected IDENTIFIER ERROR: 26 compilation errors. No code generated. diff --git a/3rdparty/glslang/Test/baseResults/spv.16bitstorage_Error.frag.out b/3rdparty/glslang/Test/baseResults/spv.16bitstorage_Error.frag.out index 08c75e73b..8e7e35e2a 100644 --- a/3rdparty/glslang/Test/baseResults/spv.16bitstorage_Error.frag.out +++ b/3rdparty/glslang/Test/baseResults/spv.16bitstorage_Error.frag.out @@ -1,96 +1,96 @@ spv.16bitstorage_Error.frag ERROR: 0:54: 'structure: float16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_half_float -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_float16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_float16 ERROR: 0:58: 'return: can't use with structs containing float16' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_half_float -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_float16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_float16 ERROR: 0:61: 'float16_t: float16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_half_float -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_float16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_float16 ERROR: 0:74: '[: does not operate on types containing float16' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_half_float -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_float16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_float16 ERROR: 0:75: '.: can't swizzle types containing float16' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_half_float -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_float16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_float16 ERROR: 0:76: 'built-in function: float16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_half_float -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_float16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_float16 ERROR: 0:76: 'built-in function: float16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_half_float -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_float16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_float16 ERROR: 0:76: 'built-in function: float16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_half_float -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_float16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_float16 ERROR: 0:77: 'built-in function: float16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_half_float -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_float16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_float16 ERROR: 0:77: 'built-in function: float16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_half_float -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_float16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_float16 ERROR: 0:78: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform float16_t' and a right operand of type 'layout( column_major std140 offset=0) uniform float16_t' (or there is no acceptable conversion) ERROR: 0:79: '-' : wrong operand type no operation '-' exists that takes an operand of type layout( column_major std140 offset=0) uniform float16_t (or there is no acceptable conversion) ERROR: 0:80: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform float16_t' and a right operand of type ' const float' (or there is no acceptable conversion) ERROR: 0:81: '.: can't swizzle types containing float16' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_half_float -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_float16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_float16 ERROR: 0:82: '=: can't use with structs containing float16' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_half_float -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_float16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_float16 ERROR: 0:83: 'qualifier: float16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_half_float -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_float16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_float16 ERROR: 0:84: 'qualifier: float16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_half_float -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_float16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_float16 ERROR: 0:85: 'qualifier: float16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_half_float -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_float16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_float16 ERROR: 0:86: '==' : wrong operand types: no operation '==' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform float16_t' and a right operand of type 'layout( column_major std140 offset=0) uniform float16_t' (or there is no acceptable conversion) ERROR: 0:87: '=: can't use with arrays containing float16' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_half_float -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_float16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_float16 ERROR: 0:88: 'half floating-point suffix' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_half_float -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_float16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_float16 ERROR: 0:88: 'half float literal' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_half_float -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_float16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_float16 ERROR: 0:89: 'constructor: 16-bit vectors only take vector types' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_half_float -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_float16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_float16 ERROR: 0:90: 'constructor: 16-bit arrays not supported' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_half_float -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_float16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_float16 ERROR: 0:90: 'constructor: 16-bit vectors only take vector types' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_half_float -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_float16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_float16 ERROR: 0:93: 'constructor: can't construct structure containing 16-bit type' : required extension not requested: Possible extensions include: GL_AMD_gpu_shader_half_float -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_float16 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_float16 ERROR: 0:94: 'func2' : no matching overloaded function found ERROR: 0:100: '' : syntax error, unexpected IDENTIFIER ERROR: 28 compilation errors. No code generated. diff --git a/3rdparty/glslang/Test/baseResults/spv.400.frag.out b/3rdparty/glslang/Test/baseResults/spv.400.frag.out index a0583cff8..6275df2c1 100644 --- a/3rdparty/glslang/Test/baseResults/spv.400.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.8bitstorage_Error-int.frag.out b/3rdparty/glslang/Test/baseResults/spv.8bitstorage_Error-int.frag.out index 0562111ba..5607670fe 100644 --- a/3rdparty/glslang/Test/baseResults/spv.8bitstorage_Error-int.frag.out +++ b/3rdparty/glslang/Test/baseResults/spv.8bitstorage_Error-int.frag.out @@ -1,68 +1,68 @@ spv.8bitstorage_Error-int.frag ERROR: 0:54: 'structure: (u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:58: 'return: can't use with structs containing int8' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:61: 'int8_t: (u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:74: '[: does not operate on types containing (u)int8' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:75: '.: can't swizzle types containing (u)int8' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:76: 'built-in function: (u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:76: 'built-in function: (u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:76: 'built-in function: (u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:77: 'built-in function: (u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:77: 'built-in function: (u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:78: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform int8_t' and a right operand of type 'layout( column_major std140 offset=0) uniform int8_t' (or there is no acceptable conversion) ERROR: 0:79: '-' : wrong operand type no operation '-' exists that takes an operand of type layout( column_major std140 offset=0) uniform int8_t (or there is no acceptable conversion) ERROR: 0:80: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform int8_t' and a right operand of type ' const int' (or there is no acceptable conversion) ERROR: 0:81: '.: can't swizzle types containing (u)int8' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:82: '=: can't use with structs containing int8' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:83: 'qualifier: (u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:84: 'qualifier: (u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:85: 'qualifier: (u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:86: '==' : wrong operand types: no operation '==' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform int8_t' and a right operand of type 'layout( column_major std140 offset=0) uniform int8_t' (or there is no acceptable conversion) ERROR: 0:87: '=: can't use with arrays containing int8' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:88: 'constructor: 8-bit vectors only take vector types' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:89: 'constructor: 8-bit arrays not supported' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:89: 'constructor: 8-bit vectors only take vector types' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:92: 'constructor: can't construct structure containing 8-bit type' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:93: 'func2' : no matching overloaded function found ERROR: 0:99: '' : syntax error, unexpected IDENTIFIER ERROR: 26 compilation errors. No code generated. diff --git a/3rdparty/glslang/Test/baseResults/spv.8bitstorage_Error-uint.frag.out b/3rdparty/glslang/Test/baseResults/spv.8bitstorage_Error-uint.frag.out index 93070f2ae..c55a63099 100644 --- a/3rdparty/glslang/Test/baseResults/spv.8bitstorage_Error-uint.frag.out +++ b/3rdparty/glslang/Test/baseResults/spv.8bitstorage_Error-uint.frag.out @@ -1,68 +1,68 @@ spv.8bitstorage_Error-uint.frag ERROR: 0:54: 'structure: (u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:58: 'return: can't use with structs containing uint8' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:61: 'uint8_t: (u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:74: '[: does not operate on types containing (u)int8' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:75: '.: can't swizzle types containing (u)int8' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:76: 'built-in function: (u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:76: 'built-in function: (u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:76: 'built-in function: (u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:77: 'built-in function: (u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:77: 'built-in function: (u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:78: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform uint8_t' and a right operand of type 'layout( column_major std140 offset=0) uniform uint8_t' (or there is no acceptable conversion) ERROR: 0:79: '-' : wrong operand type no operation '-' exists that takes an operand of type layout( column_major std140 offset=0) uniform uint8_t (or there is no acceptable conversion) ERROR: 0:80: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform uint8_t' and a right operand of type ' const int' (or there is no acceptable conversion) ERROR: 0:81: '.: can't swizzle types containing (u)int8' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:82: '=: can't use with structs containing uint8' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:83: 'qualifier: (u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:84: 'qualifier: (u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:85: 'qualifier: (u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:86: '==' : wrong operand types: no operation '==' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform uint8_t' and a right operand of type 'layout( column_major std140 offset=0) uniform uint8_t' (or there is no acceptable conversion) ERROR: 0:87: '=: can't use with arrays containing uint8' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:88: 'constructor: 8-bit vectors only take vector types' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:89: 'constructor: 8-bit arrays not supported' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:89: 'constructor: 8-bit vectors only take vector types' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:92: 'constructor: can't construct structure containing 8-bit type' : required extension not requested: Possible extensions include: -GL_KHX_shader_explicit_arithmetic_types -GL_KHX_shader_explicit_arithmetic_types_int8 +GL_EXT_shader_explicit_arithmetic_types +GL_EXT_shader_explicit_arithmetic_types_int8 ERROR: 0:93: 'func2' : no matching overloaded function found ERROR: 0:99: '' : syntax error, unexpected IDENTIFIER ERROR: 26 compilation errors. No code generated. diff --git a/3rdparty/glslang/Test/baseResults/spv.AofA.frag.out b/3rdparty/glslang/Test/baseResults/spv.AofA.frag.out index e8572ba98..feb57462c 100644 --- a/3rdparty/glslang/Test/baseResults/spv.AofA.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.controlFlowAttributes.frag.out b/3rdparty/glslang/Test/baseResults/spv.controlFlowAttributes.frag.out index 2f074def2..489522be3 100644 --- a/3rdparty/glslang/Test/baseResults/spv.controlFlowAttributes.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.explicittypes.frag.out b/3rdparty/glslang/Test/baseResults/spv.explicittypes.frag.out index 44f5ddd3b..f3ca41193 100644 --- a/3rdparty/glslang/Test/baseResults/spv.explicittypes.frag.out +++ b/3rdparty/glslang/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 @@ -19,14 +16,14 @@ error: Capability Float16 is not allowed by Vulkan 1.1 specification (or require EntryPoint Fragment 4 "main" ExecutionMode 4 OriginUpperLeft Source GLSL 450 - SourceExtension "GL_KHX_shader_explicit_arithmetic_types" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_float16" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_float32" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_float64" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int16" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int32" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int64" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int8" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float16" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float32" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float64" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int16" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int32" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int64" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int8" Name 4 "main" Name 6 "literal(" Name 8 "typeCast8(" diff --git a/3rdparty/glslang/Test/baseResults/spv.float16.frag.out b/3rdparty/glslang/Test/baseResults/spv.float16.frag.out index 37c66390e..9c0233ebb 100644 --- a/3rdparty/glslang/Test/baseResults/spv.float16.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.float16Fetch.frag.out b/3rdparty/glslang/Test/baseResults/spv.float16Fetch.frag.out index 7632737ac..45c80fec3 100644 --- a/3rdparty/glslang/Test/baseResults/spv.float16Fetch.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.float32.frag.out b/3rdparty/glslang/Test/baseResults/spv.float32.frag.out index 1a325ea18..6856eb828 100644 --- a/3rdparty/glslang/Test/baseResults/spv.float32.frag.out +++ b/3rdparty/glslang/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 @@ -20,14 +17,14 @@ error: Capability Float16 is not allowed by Vulkan 1.1 specification (or require EntryPoint Fragment 4 "main" 471 ExecutionMode 4 OriginUpperLeft Source GLSL 450 - SourceExtension "GL_KHX_shader_explicit_arithmetic_types" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_float16" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_float32" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_float64" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int16" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int32" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int64" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int8" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float16" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float32" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float64" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int16" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int32" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int64" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int8" Name 4 "main" Name 6 "literal(" Name 8 "operators(" diff --git a/3rdparty/glslang/Test/baseResults/spv.float64.frag.out b/3rdparty/glslang/Test/baseResults/spv.float64.frag.out index 78dca7564..f8dd2d193 100644 --- a/3rdparty/glslang/Test/baseResults/spv.float64.frag.out +++ b/3rdparty/glslang/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 @@ -20,14 +17,14 @@ error: Capability Float16 is not allowed by Vulkan 1.1 specification (or require EntryPoint Fragment 4 "main" 461 ExecutionMode 4 OriginUpperLeft Source GLSL 450 - SourceExtension "GL_KHX_shader_explicit_arithmetic_types" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_float16" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_float32" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_float64" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int16" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int32" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int64" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int8" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float16" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float32" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float64" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int16" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int32" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int64" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int8" Name 4 "main" Name 6 "literal(" Name 8 "operators(" diff --git a/3rdparty/glslang/Test/baseResults/spv.functionNestedOpaque.vert.out b/3rdparty/glslang/Test/baseResults/spv.functionNestedOpaque.vert.out index ff94077f5..df590c197 100644 --- a/3rdparty/glslang/Test/baseResults/spv.functionNestedOpaque.vert.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.image.frag.out b/3rdparty/glslang/Test/baseResults/spv.image.frag.out index a54418011..0fefd01ac 100644 --- a/3rdparty/glslang/Test/baseResults/spv.image.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.imageLoadStoreLod.frag.out b/3rdparty/glslang/Test/baseResults/spv.imageLoadStoreLod.frag.out index db9177d08..28cd4f964 100644 --- a/3rdparty/glslang/Test/baseResults/spv.imageLoadStoreLod.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.int16.amd.frag.out b/3rdparty/glslang/Test/baseResults/spv.int16.amd.frag.out index 0e3323bfc..4451baf9e 100644 --- a/3rdparty/glslang/Test/baseResults/spv.int16.amd.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.int16.frag.out b/3rdparty/glslang/Test/baseResults/spv.int16.frag.out index 3ba5c0715..cd5e26294 100644 --- a/3rdparty/glslang/Test/baseResults/spv.int16.frag.out +++ b/3rdparty/glslang/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 @@ -20,14 +17,14 @@ error: Capability Float16 is not allowed by Vulkan 1.0 specification (or require EntryPoint Fragment 4 "main" ExecutionMode 4 OriginUpperLeft Source GLSL 450 - SourceExtension "GL_KHX_shader_explicit_arithmetic_types" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_float16" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_float32" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_float64" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int16" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int32" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int64" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int8" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float16" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float32" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float64" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int16" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int32" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int64" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int8" Name 4 "main" Name 6 "literal(" Name 8 "typeCast16(" diff --git a/3rdparty/glslang/Test/baseResults/spv.int32.frag.out b/3rdparty/glslang/Test/baseResults/spv.int32.frag.out index 3b9342844..afa649c8d 100644 --- a/3rdparty/glslang/Test/baseResults/spv.int32.frag.out +++ b/3rdparty/glslang/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 @@ -18,14 +15,14 @@ error: Capability Float16 is not allowed by Vulkan 1.1 specification (or require EntryPoint Fragment 4 "main" ExecutionMode 4 OriginUpperLeft Source GLSL 450 - SourceExtension "GL_KHX_shader_explicit_arithmetic_types" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_float16" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_float32" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_float64" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int16" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int32" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int64" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int8" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float16" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float32" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float64" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int16" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int32" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int64" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int8" Name 4 "main" Name 6 "literal(" Name 8 "typeCast32(" diff --git a/3rdparty/glslang/Test/baseResults/spv.int64.frag.out b/3rdparty/glslang/Test/baseResults/spv.int64.frag.out index f2c54f161..b1375a666 100644 --- a/3rdparty/glslang/Test/baseResults/spv.int64.frag.out +++ b/3rdparty/glslang/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 @@ -16,7 +13,7 @@ error: OpDecorate SpecId decoration target '1' is not a scalar specializati ExecutionMode 4 OriginUpperLeft Source GLSL 450 SourceExtension "GL_ARB_gpu_shader_int64" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int64" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int64" Name 4 "main" Name 6 "literal(" Name 8 "typeCast(" diff --git a/3rdparty/glslang/Test/baseResults/spv.int8.frag.out b/3rdparty/glslang/Test/baseResults/spv.int8.frag.out index 1c65384f3..b5c0618b9 100644 --- a/3rdparty/glslang/Test/baseResults/spv.int8.frag.out +++ b/3rdparty/glslang/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 @@ -20,14 +17,14 @@ error: Capability Float16 is not allowed by Vulkan 1.1 specification (or require EntryPoint Fragment 4 "main" ExecutionMode 4 OriginUpperLeft Source GLSL 450 - SourceExtension "GL_KHX_shader_explicit_arithmetic_types" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_float16" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_float32" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_float64" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int16" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int32" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int64" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int8" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float16" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float32" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float64" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int16" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int32" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int64" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int8" Name 4 "main" Name 6 "literal(" Name 8 "typeCast8(" diff --git a/3rdparty/glslang/Test/baseResults/spv.memoryQualifier.frag.out b/3rdparty/glslang/Test/baseResults/spv.memoryQualifier.frag.out index 4113cc950..760b5871a 100644 --- a/3rdparty/glslang/Test/baseResults/spv.memoryQualifier.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.multiviewPerViewAttributes.tesc.out b/3rdparty/glslang/Test/baseResults/spv.multiviewPerViewAttributes.tesc.out index 7874b9464..16bea3db2 100644 --- a/3rdparty/glslang/Test/baseResults/spv.multiviewPerViewAttributes.tesc.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.newTexture.frag.out b/3rdparty/glslang/Test/baseResults/spv.newTexture.frag.out index 5e462bed4..1f91e4243 100644 --- a/3rdparty/glslang/Test/baseResults/spv.newTexture.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.paramMemory.frag.out b/3rdparty/glslang/Test/baseResults/spv.paramMemory.frag.out index a7e627a2c..02a485200 100644 --- a/3rdparty/glslang/Test/baseResults/spv.paramMemory.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.pp.line.frag.out b/3rdparty/glslang/Test/baseResults/spv.pp.line.frag.out new file mode 100644 index 000000000..61008d657 --- /dev/null +++ b/3rdparty/glslang/Test/baseResults/spv.pp.line.frag.out @@ -0,0 +1,144 @@ +spv.pp.line.frag +WARNING: spv.pp.line.frag:6: varying deprecated in version 130; may be removed in future release +WARNING: spv.pp.line.frag:7: varying deprecated in version 130; may be removed in future release + +// Module Version 10000 +// Generated by (magic number): 80007 +// Id's are bound by 65 + + Capability Shader + Capability Sampled1D + 2: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 5 "main" 41 53 56 59 + ExecutionMode 5 OriginUpperLeft + 1: String "spv.pp.line.frag" + Source GLSL 140 1 "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed entry-point main +#line 1 +#version 140 + +uniform sampler1D texSampler1D; +uniform sampler2D texSampler2D; + +varying float blend; +varying vec4 u; + +in vec2 coords2D; + +void main() +{ + float blendscale = 1.789; + float bias = 2.0; + float coords1D = 1.789; + vec4 color = vec4(0.0, 0.0, 0.0, 0.0); +#line 53 + color += texture (texSampler1D, coords1D); + color += texture (texSampler1D, coords1D, bias); +#line 102 + color += texture (texSampler2D, coords2D); + color += texture (texSampler2D, coords2D, bias); + + gl_FragColor = mix(color, u, blend * blendscale); +} +" + Name 5 "main" + Name 9 "blendscale" + Name 11 "bias" + Name 13 "coords1D" + Name 16 "color" + Name 22 "texSampler1D" + Name 37 "texSampler2D" + Name 41 "coords2D" + Name 53 "gl_FragColor" + Name 56 "u" + Name 59 "blend" + Decorate 22(texSampler1D) DescriptorSet 0 + Decorate 37(texSampler2D) DescriptorSet 0 + Decorate 53(gl_FragColor) Location 0 + 3: TypeVoid + 4: TypeFunction 3 + 7: TypeFloat 32 + 8: TypePointer Function 7(float) + 10: 7(float) Constant 1071971828 + 12: 7(float) Constant 1073741824 + 14: TypeVector 7(float) 4 + 15: TypePointer Function 14(fvec4) + 17: 7(float) Constant 0 + 18: 14(fvec4) ConstantComposite 17 17 17 17 + 19: TypeImage 7(float) 1D sampled format:Unknown + 20: TypeSampledImage 19 + 21: TypePointer UniformConstant 20 +22(texSampler1D): 21(ptr) Variable UniformConstant + 34: TypeImage 7(float) 2D sampled format:Unknown + 35: TypeSampledImage 34 + 36: TypePointer UniformConstant 35 +37(texSampler2D): 36(ptr) Variable UniformConstant + 39: TypeVector 7(float) 2 + 40: TypePointer Input 39(fvec2) + 41(coords2D): 40(ptr) Variable Input + 52: TypePointer Output 14(fvec4) +53(gl_FragColor): 52(ptr) Variable Output + 55: TypePointer Input 14(fvec4) + 56(u): 55(ptr) Variable Input + 58: TypePointer Input 7(float) + 59(blend): 58(ptr) Variable Input + 5(main): 3 Function None 4 + 6: Label + 9(blendscale): 8(ptr) Variable Function + 11(bias): 8(ptr) Variable Function + 13(coords1D): 8(ptr) Variable Function + 16(color): 15(ptr) Variable Function + Line 1 13 0 + Store 9(blendscale) 10 + Line 1 14 0 + Store 11(bias) 12 + Line 1 15 0 + Store 13(coords1D) 10 + Line 1 16 0 + Store 16(color) 18 + Line 1 54 0 + 23: 20 Load 22(texSampler1D) + 24: 7(float) Load 13(coords1D) + 25: 14(fvec4) ImageSampleImplicitLod 23 24 + 26: 14(fvec4) Load 16(color) + 27: 14(fvec4) FAdd 26 25 + Store 16(color) 27 + Line 1 55 0 + 28: 20 Load 22(texSampler1D) + 29: 7(float) Load 13(coords1D) + 30: 7(float) Load 11(bias) + 31: 14(fvec4) ImageSampleImplicitLod 28 29 Bias 30 + 32: 14(fvec4) Load 16(color) + 33: 14(fvec4) FAdd 32 31 + Store 16(color) 33 + Line 1 103 0 + 38: 35 Load 37(texSampler2D) + 42: 39(fvec2) Load 41(coords2D) + 43: 14(fvec4) ImageSampleImplicitLod 38 42 + 44: 14(fvec4) Load 16(color) + 45: 14(fvec4) FAdd 44 43 + Store 16(color) 45 + Line 1 104 0 + 46: 35 Load 37(texSampler2D) + 47: 39(fvec2) Load 41(coords2D) + 48: 7(float) Load 11(bias) + 49: 14(fvec4) ImageSampleImplicitLod 46 47 Bias 48 + 50: 14(fvec4) Load 16(color) + 51: 14(fvec4) FAdd 50 49 + Store 16(color) 51 + Line 1 106 0 + 54: 14(fvec4) Load 16(color) + 57: 14(fvec4) Load 56(u) + 60: 7(float) Load 59(blend) + 61: 7(float) Load 9(blendscale) + 62: 7(float) FMul 60 61 + 63: 14(fvec4) CompositeConstruct 62 62 62 62 + 64: 14(fvec4) ExtInst 2(GLSL.std.450) 46(FMix) 54 57 63 + Store 53(gl_FragColor) 64 + Return + FunctionEnd diff --git a/3rdparty/glslang/Test/baseResults/spv.queryL.frag.out b/3rdparty/glslang/Test/baseResults/spv.queryL.frag.out index b737a35b7..50829b35f 100644 --- a/3rdparty/glslang/Test/baseResults/spv.queryL.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.sampleMaskOverrideCoverage.frag.out b/3rdparty/glslang/Test/baseResults/spv.sampleMaskOverrideCoverage.frag.out index ae7e8241b..84b763ba2 100644 --- a/3rdparty/glslang/Test/baseResults/spv.sampleMaskOverrideCoverage.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.scalarlayout.frag.out b/3rdparty/glslang/Test/baseResults/spv.scalarlayout.frag.out index 2935e1a09..86dfc97b6 100644 --- a/3rdparty/glslang/Test/baseResults/spv.scalarlayout.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.scalarlayoutfloat16.frag.out b/3rdparty/glslang/Test/baseResults/spv.scalarlayoutfloat16.frag.out index 9118636f2..a3b924ae8 100644 --- a/3rdparty/glslang/Test/baseResults/spv.scalarlayoutfloat16.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.separate.frag.out b/3rdparty/glslang/Test/baseResults/spv.separate.frag.out index b9fefd709..654f854f8 100644 --- a/3rdparty/glslang/Test/baseResults/spv.separate.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.shaderBallotAMD.comp.out b/3rdparty/glslang/Test/baseResults/spv.shaderBallotAMD.comp.out index 5219a3a42..f3fbc9ff9 100644 --- a/3rdparty/glslang/Test/baseResults/spv.shaderBallotAMD.comp.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.sparseTexture.frag.out b/3rdparty/glslang/Test/baseResults/spv.sparseTexture.frag.out index 78a2c2e75..4b39ff570 100644 --- a/3rdparty/glslang/Test/baseResults/spv.sparseTexture.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.sparseTextureClamp.frag.out b/3rdparty/glslang/Test/baseResults/spv.sparseTextureClamp.frag.out index fe210f749..5b33c5004 100644 --- a/3rdparty/glslang/Test/baseResults/spv.sparseTextureClamp.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.stereoViewRendering.tesc.out b/3rdparty/glslang/Test/baseResults/spv.stereoViewRendering.tesc.out index 732e5b4ca..03b20f959 100644 --- a/3rdparty/glslang/Test/baseResults/spv.stereoViewRendering.tesc.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.subgroupPartitioned.comp.out b/3rdparty/glslang/Test/baseResults/spv.subgroupPartitioned.comp.out index e967df4a2..ab4e0c266 100644 --- a/3rdparty/glslang/Test/baseResults/spv.subgroupPartitioned.comp.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.textureGatherBiasLod.frag.out b/3rdparty/glslang/Test/baseResults/spv.textureGatherBiasLod.frag.out index d01515dc5..ee16656d4 100644 --- a/3rdparty/glslang/Test/baseResults/spv.textureGatherBiasLod.frag.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.viewportArray2.tesc.out b/3rdparty/glslang/Test/baseResults/spv.viewportArray2.tesc.out index b14179ece..a4016d401 100644 --- a/3rdparty/glslang/Test/baseResults/spv.viewportArray2.tesc.out +++ b/3rdparty/glslang/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/3rdparty/glslang/Test/baseResults/spv.vulkan110.int16.frag.out b/3rdparty/glslang/Test/baseResults/spv.vulkan110.int16.frag.out index 9141e4ec4..e6938960d 100644 --- a/3rdparty/glslang/Test/baseResults/spv.vulkan110.int16.frag.out +++ b/3rdparty/glslang/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 @@ -19,14 +16,14 @@ error: Capability Float16 is not allowed by Vulkan 1.1 specification (or require EntryPoint Fragment 4 "main" ExecutionMode 4 OriginUpperLeft Source GLSL 450 - SourceExtension "GL_KHX_shader_explicit_arithmetic_types" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_float16" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_float32" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_float64" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int16" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int32" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int64" - SourceExtension "GL_KHX_shader_explicit_arithmetic_types_int8" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float16" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float32" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float64" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int16" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int32" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int64" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int8" Name 4 "main" Name 6 "literal(" Name 8 "typeCast16(" diff --git a/3rdparty/glslang/Test/baseResults/stringToDouble.vert.out b/3rdparty/glslang/Test/baseResults/stringToDouble.vert.out index a799d0a42..3829c7036 100644 --- a/3rdparty/glslang/Test/baseResults/stringToDouble.vert.out +++ b/3rdparty/glslang/Test/baseResults/stringToDouble.vert.out @@ -1,6 +1,6 @@ stringToDouble.vert Shader version: 460 -Requested GL_KHX_shader_explicit_arithmetic_types_float16 +Requested GL_EXT_shader_explicit_arithmetic_types_float16 0:? Sequence 0:3 Function Definition: main( ( global void) 0:3 Function Parameters: @@ -524,7 +524,7 @@ Linked vertex stage: Shader version: 460 -Requested GL_KHX_shader_explicit_arithmetic_types_float16 +Requested GL_EXT_shader_explicit_arithmetic_types_float16 0:? Sequence 0:3 Function Definition: main( ( global void) 0:3 Function Parameters: diff --git a/3rdparty/glslang/Test/constantUnaryConversion.comp b/3rdparty/glslang/Test/constantUnaryConversion.comp index 467b6f6c2..3c479ae67 100644 --- a/3rdparty/glslang/Test/constantUnaryConversion.comp +++ b/3rdparty/glslang/Test/constantUnaryConversion.comp @@ -1,6 +1,6 @@ #version 450 -#extension GL_KHX_shader_explicit_arithmetic_types : require +#extension GL_EXT_shader_explicit_arithmetic_types : require const bool bool_init = true; const int8_t int8_t_init = int8_t(-1); diff --git a/3rdparty/glslang/Test/findFunction.frag b/3rdparty/glslang/Test/findFunction.frag index 7e180650b..41c091547 100644 --- a/3rdparty/glslang/Test/findFunction.frag +++ b/3rdparty/glslang/Test/findFunction.frag @@ -1,6 +1,6 @@ #version 450 -#extension GL_KHX_shader_explicit_arithmetic_types: enable +#extension GL_EXT_shader_explicit_arithmetic_types: enable int64_t func(int8_t a, int16_t b, int16_t c) { diff --git a/3rdparty/glslang/Test/hlsl.pp.line2.frag b/3rdparty/glslang/Test/hlsl.pp.line2.frag new file mode 100644 index 000000000..2d16db21b --- /dev/null +++ b/3rdparty/glslang/Test/hlsl.pp.line2.frag @@ -0,0 +1,40 @@ +#line 1 "foo.frag" +Texture2D g_tColor[ 128 ] ; + +layout (push_constant) cbuffer PerViewConstantBuffer_t +{ + uint g_nDataIdx; + uint g_nDataIdx2; + bool g_B; +} ; + +SamplerState g_sAniso; + +struct PS_INPUT +{ + float2 vTextureCoords : TEXCOORD2 ; +} ; + +struct PS_OUTPUT +{ + float4 vColor : SV_Target0 ; +} ; + +PS_OUTPUT MainPs ( PS_INPUT i ) +{ + PS_OUTPUT ps_output ; + + uint u; +#line 47 + if (g_B) +#line 3 "foo.h" + u = g_nDataIdx; + else +#line 67 + u = g_nDataIdx2; +#line 7 "foo2.h" + ps_output . vColor = g_tColor [ u ] . Sample ( g_sAniso , i . vTextureCoords . xy ); +#line 105 + return ps_output ; +} + diff --git a/3rdparty/glslang/Test/hlsl.pp.line3.frag b/3rdparty/glslang/Test/hlsl.pp.line3.frag new file mode 100644 index 000000000..7d85630fc --- /dev/null +++ b/3rdparty/glslang/Test/hlsl.pp.line3.frag @@ -0,0 +1,34 @@ +Texture2D g_tColor[ 128 ] ; + +layout (push_constant) cbuffer PerViewConstantBuffer_t +{ + uint g_nDataIdx; + uint g_nDataIdx2; + bool g_B; +} ; + +SamplerState g_sAniso; + +struct PS_INPUT +{ + float2 vTextureCoords : TEXCOORD2 ; +} ; + +struct PS_OUTPUT +{ + float4 vColor : SV_Target0 ; +} ; + +PS_OUTPUT MainPs ( PS_INPUT i ) +{ + PS_OUTPUT ps_output ; + + uint u; + if (g_B) +#include "i1.h" + else + u = g_nDataIdx2; + ps_output . vColor = g_tColor [ u ] . Sample ( g_sAniso , i . vTextureCoords . xy ); + return ps_output ; +} + diff --git a/3rdparty/glslang/Test/hlsl.sample.dx9.frag b/3rdparty/glslang/Test/hlsl.sample.dx9.frag new file mode 100644 index 000000000..26094193e --- /dev/null +++ b/3rdparty/glslang/Test/hlsl.sample.dx9.frag @@ -0,0 +1,36 @@ + +sampler g_sam : register(t0); +sampler1D g_sam1D : register(t1); +sampler2D g_sam2D : register(t2); +sampler3D g_sam3D : register(t3); +samplerCube g_samCube : register(t4); + +struct PS_OUTPUT +{ + float4 Color : SV_Target0; + float Depth : SV_Depth; +}; + +PS_OUTPUT main() +{ + PS_OUTPUT psout; + + float4 ColorOut = float4(0,0,0,0); + + ColorOut += tex2D( g_sam , float2(0.4,0.3)); + ColorOut += tex1D( g_sam1D, 0.5); + ColorOut += tex2D( g_sam2D, float2(0.5,0.6)); + ColorOut += tex3D( g_sam3D, float3(0.5,0.6,0.4)); + ColorOut += texCUBE( g_samCube, float3(0.5,0.6,0.4)); + + ColorOut += tex2Dlod( g_sam , float4(0.4,0.3,0.0,0.0)); + ColorOut += tex1Dlod( g_sam1D, float4(0.5,0.0,0.0,0.0)); + ColorOut += tex2Dlod( g_sam2D, float4(0.5,0.6,0.0,0.0)); + ColorOut += tex3Dlod( g_sam3D, float4(0.5,0.6,0.4,0.0)); + ColorOut += texCUBElod( g_samCube, float4(0.5,0.6,0.4,0.0)); + + psout.Color = ColorOut / 10.0f; + psout.Depth = 1.0; + + return psout; +} diff --git a/3rdparty/glslang/Test/hlsl.sample.dx9.vert b/3rdparty/glslang/Test/hlsl.sample.dx9.vert new file mode 100644 index 000000000..82d52b16d --- /dev/null +++ b/3rdparty/glslang/Test/hlsl.sample.dx9.vert @@ -0,0 +1,22 @@ + +sampler g_sam : register(t0); +sampler2D g_sam2D : register(t1); + +struct VS_OUTPUT +{ + float4 Pos : SV_Position; +}; + +VS_OUTPUT main() +{ + VS_OUTPUT vsout; + + float4 PosOut = float4(0,0,0,0); + + PosOut += tex2Dlod( g_sam , float4(0.3f, 0.4f, 0.0f, 1.0f)); + PosOut += tex2Dlod( g_sam2D, float4(0.5f, 0.6f, 0.0f, 1.0f)); + + vsout.Pos = PosOut / 2.0f; + + return vsout; +} diff --git a/3rdparty/glslang/Test/i1.h b/3rdparty/glslang/Test/i1.h new file mode 100644 index 000000000..e068ff703 --- /dev/null +++ b/3rdparty/glslang/Test/i1.h @@ -0,0 +1 @@ + u = g_nDataIdx; diff --git a/3rdparty/glslang/Test/runtests b/3rdparty/glslang/Test/runtests index 8cc8b7a80..c88cb5901 100755 --- a/3rdparty/glslang/Test/runtests +++ b/3rdparty/glslang/Test/runtests @@ -152,6 +152,8 @@ $EXE -l -i include.vert > $TARGETDIR/include.vert.out diff -b $BASEDIR/include.vert.out $TARGETDIR/include.vert.out || HASERROR=1 $EXE -D -Od -e main -H -Od -Iinc1/path1 -Iinc1/path2 hlsl.dashI.vert > $TARGETDIR/hlsl.dashI.vert.out diff -b $BASEDIR/hlsl.dashI.vert.out $TARGETDIR/hlsl.dashI.vert.out || HASERROR=1 +$EXE -D -Od -e MainPs -H -Od -g hlsl.pp.line3.frag > $TARGETDIR/hlsl.pp.line3.frag.out +diff -b $BASEDIR/hlsl.pp.line3.frag.out $TARGETDIR/hlsl.pp.line3.frag.out || HASERROR=1 # # Testing -D and -U diff --git a/3rdparty/glslang/Test/spv.explicittypes.frag b/3rdparty/glslang/Test/spv.explicittypes.frag index 18c070a7f..9941ea089 100644 --- a/3rdparty/glslang/Test/spv.explicittypes.frag +++ b/3rdparty/glslang/Test/spv.explicittypes.frag @@ -1,13 +1,13 @@ #version 450 -#extension GL_KHX_shader_explicit_arithmetic_types: enable -#extension GL_KHX_shader_explicit_arithmetic_types_int8: require -#extension GL_KHX_shader_explicit_arithmetic_types_int16: require -#extension GL_KHX_shader_explicit_arithmetic_types_int32: require -#extension GL_KHX_shader_explicit_arithmetic_types_int64: require -#extension GL_KHX_shader_explicit_arithmetic_types_float16: require -#extension GL_KHX_shader_explicit_arithmetic_types_float32: require -#extension GL_KHX_shader_explicit_arithmetic_types_float64: require +#extension GL_EXT_shader_explicit_arithmetic_types: enable +#extension GL_EXT_shader_explicit_arithmetic_types_int8: require +#extension GL_EXT_shader_explicit_arithmetic_types_int16: require +#extension GL_EXT_shader_explicit_arithmetic_types_int32: require +#extension GL_EXT_shader_explicit_arithmetic_types_int64: require +#extension GL_EXT_shader_explicit_arithmetic_types_float16: require +#extension GL_EXT_shader_explicit_arithmetic_types_float32: require +#extension GL_EXT_shader_explicit_arithmetic_types_float64: require layout(binding = 0) uniform Uniforms { diff --git a/3rdparty/glslang/Test/spv.float32.frag b/3rdparty/glslang/Test/spv.float32.frag index 471f6b3b7..f45dccd87 100644 --- a/3rdparty/glslang/Test/spv.float32.frag +++ b/3rdparty/glslang/Test/spv.float32.frag @@ -1,13 +1,13 @@ #version 450 -#extension GL_KHX_shader_explicit_arithmetic_types: enable -#extension GL_KHX_shader_explicit_arithmetic_types_int8: require -#extension GL_KHX_shader_explicit_arithmetic_types_int16: require -#extension GL_KHX_shader_explicit_arithmetic_types_int32: require -#extension GL_KHX_shader_explicit_arithmetic_types_int64: require -#extension GL_KHX_shader_explicit_arithmetic_types_float16: require -#extension GL_KHX_shader_explicit_arithmetic_types_float32: require -#extension GL_KHX_shader_explicit_arithmetic_types_float64: require +#extension GL_EXT_shader_explicit_arithmetic_types: enable +#extension GL_EXT_shader_explicit_arithmetic_types_int8: require +#extension GL_EXT_shader_explicit_arithmetic_types_int16: require +#extension GL_EXT_shader_explicit_arithmetic_types_int32: require +#extension GL_EXT_shader_explicit_arithmetic_types_int64: require +#extension GL_EXT_shader_explicit_arithmetic_types_float16: require +#extension GL_EXT_shader_explicit_arithmetic_types_float32: require +#extension GL_EXT_shader_explicit_arithmetic_types_float64: require void main() { diff --git a/3rdparty/glslang/Test/spv.float64.frag b/3rdparty/glslang/Test/spv.float64.frag index efbec77d9..faaac2366 100644 --- a/3rdparty/glslang/Test/spv.float64.frag +++ b/3rdparty/glslang/Test/spv.float64.frag @@ -1,13 +1,13 @@ #version 450 -#extension GL_KHX_shader_explicit_arithmetic_types: enable -#extension GL_KHX_shader_explicit_arithmetic_types_int8: require -#extension GL_KHX_shader_explicit_arithmetic_types_int16: require -#extension GL_KHX_shader_explicit_arithmetic_types_int32: require -#extension GL_KHX_shader_explicit_arithmetic_types_int64: require -#extension GL_KHX_shader_explicit_arithmetic_types_float16: require -#extension GL_KHX_shader_explicit_arithmetic_types_float32: require -#extension GL_KHX_shader_explicit_arithmetic_types_float64: require +#extension GL_EXT_shader_explicit_arithmetic_types: enable +#extension GL_EXT_shader_explicit_arithmetic_types_int8: require +#extension GL_EXT_shader_explicit_arithmetic_types_int16: require +#extension GL_EXT_shader_explicit_arithmetic_types_int32: require +#extension GL_EXT_shader_explicit_arithmetic_types_int64: require +#extension GL_EXT_shader_explicit_arithmetic_types_float16: require +#extension GL_EXT_shader_explicit_arithmetic_types_float32: require +#extension GL_EXT_shader_explicit_arithmetic_types_float64: require void main() { diff --git a/3rdparty/glslang/Test/spv.int16.frag b/3rdparty/glslang/Test/spv.int16.frag index d29894b84..2feff4f8d 100644 --- a/3rdparty/glslang/Test/spv.int16.frag +++ b/3rdparty/glslang/Test/spv.int16.frag @@ -1,13 +1,13 @@ #version 450 -#extension GL_KHX_shader_explicit_arithmetic_types: enable -#extension GL_KHX_shader_explicit_arithmetic_types_int8: require -#extension GL_KHX_shader_explicit_arithmetic_types_int16: require -#extension GL_KHX_shader_explicit_arithmetic_types_int32: require -#extension GL_KHX_shader_explicit_arithmetic_types_int64: require -#extension GL_KHX_shader_explicit_arithmetic_types_float16: require -#extension GL_KHX_shader_explicit_arithmetic_types_float32: require -#extension GL_KHX_shader_explicit_arithmetic_types_float64: require +#extension GL_EXT_shader_explicit_arithmetic_types: enable +#extension GL_EXT_shader_explicit_arithmetic_types_int8: require +#extension GL_EXT_shader_explicit_arithmetic_types_int16: require +#extension GL_EXT_shader_explicit_arithmetic_types_int32: require +#extension GL_EXT_shader_explicit_arithmetic_types_int64: require +#extension GL_EXT_shader_explicit_arithmetic_types_float16: require +#extension GL_EXT_shader_explicit_arithmetic_types_float32: require +#extension GL_EXT_shader_explicit_arithmetic_types_float64: require layout(binding = 0) uniform Uniforms { diff --git a/3rdparty/glslang/Test/spv.int32.frag b/3rdparty/glslang/Test/spv.int32.frag index 3a33c67c4..0a39ecd45 100644 --- a/3rdparty/glslang/Test/spv.int32.frag +++ b/3rdparty/glslang/Test/spv.int32.frag @@ -1,13 +1,13 @@ #version 450 -#extension GL_KHX_shader_explicit_arithmetic_types: enable -#extension GL_KHX_shader_explicit_arithmetic_types_int8: require -#extension GL_KHX_shader_explicit_arithmetic_types_int16: require -#extension GL_KHX_shader_explicit_arithmetic_types_int32: require -#extension GL_KHX_shader_explicit_arithmetic_types_int64: require -#extension GL_KHX_shader_explicit_arithmetic_types_float16: require -#extension GL_KHX_shader_explicit_arithmetic_types_float32: require -#extension GL_KHX_shader_explicit_arithmetic_types_float64: require +#extension GL_EXT_shader_explicit_arithmetic_types: enable +#extension GL_EXT_shader_explicit_arithmetic_types_int8: require +#extension GL_EXT_shader_explicit_arithmetic_types_int16: require +#extension GL_EXT_shader_explicit_arithmetic_types_int32: require +#extension GL_EXT_shader_explicit_arithmetic_types_int64: require +#extension GL_EXT_shader_explicit_arithmetic_types_float16: require +#extension GL_EXT_shader_explicit_arithmetic_types_float32: require +#extension GL_EXT_shader_explicit_arithmetic_types_float64: require layout(binding = 0) uniform Uniforms { diff --git a/3rdparty/glslang/Test/spv.int64.frag b/3rdparty/glslang/Test/spv.int64.frag index 4ec04cd8e..5390fb751 100644 --- a/3rdparty/glslang/Test/spv.int64.frag +++ b/3rdparty/glslang/Test/spv.int64.frag @@ -1,7 +1,7 @@ #version 450 #extension GL_ARB_gpu_shader_int64: enable -#extension GL_KHX_shader_explicit_arithmetic_types_int64: require +#extension GL_EXT_shader_explicit_arithmetic_types_int64: require layout(binding = 0) uniform Uniforms { diff --git a/3rdparty/glslang/Test/spv.int8.frag b/3rdparty/glslang/Test/spv.int8.frag index f41c62f54..80702b759 100644 --- a/3rdparty/glslang/Test/spv.int8.frag +++ b/3rdparty/glslang/Test/spv.int8.frag @@ -1,13 +1,13 @@ #version 450 -#extension GL_KHX_shader_explicit_arithmetic_types: enable -#extension GL_KHX_shader_explicit_arithmetic_types_int8: require -#extension GL_KHX_shader_explicit_arithmetic_types_int16: require -#extension GL_KHX_shader_explicit_arithmetic_types_int32: require -#extension GL_KHX_shader_explicit_arithmetic_types_int64: require -#extension GL_KHX_shader_explicit_arithmetic_types_float16: require -#extension GL_KHX_shader_explicit_arithmetic_types_float32: require -#extension GL_KHX_shader_explicit_arithmetic_types_float64: require +#extension GL_EXT_shader_explicit_arithmetic_types: enable +#extension GL_EXT_shader_explicit_arithmetic_types_int8: require +#extension GL_EXT_shader_explicit_arithmetic_types_int16: require +#extension GL_EXT_shader_explicit_arithmetic_types_int32: require +#extension GL_EXT_shader_explicit_arithmetic_types_int64: require +#extension GL_EXT_shader_explicit_arithmetic_types_float16: require +#extension GL_EXT_shader_explicit_arithmetic_types_float32: require +#extension GL_EXT_shader_explicit_arithmetic_types_float64: require layout(binding = 0) uniform Uniforms { diff --git a/3rdparty/glslang/Test/spv.pp.line.frag b/3rdparty/glslang/Test/spv.pp.line.frag new file mode 100644 index 000000000..464463c34 --- /dev/null +++ b/3rdparty/glslang/Test/spv.pp.line.frag @@ -0,0 +1,25 @@ +#version 140 + +uniform sampler1D texSampler1D; +uniform sampler2D texSampler2D; + +varying float blend; +varying vec4 u; + +in vec2 coords2D; + +void main() +{ + float blendscale = 1.789; + float bias = 2.0; + float coords1D = 1.789; + vec4 color = vec4(0.0, 0.0, 0.0, 0.0); +#line 53 + color += texture (texSampler1D, coords1D); + color += texture (texSampler1D, coords1D, bias); +#line 102 + color += texture (texSampler2D, coords2D); + color += texture (texSampler2D, coords2D, bias); + + gl_FragColor = mix(color, u, blend * blendscale); +} diff --git a/3rdparty/glslang/Test/spv.vulkan110.int16.frag b/3rdparty/glslang/Test/spv.vulkan110.int16.frag index d29894b84..2feff4f8d 100644 --- a/3rdparty/glslang/Test/spv.vulkan110.int16.frag +++ b/3rdparty/glslang/Test/spv.vulkan110.int16.frag @@ -1,13 +1,13 @@ #version 450 -#extension GL_KHX_shader_explicit_arithmetic_types: enable -#extension GL_KHX_shader_explicit_arithmetic_types_int8: require -#extension GL_KHX_shader_explicit_arithmetic_types_int16: require -#extension GL_KHX_shader_explicit_arithmetic_types_int32: require -#extension GL_KHX_shader_explicit_arithmetic_types_int64: require -#extension GL_KHX_shader_explicit_arithmetic_types_float16: require -#extension GL_KHX_shader_explicit_arithmetic_types_float32: require -#extension GL_KHX_shader_explicit_arithmetic_types_float64: require +#extension GL_EXT_shader_explicit_arithmetic_types: enable +#extension GL_EXT_shader_explicit_arithmetic_types_int8: require +#extension GL_EXT_shader_explicit_arithmetic_types_int16: require +#extension GL_EXT_shader_explicit_arithmetic_types_int32: require +#extension GL_EXT_shader_explicit_arithmetic_types_int64: require +#extension GL_EXT_shader_explicit_arithmetic_types_float16: require +#extension GL_EXT_shader_explicit_arithmetic_types_float32: require +#extension GL_EXT_shader_explicit_arithmetic_types_float64: require layout(binding = 0) uniform Uniforms { diff --git a/3rdparty/glslang/Test/stringToDouble.vert b/3rdparty/glslang/Test/stringToDouble.vert index 5a7024daf..a8de3b4f1 100644 --- a/3rdparty/glslang/Test/stringToDouble.vert +++ b/3rdparty/glslang/Test/stringToDouble.vert @@ -1,5 +1,5 @@ #version 460 -#extension GL_KHX_shader_explicit_arithmetic_types_float16 : enable +#extension GL_EXT_shader_explicit_arithmetic_types_float16 : enable void main() { float w1 = 00000.000; diff --git a/3rdparty/glslang/glslang/Include/Common.h b/3rdparty/glslang/glslang/Include/Common.h index 1402842c1..da166ccc8 100644 --- a/3rdparty/glslang/glslang/Include/Common.h +++ b/3rdparty/glslang/glslang/Include/Common.h @@ -229,16 +229,28 @@ inline const TString String(const int i, const int /*base*/ = 10) #endif struct TSourceLoc { - void init() { name = nullptr; string = 0; line = 0; column = 0; } + void init() + { + name = nullptr; string = 0; line = 0; column = 0; + } void init(int stringNum) { init(); string = stringNum; } // Returns the name if it exists. Otherwise, returns the string number. std::string getStringNameOrNum(bool quoteStringName = true) const { - if (name != nullptr) - return quoteStringName ? ("\"" + std::string(name) + "\"") : name; + if (name != nullptr) { + TString qstr = quoteStringName ? ("\"" + *name + "\"") : *name; + std::string ret_str(qstr.c_str()); + return ret_str; + } return std::to_string((long long)string); } - const char* name; // descriptive name for this string + const char* getFilename() const + { + if (name == nullptr) + return nullptr; + return name->c_str(); + } + TString* name; // descriptive name for this string int string; int line; int column; diff --git a/3rdparty/glslang/glslang/MachineIndependent/Intermediate.cpp b/3rdparty/glslang/glslang/MachineIndependent/Intermediate.cpp index 46d481283..5ebb2e019 100644 --- a/3rdparty/glslang/glslang/MachineIndependent/Intermediate.cpp +++ b/3rdparty/glslang/glslang/MachineIndependent/Intermediate.cpp @@ -907,28 +907,28 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt break; case EOpConstructFloat16: promoteTo = EbtFloat16; - canPromoteConstant = extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types) || - extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_float16); + canPromoteConstant = extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) || + extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_float16); break; case EOpConstructInt8: promoteTo = EbtInt8; - canPromoteConstant = extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types) || - extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_int8); + canPromoteConstant = extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) || + extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int8); break; case EOpConstructUint8: promoteTo = EbtUint8; - canPromoteConstant = extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types) || - extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_int8); + canPromoteConstant = extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) || + extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int8); break; case EOpConstructInt16: promoteTo = EbtInt16; - canPromoteConstant = extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types) || - extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_int16); + canPromoteConstant = extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) || + extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int16); break; case EOpConstructUint16: promoteTo = EbtUint16; - canPromoteConstant = extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types) || - extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_int16); + canPromoteConstant = extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) || + extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int16); break; case EOpConstructInt: promoteTo = EbtInt; @@ -1485,14 +1485,14 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat } } - bool explicitTypesEnabled = extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types) || - extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_int8) || - extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_int16) || - extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_int32) || - extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_int64) || - extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_float16) || - extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_float32) || - extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_float64); + bool explicitTypesEnabled = extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types) || + extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int8) || + extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int16) || + extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int32) || + extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_int64) || + extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_float16) || + extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_float32) || + extensionRequested(E_GL_EXT_shader_explicit_arithmetic_types_float64); if (explicitTypesEnabled) { // integral promotions diff --git a/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp b/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp index 67a861f5b..b32315b37 100755 --- a/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp +++ b/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp @@ -5750,14 +5750,14 @@ const TFunction* TParseContext::findFunction(const TSourceLoc& loc, const TFunct return nullptr; } - bool explicitTypesEnabled = extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types) || - extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_int8) || - extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_int16) || - extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_int32) || - extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_int64) || - extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_float16) || - extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_float32) || - extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_float64); + bool explicitTypesEnabled = extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) || + extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int8) || + extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int16) || + extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int32) || + extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int64) || + extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float16) || + extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float32) || + extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float64); if (profile == EEsProfile || version < 120) function = findFunctionExact(loc, call, builtIn); diff --git a/3rdparty/glslang/glslang/MachineIndependent/Scan.cpp b/3rdparty/glslang/glslang/MachineIndependent/Scan.cpp index 4d2db3857..224725027 100644 --- a/3rdparty/glslang/glslang/MachineIndependent/Scan.cpp +++ b/3rdparty/glslang/glslang/MachineIndependent/Scan.cpp @@ -471,7 +471,7 @@ void TScanContext::fillInKeywordMap() (*KeywordMap)["u64vec3"] = U64VEC3; (*KeywordMap)["u64vec4"] = U64VEC4; - // GL_KHX_shader_explicit_arithmetic_types + // GL_EXT_shader_explicit_arithmetic_types (*KeywordMap)["int8_t"] = INT8_T; (*KeywordMap)["i8vec2"] = I8VEC2; (*KeywordMap)["i8vec3"] = I8VEC3; @@ -1133,8 +1133,8 @@ int TScanContext::tokenizeIdentifier() if (parseContext.symbolTable.atBuiltInLevel() || (parseContext.profile != EEsProfile && parseContext.version >= 450 && (parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_int64) || - parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types) || - parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_int64)))) + parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) || + parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int64)))) return keyword; return identifierOrType(); @@ -1148,9 +1148,9 @@ int TScanContext::tokenizeIdentifier() case U8VEC4: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || - ((parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types) || + ((parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) || parseContext.extensionTurnedOn(E_GL_EXT_shader_8bit_storage) || - parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_int8)) && + parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int8)) && parseContext.profile != EEsProfile && parseContext.version >= 450)) return keyword; return identifierOrType(); @@ -1171,8 +1171,8 @@ int TScanContext::tokenizeIdentifier() parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_int16) || #endif parseContext.extensionTurnedOn(E_GL_EXT_shader_16bit_storage) || - parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types) || - parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_int16)))) + parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) || + parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int16)))) return keyword; return identifierOrType(); case INT32_T: @@ -1185,8 +1185,8 @@ int TScanContext::tokenizeIdentifier() case U32VEC4: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || - ((parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types) || - parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_int32)) && + ((parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) || + parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int32)) && parseContext.profile != EEsProfile && parseContext.version >= 450)) return keyword; return identifierOrType(); @@ -1208,8 +1208,8 @@ int TScanContext::tokenizeIdentifier() case F32MAT4X4: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || - ((parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types) || - parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_float32)) && + ((parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) || + parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float32)) && parseContext.profile != EEsProfile && parseContext.version >= 450)) return keyword; return identifierOrType(); @@ -1232,8 +1232,8 @@ int TScanContext::tokenizeIdentifier() case F64MAT4X4: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || - ((parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types) || - parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_float64)) && + ((parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) || + parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float64)) && parseContext.profile != EEsProfile && parseContext.version >= 450)) return keyword; return identifierOrType(); @@ -1250,8 +1250,8 @@ int TScanContext::tokenizeIdentifier() parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float) || #endif parseContext.extensionTurnedOn(E_GL_EXT_shader_16bit_storage) || - parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types) || - parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_float16)))) + parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) || + parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float16)))) return keyword; return identifierOrType(); @@ -1275,8 +1275,8 @@ int TScanContext::tokenizeIdentifier() #ifdef AMD_EXTENSIONS parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float) || #endif - parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types) || - parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_float16)))) + parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) || + parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float16)))) return keyword; return identifierOrType(); diff --git a/3rdparty/glslang/glslang/MachineIndependent/Scan.h b/3rdparty/glslang/glslang/MachineIndependent/Scan.h index 2c26c2efd..24b75cf7c 100644 --- a/3rdparty/glslang/glslang/MachineIndependent/Scan.h +++ b/3rdparty/glslang/glslang/MachineIndependent/Scan.h @@ -65,7 +65,7 @@ public: } if (names != nullptr) { for (int i = 0; i < numSources; ++i) - loc[i].name = names[i]; + loc[i].name = names[i] != nullptr ? NewPoolTString(names[i]) : nullptr; } loc[currentSource].line = 1; logicalSourceLoc.init(1); @@ -170,16 +170,18 @@ public: // for #line override in filename based parsing void setFile(const char* filename) { - logicalSourceLoc.name = filename; - loc[getLastValidSourceIndex()].name = filename; + TString* fn_tstr = NewPoolTString(filename); + logicalSourceLoc.name = fn_tstr; + loc[getLastValidSourceIndex()].name = fn_tstr; } void setFile(const char* filename, int i) { + TString* fn_tstr = NewPoolTString(filename); if (i == getLastValidSourceIndex()) { - logicalSourceLoc.name = filename; + logicalSourceLoc.name = fn_tstr; } - loc[i].name = filename; + loc[i].name = fn_tstr; } void setString(int newString) diff --git a/3rdparty/glslang/glslang/MachineIndependent/Versions.cpp b/3rdparty/glslang/glslang/MachineIndependent/Versions.cpp index 16265a30d..f40b9f4bb 100644 --- a/3rdparty/glslang/glslang/MachineIndependent/Versions.cpp +++ b/3rdparty/glslang/glslang/MachineIndependent/Versions.cpp @@ -282,14 +282,14 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_OVR_multiview2] = EBhDisable; // explicit types - extensionBehavior[E_GL_KHX_shader_explicit_arithmetic_types] = EBhDisable; - extensionBehavior[E_GL_KHX_shader_explicit_arithmetic_types_int8] = EBhDisable; - extensionBehavior[E_GL_KHX_shader_explicit_arithmetic_types_int16] = EBhDisable; - extensionBehavior[E_GL_KHX_shader_explicit_arithmetic_types_int32] = EBhDisable; - extensionBehavior[E_GL_KHX_shader_explicit_arithmetic_types_int64] = EBhDisable; - extensionBehavior[E_GL_KHX_shader_explicit_arithmetic_types_float16] = EBhDisable; - extensionBehavior[E_GL_KHX_shader_explicit_arithmetic_types_float32] = EBhDisable; - extensionBehavior[E_GL_KHX_shader_explicit_arithmetic_types_float64] = EBhDisable; + extensionBehavior[E_GL_EXT_shader_explicit_arithmetic_types] = EBhDisable; + extensionBehavior[E_GL_EXT_shader_explicit_arithmetic_types_int8] = EBhDisable; + extensionBehavior[E_GL_EXT_shader_explicit_arithmetic_types_int16] = EBhDisable; + extensionBehavior[E_GL_EXT_shader_explicit_arithmetic_types_int32] = EBhDisable; + extensionBehavior[E_GL_EXT_shader_explicit_arithmetic_types_int64] = EBhDisable; + extensionBehavior[E_GL_EXT_shader_explicit_arithmetic_types_float16] = EBhDisable; + extensionBehavior[E_GL_EXT_shader_explicit_arithmetic_types_float32] = EBhDisable; + extensionBehavior[E_GL_EXT_shader_explicit_arithmetic_types_float64] = EBhDisable; } // Get code that is not part of a shared symbol table, is specific to this shader, @@ -422,14 +422,14 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_NV_shader_texture_footprint 1\n" "#define GL_NV_mesh_shader 1\n" #endif - "#define GL_KHX_shader_explicit_arithmetic_types 1\n" - "#define GL_KHX_shader_explicit_arithmetic_types_int8 1\n" - "#define GL_KHX_shader_explicit_arithmetic_types_int16 1\n" - "#define GL_KHX_shader_explicit_arithmetic_types_int32 1\n" - "#define GL_KHX_shader_explicit_arithmetic_types_int64 1\n" - "#define GL_KHX_shader_explicit_arithmetic_types_float16 1\n" - "#define GL_KHX_shader_explicit_arithmetic_types_float32 1\n" - "#define GL_KHX_shader_explicit_arithmetic_types_float64 1\n" + "#define GL_EXT_shader_explicit_arithmetic_types 1\n" + "#define GL_EXT_shader_explicit_arithmetic_types_int8 1\n" + "#define GL_EXT_shader_explicit_arithmetic_types_int16 1\n" + "#define GL_EXT_shader_explicit_arithmetic_types_int32 1\n" + "#define GL_EXT_shader_explicit_arithmetic_types_int64 1\n" + "#define GL_EXT_shader_explicit_arithmetic_types_float16 1\n" + "#define GL_EXT_shader_explicit_arithmetic_types_float32 1\n" + "#define GL_EXT_shader_explicit_arithmetic_types_float64 1\n" ; if (version >= 150) { @@ -877,8 +877,8 @@ void TParseVersions::float16Check(const TSourceLoc& loc, const char* op, bool bu #if AMD_EXTENSIONS E_GL_AMD_gpu_shader_half_float, #endif - E_GL_KHX_shader_explicit_arithmetic_types, - E_GL_KHX_shader_explicit_arithmetic_types_float16}; + E_GL_EXT_shader_explicit_arithmetic_types, + E_GL_EXT_shader_explicit_arithmetic_types_float16}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); } } @@ -889,8 +889,8 @@ bool TParseVersions::float16Arithmetic() #if AMD_EXTENSIONS E_GL_AMD_gpu_shader_half_float, #endif - E_GL_KHX_shader_explicit_arithmetic_types, - E_GL_KHX_shader_explicit_arithmetic_types_float16}; + E_GL_EXT_shader_explicit_arithmetic_types, + E_GL_EXT_shader_explicit_arithmetic_types_float16}; return extensionsTurnedOn(sizeof(extensions)/sizeof(extensions[0]), extensions); } @@ -900,16 +900,16 @@ bool TParseVersions::int16Arithmetic() #if AMD_EXTENSIONS E_GL_AMD_gpu_shader_int16, #endif - E_GL_KHX_shader_explicit_arithmetic_types, - E_GL_KHX_shader_explicit_arithmetic_types_int16}; + E_GL_EXT_shader_explicit_arithmetic_types, + E_GL_EXT_shader_explicit_arithmetic_types_int16}; return extensionsTurnedOn(sizeof(extensions)/sizeof(extensions[0]), extensions); } bool TParseVersions::int8Arithmetic() { const char* const extensions[] = { - E_GL_KHX_shader_explicit_arithmetic_types, - E_GL_KHX_shader_explicit_arithmetic_types_int8}; + E_GL_EXT_shader_explicit_arithmetic_types, + E_GL_EXT_shader_explicit_arithmetic_types_int8}; return extensionsTurnedOn(sizeof(extensions)/sizeof(extensions[0]), extensions); } @@ -924,8 +924,8 @@ void TParseVersions::requireFloat16Arithmetic(const TSourceLoc& loc, const char* #if AMD_EXTENSIONS E_GL_AMD_gpu_shader_half_float, #endif - E_GL_KHX_shader_explicit_arithmetic_types, - E_GL_KHX_shader_explicit_arithmetic_types_float16}; + E_GL_EXT_shader_explicit_arithmetic_types, + E_GL_EXT_shader_explicit_arithmetic_types_float16}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, combined.c_str()); } @@ -940,8 +940,8 @@ void TParseVersions::requireInt16Arithmetic(const TSourceLoc& loc, const char* o #if AMD_EXTENSIONS E_GL_AMD_gpu_shader_int16, #endif - E_GL_KHX_shader_explicit_arithmetic_types, - E_GL_KHX_shader_explicit_arithmetic_types_int16}; + E_GL_EXT_shader_explicit_arithmetic_types, + E_GL_EXT_shader_explicit_arithmetic_types_int16}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, combined.c_str()); } @@ -953,8 +953,8 @@ void TParseVersions::requireInt8Arithmetic(const TSourceLoc& loc, const char* op combined += featureDesc; const char* const extensions[] = { - E_GL_KHX_shader_explicit_arithmetic_types, - E_GL_KHX_shader_explicit_arithmetic_types_int8}; + E_GL_EXT_shader_explicit_arithmetic_types, + E_GL_EXT_shader_explicit_arithmetic_types_int8}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, combined.c_str()); } @@ -966,8 +966,8 @@ void TParseVersions::float16ScalarVectorCheck(const TSourceLoc& loc, const char* E_GL_AMD_gpu_shader_half_float, #endif E_GL_EXT_shader_16bit_storage, - E_GL_KHX_shader_explicit_arithmetic_types, - E_GL_KHX_shader_explicit_arithmetic_types_float16}; + E_GL_EXT_shader_explicit_arithmetic_types, + E_GL_EXT_shader_explicit_arithmetic_types_float16}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); } } @@ -976,8 +976,8 @@ void TParseVersions::float16ScalarVectorCheck(const TSourceLoc& loc, const char* void TParseVersions::explicitFloat32Check(const TSourceLoc& loc, const char* op, bool builtIn) { if (!builtIn) { - const char* const extensions[2] = {E_GL_KHX_shader_explicit_arithmetic_types, - E_GL_KHX_shader_explicit_arithmetic_types_float32}; + const char* const extensions[2] = {E_GL_EXT_shader_explicit_arithmetic_types, + E_GL_EXT_shader_explicit_arithmetic_types_float32}; requireExtensions(loc, 2, extensions, op); } } @@ -986,8 +986,8 @@ void TParseVersions::explicitFloat32Check(const TSourceLoc& loc, const char* op, void TParseVersions::explicitFloat64Check(const TSourceLoc& loc, const char* op, bool builtIn) { if (!builtIn) { - const char* const extensions[2] = {E_GL_KHX_shader_explicit_arithmetic_types, - E_GL_KHX_shader_explicit_arithmetic_types_float64}; + const char* const extensions[2] = {E_GL_EXT_shader_explicit_arithmetic_types, + E_GL_EXT_shader_explicit_arithmetic_types_float64}; requireExtensions(loc, 2, extensions, op); requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 400, nullptr, op); @@ -998,8 +998,8 @@ void TParseVersions::explicitFloat64Check(const TSourceLoc& loc, const char* op, void TParseVersions::explicitInt8Check(const TSourceLoc& loc, const char* op, bool builtIn) { if (! builtIn) { - const char* const extensions[2] = {E_GL_KHX_shader_explicit_arithmetic_types, - E_GL_KHX_shader_explicit_arithmetic_types_int8}; + const char* const extensions[2] = {E_GL_EXT_shader_explicit_arithmetic_types, + E_GL_EXT_shader_explicit_arithmetic_types_int8}; requireExtensions(loc, 2, extensions, op); } } @@ -1024,8 +1024,8 @@ void TParseVersions::explicitInt16Check(const TSourceLoc& loc, const char* op, b #if AMD_EXTENSIONS E_GL_AMD_gpu_shader_int16, #endif - E_GL_KHX_shader_explicit_arithmetic_types, - E_GL_KHX_shader_explicit_arithmetic_types_int16}; + E_GL_EXT_shader_explicit_arithmetic_types, + E_GL_EXT_shader_explicit_arithmetic_types_int16}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); } } @@ -1038,8 +1038,8 @@ void TParseVersions::int16ScalarVectorCheck(const TSourceLoc& loc, const char* o E_GL_AMD_gpu_shader_int16, #endif E_GL_EXT_shader_16bit_storage, - E_GL_KHX_shader_explicit_arithmetic_types, - E_GL_KHX_shader_explicit_arithmetic_types_int16}; + E_GL_EXT_shader_explicit_arithmetic_types, + E_GL_EXT_shader_explicit_arithmetic_types_int16}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); } } @@ -1049,8 +1049,8 @@ void TParseVersions::int8ScalarVectorCheck(const TSourceLoc& loc, const char* op if (! builtIn) { const char* const extensions[] = { E_GL_EXT_shader_8bit_storage, - E_GL_KHX_shader_explicit_arithmetic_types, - E_GL_KHX_shader_explicit_arithmetic_types_int8}; + E_GL_EXT_shader_explicit_arithmetic_types, + E_GL_EXT_shader_explicit_arithmetic_types_int8}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); } } @@ -1059,8 +1059,8 @@ void TParseVersions::int8ScalarVectorCheck(const TSourceLoc& loc, const char* op void TParseVersions::explicitInt32Check(const TSourceLoc& loc, const char* op, bool builtIn) { if (! builtIn) { - const char* const extensions[2] = {E_GL_KHX_shader_explicit_arithmetic_types, - E_GL_KHX_shader_explicit_arithmetic_types_int32}; + const char* const extensions[2] = {E_GL_EXT_shader_explicit_arithmetic_types, + E_GL_EXT_shader_explicit_arithmetic_types_int32}; requireExtensions(loc, 2, extensions, op); } } @@ -1070,8 +1070,8 @@ void TParseVersions::int64Check(const TSourceLoc& loc, const char* op, bool buil { if (! builtIn) { const char* const extensions[3] = {E_GL_ARB_gpu_shader_int64, - E_GL_KHX_shader_explicit_arithmetic_types, - E_GL_KHX_shader_explicit_arithmetic_types_int64}; + E_GL_EXT_shader_explicit_arithmetic_types, + E_GL_EXT_shader_explicit_arithmetic_types_int64}; requireExtensions(loc, 3, extensions, op); requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 400, nullptr, op); diff --git a/3rdparty/glslang/glslang/MachineIndependent/Versions.h b/3rdparty/glslang/glslang/MachineIndependent/Versions.h index 6b513b43e..3f704f360 100644 --- a/3rdparty/glslang/glslang/MachineIndependent/Versions.h +++ b/3rdparty/glslang/glslang/MachineIndependent/Versions.h @@ -251,14 +251,14 @@ const char* const E_GL_OES_texture_buffer = "GL_OES_textur const char* const E_GL_OES_texture_cube_map_array = "GL_OES_texture_cube_map_array"; // KHX -const char* const E_GL_KHX_shader_explicit_arithmetic_types = "GL_KHX_shader_explicit_arithmetic_types"; -const char* const E_GL_KHX_shader_explicit_arithmetic_types_int8 = "GL_KHX_shader_explicit_arithmetic_types_int8"; -const char* const E_GL_KHX_shader_explicit_arithmetic_types_int16 = "GL_KHX_shader_explicit_arithmetic_types_int16"; -const char* const E_GL_KHX_shader_explicit_arithmetic_types_int32 = "GL_KHX_shader_explicit_arithmetic_types_int32"; -const char* const E_GL_KHX_shader_explicit_arithmetic_types_int64 = "GL_KHX_shader_explicit_arithmetic_types_int64"; -const char* const E_GL_KHX_shader_explicit_arithmetic_types_float16 = "GL_KHX_shader_explicit_arithmetic_types_float16"; -const char* const E_GL_KHX_shader_explicit_arithmetic_types_float32 = "GL_KHX_shader_explicit_arithmetic_types_float32"; -const char* const E_GL_KHX_shader_explicit_arithmetic_types_float64 = "GL_KHX_shader_explicit_arithmetic_types_float64"; +const char* const E_GL_EXT_shader_explicit_arithmetic_types = "GL_EXT_shader_explicit_arithmetic_types"; +const char* const E_GL_EXT_shader_explicit_arithmetic_types_int8 = "GL_EXT_shader_explicit_arithmetic_types_int8"; +const char* const E_GL_EXT_shader_explicit_arithmetic_types_int16 = "GL_EXT_shader_explicit_arithmetic_types_int16"; +const char* const E_GL_EXT_shader_explicit_arithmetic_types_int32 = "GL_EXT_shader_explicit_arithmetic_types_int32"; +const char* const E_GL_EXT_shader_explicit_arithmetic_types_int64 = "GL_EXT_shader_explicit_arithmetic_types_int64"; +const char* const E_GL_EXT_shader_explicit_arithmetic_types_float16 = "GL_EXT_shader_explicit_arithmetic_types_float16"; +const char* const E_GL_EXT_shader_explicit_arithmetic_types_float32 = "GL_EXT_shader_explicit_arithmetic_types_float32"; +const char* const E_GL_EXT_shader_explicit_arithmetic_types_float64 = "GL_EXT_shader_explicit_arithmetic_types_float64"; // Arrays of extensions for the above AEP duplications diff --git a/3rdparty/glslang/glslang/MachineIndependent/parseVersions.h b/3rdparty/glslang/glslang/MachineIndependent/parseVersions.h index be468da53..e42cde044 100644 --- a/3rdparty/glslang/glslang/MachineIndependent/parseVersions.h +++ b/3rdparty/glslang/glslang/MachineIndependent/parseVersions.h @@ -130,6 +130,7 @@ public: bool suppressWarnings() const { return (messages & EShMsgSuppressWarnings) != 0; } bool isReadingHLSL() const { return (messages & EShMsgReadHlsl) == EShMsgReadHlsl; } bool hlslEnable16BitTypes() const { return (messages & EShMsgHlslEnable16BitTypes) != 0; } + bool hlslDX9Compatible() const { return (messages & EShMsgHlslDX9Compatible) != 0; } TInfoSink& infoSink; diff --git a/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.h b/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.h index 64681fc33..2559e4d2b 100644 --- a/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.h +++ b/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.h @@ -533,7 +533,7 @@ protected: prologue_(prologue), epilogue_(epilogue), includedFile_(includedFile), - scanner(3, strings, lengths, names, 0, 0, true), + scanner(3, strings, lengths, nullptr, 0, 0, true), prevScanner(nullptr), stringInput(pp, scanner) { @@ -548,9 +548,9 @@ protected: scanner.setLine(startLoc.line); scanner.setString(startLoc.string); - scanner.setFile(startLoc.name, 0); - scanner.setFile(startLoc.name, 1); - scanner.setFile(startLoc.name, 2); + scanner.setFile(startLoc.name->c_str(), 0); + scanner.setFile(startLoc.name->c_str(), 1); + scanner.setFile(startLoc.name->c_str(), 2); } // tInput methods: @@ -590,8 +590,6 @@ protected: const char* strings[3]; // Length of str_, passed to scanner constructor. size_t lengths[3]; - // String names - const char* names[3]; // Scans over str_. TInputScanner scanner; // The previous effective scanner before the scanner in this instance diff --git a/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp b/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp index 1faa01803..b1d937c0e 100644 --- a/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp +++ b/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp @@ -446,16 +446,16 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) static const char* const Int64_Extensions[] = { E_GL_ARB_gpu_shader_int64, - E_GL_KHX_shader_explicit_arithmetic_types, - E_GL_KHX_shader_explicit_arithmetic_types_int64 }; + E_GL_EXT_shader_explicit_arithmetic_types, + E_GL_EXT_shader_explicit_arithmetic_types_int64 }; static const int Num_Int64_Extensions = sizeof(Int64_Extensions) / sizeof(Int64_Extensions[0]); static const char* const Int16_Extensions[] = { #ifdef AMD_EXTENSIONS E_GL_AMD_gpu_shader_int16, #endif - E_GL_KHX_shader_explicit_arithmetic_types, - E_GL_KHX_shader_explicit_arithmetic_types_int16 }; + E_GL_EXT_shader_explicit_arithmetic_types, + E_GL_EXT_shader_explicit_arithmetic_types_int16 }; static const int Num_Int16_Extensions = sizeof(Int16_Extensions) / sizeof(Int16_Extensions[0]); ppToken->ival = 0; diff --git a/3rdparty/glslang/glslang/Public/ShaderLang.h b/3rdparty/glslang/glslang/Public/ShaderLang.h index c5eca4e12..9ce794d7e 100755 --- a/3rdparty/glslang/glslang/Public/ShaderLang.h +++ b/3rdparty/glslang/glslang/Public/ShaderLang.h @@ -235,6 +235,7 @@ enum EShMessages { EShMsgDebugInfo = (1 << 10), // save debug information EShMsgHlslEnable16BitTypes = (1 << 11), // enable use of 16-bit types in SPIR-V for HLSL EShMsgHlslLegalization = (1 << 12), // enable HLSL Legalization messages + EShMsgHlslDX9Compatible = (1 << 13), // enable HLSL DX9 compatible mode (right now only for samplers) }; // diff --git a/3rdparty/glslang/gtests/Config.FromFile.cpp b/3rdparty/glslang/gtests/Config.FromFile.cpp index f3a27724d..dccf5d687 100644 --- a/3rdparty/glslang/gtests/Config.FromFile.cpp +++ b/3rdparty/glslang/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/3rdparty/glslang/gtests/Hlsl.FromFile.cpp b/3rdparty/glslang/gtests/Hlsl.FromFile.cpp old mode 100644 new mode 100755 index 809e52579..74d6fc267 --- a/3rdparty/glslang/gtests/Hlsl.FromFile.cpp +++ b/3rdparty/glslang/gtests/Hlsl.FromFile.cpp @@ -61,6 +61,8 @@ using HlslCompileTest = GlslangTest<::testing::TestWithParam>; using HlslCompileAndFlattenTest = GlslangTest<::testing::TestWithParam>; using HlslLegalizeTest = GlslangTest<::testing::TestWithParam>; +using HlslDebugTest = GlslangTest<::testing::TestWithParam>; +using HlslDX9CompatibleTest = GlslangTest<::testing::TestWithParam>; // Compiling HLSL to pre-legalized SPIR-V under Vulkan semantics. Expected // to successfully generate both AST and SPIR-V. @@ -95,6 +97,24 @@ TEST_P(HlslLegalizeTest, FromFile) "/baseLegalResults/", true); } +// Compiling HLSL to pre-legalized SPIR-V. Expected to successfully generate +// SPIR-V with debug instructions, particularly line info. +TEST_P(HlslDebugTest, FromFile) +{ + loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam().fileName, + Source::HLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0, + Target::Spv, true, GetParam().entryPoint, + "/baseResults/", false, true); +} + +TEST_P(HlslDX9CompatibleTest, FromFile) +{ + loadFileCompileAndCheckWithOptions(GlobalTestSettings.testRoot, GetParam().fileName, Source::HLSL, + Semantics::Vulkan, glslang::EShTargetVulkan_1_0, Target::BothASTAndSpv, true, + GetParam().entryPoint, "/baseResults/", + EShMessages::EShMsgHlslDX9Compatible); +} + // clang-format off INSTANTIATE_TEST_CASE_P( ToSpirv, HlslCompileTest, @@ -437,5 +457,24 @@ INSTANTIATE_TEST_CASE_P( // clang-format on #endif +// clang-format off +INSTANTIATE_TEST_CASE_P( + ToSpirv, HlslDebugTest, + ::testing::ValuesIn(std::vector{ + {"hlsl.pp.line2.frag", "MainPs"} + }), + FileNameAsCustomTestSuffix +); + +INSTANTIATE_TEST_CASE_P( + ToSpirv, HlslDX9CompatibleTest, + ::testing::ValuesIn(std::vector{ + {"hlsl.sample.dx9.frag", "main"}, + {"hlsl.sample.dx9.vert", "main"}, + }), + FileNameAsCustomTestSuffix +); +// clang-format on + } // anonymous namespace } // namespace glslangtest diff --git a/3rdparty/glslang/gtests/Link.FromFile.Vk.cpp b/3rdparty/glslang/gtests/Link.FromFile.Vk.cpp index 22892f0b4..4a88203e8 100644 --- a/3rdparty/glslang/gtests/Link.FromFile.Vk.cpp +++ b/3rdparty/glslang/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/3rdparty/glslang/gtests/Link.FromFile.cpp b/3rdparty/glslang/gtests/Link.FromFile.cpp index ab845bf59..49d021af2 100644 --- a/3rdparty/glslang/gtests/Link.FromFile.cpp +++ b/3rdparty/glslang/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/3rdparty/glslang/gtests/Spv.FromFile.cpp b/3rdparty/glslang/gtests/Spv.FromFile.cpp index 1e17736fc..77a30811a 100755 --- a/3rdparty/glslang/gtests/Spv.FromFile.cpp +++ b/3rdparty/glslang/gtests/Spv.FromFile.cpp @@ -63,6 +63,7 @@ std::string FileNameAsCustomTestSuffixIoMap( } using CompileVulkanToSpirvTest = GlslangTest<::testing::TestWithParam>; +using CompileVulkanToDebugSpirvTest = GlslangTest<::testing::TestWithParam>; using CompileVulkan1_1ToSpirvTest = GlslangTest<::testing::TestWithParam>; using CompileOpenGLToSpirvTest = GlslangTest<::testing::TestWithParam>; using VulkanSemantics = GlslangTest<::testing::TestWithParam>; @@ -87,6 +88,17 @@ TEST_P(CompileVulkanToSpirvTest, FromFile) Target::Spv); } +// Compiling GLSL to SPIR-V with debug info under Vulkan semantics. Expected +// to successfully generate SPIR-V. +TEST_P(CompileVulkanToDebugSpirvTest, FromFile) +{ + loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(), + Source::GLSL, Semantics::Vulkan, + glslang::EShTargetVulkan_1_0, + Target::Spv, true, "", + "/baseResults/", false, true); +} + TEST_P(CompileVulkan1_1ToSpirvTest, FromFile) { loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(), @@ -369,6 +381,15 @@ INSTANTIATE_TEST_CASE_P( FileNameAsCustomTestSuffix ); +// clang-format off +INSTANTIATE_TEST_CASE_P( + Glsl, CompileVulkanToDebugSpirvTest, + ::testing::ValuesIn(std::vector({ + "spv.pp.line.frag", + })), + FileNameAsCustomTestSuffix +); + // clang-format off INSTANTIATE_TEST_CASE_P( Glsl, CompileVulkan1_1ToSpirvTest, diff --git a/3rdparty/glslang/gtests/TestFixture.h b/3rdparty/glslang/gtests/TestFixture.h index 3329fa3c2..6bca38e48 100755 --- a/3rdparty/glslang/gtests/TestFixture.h +++ b/3rdparty/glslang/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. }; @@ -177,12 +184,19 @@ public: // and modifies |shader| on success. bool compile(glslang::TShader* shader, const std::string& code, const std::string& entryPointName, EShMessages controls, - const TBuiltInResource* resources=nullptr) + const TBuiltInResource* resources=nullptr, + const std::string* shaderName=nullptr) { const char* shaderStrings = code.data(); const int shaderLengths = static_cast(code.size()); + const char* shaderNames = nullptr; - shader->setStringsWithLengths(&shaderStrings, &shaderLengths, 1); + if ((controls & EShMsgDebugInfo) && shaderName != nullptr) { + shaderNames = shaderName->data(); + shader->setStringsWithLengthsAndNames( + &shaderStrings, &shaderLengths, &shaderNames, 1); + } else + shader->setStringsWithLengths(&shaderStrings, &shaderLengths, 1); if (!entryPointName.empty()) shader->setEntryPoint(entryPointName.c_str()); return shader->parse( (resources ? resources : &glslang::DefaultTBuiltInResource), @@ -195,12 +209,13 @@ public: // during the process. If the target includes SPIR-V, also disassembles // the result and returns disassembly text. GlslangResult compileAndLink( - const std::string shaderName, const std::string& code, + const std::string& shaderName, const std::string& code, const std::string& entryPointName, EShMessages controls, glslang::EShTargetClientVersion clientTargetVersion, bool flattenUniformArrays = false, EShTextureSamplerTransformMode texSampTransMode = EShTexSampTransKeep, bool enableOptimizer = false, + bool enableDebug = false, bool automap = true) { const EShLanguage stage = GetShaderStage(GetSuffix(shaderName)); @@ -231,7 +246,8 @@ public: } } - bool success = compile(&shader, code, entryPointName, controls); + bool success = compile( + &shader, code, entryPointName, controls, nullptr, &shaderName); glslang::TProgram program; program.addShader(&shader); @@ -241,21 +257,21 @@ public: if (success && (controls & EShMsgSpvRules)) { std::vector spirv_binary; - glslang::SpvOptions options; - options.disableOptimizer = !enableOptimizer; - options.validate = true; + options().disableOptimizer = !enableOptimizer; + options().generateDebugInfo = enableDebug; 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 +315,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 +356,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 +391,9 @@ public: return {{{shaderName, "", ""},}, "", "", - "", disassembly_stream.str()}; + true, "", disassembly_stream.str()}; } else { - return {{{shaderName, "", ""},}, "", "", "", ""}; + return {{{shaderName, "", ""},}, "", "", true, "", ""}; } } @@ -398,7 +412,9 @@ public: } outputIfNotEmpty(result.linkingOutput); outputIfNotEmpty(result.linkingError); - *stream << result.spirvWarningsErrors; + if (!result.validationResult) { + *stream << "Validation failed\n"; + } if (controls & EShMsgSpvRules) { *stream @@ -417,7 +433,8 @@ public: bool automap = true, const std::string& entryPointName="", const std::string& baseDir="/baseResults/", - const bool enableOptimizer = false) + const bool enableOptimizer = false, + const bool enableDebug = false) { const std::string inputFname = testDir + "/" + testName; const std::string expectedOutputFname = @@ -430,17 +447,47 @@ public: EShMessages controls = DeriveOptions(source, semantics, target); if (enableOptimizer) controls = static_cast(controls & ~EShMsgHlslLegalization); + if (enableDebug) + controls = static_cast(controls | EShMsgDebugInfo); GlslangResult result = compileAndLink(testName, input, entryPointName, controls, clientTargetVersion, false, - EShTexSampTransKeep, enableOptimizer, automap); + EShTexSampTransKeep, enableOptimizer, enableDebug, automap); // Generate the hybrid output in the way of glslangValidator. std::ostringstream stream; outputResultToStream(&stream, result, controls); checkEqAndUpdateIfRequested(expectedOutput, stream.str(), - expectedOutputFname); + expectedOutputFname, result.spirvWarningsErrors); } + void loadFileCompileAndCheckWithOptions(const std::string &testDir, + const std::string &testName, + Source source, + Semantics semantics, + glslang::EShTargetClientVersion clientTargetVersion, + Target target, bool automap = true, const std::string &entryPointName = "", + const std::string &baseDir = "/baseResults/", + const EShMessages additionalOptions = EShMessages::EShMsgDefault) + { + const std::string inputFname = testDir + "/" + testName; + const std::string expectedOutputFname = testDir + baseDir + testName + ".out"; + std::string input, expectedOutput; + + tryLoadFile(inputFname, "input", &input); + tryLoadFile(expectedOutputFname, "expected output", &expectedOutput); + + EShMessages controls = DeriveOptions(source, semantics, target); + controls = static_cast(controls | additionalOptions); + GlslangResult result = compileAndLink(testName, input, entryPointName, controls, clientTargetVersion, false, + EShTexSampTransKeep, false, automap); + + // Generate the hybrid output in the way of glslangValidator. + std::ostringstream stream; + outputResultToStream(&stream, result, controls); + + checkEqAndUpdateIfRequested(expectedOutput, stream.str(), expectedOutputFname); + } + void loadFileCompileFlattenUniformsAndCheck(const std::string& testDir, const std::string& testName, Source source, @@ -465,7 +512,7 @@ public: outputResultToStream(&stream, result, controls); checkEqAndUpdateIfRequested(expectedOutput, stream.str(), - expectedOutputFname); + expectedOutputFname, result.spirvWarningsErrors); } void loadFileCompileIoMapAndCheck(const std::string& testDir, @@ -502,7 +549,7 @@ public: outputResultToStream(&stream, result, controls); checkEqAndUpdateIfRequested(expectedOutput, stream.str(), - expectedOutputFname); + expectedOutputFname, result.spirvWarningsErrors); } void loadFileCompileRemapAndCheck(const std::string& testDir, @@ -529,7 +576,7 @@ public: outputResultToStream(&stream, result, controls); checkEqAndUpdateIfRequested(expectedOutput, stream.str(), - expectedOutputFname); + expectedOutputFname, result.spirvWarningsErrors); } void loadFileRemapAndCheck(const std::string& testDir, @@ -556,7 +603,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 +683,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 diff --git a/3rdparty/glslang/hlsl/hlslGrammar.cpp b/3rdparty/glslang/hlsl/hlslGrammar.cpp index 6acaccbf7..7b3bb10f2 100644 --- a/3rdparty/glslang/hlsl/hlslGrammar.cpp +++ b/3rdparty/glslang/hlsl/hlslGrammar.cpp @@ -1163,6 +1163,49 @@ bool HlslGrammar::acceptSubpassInputType(TType& type) return true; } +// sampler_type for DX9 compatibility +// : SAMPLER +// | SAMPLER1D +// | SAMPLER2D +// | SAMPLER3D +// | SAMPLERCUBE +bool HlslGrammar::acceptSamplerTypeDX9(TType &type) +{ + // read sampler type + const EHlslTokenClass samplerType = peek(); + + TSamplerDim dim = EsdNone; + TType txType(EbtFloat, EvqUniform, 4); // default type is float4 + + bool isShadow = false; + + switch (samplerType) + { + case EHTokSampler: dim = Esd2D; break; + case EHTokSampler1d: dim = Esd1D; break; + case EHTokSampler2d: dim = Esd2D; break; + case EHTokSampler3d: dim = Esd3D; break; + case EHTokSamplerCube: dim = EsdCube; break; + default: + return false; // not a dx9 sampler declaration + } + + advanceToken(); // consume the sampler type keyword + + TArraySizes *arraySizes = nullptr; // TODO: array + + TSampler sampler; + sampler.set(txType.getBasicType(), dim, false, isShadow, false); + + if (!parseContext.setTextureReturnType(sampler, txType, token.loc)) + return false; + + type.shallowCopy(TType(sampler, EvqUniform, arraySizes)); + type.getQualifier().layoutFormat = ElfNone; + + return true; +} + // sampler_type // : SAMPLER // | SAMPLER1D @@ -1445,7 +1488,13 @@ bool HlslGrammar::acceptType(TType& type, TIntermNode*& nodeList) case EHTokSampler2d: // ... case EHTokSampler3d: // ... case EHTokSamplerCube: // ... - case EHTokSamplerState: // ... + if (parseContext.hlslDX9Compatible()) + return acceptSamplerTypeDX9(type); + else + return acceptSamplerType(type); + break; + + case EHTokSamplerState: // fall through case EHTokSamplerComparisonState: // ... return acceptSamplerType(type); break; diff --git a/3rdparty/glslang/hlsl/hlslGrammar.h b/3rdparty/glslang/hlsl/hlslGrammar.h index 323f3b13f..a41220b19 100644 --- a/3rdparty/glslang/hlsl/hlslGrammar.h +++ b/3rdparty/glslang/hlsl/hlslGrammar.h @@ -84,6 +84,7 @@ namespace glslang { bool acceptStreamOutTemplateType(TType&, TLayoutGeometry&); bool acceptOutputPrimitiveGeometry(TLayoutGeometry&); bool acceptAnnotations(TQualifier&); + bool acceptSamplerTypeDX9(TType &); bool acceptSamplerType(TType&); bool acceptTextureType(TType&); bool acceptSubpassInputType(TType&); diff --git a/3rdparty/glslang/hlsl/hlslParseHelper.cpp b/3rdparty/glslang/hlsl/hlslParseHelper.cpp index b536cc9dd..e3e721067 100755 --- a/3rdparty/glslang/hlsl/hlslParseHelper.cpp +++ b/3rdparty/glslang/hlsl/hlslParseHelper.cpp @@ -133,7 +133,7 @@ bool HlslParseContext::parseShaderStrings(TPpContext& ppContext, TInputScanner& // Print a message formated such that if you click on the message it will take you right to // the line through most UIs. const glslang::TSourceLoc& sourceLoc = input.getSourceLoc(); - infoSink.info << sourceLoc.name << "(" << sourceLoc.line << "): error at column " << sourceLoc.column + infoSink.info << sourceLoc.name->c_str() << "(" << sourceLoc.line << "): error at column " << sourceLoc.column << ", HLSL parsing failed.\n"; ++numErrors; return false; @@ -3770,6 +3770,43 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType break; } + case EOpTextureLod: //is almost EOpTextureBias (only args & operations are different) + { + TIntermTyped *argSamp = argAggregate->getSequence()[0]->getAsTyped(); // sampler + TIntermTyped *argCoord = argAggregate->getSequence()[1]->getAsTyped(); // coord + + assert(argCoord->getVectorSize() == 4); + TIntermTyped *w = intermediate.addConstantUnion(3, loc, true); + TIntermTyped *argLod = intermediate.addIndex(EOpIndexDirect, argCoord, w, loc); + + TOperator constructOp = EOpNull; + const TSampler &sampler = argSamp->getType().getSampler(); + int coordSize = 0; + + switch (sampler.dim) + { + case Esd1D: constructOp = EOpConstructFloat; coordSize = 1; break; // 1D + case Esd2D: constructOp = EOpConstructVec2; coordSize = 2; break; // 2D + case Esd3D: constructOp = EOpConstructVec3; coordSize = 3; break; // 3D + case EsdCube: constructOp = EOpConstructVec3; coordSize = 3; break; // also 3D + default: + break; + } + + TIntermAggregate *constructCoord = new TIntermAggregate(constructOp); + constructCoord->getSequence().push_back(argCoord); + constructCoord->setLoc(loc); + constructCoord->setType(TType(argCoord->getBasicType(), EvqTemporary, coordSize)); + + TIntermAggregate *tex = new TIntermAggregate(EOpTextureLod); + tex->getSequence().push_back(argSamp); // sampler + tex->getSequence().push_back(constructCoord); // coordinate + tex->getSequence().push_back(argLod); // lod + + node = convertReturn(tex, sampler); + + break; + } case EOpTextureBias: { diff --git a/3rdparty/glslang/hlsl/hlslParseables.cpp b/3rdparty/glslang/hlsl/hlslParseables.cpp index 65000912c..a63ecb605 100644 --- a/3rdparty/glslang/hlsl/hlslParseables.cpp +++ b/3rdparty/glslang/hlsl/hlslParseables.cpp @@ -698,17 +698,17 @@ void TBuiltInParseablesHlsl::initialize(int /*version*/, EProfile /*profile*/, c { "step", nullptr, nullptr, "SVM,", "F,", EShLangAll, false }, { "tan", nullptr, nullptr, "SVM", "F", EShLangAll, false }, { "tanh", nullptr, nullptr, "SVM", "F", EShLangAll, false }, - { "tex1D", "V4", "F", "V1,S", "S,F", EShLangPS, false }, - { "tex1D", "V4", "F", "V1,S,V1,", "S,F,,", EShLangPS, false }, - { "tex1Dbias", "V4", "F", "V1,V4", "S,F", EShLangPS, false }, - { "tex1Dgrad", "V4", "F", "V1,,,", "S,F,,", EShLangPS, false }, - { "tex1Dlod", "V4", "F", "V1,V4", "S,F", EShLangPS, false }, - { "tex1Dproj", "V4", "F", "V1,V4", "S,F", EShLangPS, false }, + { "tex1D", "V4", "F", "S,S", "S,F", EShLangPS, false }, + { "tex1D", "V4", "F", "S,S,V1,", "S,F,,", EShLangPS, false }, + { "tex1Dbias", "V4", "F", "S,V4", "S,F", EShLangPS, false }, + { "tex1Dgrad", "V4", "F", "S,,,", "S,F,,", EShLangPS, false }, + { "tex1Dlod", "V4", "F", "S,V4", "S,F", EShLangPS, false }, + { "tex1Dproj", "V4", "F", "S,V4", "S,F", EShLangPS, false }, { "tex2D", "V4", "F", "V2,", "S,F", EShLangPS, false }, { "tex2D", "V4", "F", "V2,,,", "S,F,,", EShLangPS, false }, { "tex2Dbias", "V4", "F", "V2,V4", "S,F", EShLangPS, false }, { "tex2Dgrad", "V4", "F", "V2,,,", "S,F,,", EShLangPS, false }, - { "tex2Dlod", "V4", "F", "V2,V4", "S,F", EShLangPS, false }, + { "tex2Dlod", "V4", "F", "V2,V4", "S,F", EShLangAll, false }, { "tex2Dproj", "V4", "F", "V2,V4", "S,F", EShLangPS, false }, { "tex3D", "V4", "F", "V3,", "S,F", EShLangPS, false }, { "tex3D", "V4", "F", "V3,,,", "S,F,,", EShLangPS, false },