Update BGFX and BX (nw)

This commit is contained in:
Branimir Karadžić 2017-02-05 13:56:35 +01:00 committed by Miodrag Milanovic
parent 193e8c8a89
commit 1607745432
394 changed files with 28766 additions and 13082 deletions

View File

@ -135,7 +135,7 @@ namespace Forsyth
float FindVertexScore(uint numActiveFaces, uint cachePosition, uint vertexCacheSize)
{
assert(s_vertexScoresComputed);
assert(s_vertexScoresComputed); (void)s_vertexScoresComputed;
if ( numActiveFaces == 0 )
{

View File

@ -6,6 +6,8 @@ option(ENABLE_GLSLANG_BINARIES "Builds glslangValidator and spirv-remap" ON)
option(ENABLE_NV_EXTENSIONS "Enables support of Nvidia-specific extensions" ON)
option(ENABLE_HLSL "Enables HLSL input support" ON)
enable_testing()
set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "prefix")
@ -20,6 +22,10 @@ if(ENABLE_NV_EXTENSIONS)
add_definitions(-DNV_EXTENSIONS)
endif(ENABLE_NV_EXTENSIONS)
if(ENABLE_HLSL)
add_definitions(-DENABLE_HLSL)
endif(ENABLE_HLSL)
if(WIN32)
set(CMAKE_DEBUG_POSTFIX "d")
include(ChooseMSVCCRT.cmake)
@ -63,5 +69,7 @@ if(ENABLE_GLSLANG_BINARIES)
add_subdirectory(StandAlone)
endif()
add_subdirectory(SPIRV)
add_subdirectory(hlsl)
if(ENABLE_HLSL)
add_subdirectory(hlsl)
endif(ENABLE_HLSL)
add_subdirectory(gtests)

View File

@ -1,10 +1,10 @@
//
//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
//All rights reserved.
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
// All rights reserved.
//
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions
//are met:
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
@ -18,18 +18,18 @@
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//POSSIBILITY OF SUCH DAMAGE.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
#define SH_EXPORTING

View File

@ -1,10 +1,10 @@
//
//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
//All rights reserved.
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
// All rights reserved.
//
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions
//are met:
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
@ -18,23 +18,22 @@
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//POSSIBILITY OF SUCH DAMAGE.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
#ifndef __INITIALIZEDLL_H
#define __INITIALIZEDLL_H
#include "../glslang/OSDependent/osinclude.h"
namespace glslang {

View File

@ -17,7 +17,7 @@ There are several components:
1. A GLSL/ESSL front-end for reference validation and translation of GLSL/ESSL into an AST.
2. An HLSL front-end for translation of a broad generic HLL into the AST.
2. An HLSL front-end for translation of a broad generic HLL into the AST. See [issue 362](https://github.com/KhronosGroup/glslang/issues/362) and [issue 701](https://github.com/KhronosGroup/glslang/issues/701) for current status.
3. A SPIR-V back end for translating the AST to SPIR-V.

View File

@ -34,12 +34,14 @@ if(ENABLE_AMD_EXTENSIONS)
endif(ENABLE_AMD_EXTENSIONS)
if(ENABLE_NV_EXTENSIONS)
set(HEADERS
GLSL.ext.NV.h)
list(APPEND
HEADERS
GLSL.ext.NV.h)
endif(ENABLE_NV_EXTENSIONS)
add_library(SPIRV STATIC ${SOURCES} ${HEADERS})
set_property(TARGET SPIRV PROPERTY FOLDER glslang)
target_link_libraries(SPIRV glslang)
add_library(SPVRemapper STATIC ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
set_property(TARGET SPVRemapper PROPERTY FOLDER glslang)
@ -51,3 +53,5 @@ endif(WIN32)
install(TARGETS SPIRV SPVRemapper
ARCHIVE DESTINATION lib)
install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION include/SPIRV/)

View File

@ -32,5 +32,5 @@ static const char* const E_SPV_KHR_shader_ballot = "SPV_KHR_shade
// SPV_KHR_shader_draw_parameters
static const char* const E_SPV_KHR_shader_draw_parameters = "SPV_KHR_shader_draw_parameters";
static const char* const E_SPV_KHR_subgroup_vote = "SPV_KHR_subgroup_vote";
#endif // #ifndef GLSLextKHR_H

View File

@ -30,20 +30,45 @@
enum BuiltIn;
enum Decoration;
enum Op;
enum Capability;
static const int GLSLextNVVersion = 100;
static const int GLSLextNVRevision = 2;
static const int GLSLextNVRevision = 4;
//SPV_NV_sample_mask_override_coverage
const char* const E_SPV_NV_sample_mask_override_coverage = "SPV_NV_sample_mask_override_coverage";
static const Decoration OverrideCoverageNV = static_cast<Decoration>(5248);
static const Decoration DecorationOverrideCoverageNV = static_cast<Decoration>(5248);
//SPV_NV_geometry_shader_passthrough
const char* const E_SPV_NV_geometry_shader_passthrough = "SPV_NV_geometry_shader_passthrough";
static const Decoration PassthroughNV = static_cast<Decoration>(5250);
static const Decoration DecorationPassthroughNV = static_cast<Decoration>(5250);
static const Capability CapabilityGeometryShaderPassthroughNV = static_cast<Capability>(5251);
//SPV_NV_viewport_array2
const char* const E_SPV_NV_viewport_array2 = "SPV_NV_viewport_array2";
const char* const E_ARB_shader_viewport_layer_array = "SPV_ARB_shader_viewport_layer_array";
static const Decoration DecorationViewportRelativeNV = static_cast<Decoration>(5252);
static const BuiltIn BuiltInViewportMaskNV = static_cast<BuiltIn>(5253);
static const Capability CapabilityShaderViewportIndexLayerNV = static_cast<Capability>(5254);
static const Capability CapabilityShaderViewportMaskNV = static_cast<Capability>(5255);
//SPV_NV_stereo_view_rendering
const char* const E_SPV_NV_stereo_view_rendering = "SPV_NV_stereo_view_rendering";
static const Decoration DecorationSecondaryViewportRelativeNV = static_cast<Decoration>(5256);
static const BuiltIn BuiltInSecondaryPositionNV = static_cast<BuiltIn>(5257);
static const BuiltIn BuiltInSecondaryViewportMaskNV = static_cast<BuiltIn>(5258);
static const Capability CapabilityShaderStereoViewNV = static_cast<Capability>(5259);
static const Capability GeometryShaderPassthroughNV = static_cast<Capability>(5251);
#endif // #ifndef GLSLextNV_H

View File

@ -1,12 +1,12 @@
//
//Copyright (C) 2014-2016 LunarG, Inc.
//Copyright (C) 2015-2016 Google, Inc.
// Copyright (C) 2014-2016 LunarG, Inc.
// Copyright (C) 2015-2016 Google, Inc.
//
//All rights reserved.
// All rights reserved.
//
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions
//are met:
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
@ -20,18 +20,18 @@
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//POSSIBILITY OF SUCH DAMAGE.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// Visit the nodes in the glslang intermediate tree representation to
@ -161,7 +161,7 @@ protected:
spv::Id makeSmearedConstant(spv::Id constant, int vectorSize);
spv::Id createAtomicOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy);
spv::Id createInvocationsOperation(glslang::TOperator op, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy);
spv::Id CreateInvocationsVectorOperation(spv::Op op, spv::Id typeId, std::vector<spv::Id>& operands);
spv::Id CreateInvocationsVectorOperation(spv::Op op, spv::GroupOperation groupOperation, spv::Id typeId, std::vector<spv::Id>& operands);
spv::Id createMiscOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy);
spv::Id createNoArgOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId);
spv::Id getSymbolId(const glslang::TIntermSymbol* node);
@ -221,7 +221,7 @@ spv::SourceLanguage TranslateSourceLanguage(glslang::EShSource source, EProfile
return spv::SourceLanguageUnknown;
}
case glslang::EShSourceHlsl:
//Use SourceLanguageUnknown instead of SourceLanguageHLSL for now, until Vulkan knows what HLSL is
// Use SourceLanguageUnknown instead of SourceLanguageHLSL for now, until Vulkan knows what HLSL is
return spv::SourceLanguageUnknown;
default:
return spv::SourceLanguageUnknown;
@ -439,7 +439,6 @@ spv::Decoration TranslateNoContractionDecoration(const glslang::TQualifier& qual
return spv::DecorationMax;
}
// Translate a glslang built-in variable to a SPIR-V built in decoration. Also generate
// associated capabilities when required. For some built-in variables, a capability
// is generated only when using the variable in an executable instruction, but not when
@ -483,6 +482,15 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
case glslang::EbvViewportIndex:
builder.addCapability(spv::CapabilityMultiViewport);
#ifdef NV_EXTENSIONS
if (glslangIntermediate->getStage() == EShLangVertex ||
glslangIntermediate->getStage() == EShLangTessControl ||
glslangIntermediate->getStage() == EShLangTessEvaluation)
{
builder.addExtension(spv::E_SPV_NV_viewport_array2);
builder.addCapability(spv::CapabilityShaderViewportIndexLayerNV);
}
#endif
return spv::BuiltInViewportIndex;
case glslang::EbvSampleId:
@ -499,6 +507,18 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
case glslang::EbvLayer:
builder.addCapability(spv::CapabilityGeometry);
#ifdef NV_EXTENSIONS
if (!memberDeclaration)
{
if (glslangIntermediate->getStage() == EShLangVertex ||
glslangIntermediate->getStage() == EShLangTessControl ||
glslangIntermediate->getStage() == EShLangTessEvaluation)
{
builder.addExtension(spv::E_SPV_NV_viewport_array2);
builder.addCapability(spv::CapabilityShaderViewportIndexLayerNV);
}
}
#endif
return spv::BuiltInLayer;
case glslang::EbvPosition: return spv::BuiltInPosition;
@ -608,6 +628,21 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
builder.addExtension(spv::E_SPV_AMD_shader_explicit_vertex_parameter);
return spv::BuiltInBaryCoordPullModelAMD;
#endif
#ifdef NV_EXTENSIONS
case glslang::EbvViewportMaskNV:
builder.addExtension(spv::E_SPV_NV_viewport_array2);
builder.addCapability(spv::CapabilityShaderViewportMaskNV);
return spv::BuiltInViewportMaskNV;
case glslang::EbvSecondaryPositionNV:
builder.addExtension(spv::E_SPV_NV_stereo_view_rendering);
builder.addCapability(spv::CapabilityShaderStereoViewNV);
return spv::BuiltInSecondaryPositionNV;
case glslang::EbvSecondaryViewportMaskNV:
builder.addExtension(spv::E_SPV_NV_stereo_view_rendering);
builder.addCapability(spv::CapabilityShaderStereoViewNV);
return spv::BuiltInSecondaryViewportMaskNV;
#endif
default: return spv::BuiltInMax;
}
}
@ -1116,6 +1151,9 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
builder.accessChainPushSwizzle(swizzle, convertGlslangToSpvType(node->getLeft()->getType()));
}
return false;
case glslang::EOpMatrixSwizzle:
logger->missingFunctionality("matrix swizzle");
return true;
case glslang::EOpLogicalOr:
case glslang::EOpLogicalAnd:
{
@ -1410,7 +1448,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
{
if (node->isUserDefined())
result = handleUserFunctionCall(node);
//assert(result); // this can happen for bad shaders because the call graph completeness checking is not yet done
// assert(result); // this can happen for bad shaders because the call graph completeness checking is not yet done
if (result) {
builder.clearAccessChain();
builder.setAccessChainRValue(result);
@ -1633,7 +1671,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
// Does it need a swizzle inversion? If so, evaluation is inverted;
// operate first on the swizzle base, then apply the swizzle.
if (glslangOperands[0]->getAsOperator() &&
if (glslangOperands[0]->getAsOperator() &&
glslangOperands[0]->getAsOperator()->getOp() == glslang::EOpVectorSwizzle)
invertedType = convertGlslangToSpvType(glslangOperands[0]->getAsBinaryNode()->getLeft()->getType());
}
@ -1960,7 +1998,7 @@ spv::Id TGlslangToSpvTraverser::getSampledType(const glslang::TSampler& sampler)
// is applied.
spv::Id TGlslangToSpvTraverser::getInvertedSwizzleType(const glslang::TIntermTyped& node)
{
if (node.getAsOperator() &&
if (node.getAsOperator() &&
node.getAsOperator()->getOp() == glslang::EOpVectorSwizzle)
return convertGlslangToSpvType(node.getAsBinaryNode()->getLeft()->getType());
else
@ -2013,7 +2051,6 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
#ifdef AMD_EXTENSIONS
case glslang::EbtFloat16:
builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float);
builder.addCapability(spv::CapabilityFloat16);
spvType = builder.makeFloatType(16);
break;
#endif
@ -2139,7 +2176,6 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
return spvType;
}
// Do full recursive conversion of a glslang structure (or block) type to a SPIR-V Id.
// explicitLayout can be kept the same throughout the hierarchical recursive walk.
// Mutually recursive with convertGlslangToSpvType().
@ -2275,6 +2311,22 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
spv::BuiltIn builtIn = TranslateBuiltInDecoration(glslangMember.getQualifier().builtIn, true);
if (builtIn != spv::BuiltInMax)
addMemberDecoration(spvType, member, spv::DecorationBuiltIn, (int)builtIn);
#ifdef NV_EXTENSIONS
if (builtIn == spv::BuiltInLayer) {
// SPV_NV_viewport_array2 extension
if (glslangMember.getQualifier().layoutViewportRelative){
addMemberDecoration(spvType, member, (spv::Decoration)spv::DecorationViewportRelativeNV);
builder.addCapability(spv::CapabilityShaderViewportMaskNV);
builder.addExtension(spv::E_SPV_NV_viewport_array2);
}
if (glslangMember.getQualifier().layoutSecondaryViewportRelativeOffset != -2048){
addMemberDecoration(spvType, member, (spv::Decoration)spv::DecorationSecondaryViewportRelativeNV, glslangMember.getQualifier().layoutSecondaryViewportRelativeOffset);
builder.addCapability(spv::CapabilityShaderStereoViewNV);
builder.addExtension(spv::E_SPV_NV_stereo_view_rendering);
}
}
#endif
}
}
@ -2546,6 +2598,12 @@ void TGlslangToSpvTraverser::declareUseOfStructMember(const glslang::TTypeList&
case glslang::EbvClipDistance:
case glslang::EbvCullDistance:
case glslang::EbvPointSize:
#ifdef NV_EXTENSIONS
case glslang::EbvLayer:
case glslang::EbvViewportMaskNV:
case glslang::EbvSecondaryPositionNV:
case glslang::EbvSecondaryViewportMaskNV:
#endif
// Generate the associated capability. Delegate to TranslateBuiltInDecoration.
// Alternately, we could just call this for any glslang built-in, since the
// capability already guards against duplicates.
@ -3012,7 +3070,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
}
// copy the projective coordinate if we have to
if (projTargetComp != projSourceComp) {
spv::Id projComp = builder.createCompositeExtract(params.coords,
spv::Id projComp = builder.createCompositeExtract(params.coords,
builder.getScalarTypeId(builder.getTypeId(params.coords)),
projSourceComp);
params.coords = builder.createCompositeInsert(projComp, params.coords,
@ -3742,6 +3800,18 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv:
case glslang::EOpMinInvocationsNonUniform:
case glslang::EOpMaxInvocationsNonUniform:
case glslang::EOpAddInvocationsNonUniform:
case glslang::EOpMinInvocationsInclusiveScan:
case glslang::EOpMaxInvocationsInclusiveScan:
case glslang::EOpAddInvocationsInclusiveScan:
case glslang::EOpMinInvocationsInclusiveScanNonUniform:
case glslang::EOpMaxInvocationsInclusiveScanNonUniform:
case glslang::EOpAddInvocationsInclusiveScanNonUniform:
case glslang::EOpMinInvocationsExclusiveScan:
case glslang::EOpMaxInvocationsExclusiveScan:
case glslang::EOpAddInvocationsExclusiveScan:
case glslang::EOpMinInvocationsExclusiveScanNonUniform:
case glslang::EOpMaxInvocationsExclusiveScanNonUniform:
case glslang::EOpAddInvocationsExclusiveScanNonUniform:
#endif
{
std::vector<spv::Id> operands;
@ -4129,26 +4199,66 @@ spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op
#endif
spv::Op opCode = spv::OpNop;
std::vector<spv::Id> spvGroupOperands;
spv::GroupOperation groupOperation = spv::GroupOperationMax;
if (op == glslang::EOpBallot || op == glslang::EOpReadFirstInvocation ||
op == glslang::EOpReadInvocation) {
builder.addExtension(spv::E_SPV_KHR_shader_ballot);
builder.addCapability(spv::CapabilitySubgroupBallotKHR);
} else if (op == glslang::EOpAnyInvocation ||
op == glslang::EOpAllInvocations ||
op == glslang::EOpAllInvocationsEqual) {
builder.addExtension(spv::E_SPV_KHR_subgroup_vote);
builder.addCapability(spv::CapabilitySubgroupVoteKHR);
} else {
builder.addCapability(spv::CapabilityGroups);
#ifdef AMD_EXTENSIONS
if (op == glslang::EOpMinInvocationsNonUniform ||
op == glslang::EOpMaxInvocationsNonUniform ||
op == glslang::EOpAddInvocationsNonUniform)
op == glslang::EOpAddInvocationsNonUniform ||
op == glslang::EOpMinInvocationsInclusiveScanNonUniform ||
op == glslang::EOpMaxInvocationsInclusiveScanNonUniform ||
op == glslang::EOpAddInvocationsInclusiveScanNonUniform ||
op == glslang::EOpMinInvocationsExclusiveScanNonUniform ||
op == glslang::EOpMaxInvocationsExclusiveScanNonUniform ||
op == glslang::EOpAddInvocationsExclusiveScanNonUniform)
builder.addExtension(spv::E_SPV_AMD_shader_ballot);
#endif
spvGroupOperands.push_back(builder.makeUintConstant(spv::ScopeSubgroup));
#ifdef AMD_EXTENSIONS
if (op == glslang::EOpMinInvocations || op == glslang::EOpMaxInvocations || op == glslang::EOpAddInvocations ||
op == glslang::EOpMinInvocationsNonUniform || op == glslang::EOpMaxInvocationsNonUniform || op == glslang::EOpAddInvocationsNonUniform)
spvGroupOperands.push_back(spv::GroupOperationReduce);
switch (op) {
case glslang::EOpMinInvocations:
case glslang::EOpMaxInvocations:
case glslang::EOpAddInvocations:
case glslang::EOpMinInvocationsNonUniform:
case glslang::EOpMaxInvocationsNonUniform:
case glslang::EOpAddInvocationsNonUniform:
groupOperation = spv::GroupOperationReduce;
spvGroupOperands.push_back(groupOperation);
break;
case glslang::EOpMinInvocationsInclusiveScan:
case glslang::EOpMaxInvocationsInclusiveScan:
case glslang::EOpAddInvocationsInclusiveScan:
case glslang::EOpMinInvocationsInclusiveScanNonUniform:
case glslang::EOpMaxInvocationsInclusiveScanNonUniform:
case glslang::EOpAddInvocationsInclusiveScanNonUniform:
groupOperation = spv::GroupOperationInclusiveScan;
spvGroupOperands.push_back(groupOperation);
break;
case glslang::EOpMinInvocationsExclusiveScan:
case glslang::EOpMaxInvocationsExclusiveScan:
case glslang::EOpAddInvocationsExclusiveScan:
case glslang::EOpMinInvocationsExclusiveScanNonUniform:
case glslang::EOpMaxInvocationsExclusiveScanNonUniform:
case glslang::EOpAddInvocationsExclusiveScanNonUniform:
groupOperation = spv::GroupOperationExclusiveScan;
spvGroupOperands.push_back(groupOperation);
break;
default:
break;
}
#endif
}
@ -4157,24 +4267,18 @@ spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op
switch (op) {
case glslang::EOpAnyInvocation:
opCode = spv::OpGroupAny;
opCode = spv::OpSubgroupAnyKHR;
break;
case glslang::EOpAllInvocations:
opCode = spv::OpGroupAll;
opCode = spv::OpSubgroupAllKHR;
break;
case glslang::EOpAllInvocationsEqual:
{
spv::Id groupAll = builder.createOp(spv::OpGroupAll, typeId, spvGroupOperands);
spv::Id groupAny = builder.createOp(spv::OpGroupAny, typeId, spvGroupOperands);
return builder.createBinOp(spv::OpLogicalOr, typeId, groupAll,
builder.createUnaryOp(spv::OpLogicalNot, typeId, groupAny));
}
opCode = spv::OpSubgroupAllEqualKHR;
break;
case glslang::EOpReadInvocation:
opCode = spv::OpSubgroupReadInvocationKHR;
if (builder.isVectorType(typeId))
return CreateInvocationsVectorOperation(opCode, typeId, operands);
return CreateInvocationsVectorOperation(opCode, groupOperation, typeId, operands);
break;
case glslang::EOpReadFirstInvocation:
opCode = spv::OpSubgroupFirstInvocationKHR;
@ -4204,7 +4308,15 @@ spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op
case glslang::EOpMinInvocations:
case glslang::EOpMaxInvocations:
case glslang::EOpAddInvocations:
if (op == glslang::EOpMinInvocations) {
case glslang::EOpMinInvocationsInclusiveScan:
case glslang::EOpMaxInvocationsInclusiveScan:
case glslang::EOpAddInvocationsInclusiveScan:
case glslang::EOpMinInvocationsExclusiveScan:
case glslang::EOpMaxInvocationsExclusiveScan:
case glslang::EOpAddInvocationsExclusiveScan:
if (op == glslang::EOpMinInvocations ||
op == glslang::EOpMinInvocationsInclusiveScan ||
op == glslang::EOpMinInvocationsExclusiveScan) {
if (isFloat)
opCode = spv::OpGroupFMin;
else {
@ -4213,7 +4325,9 @@ spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op
else
opCode = spv::OpGroupSMin;
}
} else if (op == glslang::EOpMaxInvocations) {
} else if (op == glslang::EOpMaxInvocations ||
op == glslang::EOpMaxInvocationsInclusiveScan ||
op == glslang::EOpMaxInvocationsExclusiveScan) {
if (isFloat)
opCode = spv::OpGroupFMax;
else {
@ -4230,13 +4344,21 @@ spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op
}
if (builder.isVectorType(typeId))
return CreateInvocationsVectorOperation(opCode, typeId, operands);
return CreateInvocationsVectorOperation(opCode, groupOperation, typeId, operands);
break;
case glslang::EOpMinInvocationsNonUniform:
case glslang::EOpMaxInvocationsNonUniform:
case glslang::EOpAddInvocationsNonUniform:
if (op == glslang::EOpMinInvocationsNonUniform) {
case glslang::EOpMinInvocationsInclusiveScanNonUniform:
case glslang::EOpMaxInvocationsInclusiveScanNonUniform:
case glslang::EOpAddInvocationsInclusiveScanNonUniform:
case glslang::EOpMinInvocationsExclusiveScanNonUniform:
case glslang::EOpMaxInvocationsExclusiveScanNonUniform:
case glslang::EOpAddInvocationsExclusiveScanNonUniform:
if (op == glslang::EOpMinInvocationsNonUniform ||
op == glslang::EOpMinInvocationsInclusiveScanNonUniform ||
op == glslang::EOpMinInvocationsExclusiveScanNonUniform) {
if (isFloat)
opCode = spv::OpGroupFMinNonUniformAMD;
else {
@ -4246,7 +4368,9 @@ spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op
opCode = spv::OpGroupSMinNonUniformAMD;
}
}
else if (op == glslang::EOpMaxInvocationsNonUniform) {
else if (op == glslang::EOpMaxInvocationsNonUniform ||
op == glslang::EOpMaxInvocationsInclusiveScanNonUniform ||
op == glslang::EOpMaxInvocationsExclusiveScanNonUniform) {
if (isFloat)
opCode = spv::OpGroupFMaxNonUniformAMD;
else {
@ -4264,7 +4388,7 @@ spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op
}
if (builder.isVectorType(typeId))
return CreateInvocationsVectorOperation(opCode, typeId, operands);
return CreateInvocationsVectorOperation(opCode, groupOperation, typeId, operands);
break;
#endif
@ -4278,7 +4402,7 @@ spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op
}
// Create group invocation operations on a vector
spv::Id TGlslangToSpvTraverser::CreateInvocationsVectorOperation(spv::Op op, spv::Id typeId, std::vector<spv::Id>& operands)
spv::Id TGlslangToSpvTraverser::CreateInvocationsVectorOperation(spv::Op op, spv::GroupOperation groupOperation, spv::Id typeId, std::vector<spv::Id>& operands)
{
#ifdef AMD_EXTENSIONS
assert(op == spv::OpGroupFMin || op == spv::OpGroupUMin || op == spv::OpGroupSMin ||
@ -4322,7 +4446,7 @@ spv::Id TGlslangToSpvTraverser::CreateInvocationsVectorOperation(spv::Op op, spv
spvGroupOperands.push_back(operands[1]);
} else {
spvGroupOperands.push_back(builder.makeUintConstant(spv::ScopeSubgroup));
spvGroupOperands.push_back(spv::GroupOperationReduce);
spvGroupOperands.push_back(groupOperation);
spvGroupOperands.push_back(scalar);
}
@ -4731,12 +4855,12 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
if (builtIn != spv::BuiltInMax)
addDecoration(id, spv::DecorationBuiltIn, (int)builtIn);
#ifdef NV_EXTENSIONS
#ifdef NV_EXTENSIONS
if (builtIn == spv::BuiltInSampleMask) {
spv::Decoration decoration;
// GL_NV_sample_mask_override_coverage extension
if (glslangIntermediate->getLayoutOverrideCoverage())
decoration = (spv::Decoration)spv::OverrideCoverageNV;
decoration = (spv::Decoration)spv::DecorationOverrideCoverageNV;
else
decoration = (spv::Decoration)spv::DecorationMax;
addDecoration(id, decoration);
@ -4744,9 +4868,25 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
builder.addExtension(spv::E_SPV_NV_sample_mask_override_coverage);
}
}
else if (builtIn == spv::BuiltInLayer) {
// SPV_NV_viewport_array2 extension
if (symbol->getQualifier().layoutViewportRelative)
{
addDecoration(id, (spv::Decoration)spv::DecorationViewportRelativeNV);
builder.addCapability(spv::CapabilityShaderViewportMaskNV);
builder.addExtension(spv::E_SPV_NV_viewport_array2);
}
if(symbol->getQualifier().layoutSecondaryViewportRelativeOffset != -2048)
{
addDecoration(id, (spv::Decoration)spv::DecorationSecondaryViewportRelativeNV, symbol->getQualifier().layoutSecondaryViewportRelativeOffset);
builder.addCapability(spv::CapabilityShaderStereoViewNV);
builder.addExtension(spv::E_SPV_NV_stereo_view_rendering);
}
}
if (symbol->getQualifier().layoutPassthrough) {
addDecoration(id, spv::PassthroughNV);
builder.addCapability(spv::GeometryShaderPassthroughNV);
addDecoration(id, spv::DecorationPassthroughNV);
builder.addCapability(spv::CapabilityGeometryShaderPassthroughNV);
builder.addExtension(spv::E_SPV_NV_geometry_shader_passthrough);
}
#endif
@ -4831,7 +4971,9 @@ spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TIntermTyped& n
return accessChainLoad(sub_tree->getType());
} else if (auto* const_union_array = &sn->getConstArray()){
int nextConst = 0;
return createSpvConstantFromConstUnionArray(sn->getType(), *const_union_array, nextConst, true);
spv::Id id = createSpvConstantFromConstUnionArray(sn->getType(), *const_union_array, nextConst, true);
builder.addName(id, sn->getName().c_str());
return id;
}
}

View File

@ -1,11 +1,11 @@
//
//Copyright (C) 2014 LunarG, Inc.
// Copyright (C) 2014 LunarG, Inc.
//
//All rights reserved.
// All rights reserved.
//
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions
//are met:
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
@ -19,18 +19,18 @@
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//POSSIBILITY OF SUCH DAMAGE.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
#if _MSC_VER >= 1900
#pragma warning(disable : 4464) // relative include path contains '..'

View File

@ -1,11 +1,11 @@
//
//Copyright (C) 2016 Google, Inc.
// Copyright (C) 2016 Google, Inc.
//
//All rights reserved.
// All rights reserved.
//
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions
//are met:
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
@ -19,18 +19,18 @@
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//POSSIBILITY OF SUCH DAMAGE.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
// The SPIR-V spec requires code blocks to appear in an order satisfying the
// dominator-tree direction (ie, dominator before the dominated). This is,

View File

@ -1,11 +1,11 @@
//
//Copyright (C) 2015 LunarG, Inc.
// Copyright (C) 2015 LunarG, Inc.
//
//All rights reserved.
// All rights reserved.
//
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions
//are met:
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
@ -19,18 +19,18 @@
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//POSSIBILITY OF SUCH DAMAGE.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
#include "SPVRemapper.h"
@ -103,10 +103,10 @@ namespace spv {
switch (opCode) {
case spv::OpTypeVector: // fall through
case spv::OpTypeMatrix: // ...
case spv::OpTypeSampler: // ...
case spv::OpTypeArray: // ...
case spv::OpTypeRuntimeArray: // ...
case spv::OpTypeMatrix: // ...
case spv::OpTypeSampler: // ...
case spv::OpTypeArray: // ...
case spv::OpTypeRuntimeArray: // ...
case spv::OpTypePipe: return range_t(2, 3);
case spv::OpTypeStruct: // fall through
case spv::OpTypeFunction: return range_t(2, maxCount);
@ -286,7 +286,6 @@ namespace spv {
return literal;
}
void spirvbin_t::applyMap()
{
msg(3, 2, std::string("Applying map: "));
@ -300,7 +299,6 @@ namespace spv {
);
}
// Find free IDs for anything we haven't mapped
void spirvbin_t::mapRemainder()
{
@ -355,7 +353,7 @@ namespace spv {
if (idPosR.find(asId(start+1)) == idPosR.end())
stripInst(start);
break;
default:
default:
break; // leave it alone
}
@ -399,7 +397,7 @@ namespace spv {
if (spv::InstructionDesc[opCode].hasResult()) {
const spv::Id resultId = asId(word++);
idPosR[resultId] = start;
if (typeId != spv::NoResult) {
const unsigned idTypeSize = typeSizeInWords(typeId);
@ -462,7 +460,6 @@ namespace spv {
error("bad schema, must be 0");
}
int spirvbin_t::processInstruction(unsigned word, instfn_t instFn, idfn_t idFn)
{
const auto instructionStart = word;
@ -902,7 +899,7 @@ namespace spv {
},
// If local var id used anywhere else, don't eliminate
[&](spv::Id& id) {
[&](spv::Id& id) {
if (fnLocalVars.count(id) > 0) {
fnLocalVars.erase(id);
idMap.erase(id);
@ -1079,7 +1076,6 @@ namespace spv {
}
}
#ifdef NOTDEF
bool spirvbin_t::matchType(const spirvbin_t::globaltypes_t& globalTypes, spv::Id lt, spv::Id gt) const
{
@ -1139,7 +1135,6 @@ namespace spv {
}
}
// Look for an equivalent type in the globalTypes map
spv::Id spirvbin_t::findType(const spirvbin_t::globaltypes_t& globalTypes, spv::Id lt) const
{
@ -1261,7 +1256,6 @@ namespace spv {
}
}
// Strip a single binary by removing ranges given in stripRange
void spirvbin_t::strip()
{

View File

@ -1,11 +1,11 @@
//
//Copyright (C) 2015 LunarG, Inc.
// Copyright (C) 2015 LunarG, Inc.
//
//All rights reserved.
// All rights reserved.
//
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions
//are met:
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
@ -19,18 +19,18 @@
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//POSSIBILITY OF SUCH DAMAGE.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
#ifndef SPIRVREMAPPER_H
@ -112,7 +112,8 @@ class spirvbin_t : public spirvbin_base_t
{
public:
spirvbin_t(int verbose = 0) : entryPoint(spv::NoResult), largestNewId(0), verbose(verbose) { }
virtual ~spirvbin_t() { }
// remap on an existing binary in memory
void remap(std::vector<std::uint32_t>& spv, std::uint32_t opts = DO_EVERYTHING);
@ -175,7 +176,7 @@ private:
range_t constRange(spv::Op opCode) const;
unsigned typeSizeInWords(spv::Id id) const;
unsigned idTypeSizeInWords(spv::Id id) const;
spv::Id& asId(unsigned word) { return spv[word]; }
const spv::Id& asId(unsigned word) const { return spv[word]; }
spv::Op asOpCode(unsigned word) const { return opOpCode(spv[word]); }
@ -242,7 +243,7 @@ private:
void stripDebug(); // strip all debug info
void stripDeadRefs(); // strips debug info for now-dead references after DCE
void strip(); // remove debug symbols
std::vector<spirword_t> spv; // SPIR words
namemap_t nameMap; // ID names from OpName
@ -268,11 +269,11 @@ private:
// Which functions are called, anywhere in the module, with a call count
std::unordered_map<spv::Id, int> fnCalls;
posmap_t typeConstPos; // word positions that define types & consts (ordered)
posmap_rev_t idPosR; // reverse map from IDs to positions
typesize_map_t idTypeSizeMap; // maps each ID to its type size, if known.
std::vector<spv::Id> idMapL; // ID {M}ap from {L}ocal to {G}lobal IDs
spv::Id entryPoint; // module entry point

View File

@ -1,12 +1,12 @@
//
//Copyright (C) 2014-2015 LunarG, Inc.
//Copyright (C) 2015-2016 Google, Inc.
// Copyright (C) 2014-2015 LunarG, Inc.
// Copyright (C) 2015-2016 Google, Inc.
//
//All rights reserved.
// All rights reserved.
//
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions
//are met:
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
@ -20,18 +20,18 @@
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//POSSIBILITY OF SUCH DAMAGE.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// Helper for making SPIR-V IR. Generally, this is documented in the header
@ -79,7 +79,7 @@ Id Builder::import(const char* name)
{
Instruction* import = new Instruction(getUniqueId(), NoType, OpExtInstImport);
import->addStringOperand(name);
imports.push_back(std::unique_ptr<Instruction>(import));
return import->getResultId();
}
@ -246,7 +246,7 @@ Id Builder::makeStructResultType(Id type0, Id type1)
type = groupedTypes[OpTypeStruct][t];
if (type->getNumOperands() != 2)
continue;
if (type->getIdOperand(0) != type0 ||
if (type->getIdOperand(0) != type0 ||
type->getIdOperand(1) != type1)
continue;
return type->getResultId();
@ -628,7 +628,7 @@ Id Builder::findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned v1,
bool Builder::isConstantOpCode(Op opcode) const
{
switch (opcode) {
case OpUndef:
case OpUndef:
case OpConstantTrue:
case OpConstantFalse:
case OpConstant:
@ -819,7 +819,7 @@ Id Builder::makeFloat16Constant(float f16, bool specConstant)
}
#endif
Id Builder::findCompositeConstant(Op typeClass, std::vector<Id>& comps) const
Id Builder::findCompositeConstant(Op typeClass, const std::vector<Id>& comps) const
{
Instruction* constant = 0;
bool found = false;
@ -848,7 +848,7 @@ Id Builder::findCompositeConstant(Op typeClass, std::vector<Id>& comps) const
}
// Comments in header
Id Builder::makeCompositeConstant(Id typeId, std::vector<Id>& members, bool specConstant)
Id Builder::makeCompositeConstant(Id typeId, const std::vector<Id>& members, bool specConstant)
{
Op opcode = specConstant ? OpSpecConstantComposite : OpConstantComposite;
assert(typeId);
@ -1098,7 +1098,7 @@ Id Builder::createLoad(Id lValue)
}
// Comments in header
Id Builder::createAccessChain(StorageClass storageClass, Id base, std::vector<Id>& offsets)
Id Builder::createAccessChain(StorageClass storageClass, Id base, const std::vector<Id>& offsets)
{
// Figure out the final resulting type.
spv::Id typeId = getTypeId(base);
@ -1148,7 +1148,7 @@ Id Builder::createCompositeExtract(Id composite, Id typeId, unsigned index)
return extract->getResultId();
}
Id Builder::createCompositeExtract(Id composite, Id typeId, std::vector<unsigned>& indexes)
Id Builder::createCompositeExtract(Id composite, Id typeId, const std::vector<unsigned>& indexes)
{
// Generate code for spec constants if in spec constant operation
// generation mode.
@ -1175,7 +1175,7 @@ Id Builder::createCompositeInsert(Id object, Id composite, Id typeId, unsigned i
return insert->getResultId();
}
Id Builder::createCompositeInsert(Id object, Id composite, Id typeId, std::vector<unsigned>& indexes)
Id Builder::createCompositeInsert(Id object, Id composite, Id typeId, const std::vector<unsigned>& indexes)
{
Instruction* insert = new Instruction(getUniqueId(), typeId, OpCompositeInsert);
insert->addIdOperand(object);
@ -1326,7 +1326,7 @@ Id Builder::createSpecConstantOp(Op opCode, Id typeId, const std::vector<Id>& op
return op->getResultId();
}
Id Builder::createFunctionCall(spv::Function* function, std::vector<spv::Id>& args)
Id Builder::createFunctionCall(spv::Function* function, const std::vector<spv::Id>& args)
{
Instruction* op = new Instruction(getUniqueId(), function->getReturnType(), OpFunctionCall);
op->addIdOperand(function->getId());
@ -1338,7 +1338,7 @@ Id Builder::createFunctionCall(spv::Function* function, std::vector<spv::Id>& ar
}
// Comments in header
Id Builder::createRvalueSwizzle(Decoration precision, Id typeId, Id source, std::vector<unsigned>& channels)
Id Builder::createRvalueSwizzle(Decoration precision, Id typeId, Id source, const std::vector<unsigned>& channels)
{
if (channels.size() == 1)
return setPrecision(createCompositeExtract(source, typeId, channels.front()), precision);
@ -1360,7 +1360,7 @@ Id Builder::createRvalueSwizzle(Decoration precision, Id typeId, Id source, std:
}
// Comments in header
Id Builder::createLvalueSwizzle(Id typeId, Id target, Id source, std::vector<unsigned>& channels)
Id Builder::createLvalueSwizzle(Id typeId, Id target, Id source, const std::vector<unsigned>& channels)
{
if (channels.size() == 1 && getNumComponents(source) == 1)
return createCompositeInsert(source, target, typeId, channels.front());
@ -1446,7 +1446,7 @@ Id Builder::smearScalar(Decoration precision, Id scalar, Id vectorType)
}
// Comments in header
Id Builder::createBuiltinCall(Id resultType, Id builtins, int entryPoint, std::vector<Id>& args)
Id Builder::createBuiltinCall(Id resultType, Id builtins, int entryPoint, const std::vector<Id>& args)
{
Instruction* inst = new Instruction(getUniqueId(), resultType, OpExtInst);
inst->addIdOperand(builtins);
@ -1794,7 +1794,7 @@ Id Builder::createCompositeCompare(Decoration precision, Id value1, Id value2, b
}
// OpCompositeConstruct
Id Builder::createCompositeConstruct(Id typeId, std::vector<Id>& constituents)
Id Builder::createCompositeConstruct(Id typeId, const std::vector<Id>& constituents)
{
assert(isAggregateType(typeId) || (getNumTypeConstituents(typeId) > 1 && getNumTypeConstituents(typeId) == (int)constituents.size()));
@ -1936,7 +1936,6 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector<Id>&
}
}
// Step 2: Construct a matrix from that array.
// First make the column vectors, then make the matrix.
@ -2012,7 +2011,8 @@ void Builder::If::makeEndIf()
}
// Comments in header
void Builder::makeSwitch(Id selector, int numSegments, std::vector<int>& caseValues, std::vector<int>& valueIndexToSegment, int defaultSegment,
void Builder::makeSwitch(Id selector, int numSegments, const std::vector<int>& caseValues,
const std::vector<int>& valueIndexToSegment, int defaultSegment,
std::vector<Block*>& segmentBlocks)
{
Function& function = buildPoint->getParent();
@ -2355,7 +2355,7 @@ void Builder::dump(std::vector<unsigned int>& out) const
for (auto it = extensions.cbegin(); it != extensions.cend(); ++it) {
Instruction extInst(0, 0, OpExtension);
extInst.addStringOperand(*it);
extInst.addStringOperand(it->c_str());
extInst.dump(out);
}
@ -2492,7 +2492,7 @@ void Builder::createAndSetNoPredecessorBlock(const char* /*name*/)
buildPoint->getParent().addBlock(block);
setBuildPoint(block);
//if (name)
// if (name)
// addName(block->getId(), name);
}

View File

@ -1,12 +1,12 @@
//
//Copyright (C) 2014-2015 LunarG, Inc.
//Copyright (C) 2015-2016 Google, Inc.
// Copyright (C) 2014-2015 LunarG, Inc.
// Copyright (C) 2015-2016 Google, Inc.
//
//All rights reserved.
// All rights reserved.
//
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions
//are met:
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
@ -20,18 +20,18 @@
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//POSSIBILITY OF SUCH DAMAGE.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// "Builder" is an interface to fully build SPIR-V IR. Allocate one of
@ -196,7 +196,7 @@ public:
#endif
// Turn the array of constants into a proper spv constant of the requested type.
Id makeCompositeConstant(Id type, std::vector<Id>& comps, bool specConst = false);
Id makeCompositeConstant(Id type, const std::vector<Id>& comps, bool specConst = false);
// Methods for adding information outside the CFG.
Instruction* addEntryPoint(ExecutionModel, Function*, const char* name);
@ -244,16 +244,16 @@ public:
Id createLoad(Id lValue);
// Create an OpAccessChain instruction
Id createAccessChain(StorageClass, Id base, std::vector<Id>& offsets);
Id createAccessChain(StorageClass, Id base, const std::vector<Id>& offsets);
// Create an OpArrayLength instruction
Id createArrayLength(Id base, unsigned int member);
// Create an OpCompositeExtract instruction
Id createCompositeExtract(Id composite, Id typeId, unsigned index);
Id createCompositeExtract(Id composite, Id typeId, std::vector<unsigned>& indexes);
Id createCompositeExtract(Id composite, Id typeId, const std::vector<unsigned>& indexes);
Id createCompositeInsert(Id object, Id composite, Id typeId, unsigned index);
Id createCompositeInsert(Id object, Id composite, Id typeId, std::vector<unsigned>& indexes);
Id createCompositeInsert(Id object, Id composite, Id typeId, const std::vector<unsigned>& indexes);
Id createVectorExtractDynamic(Id vector, Id typeId, Id componentIndex);
Id createVectorInsertDynamic(Id vector, Id typeId, Id component, Id componentIndex);
@ -267,18 +267,18 @@ public:
Id createBinOp(Op, Id typeId, Id operand1, Id operand2);
Id createTriOp(Op, Id typeId, Id operand1, Id operand2, Id operand3);
Id createOp(Op, Id typeId, const std::vector<Id>& operands);
Id createFunctionCall(spv::Function*, std::vector<spv::Id>&);
Id createFunctionCall(spv::Function*, const std::vector<spv::Id>&);
Id createSpecConstantOp(Op, Id typeId, const std::vector<spv::Id>& operands, const std::vector<unsigned>& literals);
// Take an rvalue (source) and a set of channels to extract from it to
// make a new rvalue, which is returned.
Id createRvalueSwizzle(Decoration precision, Id typeId, Id source, std::vector<unsigned>& channels);
Id createRvalueSwizzle(Decoration precision, Id typeId, Id source, const std::vector<unsigned>& channels);
// Take a copy of an lvalue (target) and a source of components, and set the
// source components into the lvalue where the 'channels' say to put them.
// An updated version of the target is returned.
// (No true lvalue or stores are used.)
Id createLvalueSwizzle(Id typeId, Id target, Id source, std::vector<unsigned>& channels);
Id createLvalueSwizzle(Id typeId, Id target, Id source, const std::vector<unsigned>& channels);
// If both the id and precision are valid, the id
// gets tagged with the requested precision.
@ -311,7 +311,7 @@ public:
Id smearScalar(Decoration precision, Id scalarVal, Id vectorType);
// Create a call to a built-in function.
Id createBuiltinCall(Id resultType, Id builtins, int entryPoint, std::vector<Id>& args);
Id createBuiltinCall(Id resultType, Id builtins, int entryPoint, const std::vector<Id>& args);
// List of parameters used to create a texture operation
struct TextureParameters {
@ -346,7 +346,7 @@ public:
Id createCompositeCompare(Decoration precision, Id, Id, bool /* true if for equal, false if for not-equal */);
// OpCompositeConstruct
Id createCompositeConstruct(Id typeId, std::vector<Id>& constituents);
Id createCompositeConstruct(Id typeId, const std::vector<Id>& constituents);
// vector or scalar constructor
Id createConstructor(Decoration precision, const std::vector<Id>& sources, Id resultTypeId);
@ -388,8 +388,8 @@ public:
// Returns the right set of basic blocks to start each code segment with, so that the caller's
// recursion stack can hold the memory for it.
//
void makeSwitch(Id condition, int numSegments, std::vector<int>& caseValues, std::vector<int>& valueToSegment, int defaultSegment,
std::vector<Block*>& segmentBB); // return argument
void makeSwitch(Id condition, int numSegments, const std::vector<int>& caseValues,
const std::vector<int>& valueToSegment, int defaultSegment, std::vector<Block*>& segmentBB); // return argument
// Add a branch to the innermost switch's merge block.
void addSwitchBreak();
@ -545,7 +545,7 @@ public:
Id makeInt64Constant(Id typeId, unsigned long long value, bool specConstant);
Id findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned value) const;
Id findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned v1, unsigned v2) const;
Id findCompositeConstant(Op typeClass, std::vector<Id>& comps) const;
Id findCompositeConstant(Op typeClass, const std::vector<Id>& comps) const;
Id collapseAccessChain();
void transferAccessChainSwizzle(bool dynamic);
void simplifyAccessChainSwizzle();
@ -555,7 +555,7 @@ public:
SourceLanguage source;
int sourceVersion;
std::set<const char*> extensions;
std::set<std::string> extensions;
std::vector<const char*> sourceExtensions;
AddressingModel addressModel;
MemoryModel memoryModel;

View File

@ -1,11 +1,11 @@
//
//Copyright (C) 2014-2015 LunarG, Inc.
// Copyright (C) 2014-2015 LunarG, Inc.
//
//All rights reserved.
// All rights reserved.
//
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions
//are met:
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
@ -19,18 +19,18 @@
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//POSSIBILITY OF SUCH DAMAGE.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// Disassembler for SPIR-V.
@ -482,7 +482,8 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
#endif
#ifdef NV_EXTENSIONS
}else if (strcmp(spv::E_SPV_NV_sample_mask_override_coverage, name) == 0 ||
strcmp(spv::E_SPV_NV_geometry_shader_passthrough, name) == 0) {
strcmp(spv::E_SPV_NV_geometry_shader_passthrough, name) == 0 ||
strcmp(spv::E_SPV_NV_viewport_array2, name) == 0) {
extInstSet = GLSLextNVInst;
#endif
}
@ -656,12 +657,21 @@ static const char* GLSLextAMDGetDebugNames(const char* name, unsigned entrypoint
static const char* GLSLextNVGetDebugNames(const char* name, unsigned entrypoint)
{
if (strcmp(name, spv::E_SPV_NV_sample_mask_override_coverage) == 0 ||
strcmp(name, spv::E_SPV_NV_geometry_shader_passthrough) == 0) {
strcmp(name, spv::E_SPV_NV_geometry_shader_passthrough) == 0 ||
strcmp(name, spv::E_ARB_shader_viewport_layer_array) == 0 ||
strcmp(name, spv::E_SPV_NV_viewport_array2) == 0){
switch (entrypoint) {
case OverrideCoverageNV: return "OverrideCoverageNV";
case PassthroughNV: return "PassthroughNV";
case GeometryShaderPassthroughNV: return "GeometryShaderPassthroughNV";
default: return "Bad";
case DecorationOverrideCoverageNV: return "OverrideCoverageNV";
case DecorationPassthroughNV: return "PassthroughNV";
case CapabilityGeometryShaderPassthroughNV: return "GeometryShaderPassthroughNV";
case DecorationViewportRelativeNV: return "ViewportRelativeNV";
case BuiltInViewportMaskNV: return "ViewportMaskNV";
case CapabilityShaderViewportMaskNV: return "ShaderViewportMaskNV";
case DecorationSecondaryViewportRelativeNV: return "SecondaryViewportRelativeNV";
case BuiltInSecondaryPositionNV: return "SecondaryPositionNV";
case BuiltInSecondaryViewportMaskNV: return "SecondaryViewportMaskNV";
case CapabilityShaderStereoViewNV: return "ShaderStereoViewNV";
default: return "Bad";
}
}
return "Bad";

View File

@ -1,11 +1,11 @@
//
//Copyright (C) 2014-2015 LunarG, Inc.
// Copyright (C) 2014-2015 LunarG, Inc.
//
//All rights reserved.
// All rights reserved.
//
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions
//are met:
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
@ -19,18 +19,18 @@
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//POSSIBILITY OF SUCH DAMAGE.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// Disassembler for SPIR-V.

View File

@ -1,11 +1,11 @@
//
//Copyright (C) 2014-2015 LunarG, Inc.
// Copyright (C) 2014-2015 LunarG, Inc.
//
//All rights reserved.
// All rights reserved.
//
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions
//are met:
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
@ -19,18 +19,18 @@
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//POSSIBILITY OF SUCH DAMAGE.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// 1) Programmatically fill in instruction/operand information.
@ -262,6 +262,8 @@ const char* DecorationString(int decoration)
#ifdef NV_EXTENSIONS
case 5248: return "OverrideCoverageNV";
case 5250: return "PassthroughNV";
case 5252: return "ViewportRelativeNV";
case 5256: return "SecondaryViewportRelativeNV";
#endif
}
}
@ -337,6 +339,11 @@ const char* BuiltInString(int builtIn)
case 4996: return "BaryCoordSmoothCentroidAMD";
case 4997: return "BaryCoordSmoothSampleAMD";
case 4998: return "BaryCoordPullModelAMD";
#endif
#ifdef NV_EXTENSIONS
case 5253: return "ViewportMaskNV";
case 5257: return "SecondaryPositionNV";
case 5258: return "SecondaryViewportMaskNV";
#endif
}
}
@ -819,9 +826,13 @@ const char* CapabilityString(int info)
case 4423: return "SubgroupBallotKHR";
case 4427: return "DrawParameters";
case 4431: return "SubgroupVoteKHR";
#ifdef NV_EXTENSIONS
case 5251: return "GeometryShaderPassthroughNV";
case 5254: return "ShaderViewportIndexLayerNV";
case 5255: return "ShaderViewportMaskNV";
case 5259: return "ShaderStereoViewNV";
#endif
}
@ -1158,6 +1169,9 @@ const char* OpcodeString(int op)
case 4421: return "OpSubgroupBallotKHR";
case 4422: return "OpSubgroupFirstInvocationKHR";
case 4428: return "OpSubgroupAnyKHR";
case 4429: return "OpSubgroupAllKHR";
case 4430: return "OpSubgroupAllEqualKHR";
case 4432: return "OpSubgroupReadInvocationKHR";
#ifdef AMD_EXTENSIONS
@ -2771,6 +2785,18 @@ void Parameterize()
InstructionDesc[OpSubgroupFirstInvocationKHR].operands.push(OperandId, "'Value'");
InstructionDesc[OpSubgroupAnyKHR].capabilities.push_back(CapabilitySubgroupVoteKHR);
InstructionDesc[OpSubgroupAnyKHR].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpSubgroupAnyKHR].operands.push(OperandId, "'Predicate'");
InstructionDesc[OpSubgroupAllKHR].capabilities.push_back(CapabilitySubgroupVoteKHR);
InstructionDesc[OpSubgroupAllKHR].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpSubgroupAllKHR].operands.push(OperandId, "'Predicate'");
InstructionDesc[OpSubgroupAllEqualKHR].capabilities.push_back(CapabilitySubgroupVoteKHR);
InstructionDesc[OpSubgroupAllEqualKHR].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpSubgroupAllEqualKHR].operands.push(OperandId, "'Predicate'");
InstructionDesc[OpSubgroupReadInvocationKHR].capabilities.push_back(CapabilityGroups);
InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Value'");
InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Index'");

View File

@ -1,11 +1,11 @@
//
//Copyright (C) 2014-2015 LunarG, Inc.
// Copyright (C) 2014-2015 LunarG, Inc.
//
//All rights reserved.
// All rights reserved.
//
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions
//are met:
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
@ -19,18 +19,18 @@
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//POSSIBILITY OF SUCH DAMAGE.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// Parameterize the SPIR-V enumerants.

View File

@ -605,6 +605,7 @@ enum Capability {
CapabilityMultiViewport = 57,
CapabilitySubgroupBallotKHR = 4423,
CapabilityDrawParameters = 4427,
CapabilitySubgroupVoteKHR = 4431,
CapabilityMax = 0x7fffffff,
};
@ -906,6 +907,9 @@ enum Op {
OpSubgroupBallotKHR = 4421,
OpSubgroupFirstInvocationKHR = 4422,
OpSubgroupReadInvocationKHR = 4432,
OpSubgroupAllKHR = 4428,
OpSubgroupAnyKHR = 4429,
OpSubgroupAllEqualKHR = 4430,
OpMax = 0x7fffffff,
};

View File

@ -1,11 +1,11 @@
//
//Copyright (C) 2014 LunarG, Inc.
// Copyright (C) 2014 LunarG, Inc.
//
//All rights reserved.
// All rights reserved.
//
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions
//are met:
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
@ -19,26 +19,26 @@
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//POSSIBILITY OF SUCH DAMAGE.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
// SPIRV-IR
//
// Simple in-memory representation (IR) of SPIRV. Just for holding
// Each function's CFG of blocks. Has this hierarchy:
// - Module, which is a list of
// - Function, which is a list of
// - Block, which is a list of
// - Module, which is a list of
// - Function, which is a list of
// - Block, which is a list of
// - Instruction
//
@ -65,7 +65,7 @@ const Id NoResult = 0;
const Id NoType = 0;
const Decoration NoPrecision = DecorationMax;
const MemorySemanticsMask MemorySemanticsAllMemory =
const MemorySemanticsMask MemorySemanticsAllMemory =
(MemorySemanticsMask)(MemorySemanticsSequentiallyConsistentMask |
MemorySemanticsUniformMemoryMask |
MemorySemanticsSubgroupMemoryMask |
@ -229,7 +229,7 @@ protected:
std::vector<std::unique_ptr<Instruction> > localVariables;
Function& parent;
// track whether this block is known to be uncreachable (not necessarily
// track whether this block is known to be uncreachable (not necessarily
// true for all unreachable blocks, but should be set at least
// for the extraneous ones introduced by the builder).
bool unreachable;

View File

@ -20,13 +20,11 @@ glslang_set_link_args(spirv-remap)
set(LIBRARIES
glslang
OGLCompiler
OSDependent
HLSL
SPIRV
SPVRemapper
glslang-default-resource-limits)
if(WIN32)
set(LIBRARIES ${LIBRARIES} psapi)
elseif(UNIX)

View File

@ -1,12 +1,12 @@
//
//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
//Copyright (C) 2013-2016 LunarG, Inc.
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
// Copyright (C) 2013-2016 LunarG, Inc.
//
//All rights reserved.
// All rights reserved.
//
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions
//are met:
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
@ -20,18 +20,18 @@
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//POSSIBILITY OF SUCH DAMAGE.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// this only applies to the standalone wrapper, not the front end in general
@ -229,7 +229,7 @@ void ProcessBindingBase(int& argc, char**& argv, std::array<unsigned int, EShLan
if (!isdigit(argv[1][0])) {
if (argc < 3) // this form needs one more argument
usage();
// Parse form: --argname stage base
const EShLanguage lang = FindLanguage(argv[1], false);
base[lang] = atoi(argv[2]);
@ -265,7 +265,7 @@ void ProcessArguments(int argc, char* argv[])
Work[w] = 0;
argc--;
argv++;
argv++;
for (; argc >= 1; argc--, argv++) {
if (argv[0][0] == '-') {
switch (argv[0][1]) {
@ -292,7 +292,7 @@ void ProcessArguments(int argc, char* argv[])
lowerword == "sub") {
ProcessBindingBase(argc, argv, baseUboBinding);
} else if (lowerword == "auto-map-bindings" || // synonyms
lowerword == "auto-map-binding" ||
lowerword == "auto-map-binding" ||
lowerword == "amb") {
Options |= EOptionAutoMapBindings;
} else if (lowerword == "flatten-uniform-arrays" || // synonyms
@ -575,14 +575,14 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
if (Options & EOptionAutoMapBindings)
shader->setAutoMapBindings(true);
shaders.push_back(shader);
const int defaultVersion = Options & EOptionDefaultDesktop? 110: 100;
if (Options & EOptionOutputPreprocessed) {
std::string str;
glslang::TShader::ForbidInclude includer;
glslang::TShader::ForbidIncluder includer;
if (shader->preprocess(&Resources, defaultVersion, ENoProfile, false, false,
messages, &str, includer)) {
PutsIfNonEmpty(str.c_str());
@ -619,7 +619,7 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
if (!program.mapIO())
LinkFailed = true;
}
// Report
if (! (Options & EOptionSuppressInfolog) &&
! (Options & EOptionMemoryLeakMode)) {
@ -863,7 +863,7 @@ EShLanguage FindLanguage(const std::string& name, bool parseSuffix)
}
//
// Read a file's data into a string, and compile it using the old interface ShCompile,
// Read a file's data into a string, and compile it using the old interface ShCompile,
// for non-linkable results.
//
void CompileFile(const char* fileName, ShHandle compiler)
@ -887,16 +887,16 @@ void CompileFile(const char* fileName, ShHandle compiler)
EShMessages messages = EShMsgDefault;
SetMessageOptions(messages);
for (int i = 0; i < ((Options & EOptionMemoryLeakMode) ? 100 : 1); ++i) {
for (int j = 0; j < ((Options & EOptionMemoryLeakMode) ? 100 : 1); ++j) {
//ret = ShCompile(compiler, shaderStrings, NumShaderStrings, lengths, EShOptNone, &Resources, Options, (Options & EOptionDefaultDesktop) ? 110 : 100, false, messages);
// ret = ShCompile(compiler, shaderStrings, NumShaderStrings, lengths, EShOptNone, &Resources, Options, (Options & EOptionDefaultDesktop) ? 110 : 100, false, messages);
ret = ShCompile(compiler, shaderStrings, NumShaderStrings, nullptr, EShOptNone, &Resources, Options, (Options & EOptionDefaultDesktop) ? 110 : 100, false, messages);
//const char* multi[12] = { "# ve", "rsion", " 300 e", "s", "\n#err",
// "or should be l", "ine 1", "string 5\n", "float glo", "bal",
// const char* multi[12] = { "# ve", "rsion", " 300 e", "s", "\n#err",
// "or should be l", "ine 1", "string 5\n", "float glo", "bal",
// ";\n#error should be line 2\n void main() {", "global = 2.3;}" };
//const char* multi[7] = { "/", "/", "\\", "\n", "\n", "#", "version 300 es" };
//ret = ShCompile(compiler, multi, 7, nullptr, EShOptNone, &Resources, Options, (Options & EOptionDefaultDesktop) ? 110 : 100, false, messages);
// const char* multi[7] = { "/", "/", "\\", "\n", "\n", "#", "version 300 es" };
// ret = ShCompile(compiler, multi, 7, nullptr, EShOptNone, &Resources, Options, (Options & EOptionDefaultDesktop) ? 110 : 100, false, messages);
}
if (Options & EOptionMemoryLeakMode)
@ -1024,7 +1024,7 @@ int fopen_s(
//
// Malloc a string of sufficient size and read a string into it.
//
char** ReadFileData(const char* fileName)
char** ReadFileData(const char* fileName)
{
FILE *in = nullptr;
int errorCode = fopen_s(&in, fileName, "r");
@ -1035,7 +1035,7 @@ char** ReadFileData(const char* fileName)
if (errorCode || in == nullptr)
Error("unable to open input file");
while (fgetc(in) != EOF)
count++;
@ -1080,7 +1080,7 @@ char** ReadFileData(const char* fileName)
break;
}
len = count;
}
}
++i;
}

View File

@ -1,11 +1,11 @@
//
//Copyright (C) 2013 LunarG, Inc.
// Copyright (C) 2013 LunarG, Inc.
//
//All rights reserved.
// All rights reserved.
//
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions
//are met:
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
@ -19,18 +19,18 @@
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//POSSIBILITY OF SUCH DAMAGE.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
#ifndef WORKLIST_H_INCLUDED
#define WORKLIST_H_INCLUDED
@ -59,21 +59,21 @@ namespace glslang {
void add(TWorkItem* item)
{
GetGlobalLock();
worklist.push_back(item);
ReleaseGlobalLock();
}
bool remove(TWorkItem*& item)
{
GetGlobalLock();
if (worklist.empty())
return false;
item = worklist.front();
worklist.pop_front();
ReleaseGlobalLock();
return true;

View File

@ -1,11 +1,11 @@
//
//Copyright (C) 2015 LunarG, Inc.
// Copyright (C) 2015 LunarG, Inc.
//
//All rights reserved.
// All rights reserved.
//
//Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions
//are met:
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
@ -19,18 +19,18 @@
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//POSSIBILITY OF SUCH DAMAGE.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
#include <iostream>
@ -143,8 +143,8 @@ namespace {
<< " [--map (all|types|names|funcs)]"
<< " [--dce (all|types|funcs)]"
<< " [--opt (all|loadstore)]"
<< " [--strip-all | --strip all | -s]"
<< " [--do-everything]"
<< " [--strip-all | --strip all | -s]"
<< " [--do-everything]"
<< " --input | -i file1 [file2...] --output|-o DESTDIR"
<< std::endl;
@ -311,7 +311,6 @@ namespace {
} // namespace
int main(int argc, char** argv)
{
std::vector<std::string> inputFile;

View File

@ -236,3 +236,11 @@ void foo12111()
v = shadow2DRectProjGradARB(s2DRS, v, v2, v2);
}
void voidTernary()
{
bool b;
b ? foo121111() : foo12111();
b ? foo121111() : 4; // ERROR
b ? 3 : foo12111(); // ERROR
}

View File

@ -15,11 +15,9 @@ ERROR: 0:63: 'bitwise-or assign' : not supported for this version or the enabled
ERROR: 0:63: 'assign' : cannot convert from 'temp bool' to 'temp float'
ERROR: 0:79: ':' : wrong operand types: no operation ':' exists that takes a left-hand operand of type 'temp 4-component vector of float' and a right operand of type 'temp 4X4 matrix of float' (or there is no acceptable conversion)
ERROR: 0:79: 'assign' : cannot convert from 'temp 4X4 matrix of float' to 'fragColor 4-component vector of float FragColor'
ERROR: 0:82: 'xr' : illegal - vector component fields not from the same set
ERROR: 0:83: 'xyxyx' : illegal vector field selection
ERROR: 0:83: 'scalar swizzle' : not supported for this version or the enabled extensions
ERROR: 0:83: 'xy' : vector field selection out of range
ERROR: 0:84: 'z' : vector field selection out of range
ERROR: 0:82: 'xr' : vector swizzle selectors not from the same set
ERROR: 0:83: 'xyxyx' : vector swizzle too long
ERROR: 0:84: 'z' : vector swizzle selection out of range
ERROR: 0:85: 'assign' : l-value required
ERROR: 0:91: 'int' : overloaded functions must have the same return type
ERROR: 0:91: 'main' : function already has a body
@ -52,6 +50,8 @@ ERROR: 0:191: 'shadow2DProjGradARB' : required extension not requested: GL_ARB_s
ERROR: 0:209: 'shadow2DRectProjGradARB' : no matching overloaded function found
ERROR: 0:209: 'assign' : cannot convert from 'const float' to 'temp 4-component vector of float'
ERROR: 0:212: 'sampler2DRect' : Reserved word.
ERROR: 0:244: ':' : wrong operand types: no operation ':' exists that takes a left-hand operand of type 'global void' and a right operand of type 'const int' (or there is no acceptable conversion)
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: 53 compilation errors. No code generated.
@ -251,10 +251,23 @@ ERROR: node is still EOpNull!
0:82 'gl_FragColor' (fragColor 4-component vector of float FragColor)
0:82 Constant:
0:82 0 (const int)
0:83 direct index (temp float)
0:83 'gl_FragColor' (fragColor 4-component vector of float FragColor)
0:83 Constant:
0:83 0 (const int)
0:83 vector swizzle (temp 2-component vector of float)
0:83 vector swizzle (temp 4-component vector of float)
0:83 'gl_FragColor' (fragColor 4-component vector of float FragColor)
0:83 Sequence
0:83 Constant:
0:83 0 (const int)
0:83 Constant:
0:83 1 (const int)
0:83 Constant:
0:83 0 (const int)
0:83 Constant:
0:83 1 (const int)
0:83 Sequence
0:83 Constant:
0:83 0 (const int)
0:83 Constant:
0:83 1 (const int)
0:84 direct index (temp float)
0:84 'centTexCoord' (centroid smooth in 2-component vector of float)
0:84 Constant:
@ -590,6 +603,19 @@ ERROR: node is still EOpNull!
0:237 'v' (temp 4-component vector of float)
0:237 'v2' (temp 2-component vector of float)
0:237 'v2' (temp 2-component vector of float)
0:240 Function Definition: voidTernary( (global void)
0:240 Function Parameters:
0:? Sequence
0:243 Test condition and select (temp void)
0:243 Condition
0:243 'b' (temp bool)
0:243 true case
0:243 Function Call: foo121111( (global void)
0:243 false case
0:243 Function Call: foo12111( (global void)
0:244 Constant:
0:244 4 (const int)
0:245 Function Call: foo12111( (global void)
0:? Linker Objects
0:? 'lowp' (global float)
0:? 'mediump' (global float)

View File

@ -71,8 +71,8 @@ ERROR: node is still EOpNull!
0:25 move second child to first child (temp highp 4-component vector of float)
0:25 'p' (temp highp 4-component vector of float)
0:25 gl_Position: direct index for structure (in highp 4-component vector of float Position)
0:25 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
0:25 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
0:25 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize, in highp 4-component vector of float gl_SecondaryPositionNV})
0:25 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize, in highp 4-component vector of float gl_SecondaryPositionNV})
0:25 Constant:
0:25 1 (const int)
0:25 Constant:
@ -81,8 +81,8 @@ ERROR: node is still EOpNull!
0:26 move second child to first child (temp highp float)
0:26 'ps' (temp highp float)
0:26 gl_PointSize: direct index for structure (in highp float PointSize)
0:26 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
0:26 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
0:26 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize, in highp 4-component vector of float gl_SecondaryPositionNV})
0:26 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize, in highp 4-component vector of float gl_SecondaryPositionNV})
0:26 Constant:
0:26 1 (const int)
0:26 Constant:
@ -210,8 +210,8 @@ ERROR: node is still EOpNull!
0:114 move second child to first child (temp highp float)
0:114 'ps' (temp highp float)
0:114 gl_PointSize: direct index for structure (in highp float PointSize)
0:114 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
0:114 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
0:114 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize, in highp 4-component vector of float gl_SecondaryPositionNV})
0:114 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize, in highp 4-component vector of float gl_SecondaryPositionNV})
0:114 Constant:
0:114 1 (const int)
0:114 Constant:
@ -402,8 +402,8 @@ ERROR: node is still EOpNull!
0:25 move second child to first child (temp highp 4-component vector of float)
0:25 'p' (temp highp 4-component vector of float)
0:25 gl_Position: direct index for structure (in highp 4-component vector of float Position)
0:25 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
0:25 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
0:25 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize, in highp 4-component vector of float gl_SecondaryPositionNV})
0:25 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize, in highp 4-component vector of float gl_SecondaryPositionNV})
0:25 Constant:
0:25 1 (const int)
0:25 Constant:
@ -412,8 +412,8 @@ ERROR: node is still EOpNull!
0:26 move second child to first child (temp highp float)
0:26 'ps' (temp highp float)
0:26 gl_PointSize: direct index for structure (in highp float PointSize)
0:26 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
0:26 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
0:26 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize, in highp 4-component vector of float gl_SecondaryPositionNV})
0:26 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize, in highp 4-component vector of float gl_SecondaryPositionNV})
0:26 Constant:
0:26 1 (const int)
0:26 Constant:

View File

@ -78,8 +78,8 @@ ERROR: node is still EOpNull!
0:36 move second child to first child (temp highp 4-component vector of float)
0:36 'p' (temp highp 4-component vector of float)
0:36 gl_Position: direct index for structure (in highp 4-component vector of float Position)
0:36 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
0:36 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
0:36 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize, in highp 4-component vector of float gl_SecondaryPositionNV})
0:36 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize, in highp 4-component vector of float gl_SecondaryPositionNV})
0:36 Constant:
0:36 1 (const int)
0:36 Constant:
@ -88,8 +88,8 @@ ERROR: node is still EOpNull!
0:37 move second child to first child (temp highp float)
0:37 'ps' (temp highp float)
0:37 gl_PointSize: direct index for structure (in highp float PointSize)
0:37 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
0:37 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
0:37 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize, in highp 4-component vector of float gl_SecondaryPositionNV})
0:37 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize, in highp 4-component vector of float gl_SecondaryPositionNV})
0:37 Constant:
0:37 1 (const int)
0:37 Constant:
@ -211,8 +211,8 @@ ERROR: node is still EOpNull!
0:36 move second child to first child (temp highp 4-component vector of float)
0:36 'p' (temp highp 4-component vector of float)
0:36 gl_Position: direct index for structure (in highp 4-component vector of float Position)
0:36 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
0:36 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
0:36 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize, in highp 4-component vector of float gl_SecondaryPositionNV})
0:36 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize, in highp 4-component vector of float gl_SecondaryPositionNV})
0:36 Constant:
0:36 1 (const int)
0:36 Constant:
@ -221,8 +221,8 @@ ERROR: node is still EOpNull!
0:37 move second child to first child (temp highp float)
0:37 'ps' (temp highp float)
0:37 gl_PointSize: direct index for structure (in highp float PointSize)
0:37 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
0:37 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize})
0:37 direct index (temp block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize, in highp 4-component vector of float gl_SecondaryPositionNV})
0:37 'gl_in' (in 32-element array of block{in highp 4-component vector of float Position gl_Position, in highp float PointSize gl_PointSize, in highp 4-component vector of float gl_SecondaryPositionNV})
0:37 Constant:
0:37 1 (const int)
0:37 Constant:

View File

@ -18,9 +18,9 @@ ERROR: 0:40: 'j' : undeclared identifier
ERROR: 0:40: '=' : cannot convert from 'temp float' to 'temp int'
ERROR: 0:44: 'jj' : undeclared identifier
ERROR: 0:44: '=' : cannot convert from 'temp float' to 'temp int'
ERROR: 0:54: 'y' : vector field selection out of range
ERROR: 0:62: 'xxxxx' : illegal vector field selection
ERROR: 0:63: 'xxy' : vector field selection out of range
ERROR: 0:54: 'y' : vector swizzle selection out of range
ERROR: 0:62: 'xxxxx' : vector swizzle too long
ERROR: 0:63: 'xxy' : vector swizzle selection out of range
ERROR: 0:66: 'binding' : cannot declare a default, include a type or full declaration
ERROR: 0:69: 'location/component/index' : cannot declare a default, use a full declaration
ERROR: 0:70: 'input block' : not supported in this stage: vertex
@ -124,8 +124,10 @@ ERROR: node is still EOpNull!
0:61 'smeared' (temp 3-component vector of float)
0:61 Construct vec3 (temp 3-component vector of float)
0:61 'f' (temp float)
0:62 'f' (temp float)
0:63 'f' (temp float)
0:62 Construct vec4 (temp 4-component vector of float)
0:62 'f' (temp float)
0:63 Construct vec2 (temp 2-component vector of float)
0:63 'f' (temp float)
0:88 Function Definition: bar23444( (global void)
0:88 Function Parameters:
0:? Sequence

View File

@ -0,0 +1,19 @@
cppBad2.vert
ERROR: 0:3: 'macro expansion' : End of input in macro b
ERROR: 0:3: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
Shader version: 100
ERROR: node is still EOpNull!
0:? Linker Objects
Linked vertex stage:
ERROR: Linking vertex stage: Missing entry point: Each stage requires one entry point
Shader version: 100
ERROR: node is still EOpNull!
0:? Linker Objects

View File

@ -1,6 +1,8 @@
cppComplexExpr.vert
ERROR: 0:46: 'xyxwx' : illegal vector field selection
ERROR: 0:46: 'xyxwx' : illegal vector field selection
ERROR: 0:46: 'xyxwx' : vector swizzle too long
ERROR: 0:46: 'xyxwx' : vector swizzle too long
ERROR: 0:46: 'return' : cannot convert return value to function return type
WARNING: 0:46: 'return' : type conversion on return values was not explicitly allowed until version 420
ERROR: 0:66: '#define' : Macro redefined; different substitutions: BIG
ERROR: 0:81: 'preprocessor evaluation' : bad expression
ERROR: 0:81: '#if' : unexpected tokens following directive
@ -47,7 +49,7 @@ ERROR: 0:0: 'preprocessor evaluation' : division by 0
ERROR: 0:3: 'preprocessor evaluation' : bad expression
ERROR: 0:3: 'preprocessor evaluation' : division by 0
ERROR: 0:10001: '' : missing #endif
ERROR: 48 compilation errors. No code generated.
ERROR: 49 compilation errors. No code generated.
Shader version: 300
@ -80,19 +82,33 @@ ERROR: node is still EOpNull!
0:44 Function Parameters:
0:46 Sequence
0:46 Branch: Return with expression
0:46 add (temp highp float)
0:46 add (temp highp float)
0:46 direct index (temp highp float)
0:46 add (temp highp 4-component vector of float)
0:46 add (temp highp 4-component vector of float)
0:46 vector swizzle (temp highp 4-component vector of float)
0:46 'gl_Position' (gl_Position highp 4-component vector of float Position)
0:46 Constant:
0:46 0 (const int)
0:46 Sequence
0:46 Constant:
0:46 0 (const int)
0:46 Constant:
0:46 1 (const int)
0:46 Constant:
0:46 0 (const int)
0:46 Constant:
0:46 3 (const int)
0:46 Constant:
0:46 3.000000
0:46 add (temp highp float)
0:46 direct index (temp highp float)
0:46 add (temp highp 4-component vector of float)
0:46 vector swizzle (temp highp 4-component vector of float)
0:46 'gl_Position' (gl_Position highp 4-component vector of float Position)
0:46 Constant:
0:46 0 (const int)
0:46 Sequence
0:46 Constant:
0:46 0 (const int)
0:46 Constant:
0:46 1 (const int)
0:46 Constant:
0:46 0 (const int)
0:46 Constant:
0:46 3 (const int)
0:46 Constant:
0:46 3.000000
0:47 Branch: Return with expression

View File

@ -2,13 +2,17 @@ hlsl.basic.comp
Shader version: 450
local_size = (1, 1, 1)
0:? Sequence
0:4 Function Definition: main(i1; (temp void)
0:4 Function Definition: main(i1;i1; (temp void)
0:4 Function Parameters:
0:4 'dti' (in int LocalInvocationID)
0:4 'dti' (in int GlobalInvocationID)
0:4 'gti' (in int LocalInvocationID)
0:? Sequence
0:5 'dti' (in int LocalInvocationID)
0:5 subtract (temp int)
0:5 'dti' (in int GlobalInvocationID)
0:5 'gti' (in int LocalInvocationID)
0:? Linker Objects
0:? 'dti' (in int LocalInvocationID)
0:? 'dti' (in int GlobalInvocationID)
0:? 'gti' (in int LocalInvocationID)
0:? 'a' (shared 100-element array of 4-component vector of float)
@ -18,41 +22,51 @@ Linked compute stage:
Shader version: 450
local_size = (1, 1, 1)
0:? Sequence
0:4 Function Definition: main(i1; (temp void)
0:4 Function Definition: main(i1;i1; (temp void)
0:4 Function Parameters:
0:4 'dti' (in int LocalInvocationID)
0:4 'dti' (in int GlobalInvocationID)
0:4 'gti' (in int LocalInvocationID)
0:? Sequence
0:5 'dti' (in int LocalInvocationID)
0:5 subtract (temp int)
0:5 'dti' (in int GlobalInvocationID)
0:5 'gti' (in int LocalInvocationID)
0:? Linker Objects
0:? 'dti' (in int LocalInvocationID)
0:? 'dti' (in int GlobalInvocationID)
0:? 'gti' (in int LocalInvocationID)
0:? 'a' (shared 100-element array of 4-component vector of float)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 16
// Id's are bound by 20
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main" 8
EntryPoint GLCompute 4 "main" 8 10
ExecutionMode 4 LocalSize 1 1 1
Name 4 "main"
Name 8 "dti"
Name 15 "a"
Decorate 8(dti) BuiltIn LocalInvocationId
Name 10 "gti"
Name 19 "a"
Decorate 8(dti) BuiltIn GlobalInvocationId
Decorate 10(gti) BuiltIn LocalInvocationId
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
7: TypePointer Input 6(int)
8(dti): 7(ptr) Variable Input
9: TypeFloat 32
10: TypeVector 9(float) 4
11: TypeInt 32 0
12: 11(int) Constant 100
13: TypeArray 10(fvec4) 12
14: TypePointer Workgroup 13
15(a): 14(ptr) Variable Workgroup
10(gti): 7(ptr) Variable Input
13: TypeFloat 32
14: TypeVector 13(float) 4
15: TypeInt 32 0
16: 15(int) Constant 100
17: TypeArray 14(fvec4) 16
18: TypePointer Workgroup 17
19(a): 18(ptr) Variable Workgroup
4(main): 2 Function None 3
5: Label
9: 6(int) Load 8(dti)
11: 6(int) Load 10(gti)
12: 6(int) ISub 9 11
Return
FunctionEnd

View File

@ -9,7 +9,7 @@ output primitive = line_strip
0:16 Function Parameters:
0:16 'VertexID' (layout(location=0 ) in 3-element array of uint)
0:16 'test' (layout(location=3 ) in 3-element array of uint)
0:16 'OutputStream' (out structure{temp float myfloat, temp int something})
0:16 'OutputStream' (layout(location=0 ) out structure{temp float myfloat, temp int something})
0:? Sequence
0:19 move second child to first child (temp float)
0:19 myfloat: direct index for structure (temp float)
@ -43,20 +43,19 @@ output primitive = line_strip
0:20 0 (const int)
0:22 Sequence
0:22 move second child to first child (temp structure{temp float myfloat, temp int something})
0:22 'OutputStream' (out structure{temp float myfloat, temp int something})
0:22 'OutputStream' (layout(location=0 ) out structure{temp float myfloat, temp int something})
0:22 'Vert' (temp structure{temp float myfloat, temp int something})
0:22 EmitVertex (temp void)
0:23 Sequence
0:23 move second child to first child (temp structure{temp float myfloat, temp int something})
0:23 'OutputStream' (out structure{temp float myfloat, temp int something})
0:23 'OutputStream' (layout(location=0 ) out structure{temp float myfloat, temp int something})
0:23 'Vert' (temp structure{temp float myfloat, temp int something})
0:23 EmitVertex (temp void)
0:24 EndPrimitive (temp void)
0:? Linker Objects
0:? 'VertexID' (layout(location=0 ) in 3-element array of uint)
0:? 'test' (layout(location=3 ) in 3-element array of uint)
0:? 'myfloat' (layout(location=0 ) out float)
0:? 'something' (layout(location=1 ) out int)
0:? 'OutputStream' (layout(location=0 ) out structure{temp float myfloat, temp int something})
Linked geometry stage:
@ -72,7 +71,7 @@ output primitive = line_strip
0:16 Function Parameters:
0:16 'VertexID' (layout(location=0 ) in 3-element array of uint)
0:16 'test' (layout(location=3 ) in 3-element array of uint)
0:16 'OutputStream' (out structure{temp float myfloat, temp int something})
0:16 'OutputStream' (layout(location=0 ) out structure{temp float myfloat, temp int something})
0:? Sequence
0:19 move second child to first child (temp float)
0:19 myfloat: direct index for structure (temp float)
@ -106,29 +105,28 @@ output primitive = line_strip
0:20 0 (const int)
0:22 Sequence
0:22 move second child to first child (temp structure{temp float myfloat, temp int something})
0:22 'OutputStream' (out structure{temp float myfloat, temp int something})
0:22 'OutputStream' (layout(location=0 ) out structure{temp float myfloat, temp int something})
0:22 'Vert' (temp structure{temp float myfloat, temp int something})
0:22 EmitVertex (temp void)
0:23 Sequence
0:23 move second child to first child (temp structure{temp float myfloat, temp int something})
0:23 'OutputStream' (out structure{temp float myfloat, temp int something})
0:23 'OutputStream' (layout(location=0 ) out structure{temp float myfloat, temp int something})
0:23 'Vert' (temp structure{temp float myfloat, temp int something})
0:23 EmitVertex (temp void)
0:24 EndPrimitive (temp void)
0:? Linker Objects
0:? 'VertexID' (layout(location=0 ) in 3-element array of uint)
0:? 'test' (layout(location=3 ) in 3-element array of uint)
0:? 'myfloat' (layout(location=0 ) out float)
0:? 'something' (layout(location=1 ) out int)
0:? 'OutputStream' (layout(location=0 ) out structure{temp float myfloat, temp int something})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 45
// Id's are bound by 41
Capability Geometry
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 16 31 38 42 44
EntryPoint Geometry 4 "main" 16 31 38
ExecutionMode 4 Triangles
ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputLineStrip
@ -141,12 +139,9 @@ output primitive = line_strip
Name 16 "test"
Name 31 "VertexID"
Name 38 "OutputStream"
Name 42 "myfloat"
Name 44 "something"
Decorate 16(test) Location 3
Decorate 31(VertexID) Location 0
Decorate 42(myfloat) Location 0
Decorate 44(something) Location 1
Decorate 38(OutputStream) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -167,10 +162,6 @@ output primitive = line_strip
35: TypePointer Function 7(int)
37: TypePointer Output 8(PSInput)
38(OutputStream): 37(ptr) Variable Output
41: TypePointer Output 6(float)
42(myfloat): 41(ptr) Variable Output
43: TypePointer Output 7(int)
44(something): 43(ptr) Variable Output
4(main): 2 Function None 3
5: Label
10(Vert): 9(ptr) Variable Function

View File

@ -4,27 +4,27 @@ gl_FragCoord origin is upper left
0:? Sequence
0:8 Function Definition: fun(struct-InParam-vf2-vf4-vi21; (temp float)
0:8 Function Parameters:
0:8 'p' (in structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:8 'p' (temp structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:? Sequence
0:9 Branch: Return with expression
0:9 add (temp float)
0:9 direct index (temp float)
0:9 v: direct index for structure (temp 2-component vector of float)
0:9 'p' (in structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:9 'p' (temp structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:9 Constant:
0:9 0 (const int)
0:9 Constant:
0:9 1 (const int)
0:9 direct index (temp float)
0:9 fragCoord: direct index for structure (temp 4-component vector of float FragCoord)
0:9 'p' (in structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:9 fragCoord: direct index for structure (temp 4-component vector of float)
0:9 'p' (temp structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:9 Constant:
0:9 1 (const int)
0:9 Constant:
0:9 0 (const int)
0:13 Function Definition: PixelShaderFunction(struct-InParam-vf2-vf4-vi21; (temp 4-component vector of float)
0:13 Function Parameters:
0:13 'i' (in structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:13 'i' (in structure{temp 2-component vector of float v, temp 4-component vector of float FragCoord fragCoord, temp 2-component vector of int i2})
0:? Sequence
0:15 Sequence
0:15 move second child to first child (temp 2-component vector of float)
@ -32,19 +32,25 @@ gl_FragCoord origin is upper left
0:15 'local' (temp structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:15 Constant:
0:15 0 (const int)
0:? 'v' (layout(location=0 ) in 2-component vector of float)
0:15 v: direct index for structure (temp 2-component vector of float)
0:15 'i' (layout(location=0 ) in structure{temp 2-component vector of float v, temp 2-component vector of int i2})
0:15 Constant:
0:15 0 (const int)
0:15 move second child to first child (temp 4-component vector of float)
0:15 fragCoord: direct index for structure (temp 4-component vector of float)
0:15 'local' (temp structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:15 Constant:
0:15 1 (const int)
0:? 'fragCoord' (in 4-component vector of float FragCoord)
0:? 'i_fragCoord' (in 4-component vector of float FragCoord)
0:15 move second child to first child (temp 2-component vector of int)
0:15 i2: direct index for structure (temp 2-component vector of int)
0:15 'local' (temp structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:15 Constant:
0:15 2 (const int)
0:? 'i2' (layout(location=1 ) in 2-component vector of int)
0:15 i2: direct index for structure (temp 2-component vector of int)
0:15 'i' (layout(location=0 ) in structure{temp 2-component vector of float v, temp 2-component vector of int i2})
0:15 Constant:
0:15 1 (const int)
0:16 Sequence
0:16 move second child to first child (temp float)
0:16 'ret1' (temp float)
@ -54,27 +60,33 @@ gl_FragCoord origin is upper left
0:17 move second child to first child (temp float)
0:17 'ret2' (temp float)
0:17 Function Call: fun(struct-InParam-vf2-vf4-vi21; (temp float)
0:17 Comma (temp structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:17 Comma (temp structure{temp 2-component vector of float v, temp 4-component vector of float FragCoord fragCoord, temp 2-component vector of int i2})
0:17 Sequence
0:17 move second child to first child (temp 2-component vector of float)
0:17 v: direct index for structure (temp 2-component vector of float)
0:17 'aggShadow' (temp structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:17 'aggShadow' (temp structure{temp 2-component vector of float v, temp 4-component vector of float FragCoord fragCoord, temp 2-component vector of int i2})
0:17 Constant:
0:17 0 (const int)
0:17 v: direct index for structure (temp 2-component vector of float)
0:17 'i' (layout(location=0 ) in structure{temp 2-component vector of float v, temp 2-component vector of int i2})
0:17 Constant:
0:17 0 (const int)
0:? 'v' (layout(location=0 ) in 2-component vector of float)
0:17 move second child to first child (temp 4-component vector of float)
0:17 fragCoord: direct index for structure (temp 4-component vector of float)
0:17 'aggShadow' (temp structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:17 fragCoord: direct index for structure (temp 4-component vector of float FragCoord)
0:17 'aggShadow' (temp structure{temp 2-component vector of float v, temp 4-component vector of float FragCoord fragCoord, temp 2-component vector of int i2})
0:17 Constant:
0:17 1 (const int)
0:? 'fragCoord' (in 4-component vector of float FragCoord)
0:? 'i_fragCoord' (in 4-component vector of float FragCoord)
0:17 move second child to first child (temp 2-component vector of int)
0:17 i2: direct index for structure (temp 2-component vector of int)
0:17 'aggShadow' (temp structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:17 'aggShadow' (temp structure{temp 2-component vector of float v, temp 4-component vector of float FragCoord fragCoord, temp 2-component vector of int i2})
0:17 Constant:
0:17 2 (const int)
0:? 'i2' (layout(location=1 ) in 2-component vector of int)
0:17 'aggShadow' (temp structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:17 i2: direct index for structure (temp 2-component vector of int)
0:17 'i' (layout(location=0 ) in structure{temp 2-component vector of float v, temp 2-component vector of int i2})
0:17 Constant:
0:17 1 (const int)
0:17 'aggShadow' (temp structure{temp 2-component vector of float v, temp 4-component vector of float FragCoord fragCoord, temp 2-component vector of int i2})
0:19 Sequence
0:19 move second child to first child (temp 4-component vector of float)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
@ -89,9 +101,8 @@ gl_FragCoord origin is upper left
0:19 Branch: Return
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:? 'v' (layout(location=0 ) in 2-component vector of float)
0:? 'fragCoord' (in 4-component vector of float FragCoord)
0:? 'i2' (layout(location=1 ) in 2-component vector of int)
0:? 'i' (layout(location=0 ) in structure{temp 2-component vector of float v, temp 2-component vector of int i2})
0:? 'i_fragCoord' (in 4-component vector of float FragCoord)
Linked fragment stage:
@ -102,27 +113,27 @@ gl_FragCoord origin is upper left
0:? Sequence
0:8 Function Definition: fun(struct-InParam-vf2-vf4-vi21; (temp float)
0:8 Function Parameters:
0:8 'p' (in structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:8 'p' (temp structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:? Sequence
0:9 Branch: Return with expression
0:9 add (temp float)
0:9 direct index (temp float)
0:9 v: direct index for structure (temp 2-component vector of float)
0:9 'p' (in structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:9 'p' (temp structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:9 Constant:
0:9 0 (const int)
0:9 Constant:
0:9 1 (const int)
0:9 direct index (temp float)
0:9 fragCoord: direct index for structure (temp 4-component vector of float FragCoord)
0:9 'p' (in structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:9 fragCoord: direct index for structure (temp 4-component vector of float)
0:9 'p' (temp structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:9 Constant:
0:9 1 (const int)
0:9 Constant:
0:9 0 (const int)
0:13 Function Definition: PixelShaderFunction(struct-InParam-vf2-vf4-vi21; (temp 4-component vector of float)
0:13 Function Parameters:
0:13 'i' (in structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:13 'i' (in structure{temp 2-component vector of float v, temp 4-component vector of float FragCoord fragCoord, temp 2-component vector of int i2})
0:? Sequence
0:15 Sequence
0:15 move second child to first child (temp 2-component vector of float)
@ -130,19 +141,25 @@ gl_FragCoord origin is upper left
0:15 'local' (temp structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:15 Constant:
0:15 0 (const int)
0:? 'v' (layout(location=0 ) in 2-component vector of float)
0:15 v: direct index for structure (temp 2-component vector of float)
0:15 'i' (layout(location=0 ) in structure{temp 2-component vector of float v, temp 2-component vector of int i2})
0:15 Constant:
0:15 0 (const int)
0:15 move second child to first child (temp 4-component vector of float)
0:15 fragCoord: direct index for structure (temp 4-component vector of float)
0:15 'local' (temp structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:15 Constant:
0:15 1 (const int)
0:? 'fragCoord' (in 4-component vector of float FragCoord)
0:? 'i_fragCoord' (in 4-component vector of float FragCoord)
0:15 move second child to first child (temp 2-component vector of int)
0:15 i2: direct index for structure (temp 2-component vector of int)
0:15 'local' (temp structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:15 Constant:
0:15 2 (const int)
0:? 'i2' (layout(location=1 ) in 2-component vector of int)
0:15 i2: direct index for structure (temp 2-component vector of int)
0:15 'i' (layout(location=0 ) in structure{temp 2-component vector of float v, temp 2-component vector of int i2})
0:15 Constant:
0:15 1 (const int)
0:16 Sequence
0:16 move second child to first child (temp float)
0:16 'ret1' (temp float)
@ -152,27 +169,33 @@ gl_FragCoord origin is upper left
0:17 move second child to first child (temp float)
0:17 'ret2' (temp float)
0:17 Function Call: fun(struct-InParam-vf2-vf4-vi21; (temp float)
0:17 Comma (temp structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:17 Comma (temp structure{temp 2-component vector of float v, temp 4-component vector of float FragCoord fragCoord, temp 2-component vector of int i2})
0:17 Sequence
0:17 move second child to first child (temp 2-component vector of float)
0:17 v: direct index for structure (temp 2-component vector of float)
0:17 'aggShadow' (temp structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:17 'aggShadow' (temp structure{temp 2-component vector of float v, temp 4-component vector of float FragCoord fragCoord, temp 2-component vector of int i2})
0:17 Constant:
0:17 0 (const int)
0:17 v: direct index for structure (temp 2-component vector of float)
0:17 'i' (layout(location=0 ) in structure{temp 2-component vector of float v, temp 2-component vector of int i2})
0:17 Constant:
0:17 0 (const int)
0:? 'v' (layout(location=0 ) in 2-component vector of float)
0:17 move second child to first child (temp 4-component vector of float)
0:17 fragCoord: direct index for structure (temp 4-component vector of float)
0:17 'aggShadow' (temp structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:17 fragCoord: direct index for structure (temp 4-component vector of float FragCoord)
0:17 'aggShadow' (temp structure{temp 2-component vector of float v, temp 4-component vector of float FragCoord fragCoord, temp 2-component vector of int i2})
0:17 Constant:
0:17 1 (const int)
0:? 'fragCoord' (in 4-component vector of float FragCoord)
0:? 'i_fragCoord' (in 4-component vector of float FragCoord)
0:17 move second child to first child (temp 2-component vector of int)
0:17 i2: direct index for structure (temp 2-component vector of int)
0:17 'aggShadow' (temp structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:17 'aggShadow' (temp structure{temp 2-component vector of float v, temp 4-component vector of float FragCoord fragCoord, temp 2-component vector of int i2})
0:17 Constant:
0:17 2 (const int)
0:? 'i2' (layout(location=1 ) in 2-component vector of int)
0:17 'aggShadow' (temp structure{temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
0:17 i2: direct index for structure (temp 2-component vector of int)
0:17 'i' (layout(location=0 ) in structure{temp 2-component vector of float v, temp 2-component vector of int i2})
0:17 Constant:
0:17 1 (const int)
0:17 'aggShadow' (temp structure{temp 2-component vector of float v, temp 4-component vector of float FragCoord fragCoord, temp 2-component vector of int i2})
0:19 Sequence
0:19 move second child to first child (temp 4-component vector of float)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
@ -187,18 +210,17 @@ gl_FragCoord origin is upper left
0:19 Branch: Return
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:? 'v' (layout(location=0 ) in 2-component vector of float)
0:? 'fragCoord' (in 4-component vector of float FragCoord)
0:? 'i2' (layout(location=1 ) in 2-component vector of int)
0:? 'i' (layout(location=0 ) in structure{temp 2-component vector of float v, temp 2-component vector of int i2})
0:? 'i_fragCoord' (in 4-component vector of float FragCoord)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 71
// Id's are bound by 78
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "PixelShaderFunction" 32 37 43 63
EntryPoint Fragment 4 "PixelShaderFunction" 33 40 70
ExecutionMode 4 OriginUpperLeft
Name 4 "PixelShaderFunction"
Name 11 "InParam"
@ -208,19 +230,25 @@ gl_FragCoord origin is upper left
Name 15 "fun(struct-InParam-vf2-vf4-vi21;"
Name 14 "p"
Name 30 "local"
Name 32 "v"
Name 37 "fragCoord"
Name 43 "i2"
Name 47 "ret1"
Name 48 "param"
Name 51 "ret2"
Name 52 "aggShadow"
Name 59 "param"
Name 63 "@entryPointOutput"
Decorate 32(v) Location 0
Decorate 37(fragCoord) BuiltIn FragCoord
Decorate 43(i2) Location 1
Decorate 63(@entryPointOutput) Location 0
Name 31 "InParam"
MemberName 31(InParam) 0 "v"
MemberName 31(InParam) 1 "i2"
Name 33 "i"
Name 40 "i_fragCoord"
Name 50 "ret1"
Name 51 "param"
Name 54 "ret2"
Name 55 "InParam"
MemberName 55(InParam) 0 "v"
MemberName 55(InParam) 1 "fragCoord"
MemberName 55(InParam) 2 "i2"
Name 57 "aggShadow"
Name 66 "param"
Name 70 "@entryPointOutput"
Decorate 33(i) Location 0
Decorate 40(i_fragCoord) BuiltIn FragCoord
MemberDecorate 55(InParam) 1 BuiltIn FragCoord
Decorate 70(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -237,59 +265,66 @@ gl_FragCoord origin is upper left
20: TypePointer Function 6(float)
23: 9(int) Constant 1
24: 18(int) Constant 0
31: TypePointer Input 7(fvec2)
32(v): 31(ptr) Variable Input
34: TypePointer Function 7(fvec2)
36: TypePointer Input 8(fvec4)
37(fragCoord): 36(ptr) Variable Input
39: TypePointer Function 8(fvec4)
41: 9(int) Constant 2
42: TypePointer Input 10(ivec2)
43(i2): 42(ptr) Variable Input
45: TypePointer Function 10(ivec2)
62: TypePointer Output 8(fvec4)
63(@entryPointOutput): 62(ptr) Variable Output
31(InParam): TypeStruct 7(fvec2) 10(ivec2)
32: TypePointer Input 31(InParam)
33(i): 32(ptr) Variable Input
34: TypePointer Input 7(fvec2)
37: TypePointer Function 7(fvec2)
39: TypePointer Input 8(fvec4)
40(i_fragCoord): 39(ptr) Variable Input
42: TypePointer Function 8(fvec4)
44: 9(int) Constant 2
45: TypePointer Input 10(ivec2)
48: TypePointer Function 10(ivec2)
55(InParam): TypeStruct 7(fvec2) 8(fvec4) 10(ivec2)
56: TypePointer Function 55(InParam)
69: TypePointer Output 8(fvec4)
70(@entryPointOutput): 69(ptr) Variable Output
4(PixelShaderFunction): 2 Function None 3
5: Label
30(local): 12(ptr) Variable Function
47(ret1): 20(ptr) Variable Function
48(param): 12(ptr) Variable Function
51(ret2): 20(ptr) Variable Function
52(aggShadow): 12(ptr) Variable Function
59(param): 12(ptr) Variable Function
33: 7(fvec2) Load 32(v)
35: 34(ptr) AccessChain 30(local) 17
Store 35 33
38: 8(fvec4) Load 37(fragCoord)
40: 39(ptr) AccessChain 30(local) 23
Store 40 38
44: 10(ivec2) Load 43(i2)
46: 45(ptr) AccessChain 30(local) 41
Store 46 44
49: 11(InParam) Load 30(local)
Store 48(param) 49
50: 6(float) FunctionCall 15(fun(struct-InParam-vf2-vf4-vi21;) 48(param)
Store 47(ret1) 50
53: 7(fvec2) Load 32(v)
54: 34(ptr) AccessChain 52(aggShadow) 17
Store 54 53
55: 8(fvec4) Load 37(fragCoord)
56: 39(ptr) AccessChain 52(aggShadow) 23
Store 56 55
57: 10(ivec2) Load 43(i2)
58: 45(ptr) AccessChain 52(aggShadow) 41
Store 58 57
60: 11(InParam) Load 52(aggShadow)
Store 59(param) 60
61: 6(float) FunctionCall 15(fun(struct-InParam-vf2-vf4-vi21;) 59(param)
Store 51(ret2) 61
64: 39(ptr) AccessChain 30(local) 23
65: 8(fvec4) Load 64
66: 6(float) Load 47(ret1)
67: 8(fvec4) VectorTimesScalar 65 66
68: 6(float) Load 51(ret2)
69: 8(fvec4) VectorTimesScalar 67 68
Store 63(@entryPointOutput) 69
50(ret1): 20(ptr) Variable Function
51(param): 12(ptr) Variable Function
54(ret2): 20(ptr) Variable Function
57(aggShadow): 56(ptr) Variable Function
66(param): 56(ptr) Variable Function
35: 34(ptr) AccessChain 33(i) 17
36: 7(fvec2) Load 35
38: 37(ptr) AccessChain 30(local) 17
Store 38 36
41: 8(fvec4) Load 40(i_fragCoord)
43: 42(ptr) AccessChain 30(local) 23
Store 43 41
46: 45(ptr) AccessChain 33(i) 23
47: 10(ivec2) Load 46
49: 48(ptr) AccessChain 30(local) 44
Store 49 47
52: 11(InParam) Load 30(local)
Store 51(param) 52
53: 6(float) FunctionCall 15(fun(struct-InParam-vf2-vf4-vi21;) 51(param)
Store 50(ret1) 53
58: 34(ptr) AccessChain 33(i) 17
59: 7(fvec2) Load 58
60: 37(ptr) AccessChain 57(aggShadow) 17
Store 60 59
61: 8(fvec4) Load 40(i_fragCoord)
62: 42(ptr) AccessChain 57(aggShadow) 23
Store 62 61
63: 45(ptr) AccessChain 33(i) 23
64: 10(ivec2) Load 63
65: 48(ptr) AccessChain 57(aggShadow) 44
Store 65 64
67: 55(InParam) Load 57(aggShadow)
Store 66(param) 67
68: 6(float) FunctionCall 15(fun(struct-InParam-vf2-vf4-vi21;) 66(param)
Store 54(ret2) 68
71: 42(ptr) AccessChain 30(local) 23
72: 8(fvec4) Load 71
73: 6(float) Load 50(ret1)
74: 8(fvec4) VectorTimesScalar 72 73
75: 6(float) Load 54(ret2)
76: 8(fvec4) VectorTimesScalar 74 75
Store 70(@entryPointOutput) 76
Return
FunctionEnd
15(fun(struct-InParam-vf2-vf4-vi21;): 6(float) Function None 13

View File

@ -1,7 +1,7 @@
hlsl.gather.basic.dx10.vert
Shader version: 450
0:? Sequence
0:28 Function Definition: main( (temp structure{temp 4-component vector of float Pos})
0:28 Function Definition: main( (temp structure{temp 4-component vector of float Position Pos})
0:28 Function Parameters:
0:? Sequence
0:33 Sequence
@ -87,7 +87,6 @@ Shader version: 450
0:45 0 (const int)
0:45 Branch: Return
0:? Linker Objects
0:? 'Pos' (out 4-component vector of float Position)
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
0:? 'g_sSamp2d' (uniform sampler)
0:? 'g_tTex1df4a' (layout(binding=1 ) uniform texture1D)
@ -103,6 +102,7 @@ Shader version: 450
0:? 'g_tTexcdf4' (uniform textureCube)
0:? 'g_tTexcdi4' (uniform itextureCube)
0:? 'g_tTexcdu4' (uniform utextureCube)
0:? 'PerVertex_out' (out block{out 4-component vector of float Position Pos})
Linked vertex stage:
@ -110,7 +110,7 @@ Linked vertex stage:
Shader version: 450
0:? Sequence
0:28 Function Definition: main( (temp structure{temp 4-component vector of float Pos})
0:28 Function Definition: main( (temp structure{temp 4-component vector of float Position Pos})
0:28 Function Parameters:
0:? Sequence
0:33 Sequence
@ -196,7 +196,6 @@ Shader version: 450
0:45 0 (const int)
0:45 Branch: Return
0:? Linker Objects
0:? 'Pos' (out 4-component vector of float Position)
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
0:? 'g_sSamp2d' (uniform sampler)
0:? 'g_tTex1df4a' (layout(binding=1 ) uniform texture1D)
@ -212,16 +211,17 @@ Shader version: 450
0:? 'g_tTexcdf4' (uniform textureCube)
0:? 'g_tTexcdi4' (uniform itextureCube)
0:? 'g_tTexcdu4' (uniform utextureCube)
0:? 'PerVertex_out' (out block{out 4-component vector of float Position Pos})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 121
// Id's are bound by 124
Capability Shader
Capability Sampled1D
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 97
EntryPoint Vertex 4 "main" 97 123
Name 4 "main"
Name 9 "txval20"
Name 12 "g_tTex2df4"
@ -248,6 +248,9 @@ Shader version: 450
Name 114 "g_tTex3df4"
Name 117 "g_tTex3di4"
Name 120 "g_tTex3du4"
Name 121 "PerVertex_out"
MemberName 121(PerVertex_out) 0 "Pos"
Name 123 "PerVertex_out"
Decorate 12(g_tTex2df4) DescriptorSet 0
Decorate 16(g_sSamp) DescriptorSet 0
Decorate 16(g_sSamp) Binding 0
@ -267,6 +270,8 @@ Shader version: 450
Decorate 114(g_tTex3df4) DescriptorSet 0
Decorate 117(g_tTex3di4) DescriptorSet 0
Decorate 120(g_tTex3du4) DescriptorSet 0
MemberDecorate 121(PerVertex_out) 0 BuiltIn Position
Decorate 121(PerVertex_out) Block
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -349,6 +354,9 @@ Shader version: 450
118: TypeImage 41(int) 3D sampled format:Unknown
119: TypePointer UniformConstant 118
120(g_tTex3du4): 119(ptr) Variable UniformConstant
121(PerVertex_out): TypeStruct 7(fvec4)
122: TypePointer Output 121(PerVertex_out)
123(PerVertex_out): 122(ptr) Variable Output
4(main): 2 Function None 3
5: Label
9(txval20): 8(ptr) Variable Function

View File

@ -1,7 +1,7 @@
hlsl.getdimensions.dx10.vert
Shader version: 450
0:? Sequence
0:11 Function Definition: main( (temp structure{temp 4-component vector of float Pos})
0:11 Function Definition: main( (temp structure{temp 4-component vector of float Position Pos})
0:11 Function Parameters:
0:? Sequence
0:21 Sequence
@ -46,9 +46,9 @@ Shader version: 450
0:26 0 (const int)
0:26 Branch: Return
0:? Linker Objects
0:? 'Pos' (out 4-component vector of float Position)
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
0:? 'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
0:? 'PerVertex_out' (out block{out 4-component vector of float Position Pos})
Linked vertex stage:
@ -56,7 +56,7 @@ Linked vertex stage:
Shader version: 450
0:? Sequence
0:11 Function Definition: main( (temp structure{temp 4-component vector of float Pos})
0:11 Function Definition: main( (temp structure{temp 4-component vector of float Position Pos})
0:11 Function Parameters:
0:? Sequence
0:21 Sequence
@ -101,20 +101,20 @@ Shader version: 450
0:26 0 (const int)
0:26 Branch: Return
0:? Linker Objects
0:? 'Pos' (out 4-component vector of float Position)
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
0:? 'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
0:? 'PerVertex_out' (out block{out 4-component vector of float Position Pos})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 43
// Id's are bound by 46
Capability Shader
Capability Sampled1D
Capability ImageQuery
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 36
EntryPoint Vertex 4 "main" 36 45
Name 4 "main"
Name 8 "sizeQueryTemp"
Name 12 "g_tTex1df4"
@ -126,11 +126,16 @@ Shader version: 450
Name 29 "vsout"
Name 36 "Pos"
Name 42 "g_sSamp"
Name 43 "PerVertex_out"
MemberName 43(PerVertex_out) 0 "Pos"
Name 45 "PerVertex_out"
Decorate 12(g_tTex1df4) DescriptorSet 0
Decorate 12(g_tTex1df4) Binding 0
Decorate 36(Pos) BuiltIn Position
Decorate 42(g_sSamp) DescriptorSet 0
Decorate 42(g_sSamp) Binding 0
MemberDecorate 43(PerVertex_out) 0 BuiltIn Position
Decorate 43(PerVertex_out) Block
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
@ -153,6 +158,9 @@ Shader version: 450
40: TypeSampler
41: TypePointer UniformConstant 40
42(g_sSamp): 41(ptr) Variable UniformConstant
43(PerVertex_out): TypeStruct 26(fvec4)
44: TypePointer Output 43(PerVertex_out)
45(PerVertex_out): 44(ptr) Variable Output
4(main): 2 Function None 3
5: Label
8(sizeQueryTemp): 7(ptr) Variable Function

View File

@ -1,4 +1,7 @@
hlsl.init.frag
WARNING: 0:40: 'typedef' : struct-member initializers ignored
WARNING: 0:40: 'typedef' : struct-member initializers ignored
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
@ -152,6 +155,7 @@ gl_FragCoord origin is upper left
0:? 'single2' (global structure{temp 2-component vector of uint v})
0:? 'single3' (global structure{temp structure{temp int f} s1})
0:? 'single4' (global structure{temp structure{temp 2-component vector of uint v} s1})
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(row_major std140 ) uniform float a, layout(row_major std140 ) uniform float b, layout(row_major std140 ) uniform float c})
Linked fragment stage:
@ -310,10 +314,11 @@ gl_FragCoord origin is upper left
0:? 'single2' (global structure{temp 2-component vector of uint v})
0:? 'single3' (global structure{temp structure{temp int f} s1})
0:? 'single4' (global structure{temp structure{temp 2-component vector of uint v} s1})
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(row_major std140 ) uniform float a, layout(row_major std140 ) uniform float b, layout(row_major std140 ) uniform float c})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 97
// Id's are bound by 100
Capability Shader
1: ExtInstImport "GLSL.std.450"
@ -361,8 +366,18 @@ gl_FragCoord origin is upper left
Name 90 "input"
Name 95 "c4"
Name 96 "b5"
Name 97 "Constants"
MemberName 97(Constants) 0 "a"
MemberName 97(Constants) 1 "b"
MemberName 97(Constants) 2 "c"
Name 99 ""
Decorate 88(@entryPointOutput) Location 0
Decorate 90(input) Location 0
MemberDecorate 97(Constants) 0 Offset 0
MemberDecorate 97(Constants) 1 Offset 4
MemberDecorate 97(Constants) 2 Offset 8
Decorate 97(Constants) Block
Decorate 99 DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -437,6 +452,9 @@ gl_FragCoord origin is upper left
90(input): 89(ptr) Variable Input
95(c4): 22(ptr) Variable Private
96(b5): 22(ptr) Variable Private
97(Constants): TypeStruct 6(float) 6(float) 6(float)
98: TypePointer Uniform 97(Constants)
99: 98(ptr) Variable Uniform
4(ShaderFunction): 2 Function None 3
5: Label
62(a2): 61(ptr) Variable Function

View File

@ -29,29 +29,147 @@ gl_FragCoord origin is upper left
0:20 8.000000
0:20 9.000000
0:20 10.000000
0:26 Function Definition: main( (temp structure{temp 4-component vector of float color})
0:26 Function Parameters:
0:22 Constant:
0:22 10.000000
0:25 Sequence
0:25 move second child to first child (temp float)
0:25 'n' (temp float)
0:25 Constant:
0:25 0.000000
0:26 Sequence
0:26 move second child to first child (temp 8-element array of 3-component vector of float)
0:26 'a' (const (read only) 8-element array of 3-component vector of float)
0:26 Construct vec3 (temp 8-element array of 3-component vector of float)
0:27 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? 0.577350
0:? 0.577350
0:? 0.577350
0:27 add second child into first child (temp float)
0:27 'n' (temp float)
0:27 Constant:
0:27 1.000000
0:28 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? -0.577350
0:? -0.577350
0:28 add second child into first child (temp float)
0:28 'n' (temp float)
0:28 Constant:
0:28 1.000000
0:29 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? -0.577350
0:? 0.577350
0:29 add second child into first child (temp float)
0:29 'n' (temp float)
0:29 Constant:
0:29 1.000000
0:30 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? 0.577350
0:? -0.577350
0:30 add second child into first child (temp float)
0:30 'n' (temp float)
0:30 Constant:
0:30 1.000000
0:31 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? 0.577350
0:? 0.577350
0:31 add second child into first child (temp float)
0:31 'n' (temp float)
0:31 Constant:
0:31 1.000000
0:32 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? 0.577350
0:? -0.577350
0:? -0.577350
0:32 add second child into first child (temp float)
0:32 'n' (temp float)
0:32 Constant:
0:32 1.000000
0:33 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? 0.577350
0:? -0.577350
0:? 0.577350
0:33 add second child into first child (temp float)
0:33 'n' (temp float)
0:33 Constant:
0:33 1.000000
0:34 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? 0.577350
0:? 0.577350
0:? -0.577350
0:34 add second child into first child (temp float)
0:34 'n' (temp float)
0:34 Constant:
0:34 1.000000
0:36 Sequence
0:36 move second child to first child (temp structure{temp 3-component vector of float a})
0:36 'oneNonConst' (const (read only) structure{temp 3-component vector of float a})
0:36 Construct structure (temp structure{temp 3-component vector of float a})
0:36 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? 0.577350
0:? 0.577350
0:36 add second child into first child (temp float)
0:36 'n' (temp float)
0:36 Constant:
0:36 1.000000
0:38 Sequence
0:38 move second child to first child (temp structure{temp 3-component vector of float a, temp 3-component vector of float b})
0:38 'twoNonConst' (const (read only) structure{temp 3-component vector of float a, temp 3-component vector of float b})
0:38 Construct structure (temp structure{temp 3-component vector of float a, temp 3-component vector of float b})
0:38 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? 0.577350
0:? 0.577350
0:38 add second child into first child (temp float)
0:38 'n' (temp float)
0:38 Constant:
0:38 1.000000
0:39 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? 0.577350
0:? 0.577350
0:39 add second child into first child (temp float)
0:39 'n' (temp float)
0:39 Constant:
0:39 1.000000
0:45 Function Definition: main( (temp structure{temp 4-component vector of float color})
0:45 Function Parameters:
0:? Sequence
0:27 Function Call: Test1( (temp void)
0:30 move second child to first child (temp 4-component vector of float)
0:30 color: direct index for structure (temp 4-component vector of float)
0:30 'ps_output' (temp structure{temp 4-component vector of float color})
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 1.000000
0:30 1.000000
0:30 1.000000
0:30 1.000000
0:31 Sequence
0:31 Sequence
0:31 move second child to first child (temp 4-component vector of float)
0:46 Function Call: Test1( (temp void)
0:49 move second child to first child (temp 4-component vector of float)
0:49 color: direct index for structure (temp 4-component vector of float)
0:49 'ps_output' (temp structure{temp 4-component vector of float color})
0:49 Constant:
0:49 0 (const int)
0:49 Constant:
0:49 1.000000
0:49 1.000000
0:49 1.000000
0:49 1.000000
0:50 Sequence
0:50 Sequence
0:50 move second child to first child (temp 4-component vector of float)
0:? 'color' (layout(location=0 ) out 4-component vector of float)
0:31 color: direct index for structure (temp 4-component vector of float)
0:31 'ps_output' (temp structure{temp 4-component vector of float color})
0:31 Constant:
0:31 0 (const int)
0:31 Branch: Return
0:50 color: direct index for structure (temp 4-component vector of float)
0:50 'ps_output' (temp structure{temp 4-component vector of float color})
0:50 Constant:
0:50 0 (const int)
0:50 Branch: Return
0:? Linker Objects
0:? 'color' (layout(location=0 ) out 4-component vector of float)
@ -89,40 +207,158 @@ gl_FragCoord origin is upper left
0:20 8.000000
0:20 9.000000
0:20 10.000000
0:26 Function Definition: main( (temp structure{temp 4-component vector of float color})
0:26 Function Parameters:
0:22 Constant:
0:22 10.000000
0:25 Sequence
0:25 move second child to first child (temp float)
0:25 'n' (temp float)
0:25 Constant:
0:25 0.000000
0:26 Sequence
0:26 move second child to first child (temp 8-element array of 3-component vector of float)
0:26 'a' (const (read only) 8-element array of 3-component vector of float)
0:26 Construct vec3 (temp 8-element array of 3-component vector of float)
0:27 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? 0.577350
0:? 0.577350
0:? 0.577350
0:27 add second child into first child (temp float)
0:27 'n' (temp float)
0:27 Constant:
0:27 1.000000
0:28 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? -0.577350
0:? -0.577350
0:28 add second child into first child (temp float)
0:28 'n' (temp float)
0:28 Constant:
0:28 1.000000
0:29 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? -0.577350
0:? 0.577350
0:29 add second child into first child (temp float)
0:29 'n' (temp float)
0:29 Constant:
0:29 1.000000
0:30 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? 0.577350
0:? -0.577350
0:30 add second child into first child (temp float)
0:30 'n' (temp float)
0:30 Constant:
0:30 1.000000
0:31 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? 0.577350
0:? 0.577350
0:31 add second child into first child (temp float)
0:31 'n' (temp float)
0:31 Constant:
0:31 1.000000
0:32 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? 0.577350
0:? -0.577350
0:? -0.577350
0:32 add second child into first child (temp float)
0:32 'n' (temp float)
0:32 Constant:
0:32 1.000000
0:33 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? 0.577350
0:? -0.577350
0:? 0.577350
0:33 add second child into first child (temp float)
0:33 'n' (temp float)
0:33 Constant:
0:33 1.000000
0:34 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? 0.577350
0:? 0.577350
0:? -0.577350
0:34 add second child into first child (temp float)
0:34 'n' (temp float)
0:34 Constant:
0:34 1.000000
0:36 Sequence
0:36 move second child to first child (temp structure{temp 3-component vector of float a})
0:36 'oneNonConst' (const (read only) structure{temp 3-component vector of float a})
0:36 Construct structure (temp structure{temp 3-component vector of float a})
0:36 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? 0.577350
0:? 0.577350
0:36 add second child into first child (temp float)
0:36 'n' (temp float)
0:36 Constant:
0:36 1.000000
0:38 Sequence
0:38 move second child to first child (temp structure{temp 3-component vector of float a, temp 3-component vector of float b})
0:38 'twoNonConst' (const (read only) structure{temp 3-component vector of float a, temp 3-component vector of float b})
0:38 Construct structure (temp structure{temp 3-component vector of float a, temp 3-component vector of float b})
0:38 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? 0.577350
0:? 0.577350
0:38 add second child into first child (temp float)
0:38 'n' (temp float)
0:38 Constant:
0:38 1.000000
0:39 vector-scale (temp 3-component vector of float)
0:? Constant:
0:? -0.577350
0:? 0.577350
0:? 0.577350
0:39 add second child into first child (temp float)
0:39 'n' (temp float)
0:39 Constant:
0:39 1.000000
0:45 Function Definition: main( (temp structure{temp 4-component vector of float color})
0:45 Function Parameters:
0:? Sequence
0:27 Function Call: Test1( (temp void)
0:30 move second child to first child (temp 4-component vector of float)
0:30 color: direct index for structure (temp 4-component vector of float)
0:30 'ps_output' (temp structure{temp 4-component vector of float color})
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 1.000000
0:30 1.000000
0:30 1.000000
0:30 1.000000
0:31 Sequence
0:31 Sequence
0:31 move second child to first child (temp 4-component vector of float)
0:46 Function Call: Test1( (temp void)
0:49 move second child to first child (temp 4-component vector of float)
0:49 color: direct index for structure (temp 4-component vector of float)
0:49 'ps_output' (temp structure{temp 4-component vector of float color})
0:49 Constant:
0:49 0 (const int)
0:49 Constant:
0:49 1.000000
0:49 1.000000
0:49 1.000000
0:49 1.000000
0:50 Sequence
0:50 Sequence
0:50 move second child to first child (temp 4-component vector of float)
0:? 'color' (layout(location=0 ) out 4-component vector of float)
0:31 color: direct index for structure (temp 4-component vector of float)
0:31 'ps_output' (temp structure{temp 4-component vector of float color})
0:31 Constant:
0:31 0 (const int)
0:31 Branch: Return
0:50 color: direct index for structure (temp 4-component vector of float)
0:50 'ps_output' (temp structure{temp 4-component vector of float color})
0:50 Constant:
0:50 0 (const int)
0:50 Branch: Return
0:? Linker Objects
0:? 'color' (layout(location=0 ) out 4-component vector of float)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 47
// Id's are bound by 107
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 43
EntryPoint Fragment 4 "main" 103
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 6 "Test1("
@ -136,11 +372,20 @@ gl_FragCoord origin is upper left
MemberName 25(mystruct2) 1 "b"
MemberName 25(mystruct2) 2 "c"
Name 27 "test5"
Name 34 "PS_OUTPUT"
MemberName 34(PS_OUTPUT) 0 "color"
Name 36 "ps_output"
Name 43 "color"
Decorate 43(color) Location 0
Name 32 "n"
Name 39 "a"
Name 75 "one"
MemberName 75(one) 0 "a"
Name 77 "oneNonConst"
Name 82 "two"
MemberName 82(two) 0 "a"
MemberName 82(two) 1 "b"
Name 84 "twoNonConst"
Name 94 "PS_OUTPUT"
MemberName 94(PS_OUTPUT) 0 "color"
Name 96 "ps_output"
Name 103 "color"
Decorate 103(color) Location 0
2: TypeVoid
3: TypeFunction 2
8: TypeFloat 32
@ -163,24 +408,44 @@ gl_FragCoord origin is upper left
29: 8(float) Constant 1091567616
30: 8(float) Constant 1092616192
31:25(mystruct2) ConstantComposite 28 29 30
33: TypeVector 8(float) 4
34(PS_OUTPUT): TypeStruct 33(fvec4)
35: TypePointer Function 34(PS_OUTPUT)
37: TypeInt 32 1
38: 37(int) Constant 0
39: 33(fvec4) ConstantComposite 13 13 13 13
40: TypePointer Function 33(fvec4)
42: TypePointer Output 33(fvec4)
43(color): 42(ptr) Variable Output
33: 8(float) Constant 0
34: TypeVector 8(float) 3
35: TypeInt 32 0
36: 35(int) Constant 8
37: TypeArray 34(fvec3) 36
38: TypePointer Function 37
40: 8(float) Constant 1058262330
41: 34(fvec3) ConstantComposite 40 40 40
45: 8(float) Constant 3205745978
46: 34(fvec3) ConstantComposite 45 45 45
50: 34(fvec3) ConstantComposite 45 45 40
54: 34(fvec3) ConstantComposite 45 40 45
58: 34(fvec3) ConstantComposite 45 40 40
62: 34(fvec3) ConstantComposite 40 45 45
66: 34(fvec3) ConstantComposite 40 45 40
70: 34(fvec3) ConstantComposite 40 40 45
75(one): TypeStruct 34(fvec3)
76: TypePointer Function 75(one)
82(two): TypeStruct 34(fvec3) 34(fvec3)
83: TypePointer Function 82(two)
93: TypeVector 8(float) 4
94(PS_OUTPUT): TypeStruct 93(fvec4)
95: TypePointer Function 94(PS_OUTPUT)
97: TypeInt 32 1
98: 97(int) Constant 0
99: 93(fvec4) ConstantComposite 13 13 13 13
100: TypePointer Function 93(fvec4)
102: TypePointer Output 93(fvec4)
103(color): 102(ptr) Variable Output
4(main): 2 Function None 3
5: Label
36(ps_output): 35(ptr) Variable Function
32: 2 FunctionCall 6(Test1()
41: 40(ptr) AccessChain 36(ps_output) 38
Store 41 39
44: 40(ptr) AccessChain 36(ps_output) 38
45: 33(fvec4) Load 44
Store 43(color) 45
96(ps_output): 95(ptr) Variable Function
92: 2 FunctionCall 6(Test1()
101: 100(ptr) AccessChain 96(ps_output) 98
Store 101 99
104: 100(ptr) AccessChain 96(ps_output) 98
105: 93(fvec4) Load 104
Store 103(color) 105
Return
FunctionEnd
6(Test1(): 2 Function None 3
@ -189,9 +454,64 @@ gl_FragCoord origin is upper left
17(test2): 11(ptr) Variable Function
23(test4): 22(ptr) Variable Function
27(test5): 26(ptr) Variable Function
32(n): 22(ptr) Variable Function
39(a): 38(ptr) Variable Function
77(oneNonConst): 76(ptr) Variable Function
84(twoNonConst): 83(ptr) Variable Function
Store 12(test1) 16
Store 17(test2) 21
Store 23(test4) 24
Store 27(test5) 31
Store 32(n) 33
42: 8(float) Load 32(n)
43: 8(float) FAdd 42 13
Store 32(n) 43
44: 34(fvec3) VectorTimesScalar 41 43
47: 8(float) Load 32(n)
48: 8(float) FAdd 47 13
Store 32(n) 48
49: 34(fvec3) VectorTimesScalar 46 48
51: 8(float) Load 32(n)
52: 8(float) FAdd 51 13
Store 32(n) 52
53: 34(fvec3) VectorTimesScalar 50 52
55: 8(float) Load 32(n)
56: 8(float) FAdd 55 13
Store 32(n) 56
57: 34(fvec3) VectorTimesScalar 54 56
59: 8(float) Load 32(n)
60: 8(float) FAdd 59 13
Store 32(n) 60
61: 34(fvec3) VectorTimesScalar 58 60
63: 8(float) Load 32(n)
64: 8(float) FAdd 63 13
Store 32(n) 64
65: 34(fvec3) VectorTimesScalar 62 64
67: 8(float) Load 32(n)
68: 8(float) FAdd 67 13
Store 32(n) 68
69: 34(fvec3) VectorTimesScalar 66 68
71: 8(float) Load 32(n)
72: 8(float) FAdd 71 13
Store 32(n) 72
73: 34(fvec3) VectorTimesScalar 70 72
74: 37 CompositeConstruct 44 49 53 57 61 65 69 73
Store 39(a) 74
78: 8(float) Load 32(n)
79: 8(float) FAdd 78 13
Store 32(n) 79
80: 34(fvec3) VectorTimesScalar 58 79
81: 75(one) CompositeConstruct 80
Store 77(oneNonConst) 81
85: 8(float) Load 32(n)
86: 8(float) FAdd 85 13
Store 32(n) 86
87: 34(fvec3) VectorTimesScalar 58 86
88: 8(float) Load 32(n)
89: 8(float) FAdd 88 13
Store 32(n) 89
90: 34(fvec3) VectorTimesScalar 58 89
91: 82(two) CompositeConstruct 87 90
Store 84(twoNonConst) 91
Return
FunctionEnd

View File

@ -0,0 +1,111 @@
hlsl.intrinsics.d3dcolortoubyte4.frag
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:5 Function Definition: main( (temp 4-component vector of int)
0:5 Function Parameters:
0:? Sequence
0:6 Sequence
0:6 move second child to first child (temp 4-component vector of int)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of int)
0:6 Convert float to int (temp 4-component vector of int)
0:6 vector-scale (temp 4-component vector of float)
0:6 Constant:
0:6 255.001953
0:6 vector swizzle (temp 4-component vector of float)
0:6 col4: direct index for structure (layout(offset=0 ) uniform 4-component vector of float)
0:6 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float col4})
0:6 Constant:
0:6 0 (const uint)
0:6 Sequence
0:6 Constant:
0:6 2 (const int)
0:6 Constant:
0:6 1 (const int)
0:6 Constant:
0:6 0 (const int)
0:6 Constant:
0:6 3 (const int)
0:6 Branch: Return
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of int)
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float col4})
Linked fragment stage:
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:5 Function Definition: main( (temp 4-component vector of int)
0:5 Function Parameters:
0:? Sequence
0:6 Sequence
0:6 move second child to first child (temp 4-component vector of int)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of int)
0:6 Convert float to int (temp 4-component vector of int)
0:6 vector-scale (temp 4-component vector of float)
0:6 Constant:
0:6 255.001953
0:6 vector swizzle (temp 4-component vector of float)
0:6 col4: direct index for structure (layout(offset=0 ) uniform 4-component vector of float)
0:6 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float col4})
0:6 Constant:
0:6 0 (const uint)
0:6 Sequence
0:6 Constant:
0:6 2 (const int)
0:6 Constant:
0:6 1 (const int)
0:6 Constant:
0:6 0 (const int)
0:6 Constant:
0:6 3 (const int)
0:6 Branch: Return
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of int)
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float col4})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 24
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 9
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 9 "@entryPointOutput"
Name 13 "$Global"
MemberName 13($Global) 0 "col4"
Name 15 ""
Decorate 9(@entryPointOutput) Location 0
MemberDecorate 13($Global) 0 Offset 0
Decorate 13($Global) Block
Decorate 15 DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
7: TypeVector 6(int) 4
8: TypePointer Output 7(ivec4)
9(@entryPointOutput): 8(ptr) Variable Output
10: TypeFloat 32
11: 10(float) Constant 1132396672
12: TypeVector 10(float) 4
13($Global): TypeStruct 12(fvec4)
14: TypePointer Uniform 13($Global)
15: 14(ptr) Variable Uniform
16: 6(int) Constant 0
17: TypePointer Uniform 12(fvec4)
4(main): 2 Function None 3
5: Label
18: 17(ptr) AccessChain 15 16
19: 12(fvec4) Load 18
20: 12(fvec4) VectorShuffle 19 19 2 1 0 3
21: 12(fvec4) VectorTimesScalar 20 11
22: 7(ivec4) ConvertFToS 21
Store 9(@entryPointOutput) 22
Return
FunctionEnd

View File

@ -1,6 +1,10 @@
hlsl.intrinsics.negative.frag
ERROR: 0:10: 'determinant' : no matching overloaded function found
ERROR: 0:12: 'f32tof16' : unimplemented intrinsic: handle natively
ERROR: 0:23: 'length' : ambiguous best function under implicit type conversion
ERROR: 0:25: 'normalize' : ambiguous best function under implicit type conversion
ERROR: 0:26: 'reflect' : ambiguous best function under implicit type conversion
ERROR: 0:27: 'refract' : ambiguous best function under implicit type conversion
ERROR: 0:28: 'refract' : no matching overloaded function found
ERROR: 0:30: 'transpose' : no matching overloaded function found
ERROR: 0:39: 'GetRenderTargetSamplePosition' : no matching overloaded function found
@ -59,7 +63,7 @@ ERROR: 0:133: 'normalize' : no matching overloaded function found
ERROR: 0:133: 'reflect' : no matching overloaded function found
ERROR: 0:133: 'refract' : no matching overloaded function found
ERROR: 0:133: 'reversebits' : no matching overloaded function found
ERROR: 60 compilation errors. No code generated.
ERROR: 64 compilation errors. No code generated.
Shader version: 450
@ -89,9 +93,22 @@ ERROR: node is still EOpNull!
0:8 'inF0' (in float)
0:8 Construct vec3 (in 3-component vector of float)
0:8 'inF1' (in float)
0:9 Function Call: D3DCOLORtoUBYTE4(vf4; (temp 4-component vector of int)
0:9 Construct vec4 (in 4-component vector of float)
0:9 'inF0' (in float)
0:9 Convert float to int (temp 4-component vector of int)
0:9 vector-scale (temp 4-component vector of float)
0:9 Constant:
0:9 255.001953
0:9 vector swizzle (temp 4-component vector of float)
0:9 Construct vec4 (in 4-component vector of float)
0:9 'inF0' (in float)
0:9 Sequence
0:9 Constant:
0:9 2 (const int)
0:9 Constant:
0:9 1 (const int)
0:9 Constant:
0:9 0 (const int)
0:9 Constant:
0:9 3 (const int)
0:10 Constant:
0:10 0.000000
0:12 ERROR: Bad unary op
@ -445,9 +462,22 @@ ERROR: node is still EOpNull!
0:8 'inF0' (in float)
0:8 Construct vec3 (in 3-component vector of float)
0:8 'inF1' (in float)
0:9 Function Call: D3DCOLORtoUBYTE4(vf4; (temp 4-component vector of int)
0:9 Construct vec4 (in 4-component vector of float)
0:9 'inF0' (in float)
0:9 Convert float to int (temp 4-component vector of int)
0:9 vector-scale (temp 4-component vector of float)
0:9 Constant:
0:9 255.001953
0:9 vector swizzle (temp 4-component vector of float)
0:9 Construct vec4 (in 4-component vector of float)
0:9 'inF0' (in float)
0:9 Sequence
0:9 Constant:
0:9 2 (const int)
0:9 Constant:
0:9 1 (const int)
0:9 Constant:
0:9 0 (const int)
0:9 Constant:
0:9 3 (const int)
0:10 Constant:
0:10 0.000000
0:12 ERROR: Bad unary op

View File

@ -87,6 +87,7 @@ gl_FragCoord origin is upper left
Name 30 "tbufName2"
MemberName 30(tbufName2) 0 "v1PostLayout"
Name 32 ""
Name 38 "specConst"
MemberDecorate 14(tbufName) 0 Offset 16
Decorate 14(tbufName) BufferBlock
Decorate 16 DescriptorSet 3
@ -97,7 +98,7 @@ gl_FragCoord origin is upper left
Decorate 30(tbufName2) BufferBlock
Decorate 32 DescriptorSet 4
Decorate 32 Binding 7
Decorate 38 SpecId 17
Decorate 38(specConst) SpecId 17
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -117,7 +118,7 @@ gl_FragCoord origin is upper left
30(tbufName2): TypeStruct 7(fvec4)
31: TypePointer Uniform 30(tbufName2)
32: 31(ptr) Variable Uniform
38: 17(int) SpecConstant 10
38(specConst): 17(int) SpecConstant 10
4(main): 2 Function None 3
5: Label
Return

View File

@ -1,7 +1,7 @@
hlsl.load.basic.dx10.vert
Shader version: 450
0:? Sequence
0:47 Function Definition: main( (temp structure{temp 4-component vector of float Pos})
0:47 Function Definition: main( (temp structure{temp 4-component vector of float Position Pos})
0:47 Function Parameters:
0:? Sequence
0:51 textureFetch (temp 4-component vector of float)
@ -195,7 +195,6 @@ Shader version: 450
0:69 0 (const int)
0:69 Branch: Return
0:? Linker Objects
0:? 'Pos' (out 4-component vector of float Position)
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
0:? 'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
0:? 'g_tTex1di4' (uniform itexture1D)
@ -219,6 +218,7 @@ Shader version: 450
0:? 'g_tTexcdi4a' (uniform itextureCubeArray)
0:? 'g_tTexcdu4a' (uniform utextureCubeArray)
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
0:? 'PerVertex_out' (out block{out 4-component vector of float Position Pos})
Linked vertex stage:
@ -226,7 +226,7 @@ Linked vertex stage:
Shader version: 450
0:? Sequence
0:47 Function Definition: main( (temp structure{temp 4-component vector of float Pos})
0:47 Function Definition: main( (temp structure{temp 4-component vector of float Position Pos})
0:47 Function Parameters:
0:? Sequence
0:51 textureFetch (temp 4-component vector of float)
@ -420,7 +420,6 @@ Shader version: 450
0:69 0 (const int)
0:69 Branch: Return
0:? Linker Objects
0:? 'Pos' (out 4-component vector of float Position)
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
0:? 'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
0:? 'g_tTex1di4' (uniform itexture1D)
@ -444,17 +443,18 @@ Shader version: 450
0:? 'g_tTexcdi4a' (uniform itextureCubeArray)
0:? 'g_tTexcdu4a' (uniform utextureCubeArray)
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
0:? 'PerVertex_out' (out block{out 4-component vector of float Position Pos})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 166
// Id's are bound by 169
Capability Shader
Capability Sampled1D
Capability SampledCubeArray
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 123
EntryPoint Vertex 4 "main" 123 168
Name 4 "main"
Name 9 "g_tTex1df4"
Name 15 "$Global"
@ -492,6 +492,9 @@ Shader version: 450
Name 159 "g_tTexcdf4a"
Name 162 "g_tTexcdi4a"
Name 165 "g_tTexcdu4a"
Name 166 "PerVertex_out"
MemberName 166(PerVertex_out) 0 "Pos"
Name 168 "PerVertex_out"
Decorate 9(g_tTex1df4) DescriptorSet 0
Decorate 9(g_tTex1df4) Binding 0
MemberDecorate 15($Global) 0 Offset 0
@ -527,6 +530,8 @@ Shader version: 450
Decorate 159(g_tTexcdf4a) DescriptorSet 0
Decorate 162(g_tTexcdi4a) DescriptorSet 0
Decorate 165(g_tTexcdu4a) DescriptorSet 0
MemberDecorate 166(PerVertex_out) 0 BuiltIn Position
Decorate 166(PerVertex_out) Block
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -624,6 +629,9 @@ Shader version: 450
163: TypeImage 19(int) Cube array sampled format:Unknown
164: TypePointer UniformConstant 163
165(g_tTexcdu4a): 164(ptr) Variable UniformConstant
166(PerVertex_out): TypeStruct 27(fvec4)
167: TypePointer Output 166(PerVertex_out)
168(PerVertex_out): 167(ptr) Variable Output
4(main): 2 Function None 3
5: Label
116(vsout): 115(ptr) Variable Function

View File

@ -0,0 +1,818 @@
hlsl.matrixSwizzle.vert
Shader version: 450
0:? Sequence
0:2 Function Definition: ShaderFunction(f1; (temp void)
0:2 Function Parameters:
0:2 'inf' (layout(location=0 ) in float)
0:? Sequence
0:7 move second child to first child (temp float)
0:7 direct index (temp float)
0:7 direct index (temp 4-component vector of float)
0:7 'm' (temp 3X4 matrix of float)
0:7 Constant:
0:7 2 (const int)
0:7 Constant:
0:7 3 (const int)
0:7 Constant:
0:7 1.000000
0:8 move second child to first child (temp float)
0:8 direct index (temp float)
0:8 direct index (temp 4-component vector of float)
0:8 'm' (temp 3X4 matrix of float)
0:8 Constant:
0:8 2 (const int)
0:8 Constant:
0:8 3 (const int)
0:8 Constant:
0:8 2.000000
0:9 move second child to first child (temp float)
0:9 direct index (temp float)
0:9 direct index (temp 4-component vector of float)
0:9 'm' (temp 3X4 matrix of float)
0:9 Constant:
0:9 2 (const int)
0:9 Constant:
0:9 3 (const int)
0:9 Constant:
0:9 2.000000
0:11 move second child to first child (temp 4-component vector of float)
0:11 direct index (temp 4-component vector of float)
0:11 'm' (temp 3X4 matrix of float)
0:11 Constant:
0:11 0 (const int)
0:11 Constant:
0:11 3.000000
0:11 3.000000
0:11 3.000000
0:11 3.000000
0:12 move second child to first child (temp 4-component vector of float)
0:12 direct index (temp 4-component vector of float)
0:12 'm' (temp 3X4 matrix of float)
0:12 Constant:
0:12 1 (const int)
0:12 Constant:
0:12 3.000000
0:12 3.000000
0:12 3.000000
0:12 3.000000
0:13 move second child to first child (temp 4-component vector of float)
0:13 direct index (temp 4-component vector of float)
0:13 'm' (temp 3X4 matrix of float)
0:13 Constant:
0:13 1 (const int)
0:13 Constant:
0:13 3.000000
0:13 3.000000
0:13 3.000000
0:13 3.000000
0:? Sequence
0:18 move second child to first child (temp float)
0:18 direct index (temp float)
0:18 direct index (temp 4-component vector of float)
0:18 'm' (temp 3X4 matrix of float)
0:18 Constant:
0:18 0 (const int)
0:18 Constant:
0:18 0 (const int)
0:18 direct index (temp float)
0:18 'f3' (temp 3-component vector of float)
0:18 Constant:
0:18 0 (const int)
0:18 move second child to first child (temp float)
0:18 direct index (temp float)
0:18 direct index (temp 4-component vector of float)
0:18 'm' (temp 3X4 matrix of float)
0:18 Constant:
0:18 1 (const int)
0:18 Constant:
0:18 1 (const int)
0:18 direct index (temp float)
0:18 'f3' (temp 3-component vector of float)
0:18 Constant:
0:18 1 (const int)
0:18 move second child to first child (temp float)
0:18 direct index (temp float)
0:18 direct index (temp 4-component vector of float)
0:18 'm' (temp 3X4 matrix of float)
0:18 Constant:
0:18 1 (const int)
0:18 Constant:
0:18 2 (const int)
0:18 direct index (temp float)
0:18 'f3' (temp 3-component vector of float)
0:18 Constant:
0:18 2 (const int)
0:19 Sequence
0:19 move second child to first child (temp 3-component vector of float)
0:19 'intermVec' (temp 3-component vector of float)
0:19 Constant:
0:19 5.000000
0:19 5.000000
0:19 5.000000
0:19 move second child to first child (temp float)
0:19 direct index (temp float)
0:19 direct index (temp 4-component vector of float)
0:19 'm' (temp 3X4 matrix of float)
0:19 Constant:
0:19 1 (const int)
0:19 Constant:
0:19 0 (const int)
0:19 direct index (temp float)
0:19 'intermVec' (temp 3-component vector of float)
0:19 Constant:
0:19 0 (const int)
0:19 move second child to first child (temp float)
0:19 direct index (temp float)
0:19 direct index (temp 4-component vector of float)
0:19 'm' (temp 3X4 matrix of float)
0:19 Constant:
0:19 0 (const int)
0:19 Constant:
0:19 1 (const int)
0:19 direct index (temp float)
0:19 'intermVec' (temp 3-component vector of float)
0:19 Constant:
0:19 1 (const int)
0:19 move second child to first child (temp float)
0:19 direct index (temp float)
0:19 direct index (temp 4-component vector of float)
0:19 'm' (temp 3X4 matrix of float)
0:19 Constant:
0:19 2 (const int)
0:19 Constant:
0:19 0 (const int)
0:19 direct index (temp float)
0:19 'intermVec' (temp 3-component vector of float)
0:19 Constant:
0:19 2 (const int)
0:20 Sequence
0:20 move second child to first child (temp 3-component vector of float)
0:20 'intermVec' (temp 3-component vector of float)
0:20 vector-scale (temp 3-component vector of float)
0:20 Constant:
0:20 2.000000
0:20 'f3' (temp 3-component vector of float)
0:20 move second child to first child (temp float)
0:20 direct index (temp float)
0:20 direct index (temp 4-component vector of float)
0:20 'm' (temp 3X4 matrix of float)
0:20 Constant:
0:20 0 (const int)
0:20 Constant:
0:20 0 (const int)
0:20 direct index (temp float)
0:20 'intermVec' (temp 3-component vector of float)
0:20 Constant:
0:20 0 (const int)
0:20 move second child to first child (temp float)
0:20 direct index (temp float)
0:20 direct index (temp 4-component vector of float)
0:20 'm' (temp 3X4 matrix of float)
0:20 Constant:
0:20 0 (const int)
0:20 Constant:
0:20 1 (const int)
0:20 direct index (temp float)
0:20 'intermVec' (temp 3-component vector of float)
0:20 Constant:
0:20 1 (const int)
0:20 move second child to first child (temp float)
0:20 direct index (temp float)
0:20 direct index (temp 4-component vector of float)
0:20 'm' (temp 3X4 matrix of float)
0:20 Constant:
0:20 1 (const int)
0:20 Constant:
0:20 0 (const int)
0:20 direct index (temp float)
0:20 'intermVec' (temp 3-component vector of float)
0:20 Constant:
0:20 2 (const int)
0:23 move second child to first child (temp 3-component vector of float)
0:23 'f3' (temp 3-component vector of float)
0:23 matrix swizzle (temp 3-component vector of float)
0:23 'm' (temp 3X4 matrix of float)
0:23 Sequence
0:23 Constant:
0:23 1 (const int)
0:23 Constant:
0:23 0 (const int)
0:23 Constant:
0:23 0 (const int)
0:23 Constant:
0:23 1 (const int)
0:23 Constant:
0:23 2 (const int)
0:23 Constant:
0:23 0 (const int)
0:27 Function Definition: createMat3x3(vf3;vf3;vf3; (temp 3X3 matrix of float)
0:27 Function Parameters:
0:27 'a' (in 3-component vector of float)
0:27 'b' (in 3-component vector of float)
0:27 'c' (in 3-component vector of float)
0:? Sequence
0:? Sequence
0:29 move second child to first child (temp float)
0:29 direct index (temp float)
0:29 direct index (temp 3-component vector of float)
0:29 'm' (temp 3X3 matrix of float)
0:29 Constant:
0:29 0 (const int)
0:29 Constant:
0:29 0 (const int)
0:29 direct index (temp float)
0:29 'a' (in 3-component vector of float)
0:29 Constant:
0:29 0 (const int)
0:29 move second child to first child (temp float)
0:29 direct index (temp float)
0:29 direct index (temp 3-component vector of float)
0:29 'm' (temp 3X3 matrix of float)
0:29 Constant:
0:29 1 (const int)
0:29 Constant:
0:29 0 (const int)
0:29 direct index (temp float)
0:29 'a' (in 3-component vector of float)
0:29 Constant:
0:29 1 (const int)
0:29 move second child to first child (temp float)
0:29 direct index (temp float)
0:29 direct index (temp 3-component vector of float)
0:29 'm' (temp 3X3 matrix of float)
0:29 Constant:
0:29 2 (const int)
0:29 Constant:
0:29 0 (const int)
0:29 direct index (temp float)
0:29 'a' (in 3-component vector of float)
0:29 Constant:
0:29 2 (const int)
0:? Sequence
0:30 move second child to first child (temp float)
0:30 direct index (temp float)
0:30 direct index (temp 3-component vector of float)
0:30 'm' (temp 3X3 matrix of float)
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 1 (const int)
0:30 direct index (temp float)
0:30 'b' (in 3-component vector of float)
0:30 Constant:
0:30 0 (const int)
0:30 move second child to first child (temp float)
0:30 direct index (temp float)
0:30 direct index (temp 3-component vector of float)
0:30 'm' (temp 3X3 matrix of float)
0:30 Constant:
0:30 1 (const int)
0:30 Constant:
0:30 1 (const int)
0:30 direct index (temp float)
0:30 'b' (in 3-component vector of float)
0:30 Constant:
0:30 1 (const int)
0:30 move second child to first child (temp float)
0:30 direct index (temp float)
0:30 direct index (temp 3-component vector of float)
0:30 'm' (temp 3X3 matrix of float)
0:30 Constant:
0:30 2 (const int)
0:30 Constant:
0:30 1 (const int)
0:30 direct index (temp float)
0:30 'b' (in 3-component vector of float)
0:30 Constant:
0:30 2 (const int)
0:? Sequence
0:31 move second child to first child (temp float)
0:31 direct index (temp float)
0:31 direct index (temp 3-component vector of float)
0:31 'm' (temp 3X3 matrix of float)
0:31 Constant:
0:31 0 (const int)
0:31 Constant:
0:31 2 (const int)
0:31 direct index (temp float)
0:31 'c' (in 3-component vector of float)
0:31 Constant:
0:31 0 (const int)
0:31 move second child to first child (temp float)
0:31 direct index (temp float)
0:31 direct index (temp 3-component vector of float)
0:31 'm' (temp 3X3 matrix of float)
0:31 Constant:
0:31 1 (const int)
0:31 Constant:
0:31 2 (const int)
0:31 direct index (temp float)
0:31 'c' (in 3-component vector of float)
0:31 Constant:
0:31 1 (const int)
0:31 move second child to first child (temp float)
0:31 direct index (temp float)
0:31 direct index (temp 3-component vector of float)
0:31 'm' (temp 3X3 matrix of float)
0:31 Constant:
0:31 2 (const int)
0:31 Constant:
0:31 2 (const int)
0:31 direct index (temp float)
0:31 'c' (in 3-component vector of float)
0:31 Constant:
0:31 2 (const int)
0:32 Branch: Return with expression
0:32 'm' (temp 3X3 matrix of float)
0:? Linker Objects
0:? 'inf' (layout(location=0 ) in float)
Linked vertex stage:
Shader version: 450
0:? Sequence
0:2 Function Definition: ShaderFunction(f1; (temp void)
0:2 Function Parameters:
0:2 'inf' (layout(location=0 ) in float)
0:? Sequence
0:7 move second child to first child (temp float)
0:7 direct index (temp float)
0:7 direct index (temp 4-component vector of float)
0:7 'm' (temp 3X4 matrix of float)
0:7 Constant:
0:7 2 (const int)
0:7 Constant:
0:7 3 (const int)
0:7 Constant:
0:7 1.000000
0:8 move second child to first child (temp float)
0:8 direct index (temp float)
0:8 direct index (temp 4-component vector of float)
0:8 'm' (temp 3X4 matrix of float)
0:8 Constant:
0:8 2 (const int)
0:8 Constant:
0:8 3 (const int)
0:8 Constant:
0:8 2.000000
0:9 move second child to first child (temp float)
0:9 direct index (temp float)
0:9 direct index (temp 4-component vector of float)
0:9 'm' (temp 3X4 matrix of float)
0:9 Constant:
0:9 2 (const int)
0:9 Constant:
0:9 3 (const int)
0:9 Constant:
0:9 2.000000
0:11 move second child to first child (temp 4-component vector of float)
0:11 direct index (temp 4-component vector of float)
0:11 'm' (temp 3X4 matrix of float)
0:11 Constant:
0:11 0 (const int)
0:11 Constant:
0:11 3.000000
0:11 3.000000
0:11 3.000000
0:11 3.000000
0:12 move second child to first child (temp 4-component vector of float)
0:12 direct index (temp 4-component vector of float)
0:12 'm' (temp 3X4 matrix of float)
0:12 Constant:
0:12 1 (const int)
0:12 Constant:
0:12 3.000000
0:12 3.000000
0:12 3.000000
0:12 3.000000
0:13 move second child to first child (temp 4-component vector of float)
0:13 direct index (temp 4-component vector of float)
0:13 'm' (temp 3X4 matrix of float)
0:13 Constant:
0:13 1 (const int)
0:13 Constant:
0:13 3.000000
0:13 3.000000
0:13 3.000000
0:13 3.000000
0:? Sequence
0:18 move second child to first child (temp float)
0:18 direct index (temp float)
0:18 direct index (temp 4-component vector of float)
0:18 'm' (temp 3X4 matrix of float)
0:18 Constant:
0:18 0 (const int)
0:18 Constant:
0:18 0 (const int)
0:18 direct index (temp float)
0:18 'f3' (temp 3-component vector of float)
0:18 Constant:
0:18 0 (const int)
0:18 move second child to first child (temp float)
0:18 direct index (temp float)
0:18 direct index (temp 4-component vector of float)
0:18 'm' (temp 3X4 matrix of float)
0:18 Constant:
0:18 1 (const int)
0:18 Constant:
0:18 1 (const int)
0:18 direct index (temp float)
0:18 'f3' (temp 3-component vector of float)
0:18 Constant:
0:18 1 (const int)
0:18 move second child to first child (temp float)
0:18 direct index (temp float)
0:18 direct index (temp 4-component vector of float)
0:18 'm' (temp 3X4 matrix of float)
0:18 Constant:
0:18 1 (const int)
0:18 Constant:
0:18 2 (const int)
0:18 direct index (temp float)
0:18 'f3' (temp 3-component vector of float)
0:18 Constant:
0:18 2 (const int)
0:19 Sequence
0:19 move second child to first child (temp 3-component vector of float)
0:19 'intermVec' (temp 3-component vector of float)
0:19 Constant:
0:19 5.000000
0:19 5.000000
0:19 5.000000
0:19 move second child to first child (temp float)
0:19 direct index (temp float)
0:19 direct index (temp 4-component vector of float)
0:19 'm' (temp 3X4 matrix of float)
0:19 Constant:
0:19 1 (const int)
0:19 Constant:
0:19 0 (const int)
0:19 direct index (temp float)
0:19 'intermVec' (temp 3-component vector of float)
0:19 Constant:
0:19 0 (const int)
0:19 move second child to first child (temp float)
0:19 direct index (temp float)
0:19 direct index (temp 4-component vector of float)
0:19 'm' (temp 3X4 matrix of float)
0:19 Constant:
0:19 0 (const int)
0:19 Constant:
0:19 1 (const int)
0:19 direct index (temp float)
0:19 'intermVec' (temp 3-component vector of float)
0:19 Constant:
0:19 1 (const int)
0:19 move second child to first child (temp float)
0:19 direct index (temp float)
0:19 direct index (temp 4-component vector of float)
0:19 'm' (temp 3X4 matrix of float)
0:19 Constant:
0:19 2 (const int)
0:19 Constant:
0:19 0 (const int)
0:19 direct index (temp float)
0:19 'intermVec' (temp 3-component vector of float)
0:19 Constant:
0:19 2 (const int)
0:20 Sequence
0:20 move second child to first child (temp 3-component vector of float)
0:20 'intermVec' (temp 3-component vector of float)
0:20 vector-scale (temp 3-component vector of float)
0:20 Constant:
0:20 2.000000
0:20 'f3' (temp 3-component vector of float)
0:20 move second child to first child (temp float)
0:20 direct index (temp float)
0:20 direct index (temp 4-component vector of float)
0:20 'm' (temp 3X4 matrix of float)
0:20 Constant:
0:20 0 (const int)
0:20 Constant:
0:20 0 (const int)
0:20 direct index (temp float)
0:20 'intermVec' (temp 3-component vector of float)
0:20 Constant:
0:20 0 (const int)
0:20 move second child to first child (temp float)
0:20 direct index (temp float)
0:20 direct index (temp 4-component vector of float)
0:20 'm' (temp 3X4 matrix of float)
0:20 Constant:
0:20 0 (const int)
0:20 Constant:
0:20 1 (const int)
0:20 direct index (temp float)
0:20 'intermVec' (temp 3-component vector of float)
0:20 Constant:
0:20 1 (const int)
0:20 move second child to first child (temp float)
0:20 direct index (temp float)
0:20 direct index (temp 4-component vector of float)
0:20 'm' (temp 3X4 matrix of float)
0:20 Constant:
0:20 1 (const int)
0:20 Constant:
0:20 0 (const int)
0:20 direct index (temp float)
0:20 'intermVec' (temp 3-component vector of float)
0:20 Constant:
0:20 2 (const int)
0:23 move second child to first child (temp 3-component vector of float)
0:23 'f3' (temp 3-component vector of float)
0:23 matrix swizzle (temp 3-component vector of float)
0:23 'm' (temp 3X4 matrix of float)
0:23 Sequence
0:23 Constant:
0:23 1 (const int)
0:23 Constant:
0:23 0 (const int)
0:23 Constant:
0:23 0 (const int)
0:23 Constant:
0:23 1 (const int)
0:23 Constant:
0:23 2 (const int)
0:23 Constant:
0:23 0 (const int)
0:27 Function Definition: createMat3x3(vf3;vf3;vf3; (temp 3X3 matrix of float)
0:27 Function Parameters:
0:27 'a' (in 3-component vector of float)
0:27 'b' (in 3-component vector of float)
0:27 'c' (in 3-component vector of float)
0:? Sequence
0:? Sequence
0:29 move second child to first child (temp float)
0:29 direct index (temp float)
0:29 direct index (temp 3-component vector of float)
0:29 'm' (temp 3X3 matrix of float)
0:29 Constant:
0:29 0 (const int)
0:29 Constant:
0:29 0 (const int)
0:29 direct index (temp float)
0:29 'a' (in 3-component vector of float)
0:29 Constant:
0:29 0 (const int)
0:29 move second child to first child (temp float)
0:29 direct index (temp float)
0:29 direct index (temp 3-component vector of float)
0:29 'm' (temp 3X3 matrix of float)
0:29 Constant:
0:29 1 (const int)
0:29 Constant:
0:29 0 (const int)
0:29 direct index (temp float)
0:29 'a' (in 3-component vector of float)
0:29 Constant:
0:29 1 (const int)
0:29 move second child to first child (temp float)
0:29 direct index (temp float)
0:29 direct index (temp 3-component vector of float)
0:29 'm' (temp 3X3 matrix of float)
0:29 Constant:
0:29 2 (const int)
0:29 Constant:
0:29 0 (const int)
0:29 direct index (temp float)
0:29 'a' (in 3-component vector of float)
0:29 Constant:
0:29 2 (const int)
0:? Sequence
0:30 move second child to first child (temp float)
0:30 direct index (temp float)
0:30 direct index (temp 3-component vector of float)
0:30 'm' (temp 3X3 matrix of float)
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 1 (const int)
0:30 direct index (temp float)
0:30 'b' (in 3-component vector of float)
0:30 Constant:
0:30 0 (const int)
0:30 move second child to first child (temp float)
0:30 direct index (temp float)
0:30 direct index (temp 3-component vector of float)
0:30 'm' (temp 3X3 matrix of float)
0:30 Constant:
0:30 1 (const int)
0:30 Constant:
0:30 1 (const int)
0:30 direct index (temp float)
0:30 'b' (in 3-component vector of float)
0:30 Constant:
0:30 1 (const int)
0:30 move second child to first child (temp float)
0:30 direct index (temp float)
0:30 direct index (temp 3-component vector of float)
0:30 'm' (temp 3X3 matrix of float)
0:30 Constant:
0:30 2 (const int)
0:30 Constant:
0:30 1 (const int)
0:30 direct index (temp float)
0:30 'b' (in 3-component vector of float)
0:30 Constant:
0:30 2 (const int)
0:? Sequence
0:31 move second child to first child (temp float)
0:31 direct index (temp float)
0:31 direct index (temp 3-component vector of float)
0:31 'm' (temp 3X3 matrix of float)
0:31 Constant:
0:31 0 (const int)
0:31 Constant:
0:31 2 (const int)
0:31 direct index (temp float)
0:31 'c' (in 3-component vector of float)
0:31 Constant:
0:31 0 (const int)
0:31 move second child to first child (temp float)
0:31 direct index (temp float)
0:31 direct index (temp 3-component vector of float)
0:31 'm' (temp 3X3 matrix of float)
0:31 Constant:
0:31 1 (const int)
0:31 Constant:
0:31 2 (const int)
0:31 direct index (temp float)
0:31 'c' (in 3-component vector of float)
0:31 Constant:
0:31 1 (const int)
0:31 move second child to first child (temp float)
0:31 direct index (temp float)
0:31 direct index (temp 3-component vector of float)
0:31 'm' (temp 3X3 matrix of float)
0:31 Constant:
0:31 2 (const int)
0:31 Constant:
0:31 2 (const int)
0:31 direct index (temp float)
0:31 'c' (in 3-component vector of float)
0:31 Constant:
0:31 2 (const int)
0:32 Branch: Return with expression
0:32 'm' (temp 3X3 matrix of float)
0:? Linker Objects
0:? 'inf' (layout(location=0 ) in float)
Missing functionality: matrix swizzle
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 109
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "ShaderFunction" 108
Name 4 "ShaderFunction"
Name 14 "createMat3x3(vf3;vf3;vf3;"
Name 11 "a"
Name 12 "b"
Name 13 "c"
Name 19 "m"
Name 38 "f3"
Name 51 "intermVec"
Name 63 "intermVec"
Name 76 "m"
Name 108 "inf"
Decorate 108(inf) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 3
8: TypePointer Function 7(fvec3)
9: TypeMatrix 7(fvec3) 3
10: TypeFunction 9 8(ptr) 8(ptr) 8(ptr)
16: TypeVector 6(float) 4
17: TypeMatrix 16(fvec4) 3
18: TypePointer Function 17
20: TypeInt 32 1
21: 20(int) Constant 2
22: 6(float) Constant 1065353216
23: TypeInt 32 0
24: 23(int) Constant 3
25: TypePointer Function 6(float)
27: 6(float) Constant 1073741824
30: 20(int) Constant 0
31: 6(float) Constant 1077936128
32: 16(fvec4) ConstantComposite 31 31 31 31
33: TypePointer Function 16(fvec4)
35: 20(int) Constant 1
39: 23(int) Constant 0
43: 23(int) Constant 1
47: 23(int) Constant 2
52: 6(float) Constant 1084227584
53: 7(fvec3) ConstantComposite 52 52 52
75: TypePointer Function 9
107: TypePointer Input 6(float)
108(inf): 107(ptr) Variable Input
4(ShaderFunction): 2 Function None 3
5: Label
19(m): 18(ptr) Variable Function
38(f3): 8(ptr) Variable Function
51(intermVec): 8(ptr) Variable Function
63(intermVec): 8(ptr) Variable Function
26: 25(ptr) AccessChain 19(m) 21 24
Store 26 22
28: 25(ptr) AccessChain 19(m) 21 24
Store 28 27
29: 25(ptr) AccessChain 19(m) 21 24
Store 29 27
34: 33(ptr) AccessChain 19(m) 30
Store 34 32
36: 33(ptr) AccessChain 19(m) 35
Store 36 32
37: 33(ptr) AccessChain 19(m) 35
Store 37 32
40: 25(ptr) AccessChain 38(f3) 39
41: 6(float) Load 40
42: 25(ptr) AccessChain 19(m) 30 39
Store 42 41
44: 25(ptr) AccessChain 38(f3) 43
45: 6(float) Load 44
46: 25(ptr) AccessChain 19(m) 35 43
Store 46 45
48: 25(ptr) AccessChain 38(f3) 47
49: 6(float) Load 48
50: 25(ptr) AccessChain 19(m) 35 47
Store 50 49
Store 51(intermVec) 53
54: 25(ptr) AccessChain 51(intermVec) 39
55: 6(float) Load 54
56: 25(ptr) AccessChain 19(m) 35 39
Store 56 55
57: 25(ptr) AccessChain 51(intermVec) 43
58: 6(float) Load 57
59: 25(ptr) AccessChain 19(m) 30 43
Store 59 58
60: 25(ptr) AccessChain 51(intermVec) 47
61: 6(float) Load 60
62: 25(ptr) AccessChain 19(m) 21 39
Store 62 61
64: 7(fvec3) Load 38(f3)
65: 7(fvec3) VectorTimesScalar 64 27
Store 63(intermVec) 65
66: 25(ptr) AccessChain 63(intermVec) 39
67: 6(float) Load 66
68: 25(ptr) AccessChain 19(m) 30 39
Store 68 67
69: 25(ptr) AccessChain 63(intermVec) 43
70: 6(float) Load 69
71: 25(ptr) AccessChain 19(m) 30 43
Store 71 70
72: 25(ptr) AccessChain 63(intermVec) 47
73: 6(float) Load 72
74: 25(ptr) AccessChain 19(m) 35 39
Store 74 73
Store 38(f3) 30
Return
FunctionEnd
14(createMat3x3(vf3;vf3;vf3;): 9 Function None 10
11(a): 8(ptr) FunctionParameter
12(b): 8(ptr) FunctionParameter
13(c): 8(ptr) FunctionParameter
15: Label
76(m): 75(ptr) Variable Function
77: 25(ptr) AccessChain 11(a) 39
78: 6(float) Load 77
79: 25(ptr) AccessChain 76(m) 30 39
Store 79 78
80: 25(ptr) AccessChain 11(a) 43
81: 6(float) Load 80
82: 25(ptr) AccessChain 76(m) 35 39
Store 82 81
83: 25(ptr) AccessChain 11(a) 47
84: 6(float) Load 83
85: 25(ptr) AccessChain 76(m) 21 39
Store 85 84
86: 25(ptr) AccessChain 12(b) 39
87: 6(float) Load 86
88: 25(ptr) AccessChain 76(m) 30 43
Store 88 87
89: 25(ptr) AccessChain 12(b) 43
90: 6(float) Load 89
91: 25(ptr) AccessChain 76(m) 35 43
Store 91 90
92: 25(ptr) AccessChain 12(b) 47
93: 6(float) Load 92
94: 25(ptr) AccessChain 76(m) 21 43
Store 94 93
95: 25(ptr) AccessChain 13(c) 39
96: 6(float) Load 95
97: 25(ptr) AccessChain 76(m) 30 47
Store 97 96
98: 25(ptr) AccessChain 13(c) 43
99: 6(float) Load 98
100: 25(ptr) AccessChain 76(m) 35 47
Store 100 99
101: 25(ptr) AccessChain 13(c) 47
102: 6(float) Load 101
103: 25(ptr) AccessChain 76(m) 21 47
Store 103 102
104: 9 Load 76(m)
ReturnValue 104
FunctionEnd

View File

@ -7,9 +7,9 @@ local_size = (4, 4, 2)
0:4 'tid' (in 3-component vector of uint)
0:9 Function Definition: main_aux1(vu3; (temp void)
0:9 Function Parameters:
0:9 'tid' (in 3-component vector of uint LocalInvocationID)
0:9 'tid' (in 3-component vector of uint GlobalInvocationID)
0:? Linker Objects
0:? 'tid' (in 3-component vector of uint LocalInvocationID)
0:? 'tid' (in 3-component vector of uint GlobalInvocationID)
Linked compute stage:
@ -23,9 +23,9 @@ local_size = (4, 4, 2)
0:4 'tid' (in 3-component vector of uint)
0:9 Function Definition: main_aux1(vu3; (temp void)
0:9 Function Parameters:
0:9 'tid' (in 3-component vector of uint LocalInvocationID)
0:9 'tid' (in 3-component vector of uint GlobalInvocationID)
0:? Linker Objects
0:? 'tid' (in 3-component vector of uint LocalInvocationID)
0:? 'tid' (in 3-component vector of uint GlobalInvocationID)
// Module Version 10000
// Generated by (magic number): 80001
@ -40,7 +40,7 @@ local_size = (4, 4, 2)
Name 11 "main(vu3;"
Name 10 "tid"
Name 14 "tid"
Decorate 14(tid) BuiltIn LocalInvocationId
Decorate 14(tid) BuiltIn GlobalInvocationId
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0

View File

@ -0,0 +1,639 @@
hlsl.params.default.frag
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:9 Function Definition: fn1(vi4;b1;b1; (temp 4-component vector of int)
0:9 Function Parameters:
0:9 'p0' (in 4-component vector of int)
0:9 'b1' (in bool)
0:9 'b2' (in bool)
0:? Sequence
0:10 Branch: Return with expression
0:10 'p0' (in 4-component vector of int)
0:17 Function Definition: fn1(vi4;vi4;i1[2];i1; (temp 4-component vector of int)
0:17 Function Parameters:
0:17 'p0' (in 4-component vector of int)
0:17 'p1' (in 4-component vector of int)
0:17 'p2' (in 2-element array of int)
0:17 'p3' (in int)
0:? Sequence
0:18 Branch: Return with expression
0:18 add (temp 4-component vector of int)
0:18 add (temp 4-component vector of int)
0:18 add (temp 4-component vector of int)
0:18 'p0' (in 4-component vector of int)
0:18 'p1' (in 4-component vector of int)
0:18 direct index (temp int)
0:18 'p2' (in 2-element array of int)
0:18 Constant:
0:18 0 (const int)
0:18 'p3' (in int)
0:23 Function Definition: fn2(vi4;i1; (temp 4-component vector of int)
0:23 Function Parameters:
0:23 'p0' (in 4-component vector of int)
0:23 'x' (in int)
0:? Sequence
0:24 Branch: Return with expression
0:? Constant:
0:? 10 (const int)
0:? 11 (const int)
0:? 12 (const int)
0:? 13 (const int)
0:28 Function Definition: fn2(vi4;f1; (temp 4-component vector of int)
0:28 Function Parameters:
0:28 'p0' (in 4-component vector of int)
0:28 'x' (in float)
0:? Sequence
0:29 Branch: Return with expression
0:29 add (temp 4-component vector of int)
0:29 'p0' (in 4-component vector of int)
0:? Constant:
0:? 20 (const int)
0:? 21 (const int)
0:? 22 (const int)
0:? 23 (const int)
0:32 Function Definition: fn3(i1; (temp void)
0:32 Function Parameters:
0:32 'p0' (in int)
0:36 Function Definition: main( (temp 4-component vector of int)
0:36 Function Parameters:
0:? Sequence
0:37 Sequence
0:37 move second child to first child (temp 2-element array of int)
0:37 'myarray' (temp 2-element array of int)
0:37 Constant:
0:37 30 (const int)
0:37 31 (const int)
0:39 Function Call: fn3(i1; (temp void)
0:32 Constant:
0:32 3 (const int)
0:40 Function Call: fn3(i1; (temp void)
0:40 Constant:
0:40 5 (const int)
0:50 Sequence
0:50 move second child to first child (temp 4-component vector of int)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of int)
0:49 add (temp 4-component vector of int)
0:47 add (temp 4-component vector of int)
0:46 add (temp 4-component vector of int)
0:45 add (temp 4-component vector of int)
0:44 add (temp 4-component vector of int)
0:43 add (temp 4-component vector of int)
0:42 add (temp 4-component vector of int)
0:42 Function Call: fn1(vi4;vi4;i1[2];i1; (temp 4-component vector of int)
0:42 Constant:
0:42 100 (const int)
0:42 100 (const int)
0:42 100 (const int)
0:42 100 (const int)
0:? Constant:
0:? -1 (const int)
0:? -2 (const int)
0:? -3 (const int)
0:? -4 (const int)
0:15 Constant:
0:15 1 (const int)
0:15 2 (const int)
0:16 Constant:
0:16 42 (const int)
0:43 Function Call: fn1(vi4;vi4;i1[2];i1; (temp 4-component vector of int)
0:43 Constant:
0:43 101 (const int)
0:43 101 (const int)
0:43 101 (const int)
0:43 101 (const int)
0:43 ui4: direct index for structure (layout(offset=0 ) uniform 4-component vector of int)
0:43 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of int ui4})
0:43 Constant:
0:43 0 (const uint)
0:15 Constant:
0:15 1 (const int)
0:15 2 (const int)
0:16 Constant:
0:16 42 (const int)
0:44 Function Call: fn1(vi4;vi4;i1[2];i1; (temp 4-component vector of int)
0:44 Constant:
0:44 102 (const int)
0:44 102 (const int)
0:44 102 (const int)
0:44 102 (const int)
0:44 ui4: direct index for structure (layout(offset=0 ) uniform 4-component vector of int)
0:44 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of int ui4})
0:44 Constant:
0:44 0 (const uint)
0:44 'myarray' (temp 2-element array of int)
0:16 Constant:
0:16 42 (const int)
0:45 Function Call: fn1(vi4;vi4;i1[2];i1; (temp 4-component vector of int)
0:45 Constant:
0:45 103 (const int)
0:45 103 (const int)
0:45 103 (const int)
0:45 103 (const int)
0:45 ui4: direct index for structure (layout(offset=0 ) uniform 4-component vector of int)
0:45 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of int ui4})
0:45 Constant:
0:45 0 (const uint)
0:45 'myarray' (temp 2-element array of int)
0:45 Constant:
0:45 99 (const int)
0:46 Function Call: fn1(vi4;b1;b1; (temp 4-component vector of int)
0:46 Constant:
0:46 104 (const int)
0:46 104 (const int)
0:46 104 (const int)
0:46 104 (const int)
0:46 Constant:
0:46 false (const bool)
0:9 Constant:
0:9 false (const bool)
0:47 Function Call: fn1(vi4;b1;b1; (temp 4-component vector of int)
0:47 Constant:
0:47 105 (const int)
0:47 105 (const int)
0:47 105 (const int)
0:47 105 (const int)
0:47 Constant:
0:47 false (const bool)
0:47 Constant:
0:47 true (const bool)
0:49 Function Call: fn2(vi4;f1; (temp 4-component vector of int)
0:49 Constant:
0:49 110 (const int)
0:49 110 (const int)
0:49 110 (const int)
0:49 110 (const int)
0:49 Constant:
0:49 11.110000
0:50 Function Call: fn2(vi4;i1; (temp 4-component vector of int)
0:50 Constant:
0:50 111 (const int)
0:50 111 (const int)
0:50 111 (const int)
0:50 111 (const int)
0:50 Constant:
0:50 12 (const int)
0:50 Branch: Return
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of int)
0:? 'cia' (const int)
0:? -4 (const int)
0:? 'cib' (const int)
0:? -42 (const int)
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of int ui4})
Linked fragment stage:
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:9 Function Definition: fn1(vi4;b1;b1; (temp 4-component vector of int)
0:9 Function Parameters:
0:9 'p0' (in 4-component vector of int)
0:9 'b1' (in bool)
0:9 'b2' (in bool)
0:? Sequence
0:10 Branch: Return with expression
0:10 'p0' (in 4-component vector of int)
0:17 Function Definition: fn1(vi4;vi4;i1[2];i1; (temp 4-component vector of int)
0:17 Function Parameters:
0:17 'p0' (in 4-component vector of int)
0:17 'p1' (in 4-component vector of int)
0:17 'p2' (in 2-element array of int)
0:17 'p3' (in int)
0:? Sequence
0:18 Branch: Return with expression
0:18 add (temp 4-component vector of int)
0:18 add (temp 4-component vector of int)
0:18 add (temp 4-component vector of int)
0:18 'p0' (in 4-component vector of int)
0:18 'p1' (in 4-component vector of int)
0:18 direct index (temp int)
0:18 'p2' (in 2-element array of int)
0:18 Constant:
0:18 0 (const int)
0:18 'p3' (in int)
0:23 Function Definition: fn2(vi4;i1; (temp 4-component vector of int)
0:23 Function Parameters:
0:23 'p0' (in 4-component vector of int)
0:23 'x' (in int)
0:? Sequence
0:24 Branch: Return with expression
0:? Constant:
0:? 10 (const int)
0:? 11 (const int)
0:? 12 (const int)
0:? 13 (const int)
0:28 Function Definition: fn2(vi4;f1; (temp 4-component vector of int)
0:28 Function Parameters:
0:28 'p0' (in 4-component vector of int)
0:28 'x' (in float)
0:? Sequence
0:29 Branch: Return with expression
0:29 add (temp 4-component vector of int)
0:29 'p0' (in 4-component vector of int)
0:? Constant:
0:? 20 (const int)
0:? 21 (const int)
0:? 22 (const int)
0:? 23 (const int)
0:32 Function Definition: fn3(i1; (temp void)
0:32 Function Parameters:
0:32 'p0' (in int)
0:36 Function Definition: main( (temp 4-component vector of int)
0:36 Function Parameters:
0:? Sequence
0:37 Sequence
0:37 move second child to first child (temp 2-element array of int)
0:37 'myarray' (temp 2-element array of int)
0:37 Constant:
0:37 30 (const int)
0:37 31 (const int)
0:39 Function Call: fn3(i1; (temp void)
0:32 Constant:
0:32 3 (const int)
0:40 Function Call: fn3(i1; (temp void)
0:40 Constant:
0:40 5 (const int)
0:50 Sequence
0:50 move second child to first child (temp 4-component vector of int)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of int)
0:49 add (temp 4-component vector of int)
0:47 add (temp 4-component vector of int)
0:46 add (temp 4-component vector of int)
0:45 add (temp 4-component vector of int)
0:44 add (temp 4-component vector of int)
0:43 add (temp 4-component vector of int)
0:42 add (temp 4-component vector of int)
0:42 Function Call: fn1(vi4;vi4;i1[2];i1; (temp 4-component vector of int)
0:42 Constant:
0:42 100 (const int)
0:42 100 (const int)
0:42 100 (const int)
0:42 100 (const int)
0:? Constant:
0:? -1 (const int)
0:? -2 (const int)
0:? -3 (const int)
0:? -4 (const int)
0:15 Constant:
0:15 1 (const int)
0:15 2 (const int)
0:16 Constant:
0:16 42 (const int)
0:43 Function Call: fn1(vi4;vi4;i1[2];i1; (temp 4-component vector of int)
0:43 Constant:
0:43 101 (const int)
0:43 101 (const int)
0:43 101 (const int)
0:43 101 (const int)
0:43 ui4: direct index for structure (layout(offset=0 ) uniform 4-component vector of int)
0:43 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of int ui4})
0:43 Constant:
0:43 0 (const uint)
0:15 Constant:
0:15 1 (const int)
0:15 2 (const int)
0:16 Constant:
0:16 42 (const int)
0:44 Function Call: fn1(vi4;vi4;i1[2];i1; (temp 4-component vector of int)
0:44 Constant:
0:44 102 (const int)
0:44 102 (const int)
0:44 102 (const int)
0:44 102 (const int)
0:44 ui4: direct index for structure (layout(offset=0 ) uniform 4-component vector of int)
0:44 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of int ui4})
0:44 Constant:
0:44 0 (const uint)
0:44 'myarray' (temp 2-element array of int)
0:16 Constant:
0:16 42 (const int)
0:45 Function Call: fn1(vi4;vi4;i1[2];i1; (temp 4-component vector of int)
0:45 Constant:
0:45 103 (const int)
0:45 103 (const int)
0:45 103 (const int)
0:45 103 (const int)
0:45 ui4: direct index for structure (layout(offset=0 ) uniform 4-component vector of int)
0:45 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of int ui4})
0:45 Constant:
0:45 0 (const uint)
0:45 'myarray' (temp 2-element array of int)
0:45 Constant:
0:45 99 (const int)
0:46 Function Call: fn1(vi4;b1;b1; (temp 4-component vector of int)
0:46 Constant:
0:46 104 (const int)
0:46 104 (const int)
0:46 104 (const int)
0:46 104 (const int)
0:46 Constant:
0:46 false (const bool)
0:9 Constant:
0:9 false (const bool)
0:47 Function Call: fn1(vi4;b1;b1; (temp 4-component vector of int)
0:47 Constant:
0:47 105 (const int)
0:47 105 (const int)
0:47 105 (const int)
0:47 105 (const int)
0:47 Constant:
0:47 false (const bool)
0:47 Constant:
0:47 true (const bool)
0:49 Function Call: fn2(vi4;f1; (temp 4-component vector of int)
0:49 Constant:
0:49 110 (const int)
0:49 110 (const int)
0:49 110 (const int)
0:49 110 (const int)
0:49 Constant:
0:49 11.110000
0:50 Function Call: fn2(vi4;i1; (temp 4-component vector of int)
0:50 Constant:
0:50 111 (const int)
0:50 111 (const int)
0:50 111 (const int)
0:50 111 (const int)
0:50 Constant:
0:50 12 (const int)
0:50 Branch: Return
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of int)
0:? 'cia' (const int)
0:? -4 (const int)
0:? 'cib' (const int)
0:? -42 (const int)
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of int ui4})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 173
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 88
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 15 "fn1(vi4;b1;b1;"
Name 12 "p0"
Name 13 "b1"
Name 14 "b2"
Name 27 "fn1(vi4;vi4;i1[2];i1;"
Name 23 "p0"
Name 24 "p1"
Name 25 "p2"
Name 26 "p3"
Name 32 "fn2(vi4;i1;"
Name 30 "p0"
Name 31 "x"
Name 39 "fn2(vi4;f1;"
Name 37 "p0"
Name 38 "x"
Name 43 "fn3(i1;"
Name 42 "p0"
Name 77 "myarray"
Name 82 "param"
Name 85 "param"
Name 88 "@entryPointOutput"
Name 100 "param"
Name 101 "param"
Name 102 "param"
Name 103 "param"
Name 107 "$Global"
MemberName 107($Global) 0 "ui4"
Name 109 ""
Name 110 "param"
Name 111 "param"
Name 115 "param"
Name 116 "param"
Name 121 "param"
Name 122 "param"
Name 125 "param"
Name 127 "param"
Name 133 "param"
Name 134 "param"
Name 137 "param"
Name 139 "param"
Name 145 "param"
Name 146 "param"
Name 147 "param"
Name 153 "param"
Name 154 "param"
Name 155 "param"
Name 161 "param"
Name 162 "param"
Name 167 "param"
Name 168 "param"
Decorate 88(@entryPointOutput) Location 0
MemberDecorate 107($Global) 0 Offset 0
Decorate 107($Global) Block
Decorate 109 DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
7: TypeVector 6(int) 4
8: TypePointer Function 7(ivec4)
9: TypeBool
10: TypePointer Function 9(bool)
11: TypeFunction 7(ivec4) 8(ptr) 10(ptr) 10(ptr)
17: TypeInt 32 0
18: 17(int) Constant 2
19: TypeArray 6(int) 18
20: TypePointer Function 19
21: TypePointer Function 6(int)
22: TypeFunction 7(ivec4) 8(ptr) 8(ptr) 20(ptr) 21(ptr)
29: TypeFunction 7(ivec4) 8(ptr) 21(ptr)
34: TypeFloat 32
35: TypePointer Function 34(float)
36: TypeFunction 7(ivec4) 8(ptr) 35(ptr)
41: TypeFunction 2 21(ptr)
51: 6(int) Constant 0
61: 6(int) Constant 10
62: 6(int) Constant 11
63: 6(int) Constant 12
64: 6(int) Constant 13
65: 7(ivec4) ConstantComposite 61 62 63 64
69: 6(int) Constant 20
70: 6(int) Constant 21
71: 6(int) Constant 22
72: 6(int) Constant 23
73: 7(ivec4) ConstantComposite 69 70 71 72
78: 6(int) Constant 30
79: 6(int) Constant 31
80: 19 ConstantComposite 78 79
81: 6(int) Constant 3
84: 6(int) Constant 5
87: TypePointer Output 7(ivec4)
88(@entryPointOutput): 87(ptr) Variable Output
89: 6(int) Constant 100
90: 7(ivec4) ConstantComposite 89 89 89 89
91: 6(int) Constant 4294967295
92: 6(int) Constant 4294967294
93: 6(int) Constant 4294967293
94: 6(int) Constant 4294967292
95: 7(ivec4) ConstantComposite 91 92 93 94
96: 6(int) Constant 1
97: 6(int) Constant 2
98: 19 ConstantComposite 96 97
99: 6(int) Constant 42
105: 6(int) Constant 101
106: 7(ivec4) ConstantComposite 105 105 105 105
107($Global): TypeStruct 7(ivec4)
108: TypePointer Uniform 107($Global)
109: 108(ptr) Variable Uniform
112: TypePointer Uniform 7(ivec4)
119: 6(int) Constant 102
120: 7(ivec4) ConstantComposite 119 119 119 119
130: 6(int) Constant 103
131: 7(ivec4) ConstantComposite 130 130 130 130
132: 6(int) Constant 99
142: 6(int) Constant 104
143: 7(ivec4) ConstantComposite 142 142 142 142
144: 9(bool) ConstantFalse
150: 6(int) Constant 105
151: 7(ivec4) ConstantComposite 150 150 150 150
152: 9(bool) ConstantTrue
158: 6(int) Constant 110
159: 7(ivec4) ConstantComposite 158 158 158 158
160: 34(float) Constant 1093780111
165: 6(int) Constant 111
166: 7(ivec4) ConstantComposite 165 165 165 165
172: 6(int) Constant 4294967254
4(main): 2 Function None 3
5: Label
77(myarray): 20(ptr) Variable Function
82(param): 21(ptr) Variable Function
85(param): 21(ptr) Variable Function
100(param): 8(ptr) Variable Function
101(param): 8(ptr) Variable Function
102(param): 20(ptr) Variable Function
103(param): 21(ptr) Variable Function
110(param): 8(ptr) Variable Function
111(param): 8(ptr) Variable Function
115(param): 20(ptr) Variable Function
116(param): 21(ptr) Variable Function
121(param): 8(ptr) Variable Function
122(param): 8(ptr) Variable Function
125(param): 20(ptr) Variable Function
127(param): 21(ptr) Variable Function
133(param): 8(ptr) Variable Function
134(param): 8(ptr) Variable Function
137(param): 20(ptr) Variable Function
139(param): 21(ptr) Variable Function
145(param): 8(ptr) Variable Function
146(param): 10(ptr) Variable Function
147(param): 10(ptr) Variable Function
153(param): 8(ptr) Variable Function
154(param): 10(ptr) Variable Function
155(param): 10(ptr) Variable Function
161(param): 8(ptr) Variable Function
162(param): 35(ptr) Variable Function
167(param): 8(ptr) Variable Function
168(param): 21(ptr) Variable Function
Store 77(myarray) 80
Store 82(param) 81
83: 2 FunctionCall 43(fn3(i1;) 82(param)
Store 85(param) 84
86: 2 FunctionCall 43(fn3(i1;) 85(param)
Store 100(param) 90
Store 101(param) 95
Store 102(param) 98
Store 103(param) 99
104: 7(ivec4) FunctionCall 27(fn1(vi4;vi4;i1[2];i1;) 100(param) 101(param) 102(param) 103(param)
Store 110(param) 106
113: 112(ptr) AccessChain 109 51
114: 7(ivec4) Load 113
Store 111(param) 114
Store 115(param) 98
Store 116(param) 99
117: 7(ivec4) FunctionCall 27(fn1(vi4;vi4;i1[2];i1;) 110(param) 111(param) 115(param) 116(param)
118: 7(ivec4) IAdd 104 117
Store 121(param) 120
123: 112(ptr) AccessChain 109 51
124: 7(ivec4) Load 123
Store 122(param) 124
126: 19 Load 77(myarray)
Store 125(param) 126
Store 127(param) 99
128: 7(ivec4) FunctionCall 27(fn1(vi4;vi4;i1[2];i1;) 121(param) 122(param) 125(param) 127(param)
129: 7(ivec4) IAdd 118 128
Store 133(param) 131
135: 112(ptr) AccessChain 109 51
136: 7(ivec4) Load 135
Store 134(param) 136
138: 19 Load 77(myarray)
Store 137(param) 138
Store 139(param) 132
140: 7(ivec4) FunctionCall 27(fn1(vi4;vi4;i1[2];i1;) 133(param) 134(param) 137(param) 139(param)
141: 7(ivec4) IAdd 129 140
Store 145(param) 143
Store 146(param) 144
Store 147(param) 144
148: 7(ivec4) FunctionCall 15(fn1(vi4;b1;b1;) 145(param) 146(param) 147(param)
149: 7(ivec4) IAdd 141 148
Store 153(param) 151
Store 154(param) 144
Store 155(param) 152
156: 7(ivec4) FunctionCall 15(fn1(vi4;b1;b1;) 153(param) 154(param) 155(param)
157: 7(ivec4) IAdd 149 156
Store 161(param) 159
Store 162(param) 160
163: 7(ivec4) FunctionCall 39(fn2(vi4;f1;) 161(param) 162(param)
164: 7(ivec4) IAdd 157 163
Store 167(param) 166
Store 168(param) 63
169: 7(ivec4) FunctionCall 32(fn2(vi4;i1;) 167(param) 168(param)
170: 7(ivec4) IAdd 164 169
Store 88(@entryPointOutput) 170
Return
FunctionEnd
15(fn1(vi4;b1;b1;): 7(ivec4) Function None 11
12(p0): 8(ptr) FunctionParameter
13(b1): 10(ptr) FunctionParameter
14(b2): 10(ptr) FunctionParameter
16: Label
45: 7(ivec4) Load 12(p0)
ReturnValue 45
FunctionEnd
27(fn1(vi4;vi4;i1[2];i1;): 7(ivec4) Function None 22
23(p0): 8(ptr) FunctionParameter
24(p1): 8(ptr) FunctionParameter
25(p2): 20(ptr) FunctionParameter
26(p3): 21(ptr) FunctionParameter
28: Label
48: 7(ivec4) Load 23(p0)
49: 7(ivec4) Load 24(p1)
50: 7(ivec4) IAdd 48 49
52: 21(ptr) AccessChain 25(p2) 51
53: 6(int) Load 52
54: 7(ivec4) CompositeConstruct 53 53 53 53
55: 7(ivec4) IAdd 50 54
56: 6(int) Load 26(p3)
57: 7(ivec4) CompositeConstruct 56 56 56 56
58: 7(ivec4) IAdd 55 57
ReturnValue 58
FunctionEnd
32(fn2(vi4;i1;): 7(ivec4) Function None 29
30(p0): 8(ptr) FunctionParameter
31(x): 21(ptr) FunctionParameter
33: Label
ReturnValue 65
FunctionEnd
39(fn2(vi4;f1;): 7(ivec4) Function None 36
37(p0): 8(ptr) FunctionParameter
38(x): 35(ptr) FunctionParameter
40: Label
68: 7(ivec4) Load 37(p0)
74: 7(ivec4) IAdd 68 73
ReturnValue 74
FunctionEnd
43(fn3(i1;): 2 Function None 41
42(p0): 21(ptr) FunctionParameter
44: Label
Return
FunctionEnd

View File

@ -0,0 +1,379 @@
hlsl.params.default.negative.frag
ERROR: 0:27: '' : invalid default parameter value
ERROR: 0:32: 'p1' : invalid parameter after default value parameters
ERROR: 0:40: 'fn1' : ambiguous best function under implicit type conversion
ERROR: 0:47: 'fn2' : ambiguous best function under implicit type conversion
ERROR: 4 compilation errors. No code generated.
Shader version: 450
gl_FragCoord origin is upper left
ERROR: node is still EOpNull!
0:7 Function Definition: fn1(vi4; (temp 4-component vector of int)
0:7 Function Parameters:
0:7 'p0' (in 4-component vector of int)
0:? Sequence
0:7 Branch: Return with expression
0:? Constant:
0:? 1 (const int)
0:? 2 (const int)
0:? 3 (const int)
0:? 4 (const int)
0:9 Function Definition: fn1(vi4;b1;b1; (temp 4-component vector of int)
0:9 Function Parameters:
0:9 'p0' (in 4-component vector of int)
0:9 'b1' (in bool)
0:9 'b2' (in bool)
0:? Sequence
0:10 Branch: Return with expression
0:10 'p0' (in 4-component vector of int)
0:17 Function Definition: fn1(vi4;vi4;i1[2];i1; (temp 4-component vector of int)
0:17 Function Parameters:
0:17 'p0' (in 4-component vector of int)
0:17 'p1' (in 4-component vector of int)
0:17 'p2' (in 2-element array of int)
0:17 'p3' (in int)
0:? Sequence
0:18 Branch: Return with expression
0:18 add (temp 4-component vector of int)
0:18 add (temp 4-component vector of int)
0:18 add (temp 4-component vector of int)
0:18 'p0' (in 4-component vector of int)
0:18 'p1' (in 4-component vector of int)
0:18 direct index (temp int)
0:18 'p2' (in 2-element array of int)
0:18 Constant:
0:18 0 (const int)
0:18 'p3' (in int)
0:23 Function Definition: fn2(vi4;i1; (temp 4-component vector of int)
0:23 Function Parameters:
0:23 'p0' (in 4-component vector of int)
0:23 'x' (in int)
0:? Sequence
0:24 Branch: Return with expression
0:? Constant:
0:? 10 (const int)
0:? 11 (const int)
0:? 12 (const int)
0:? 13 (const int)
0:28 Function Definition: fn2(vi4; (temp 4-component vector of int)
0:28 Function Parameters:
0:28 'p0' (in 4-component vector of int)
0:? Sequence
0:29 Branch: Return with expression
0:29 add (temp 4-component vector of int)
0:29 'p0' (in 4-component vector of int)
0:? Constant:
0:? 20 (const int)
0:? 21 (const int)
0:? 22 (const int)
0:? 23 (const int)
0:33 Function Definition: fn3(i1; (temp void)
0:33 Function Parameters:
0:33 'p0' (in int)
0:37 Function Definition: main( (temp 4-component vector of int)
0:37 Function Parameters:
0:? Sequence
0:38 Sequence
0:38 move second child to first child (temp 2-element array of int)
0:38 'myarray' (temp 2-element array of int)
0:38 Constant:
0:38 30 (const int)
0:38 31 (const int)
0:49 Sequence
0:49 move second child to first child (temp 4-component vector of int)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of int)
0:48 add (temp 4-component vector of int)
0:47 add (temp 4-component vector of int)
0:45 add (temp 4-component vector of int)
0:44 add (temp 4-component vector of int)
0:43 add (temp 4-component vector of int)
0:42 add (temp 4-component vector of int)
0:41 add (temp 4-component vector of int)
0:40 add (temp 4-component vector of int)
0:40 Function Call: fn1(vi4; (temp 4-component vector of int)
0:40 Constant:
0:40 100 (const int)
0:40 100 (const int)
0:40 100 (const int)
0:40 100 (const int)
0:41 Function Call: fn1(vi4;vi4;i1[2];i1; (temp 4-component vector of int)
0:41 Constant:
0:41 101 (const int)
0:41 101 (const int)
0:41 101 (const int)
0:41 101 (const int)
0:41 ui4: direct index for structure (layout(offset=0 ) uniform 4-component vector of int)
0:41 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of int ui4, layout(offset=16 ) uniform float ufvar})
0:41 Constant:
0:41 0 (const uint)
0:15 Constant:
0:15 1 (const int)
0:15 2 (const int)
0:16 Constant:
0:16 42 (const int)
0:42 Function Call: fn1(vi4;vi4;i1[2];i1; (temp 4-component vector of int)
0:42 Constant:
0:42 102 (const int)
0:42 102 (const int)
0:42 102 (const int)
0:42 102 (const int)
0:42 ui4: direct index for structure (layout(offset=0 ) uniform 4-component vector of int)
0:42 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of int ui4, layout(offset=16 ) uniform float ufvar})
0:42 Constant:
0:42 0 (const uint)
0:42 'myarray' (temp 2-element array of int)
0:16 Constant:
0:16 42 (const int)
0:43 Function Call: fn1(vi4;vi4;i1[2];i1; (temp 4-component vector of int)
0:43 Constant:
0:43 103 (const int)
0:43 103 (const int)
0:43 103 (const int)
0:43 103 (const int)
0:43 ui4: direct index for structure (layout(offset=0 ) uniform 4-component vector of int)
0:43 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of int ui4, layout(offset=16 ) uniform float ufvar})
0:43 Constant:
0:43 0 (const uint)
0:43 'myarray' (temp 2-element array of int)
0:43 Constant:
0:43 99 (const int)
0:44 Function Call: fn1(vi4;b1;b1; (temp 4-component vector of int)
0:44 Constant:
0:44 104 (const int)
0:44 104 (const int)
0:44 104 (const int)
0:44 104 (const int)
0:44 Constant:
0:44 false (const bool)
0:9 Constant:
0:9 false (const bool)
0:45 Function Call: fn1(vi4;b1;b1; (temp 4-component vector of int)
0:45 Constant:
0:45 105 (const int)
0:45 105 (const int)
0:45 105 (const int)
0:45 105 (const int)
0:45 Constant:
0:45 false (const bool)
0:45 Constant:
0:45 true (const bool)
0:47 Function Call: fn2(vi4; (temp 4-component vector of int)
0:47 Constant:
0:47 112 (const int)
0:47 112 (const int)
0:47 112 (const int)
0:47 112 (const int)
0:48 Function Call: fn2(vi4;i1; (temp 4-component vector of int)
0:48 Constant:
0:48 110 (const int)
0:48 110 (const int)
0:48 110 (const int)
0:48 110 (const int)
0:48 Constant:
0:48 11 (const int)
0:49 Function Call: fn2(vi4;i1; (temp 4-component vector of int)
0:49 Constant:
0:49 111 (const int)
0:49 111 (const int)
0:49 111 (const int)
0:49 111 (const int)
0:49 Constant:
0:49 12 (const int)
0:49 Branch: Return
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of int)
0:? 'cia' (const int)
0:? -4 (const int)
0:? 'cib' (const int)
0:? -42 (const int)
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of int ui4, layout(offset=16 ) uniform float ufvar})
Linked fragment stage:
Shader version: 450
gl_FragCoord origin is upper left
ERROR: node is still EOpNull!
0:7 Function Definition: fn1(vi4; (temp 4-component vector of int)
0:7 Function Parameters:
0:7 'p0' (in 4-component vector of int)
0:? Sequence
0:7 Branch: Return with expression
0:? Constant:
0:? 1 (const int)
0:? 2 (const int)
0:? 3 (const int)
0:? 4 (const int)
0:9 Function Definition: fn1(vi4;b1;b1; (temp 4-component vector of int)
0:9 Function Parameters:
0:9 'p0' (in 4-component vector of int)
0:9 'b1' (in bool)
0:9 'b2' (in bool)
0:? Sequence
0:10 Branch: Return with expression
0:10 'p0' (in 4-component vector of int)
0:17 Function Definition: fn1(vi4;vi4;i1[2];i1; (temp 4-component vector of int)
0:17 Function Parameters:
0:17 'p0' (in 4-component vector of int)
0:17 'p1' (in 4-component vector of int)
0:17 'p2' (in 2-element array of int)
0:17 'p3' (in int)
0:? Sequence
0:18 Branch: Return with expression
0:18 add (temp 4-component vector of int)
0:18 add (temp 4-component vector of int)
0:18 add (temp 4-component vector of int)
0:18 'p0' (in 4-component vector of int)
0:18 'p1' (in 4-component vector of int)
0:18 direct index (temp int)
0:18 'p2' (in 2-element array of int)
0:18 Constant:
0:18 0 (const int)
0:18 'p3' (in int)
0:23 Function Definition: fn2(vi4;i1; (temp 4-component vector of int)
0:23 Function Parameters:
0:23 'p0' (in 4-component vector of int)
0:23 'x' (in int)
0:? Sequence
0:24 Branch: Return with expression
0:? Constant:
0:? 10 (const int)
0:? 11 (const int)
0:? 12 (const int)
0:? 13 (const int)
0:28 Function Definition: fn2(vi4; (temp 4-component vector of int)
0:28 Function Parameters:
0:28 'p0' (in 4-component vector of int)
0:? Sequence
0:29 Branch: Return with expression
0:29 add (temp 4-component vector of int)
0:29 'p0' (in 4-component vector of int)
0:? Constant:
0:? 20 (const int)
0:? 21 (const int)
0:? 22 (const int)
0:? 23 (const int)
0:33 Function Definition: fn3(i1; (temp void)
0:33 Function Parameters:
0:33 'p0' (in int)
0:37 Function Definition: main( (temp 4-component vector of int)
0:37 Function Parameters:
0:? Sequence
0:38 Sequence
0:38 move second child to first child (temp 2-element array of int)
0:38 'myarray' (temp 2-element array of int)
0:38 Constant:
0:38 30 (const int)
0:38 31 (const int)
0:49 Sequence
0:49 move second child to first child (temp 4-component vector of int)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of int)
0:48 add (temp 4-component vector of int)
0:47 add (temp 4-component vector of int)
0:45 add (temp 4-component vector of int)
0:44 add (temp 4-component vector of int)
0:43 add (temp 4-component vector of int)
0:42 add (temp 4-component vector of int)
0:41 add (temp 4-component vector of int)
0:40 add (temp 4-component vector of int)
0:40 Function Call: fn1(vi4; (temp 4-component vector of int)
0:40 Constant:
0:40 100 (const int)
0:40 100 (const int)
0:40 100 (const int)
0:40 100 (const int)
0:41 Function Call: fn1(vi4;vi4;i1[2];i1; (temp 4-component vector of int)
0:41 Constant:
0:41 101 (const int)
0:41 101 (const int)
0:41 101 (const int)
0:41 101 (const int)
0:41 ui4: direct index for structure (layout(offset=0 ) uniform 4-component vector of int)
0:41 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of int ui4, layout(offset=16 ) uniform float ufvar})
0:41 Constant:
0:41 0 (const uint)
0:15 Constant:
0:15 1 (const int)
0:15 2 (const int)
0:16 Constant:
0:16 42 (const int)
0:42 Function Call: fn1(vi4;vi4;i1[2];i1; (temp 4-component vector of int)
0:42 Constant:
0:42 102 (const int)
0:42 102 (const int)
0:42 102 (const int)
0:42 102 (const int)
0:42 ui4: direct index for structure (layout(offset=0 ) uniform 4-component vector of int)
0:42 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of int ui4, layout(offset=16 ) uniform float ufvar})
0:42 Constant:
0:42 0 (const uint)
0:42 'myarray' (temp 2-element array of int)
0:16 Constant:
0:16 42 (const int)
0:43 Function Call: fn1(vi4;vi4;i1[2];i1; (temp 4-component vector of int)
0:43 Constant:
0:43 103 (const int)
0:43 103 (const int)
0:43 103 (const int)
0:43 103 (const int)
0:43 ui4: direct index for structure (layout(offset=0 ) uniform 4-component vector of int)
0:43 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of int ui4, layout(offset=16 ) uniform float ufvar})
0:43 Constant:
0:43 0 (const uint)
0:43 'myarray' (temp 2-element array of int)
0:43 Constant:
0:43 99 (const int)
0:44 Function Call: fn1(vi4;b1;b1; (temp 4-component vector of int)
0:44 Constant:
0:44 104 (const int)
0:44 104 (const int)
0:44 104 (const int)
0:44 104 (const int)
0:44 Constant:
0:44 false (const bool)
0:9 Constant:
0:9 false (const bool)
0:45 Function Call: fn1(vi4;b1;b1; (temp 4-component vector of int)
0:45 Constant:
0:45 105 (const int)
0:45 105 (const int)
0:45 105 (const int)
0:45 105 (const int)
0:45 Constant:
0:45 false (const bool)
0:45 Constant:
0:45 true (const bool)
0:47 Function Call: fn2(vi4; (temp 4-component vector of int)
0:47 Constant:
0:47 112 (const int)
0:47 112 (const int)
0:47 112 (const int)
0:47 112 (const int)
0:48 Function Call: fn2(vi4;i1; (temp 4-component vector of int)
0:48 Constant:
0:48 110 (const int)
0:48 110 (const int)
0:48 110 (const int)
0:48 110 (const int)
0:48 Constant:
0:48 11 (const int)
0:49 Function Call: fn2(vi4;i1; (temp 4-component vector of int)
0:49 Constant:
0:49 111 (const int)
0:49 111 (const int)
0:49 111 (const int)
0:49 111 (const int)
0:49 Constant:
0:49 12 (const int)
0:49 Branch: Return
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of int)
0:? 'cia' (const int)
0:? -4 (const int)
0:? 'cib' (const int)
0:? -42 (const int)
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of int ui4, layout(offset=16 ) uniform float ufvar})
SPIR-V is not generated for failed compile or link

View File

@ -1,4 +1,7 @@
hlsl.partialInit.frag
WARNING: 0:35: 'cgf2a' : variable with qualifier 'const' not initialized; zero initializing
WARNING: 0:36: 'ci' : variable with qualifier 'const' not initialized; zero initializing
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
@ -109,32 +112,64 @@ gl_FragCoord origin is upper left
0:26 0.000000
0:26 false (const bool)
0:28 Sequence
0:28 Sequence
0:28 move second child to first child (temp int)
0:28 move second child to first child (temp 4-element array of 2-component vector of float)
0:28 'gf2a' (temp 4-element array of 2-component vector of float)
0:28 Constant:
0:28 0.000000
0:28 0.000000
0:28 0.000000
0:28 0.000000
0:28 0.000000
0:28 0.000000
0:28 0.000000
0:28 0.000000
0:29 Sequence
0:29 move second child to first child (temp int)
0:29 'cgi' (temp int)
0:29 Constant:
0:29 0 (const int)
0:30 move second child to first child (temp float)
0:30 b: direct index for structure (temp float)
0:30 'o4' (temp structure{temp int a, temp float b, temp bool c, temp 4-component vector of float v})
0:30 Constant:
0:30 1 (const int)
0:30 component-wise multiply (temp float)
0:30 direct index (temp float)
0:30 direct index (temp 2-component vector of float)
0:30 'gf2a' (temp 4-element array of 2-component vector of float)
0:30 Constant:
0:30 2 (const int)
0:30 Constant:
0:30 1 (const int)
0:30 Convert int to float (temp float)
0:30 'cgi' (temp int)
0:32 Sequence
0:32 Sequence
0:32 move second child to first child (temp int)
0:? 'a' (layout(location=0 ) out int)
0:28 a: direct index for structure (temp int)
0:28 'o4' (temp structure{temp int a, temp float b, temp bool c, temp 4-component vector of float v})
0:28 Constant:
0:28 0 (const int)
0:28 move second child to first child (temp float)
0:32 a: direct index for structure (temp int)
0:32 'o4' (temp structure{temp int a, temp float b, temp bool c, temp 4-component vector of float v})
0:32 Constant:
0:32 0 (const int)
0:32 move second child to first child (temp float)
0:? 'b' (layout(location=1 ) out float)
0:28 b: direct index for structure (temp float)
0:28 'o4' (temp structure{temp int a, temp float b, temp bool c, temp 4-component vector of float v})
0:28 Constant:
0:28 1 (const int)
0:28 move second child to first child (temp bool)
0:32 b: direct index for structure (temp float)
0:32 'o4' (temp structure{temp int a, temp float b, temp bool c, temp 4-component vector of float v})
0:32 Constant:
0:32 1 (const int)
0:32 move second child to first child (temp bool)
0:? 'c' (layout(location=2 ) out bool)
0:28 c: direct index for structure (temp bool)
0:28 'o4' (temp structure{temp int a, temp float b, temp bool c, temp 4-component vector of float v})
0:28 Constant:
0:28 2 (const int)
0:28 move second child to first child (temp 4-component vector of float)
0:32 c: direct index for structure (temp bool)
0:32 'o4' (temp structure{temp int a, temp float b, temp bool c, temp 4-component vector of float v})
0:32 Constant:
0:32 2 (const int)
0:32 move second child to first child (temp 4-component vector of float)
0:? 'v' (layout(location=3 ) out 4-component vector of float)
0:28 v: direct index for structure (temp 4-component vector of float)
0:28 'o4' (temp structure{temp int a, temp float b, temp bool c, temp 4-component vector of float v})
0:28 Constant:
0:28 3 (const int)
0:28 Branch: Return
0:32 v: direct index for structure (temp 4-component vector of float)
0:32 'o4' (temp structure{temp int a, temp float b, temp bool c, temp 4-component vector of float v})
0:32 Constant:
0:32 3 (const int)
0:32 Branch: Return
0:? Linker Objects
0:? 'a' (layout(location=0 ) out int)
0:? 'b' (layout(location=1 ) out float)
@ -143,6 +178,15 @@ gl_FragCoord origin is upper left
0:? 'input' (layout(location=0 ) in 4-component vector of float)
0:? 'gv' (global 4-component vector of float)
0:? 'gfa' (global 3-element array of float)
0:? 'cgf2a' (const 3-element array of 2-component vector of float)
0:? 0.000000
0:? 0.000000
0:? 0.000000
0:? 0.000000
0:? 0.000000
0:? 0.000000
0:? 'ci' (const int)
0:? 0 (const int)
Linked fragment stage:
@ -258,32 +302,64 @@ gl_FragCoord origin is upper left
0:26 0.000000
0:26 false (const bool)
0:28 Sequence
0:28 Sequence
0:28 move second child to first child (temp int)
0:28 move second child to first child (temp 4-element array of 2-component vector of float)
0:28 'gf2a' (temp 4-element array of 2-component vector of float)
0:28 Constant:
0:28 0.000000
0:28 0.000000
0:28 0.000000
0:28 0.000000
0:28 0.000000
0:28 0.000000
0:28 0.000000
0:28 0.000000
0:29 Sequence
0:29 move second child to first child (temp int)
0:29 'cgi' (temp int)
0:29 Constant:
0:29 0 (const int)
0:30 move second child to first child (temp float)
0:30 b: direct index for structure (temp float)
0:30 'o4' (temp structure{temp int a, temp float b, temp bool c, temp 4-component vector of float v})
0:30 Constant:
0:30 1 (const int)
0:30 component-wise multiply (temp float)
0:30 direct index (temp float)
0:30 direct index (temp 2-component vector of float)
0:30 'gf2a' (temp 4-element array of 2-component vector of float)
0:30 Constant:
0:30 2 (const int)
0:30 Constant:
0:30 1 (const int)
0:30 Convert int to float (temp float)
0:30 'cgi' (temp int)
0:32 Sequence
0:32 Sequence
0:32 move second child to first child (temp int)
0:? 'a' (layout(location=0 ) out int)
0:28 a: direct index for structure (temp int)
0:28 'o4' (temp structure{temp int a, temp float b, temp bool c, temp 4-component vector of float v})
0:28 Constant:
0:28 0 (const int)
0:28 move second child to first child (temp float)
0:32 a: direct index for structure (temp int)
0:32 'o4' (temp structure{temp int a, temp float b, temp bool c, temp 4-component vector of float v})
0:32 Constant:
0:32 0 (const int)
0:32 move second child to first child (temp float)
0:? 'b' (layout(location=1 ) out float)
0:28 b: direct index for structure (temp float)
0:28 'o4' (temp structure{temp int a, temp float b, temp bool c, temp 4-component vector of float v})
0:28 Constant:
0:28 1 (const int)
0:28 move second child to first child (temp bool)
0:32 b: direct index for structure (temp float)
0:32 'o4' (temp structure{temp int a, temp float b, temp bool c, temp 4-component vector of float v})
0:32 Constant:
0:32 1 (const int)
0:32 move second child to first child (temp bool)
0:? 'c' (layout(location=2 ) out bool)
0:28 c: direct index for structure (temp bool)
0:28 'o4' (temp structure{temp int a, temp float b, temp bool c, temp 4-component vector of float v})
0:28 Constant:
0:28 2 (const int)
0:28 move second child to first child (temp 4-component vector of float)
0:32 c: direct index for structure (temp bool)
0:32 'o4' (temp structure{temp int a, temp float b, temp bool c, temp 4-component vector of float v})
0:32 Constant:
0:32 2 (const int)
0:32 move second child to first child (temp 4-component vector of float)
0:? 'v' (layout(location=3 ) out 4-component vector of float)
0:28 v: direct index for structure (temp 4-component vector of float)
0:28 'o4' (temp structure{temp int a, temp float b, temp bool c, temp 4-component vector of float v})
0:28 Constant:
0:28 3 (const int)
0:28 Branch: Return
0:32 v: direct index for structure (temp 4-component vector of float)
0:32 'o4' (temp structure{temp int a, temp float b, temp bool c, temp 4-component vector of float v})
0:32 Constant:
0:32 3 (const int)
0:32 Branch: Return
0:? Linker Objects
0:? 'a' (layout(location=0 ) out int)
0:? 'b' (layout(location=1 ) out float)
@ -292,15 +368,24 @@ gl_FragCoord origin is upper left
0:? 'input' (layout(location=0 ) in 4-component vector of float)
0:? 'gv' (global 4-component vector of float)
0:? 'gfa' (global 3-element array of float)
0:? 'cgf2a' (const 3-element array of 2-component vector of float)
0:? 0.000000
0:? 0.000000
0:? 0.000000
0:? 0.000000
0:? 0.000000
0:? 0.000000
0:? 'ci' (const int)
0:? 0 (const int)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 75
// Id's are bound by 92
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "PixelShaderFunction" 54 59 65 69 74
EntryPoint Fragment 4 "PixelShaderFunction" 72 76 80 84 89
ExecutionMode 4 OriginUpperLeft
Name 4 "PixelShaderFunction"
Name 9 "gv"
@ -319,16 +404,18 @@ gl_FragCoord origin is upper left
MemberName 47(Nest) 1 "os"
MemberName 47(Nest) 2 "b"
Name 49 "nest"
Name 54 "a"
Name 59 "b"
Name 65 "c"
Name 69 "v"
Name 74 "input"
Decorate 54(a) Location 0
Decorate 59(b) Location 1
Decorate 65(c) Location 2
Decorate 69(v) Location 3
Decorate 74(input) Location 0
Name 57 "gf2a"
Name 61 "cgi"
Name 72 "a"
Name 76 "b"
Name 80 "c"
Name 84 "v"
Name 89 "input"
Decorate 72(a) Location 0
Decorate 76(b) Location 1
Decorate 80(c) Location 2
Decorate 84(v) Location 3
Decorate 89(input) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -365,19 +452,28 @@ gl_FragCoord origin is upper left
50: 45(fvec3) ConstantComposite 10 10 10
51: 46 ConstantComposite 50 50 50 50
52: 47(Nest) ConstantComposite 51 39 25
53: TypePointer Output 19(int)
54(a): 53(ptr) Variable Output
55: TypePointer Function 19(int)
58: TypePointer Output 6(float)
59(b): 58(ptr) Variable Output
60: 19(int) Constant 1
61: TypePointer Function 6(float)
64: TypePointer Output 20(bool)
65(c): 64(ptr) Variable Output
68: TypePointer Output 7(fvec4)
69(v): 68(ptr) Variable Output
73: TypePointer Input 7(fvec4)
74(input): 73(ptr) Variable Input
53: TypeVector 6(float) 2
54: 13(int) Constant 4
55: TypeArray 53(fvec2) 54
56: TypePointer Function 55
58: 53(fvec2) ConstantComposite 10 10
59: 55 ConstantComposite 58 58 58 58
60: TypePointer Function 19(int)
62: 19(int) Constant 1
63: 13(int) Constant 1
64: TypePointer Function 6(float)
71: TypePointer Output 19(int)
72(a): 71(ptr) Variable Output
75: TypePointer Output 6(float)
76(b): 75(ptr) Variable Output
79: TypePointer Output 20(bool)
80(c): 79(ptr) Variable Output
83: TypePointer Output 7(fvec4)
84(v): 83(ptr) Variable Output
88: TypePointer Input 7(fvec4)
89(input): 88(ptr) Variable Input
90: TypeArray 53(fvec2) 14
91: 90 ConstantComposite 58 58 58
4(PixelShaderFunction): 2 Function None 3
5: Label
23(o2): 22(ptr) Variable Function
@ -385,6 +481,8 @@ gl_FragCoord origin is upper left
37(o1): 22(ptr) Variable Function
40(o3): 22(ptr) Variable Function
49(nest): 48(ptr) Variable Function
57(gf2a): 56(ptr) Variable Function
61(cgi): 60(ptr) Variable Function
Store 9(gv) 12
Store 17(gfa) 18
Store 23(o2) 27
@ -402,17 +500,26 @@ gl_FragCoord origin is upper left
44: 41(ptr) AccessChain 28(o4) 30
Store 44 43
Store 49(nest) 52
56: 55(ptr) AccessChain 28(o4) 38
57: 19(int) Load 56
Store 54(a) 57
62: 61(ptr) AccessChain 28(o4) 60
63: 6(float) Load 62
Store 59(b) 63
66: 41(ptr) AccessChain 28(o4) 30
67: 20(bool) Load 66
Store 65(c) 67
70: 35(ptr) AccessChain 28(o4) 24
71: 7(fvec4) Load 70
Store 69(v) 71
Store 57(gf2a) 59
Store 61(cgi) 38
65: 64(ptr) AccessChain 57(gf2a) 30 63
66: 6(float) Load 65
67: 19(int) Load 61(cgi)
68: 6(float) ConvertSToF 67
69: 6(float) FMul 66 68
70: 64(ptr) AccessChain 28(o4) 62
Store 70 69
73: 60(ptr) AccessChain 28(o4) 38
74: 19(int) Load 73
Store 72(a) 74
77: 64(ptr) AccessChain 28(o4) 62
78: 6(float) Load 77
Store 76(b) 78
81: 41(ptr) AccessChain 28(o4) 30
82: 20(bool) Load 81
Store 80(c) 82
85: 35(ptr) AccessChain 28(o4) 24
86: 7(fvec4) Load 85
Store 84(v) 86
Return
FunctionEnd

View File

@ -0,0 +1,286 @@
hlsl.rw.swizzle.frag
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:4 Function Definition: SomeValue( (temp 3-component vector of float)
0:4 Function Parameters:
0:? Sequence
0:4 Branch: Return with expression
0:? Constant:
0:? 1.000000
0:? 2.000000
0:? 3.000000
0:7 Function Definition: main( (temp 4-component vector of float)
0:7 Function Parameters:
0:? Sequence
0:8 Sequence
0:8 move second child to first child (temp 2-component vector of int)
0:8 'tc2' (temp 2-component vector of int)
0:8 Constant:
0:8 0 (const int)
0:8 0 (const int)
0:9 Sequence
0:9 move second child to first child (temp int)
0:9 'tc' (temp int)
0:9 Constant:
0:9 0 (const int)
0:12 Sequence
0:12 move second child to first child (temp 3-component vector of float)
0:12 vector swizzle (temp 3-component vector of float)
0:12 'storeTemp' (temp 3-component vector of float)
0:12 Sequence
0:12 Constant:
0:12 2 (const int)
0:12 Constant:
0:12 1 (const int)
0:12 Constant:
0:12 0 (const int)
0:? Constant:
0:? 1.000000
0:? 2.000000
0:? 3.000000
0:12 imageStore (temp void)
0:12 'rwtx' (layout(rgba32f ) uniform image2D)
0:12 'tc2' (temp 2-component vector of int)
0:12 'storeTemp' (temp 3-component vector of float)
0:12 'storeTemp' (temp 3-component vector of float)
0:13 Sequence
0:13 move second child to first child (temp 3-component vector of float)
0:13 vector swizzle (temp 3-component vector of float)
0:13 'storeTemp' (temp 3-component vector of float)
0:13 Sequence
0:13 Constant:
0:13 2 (const int)
0:13 Constant:
0:13 1 (const int)
0:13 Constant:
0:13 0 (const int)
0:13 Function Call: SomeValue( (temp 3-component vector of float)
0:13 imageStore (temp void)
0:13 'rwtx' (layout(rgba32f ) uniform image2D)
0:13 'tc2' (temp 2-component vector of int)
0:13 'storeTemp' (temp 3-component vector of float)
0:13 'storeTemp' (temp 3-component vector of float)
0:14 Sequence
0:14 move second child to first child (temp 3-component vector of float)
0:14 vector swizzle (temp 3-component vector of float)
0:14 'storeTemp' (temp 3-component vector of float)
0:14 Sequence
0:14 Constant:
0:14 2 (const int)
0:14 Constant:
0:14 1 (const int)
0:14 Constant:
0:14 0 (const int)
0:14 Constant:
0:14 2.000000
0:14 2.000000
0:14 2.000000
0:14 imageStore (temp void)
0:14 'rwtx' (layout(rgba32f ) uniform image2D)
0:14 'tc2' (temp 2-component vector of int)
0:14 'storeTemp' (temp 3-component vector of float)
0:14 'storeTemp' (temp 3-component vector of float)
0:27 Sequence
0:27 move second child to first child (temp 4-component vector of float)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:27 Constant:
0:27 0.000000
0:27 0.000000
0:27 0.000000
0:27 0.000000
0:27 Branch: Return
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:? 'rwtx' (layout(rgba32f ) uniform image2D)
0:? 'buf' (layout(rgba32f ) uniform imageBuffer)
Linked fragment stage:
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:4 Function Definition: SomeValue( (temp 3-component vector of float)
0:4 Function Parameters:
0:? Sequence
0:4 Branch: Return with expression
0:? Constant:
0:? 1.000000
0:? 2.000000
0:? 3.000000
0:7 Function Definition: main( (temp 4-component vector of float)
0:7 Function Parameters:
0:? Sequence
0:8 Sequence
0:8 move second child to first child (temp 2-component vector of int)
0:8 'tc2' (temp 2-component vector of int)
0:8 Constant:
0:8 0 (const int)
0:8 0 (const int)
0:9 Sequence
0:9 move second child to first child (temp int)
0:9 'tc' (temp int)
0:9 Constant:
0:9 0 (const int)
0:12 Sequence
0:12 move second child to first child (temp 3-component vector of float)
0:12 vector swizzle (temp 3-component vector of float)
0:12 'storeTemp' (temp 3-component vector of float)
0:12 Sequence
0:12 Constant:
0:12 2 (const int)
0:12 Constant:
0:12 1 (const int)
0:12 Constant:
0:12 0 (const int)
0:? Constant:
0:? 1.000000
0:? 2.000000
0:? 3.000000
0:12 imageStore (temp void)
0:12 'rwtx' (layout(rgba32f ) uniform image2D)
0:12 'tc2' (temp 2-component vector of int)
0:12 'storeTemp' (temp 3-component vector of float)
0:12 'storeTemp' (temp 3-component vector of float)
0:13 Sequence
0:13 move second child to first child (temp 3-component vector of float)
0:13 vector swizzle (temp 3-component vector of float)
0:13 'storeTemp' (temp 3-component vector of float)
0:13 Sequence
0:13 Constant:
0:13 2 (const int)
0:13 Constant:
0:13 1 (const int)
0:13 Constant:
0:13 0 (const int)
0:13 Function Call: SomeValue( (temp 3-component vector of float)
0:13 imageStore (temp void)
0:13 'rwtx' (layout(rgba32f ) uniform image2D)
0:13 'tc2' (temp 2-component vector of int)
0:13 'storeTemp' (temp 3-component vector of float)
0:13 'storeTemp' (temp 3-component vector of float)
0:14 Sequence
0:14 move second child to first child (temp 3-component vector of float)
0:14 vector swizzle (temp 3-component vector of float)
0:14 'storeTemp' (temp 3-component vector of float)
0:14 Sequence
0:14 Constant:
0:14 2 (const int)
0:14 Constant:
0:14 1 (const int)
0:14 Constant:
0:14 0 (const int)
0:14 Constant:
0:14 2.000000
0:14 2.000000
0:14 2.000000
0:14 imageStore (temp void)
0:14 'rwtx' (layout(rgba32f ) uniform image2D)
0:14 'tc2' (temp 2-component vector of int)
0:14 'storeTemp' (temp 3-component vector of float)
0:14 'storeTemp' (temp 3-component vector of float)
0:27 Sequence
0:27 move second child to first child (temp 4-component vector of float)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:27 Constant:
0:27 0.000000
0:27 0.000000
0:27 0.000000
0:27 0.000000
0:27 Branch: Return
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:? 'rwtx' (layout(rgba32f ) uniform image2D)
0:? 'buf' (layout(rgba32f ) uniform imageBuffer)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 58
Capability Shader
Capability SampledBuffer
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 51
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 9 "SomeValue("
Name 20 "tc2"
Name 24 "tc"
Name 26 "storeTemp"
Name 31 "rwtx"
Name 35 "storeTemp"
Name 42 "storeTemp"
Name 51 "@entryPointOutput"
Name 57 "buf"
Decorate 31(rwtx) DescriptorSet 0
Decorate 51(@entryPointOutput) Location 0
Decorate 57(buf) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 3
8: TypeFunction 7(fvec3)
11: 6(float) Constant 1065353216
12: 6(float) Constant 1073741824
13: 6(float) Constant 1077936128
14: 7(fvec3) ConstantComposite 11 12 13
17: TypeInt 32 1
18: TypeVector 17(int) 2
19: TypePointer Function 18(ivec2)
21: 17(int) Constant 0
22: 18(ivec2) ConstantComposite 21 21
23: TypePointer Function 17(int)
25: TypePointer Function 7(fvec3)
29: TypeImage 6(float) 2D nonsampled format:Rgba32f
30: TypePointer UniformConstant 29
31(rwtx): 30(ptr) Variable UniformConstant
43: 7(fvec3) ConstantComposite 12 12 12
49: TypeVector 6(float) 4
50: TypePointer Output 49(fvec4)
51(@entryPointOutput): 50(ptr) Variable Output
52: 6(float) Constant 0
53: 49(fvec4) ConstantComposite 52 52 52 52
55: TypeImage 6(float) Buffer nonsampled format:Rgba32f
56: TypePointer UniformConstant 55
57(buf): 56(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
20(tc2): 19(ptr) Variable Function
24(tc): 23(ptr) Variable Function
26(storeTemp): 25(ptr) Variable Function
35(storeTemp): 25(ptr) Variable Function
42(storeTemp): 25(ptr) Variable Function
Store 20(tc2) 22
Store 24(tc) 21
27: 7(fvec3) Load 26(storeTemp)
28: 7(fvec3) VectorShuffle 27 14 5 4 3
Store 26(storeTemp) 28
32: 29 Load 31(rwtx)
33: 18(ivec2) Load 20(tc2)
34: 7(fvec3) Load 26(storeTemp)
ImageWrite 32 33 34
36: 7(fvec3) FunctionCall 9(SomeValue()
37: 7(fvec3) Load 35(storeTemp)
38: 7(fvec3) VectorShuffle 37 36 5 4 3
Store 35(storeTemp) 38
39: 29 Load 31(rwtx)
40: 18(ivec2) Load 20(tc2)
41: 7(fvec3) Load 35(storeTemp)
ImageWrite 39 40 41
44: 7(fvec3) Load 42(storeTemp)
45: 7(fvec3) VectorShuffle 44 43 5 4 3
Store 42(storeTemp) 45
46: 29 Load 31(rwtx)
47: 18(ivec2) Load 20(tc2)
48: 7(fvec3) Load 42(storeTemp)
ImageWrite 46 47 48
Store 51(@entryPointOutput) 53
Return
FunctionEnd
9(SomeValue(): 7(fvec3) Function None 8
10: Label
ReturnValue 14
FunctionEnd

View File

@ -1,7 +1,7 @@
hlsl.samplegrad.basic.dx10.vert
Shader version: 450
0:? Sequence
0:27 Function Definition: main( (temp structure{temp 4-component vector of float Pos})
0:27 Function Definition: main( (temp structure{temp 4-component vector of float Position Pos})
0:27 Function Parameters:
0:? Sequence
0:30 Sequence
@ -225,7 +225,6 @@ Shader version: 450
0:48 0 (const int)
0:48 Branch: Return
0:? Linker Objects
0:? 'Pos' (out 4-component vector of float Position)
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
0:? 'g_tTex1df4a' (layout(binding=1 ) uniform texture1D)
0:? 'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
@ -240,6 +239,7 @@ Shader version: 450
0:? 'g_tTexcdf4' (uniform textureCube)
0:? 'g_tTexcdi4' (uniform itextureCube)
0:? 'g_tTexcdu4' (uniform utextureCube)
0:? 'PerVertex_out' (out block{out 4-component vector of float Position Pos})
Linked vertex stage:
@ -247,7 +247,7 @@ Linked vertex stage:
Shader version: 450
0:? Sequence
0:27 Function Definition: main( (temp structure{temp 4-component vector of float Pos})
0:27 Function Definition: main( (temp structure{temp 4-component vector of float Position Pos})
0:27 Function Parameters:
0:? Sequence
0:30 Sequence
@ -471,7 +471,6 @@ Shader version: 450
0:48 0 (const int)
0:48 Branch: Return
0:? Linker Objects
0:? 'Pos' (out 4-component vector of float Position)
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
0:? 'g_tTex1df4a' (layout(binding=1 ) uniform texture1D)
0:? 'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
@ -486,16 +485,17 @@ Shader version: 450
0:? 'g_tTexcdf4' (uniform textureCube)
0:? 'g_tTexcdi4' (uniform itextureCube)
0:? 'g_tTexcdu4' (uniform utextureCube)
0:? 'PerVertex_out' (out block{out 4-component vector of float Position Pos})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 161
// Id's are bound by 164
Capability Shader
Capability Sampled1D
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 156
EntryPoint Vertex 4 "main" 156 163
Name 4 "main"
Name 9 "txval10"
Name 12 "g_tTex1df4"
@ -527,6 +527,9 @@ Shader version: 450
Name 150 "vsout"
Name 156 "Pos"
Name 160 "g_tTex1df4a"
Name 161 "PerVertex_out"
MemberName 161(PerVertex_out) 0 "Pos"
Name 163 "PerVertex_out"
Decorate 12(g_tTex1df4) DescriptorSet 0
Decorate 12(g_tTex1df4) Binding 0
Decorate 16(g_sSamp) DescriptorSet 0
@ -545,6 +548,8 @@ Shader version: 450
Decorate 156(Pos) BuiltIn Position
Decorate 160(g_tTex1df4a) DescriptorSet 0
Decorate 160(g_tTex1df4a) Binding 1
MemberDecorate 161(PerVertex_out) 0 BuiltIn Position
Decorate 161(PerVertex_out) Block
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -637,6 +642,9 @@ Shader version: 450
155: TypePointer Output 7(fvec4)
156(Pos): 155(ptr) Variable Output
160(g_tTex1df4a): 11(ptr) Variable UniformConstant
161(PerVertex_out): TypeStruct 7(fvec4)
162: TypePointer Output 161(PerVertex_out)
163(PerVertex_out): 162(ptr) Variable Output
4(main): 2 Function None 3
5: Label
9(txval10): 8(ptr) Variable Function

View File

@ -1,7 +1,7 @@
hlsl.samplelevel.basic.dx10.vert
Shader version: 450
0:? Sequence
0:27 Function Definition: main( (temp structure{temp 4-component vector of float Pos})
0:27 Function Definition: main( (temp structure{temp 4-component vector of float Position Pos})
0:27 Function Parameters:
0:? Sequence
0:30 Sequence
@ -171,7 +171,6 @@ Shader version: 450
0:48 0 (const int)
0:48 Branch: Return
0:? Linker Objects
0:? 'Pos' (out 4-component vector of float Position)
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
0:? 'g_tTex1df4a' (layout(binding=1 ) uniform texture1D)
0:? 'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
@ -186,6 +185,7 @@ Shader version: 450
0:? 'g_tTexcdf4' (uniform textureCube)
0:? 'g_tTexcdi4' (uniform itextureCube)
0:? 'g_tTexcdu4' (uniform utextureCube)
0:? 'PerVertex_out' (out block{out 4-component vector of float Position Pos})
Linked vertex stage:
@ -193,7 +193,7 @@ Linked vertex stage:
Shader version: 450
0:? Sequence
0:27 Function Definition: main( (temp structure{temp 4-component vector of float Pos})
0:27 Function Definition: main( (temp structure{temp 4-component vector of float Position Pos})
0:27 Function Parameters:
0:? Sequence
0:30 Sequence
@ -363,7 +363,6 @@ Shader version: 450
0:48 0 (const int)
0:48 Branch: Return
0:? Linker Objects
0:? 'Pos' (out 4-component vector of float Position)
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
0:? 'g_tTex1df4a' (layout(binding=1 ) uniform texture1D)
0:? 'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
@ -378,16 +377,17 @@ Shader version: 450
0:? 'g_tTexcdf4' (uniform textureCube)
0:? 'g_tTexcdi4' (uniform itextureCube)
0:? 'g_tTexcdu4' (uniform utextureCube)
0:? 'PerVertex_out' (out block{out 4-component vector of float Position Pos})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 157
// Id's are bound by 160
Capability Shader
Capability Sampled1D
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 152
EntryPoint Vertex 4 "main" 152 159
Name 4 "main"
Name 9 "txval10"
Name 12 "g_tTex1df4"
@ -419,6 +419,9 @@ Shader version: 450
Name 146 "vsout"
Name 152 "Pos"
Name 156 "g_tTex1df4a"
Name 157 "PerVertex_out"
MemberName 157(PerVertex_out) 0 "Pos"
Name 159 "PerVertex_out"
Decorate 12(g_tTex1df4) DescriptorSet 0
Decorate 12(g_tTex1df4) Binding 0
Decorate 16(g_sSamp) DescriptorSet 0
@ -437,6 +440,8 @@ Shader version: 450
Decorate 152(Pos) BuiltIn Position
Decorate 156(g_tTex1df4a) DescriptorSet 0
Decorate 156(g_tTex1df4a) Binding 1
MemberDecorate 157(PerVertex_out) 0 BuiltIn Position
Decorate 157(PerVertex_out) Block
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -525,6 +530,9 @@ Shader version: 450
151: TypePointer Output 7(fvec4)
152(Pos): 151(ptr) Variable Output
156(g_tTex1df4a): 11(ptr) Variable UniformConstant
157(PerVertex_out): TypeStruct 7(fvec4)
158: TypePointer Output 157(PerVertex_out)
159(PerVertex_out): 158(ptr) Variable Output
4(main): 2 Function None 3
5: Label
9(txval10): 8(ptr) Variable Function

View File

@ -9,7 +9,7 @@ gl_FragCoord origin is upper left
0:34 Function Definition: PixelShaderFunction(vf4;struct-IN_S-vf4-b1-vf1-vf2-b1-b1-b1-vf41; (temp 4-component vector of float)
0:34 Function Parameters:
0:34 'input' (layout(location=0 ) in 4-component vector of float)
0:34 's' (in structure{temp 4-component vector of float a, temp bool b, temp 1-component vector of float c, temp 2-component vector of float d, temp bool ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4})
0:34 's' (in structure{smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool Face ff1, layout(offset=4 ) temp bool ff2, layout(binding=0 offset=4 ) temp bool ff3, layout(binding=0 offset=4 ) temp 4-component vector of float ff4})
0:? Sequence
0:39 Compare Equal (temp bool)
0:39 's3' (temp structure{temp 3-component vector of bool b3})
@ -19,7 +19,10 @@ gl_FragCoord origin is upper left
0:40 's2' (global structure{temp 4-component vector of float i})
0:40 Constant:
0:40 0 (const int)
0:? 'ff4' (layout(location=7 binding=0 offset=4 ) in 4-component vector of float)
0:40 ff4: direct index for structure (layout(binding=0 offset=4 ) temp 4-component vector of float)
0:40 's' (layout(location=1 ) in structure{smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, layout(offset=4 ) temp bool ff2, layout(binding=0 offset=4 ) temp bool ff3, layout(binding=0 offset=4 ) temp 4-component vector of float ff4})
0:40 Constant:
0:40 6 (const int)
0:42 Sequence
0:42 move second child to first child (temp 4-component vector of float)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
@ -28,16 +31,10 @@ gl_FragCoord origin is upper left
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:? 'input' (layout(location=0 ) in 4-component vector of float)
0:? 'a' (layout(location=1 ) smooth in 4-component vector of float)
0:? 'b' (layout(location=2 ) flat in bool)
0:? 'c' (layout(location=3 ) centroid noperspective in 1-component vector of float)
0:? 'd' (layout(location=4 ) centroid sample in 2-component vector of float)
0:? 'ff1' (in bool Face)
0:? 'ff2' (layout(location=5 offset=4 ) in bool)
0:? 'ff3' (layout(location=6 binding=0 offset=4 ) in bool)
0:? 'ff4' (layout(location=7 binding=0 offset=4 ) in 4-component vector of float)
0:? 's' (layout(location=1 ) in structure{smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, layout(offset=4 ) temp bool ff2, layout(binding=0 offset=4 ) temp bool ff3, layout(binding=0 offset=4 ) temp 4-component vector of float ff4})
0:? 's2' (global structure{temp 4-component vector of float i})
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform structure{temp bool b, temp bool c, temp 4-component vector of float a, temp 4-component vector of float d} s1, layout(binding=5 offset=1620 ) uniform float ff5, layout(binding=8 offset=1636 ) uniform float ff6})
0:? 's_ff1' (in bool Face)
Linked fragment stage:
@ -49,7 +46,7 @@ gl_FragCoord origin is upper left
0:34 Function Definition: PixelShaderFunction(vf4;struct-IN_S-vf4-b1-vf1-vf2-b1-b1-b1-vf41; (temp 4-component vector of float)
0:34 Function Parameters:
0:34 'input' (layout(location=0 ) in 4-component vector of float)
0:34 's' (in structure{temp 4-component vector of float a, temp bool b, temp 1-component vector of float c, temp 2-component vector of float d, temp bool ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4})
0:34 's' (in structure{smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool Face ff1, layout(offset=4 ) temp bool ff2, layout(binding=0 offset=4 ) temp bool ff3, layout(binding=0 offset=4 ) temp 4-component vector of float ff4})
0:? Sequence
0:39 Compare Equal (temp bool)
0:39 's3' (temp structure{temp 3-component vector of bool b3})
@ -59,7 +56,10 @@ gl_FragCoord origin is upper left
0:40 's2' (global structure{temp 4-component vector of float i})
0:40 Constant:
0:40 0 (const int)
0:? 'ff4' (layout(location=7 binding=0 offset=4 ) in 4-component vector of float)
0:40 ff4: direct index for structure (layout(binding=0 offset=4 ) temp 4-component vector of float)
0:40 's' (layout(location=1 ) in structure{smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, layout(offset=4 ) temp bool ff2, layout(binding=0 offset=4 ) temp bool ff3, layout(binding=0 offset=4 ) temp 4-component vector of float ff4})
0:40 Constant:
0:40 6 (const int)
0:42 Sequence
0:42 move second child to first child (temp 4-component vector of float)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
@ -68,25 +68,19 @@ gl_FragCoord origin is upper left
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:? 'input' (layout(location=0 ) in 4-component vector of float)
0:? 'a' (layout(location=1 ) smooth in 4-component vector of float)
0:? 'b' (layout(location=2 ) flat in bool)
0:? 'c' (layout(location=3 ) centroid noperspective in 1-component vector of float)
0:? 'd' (layout(location=4 ) centroid sample in 2-component vector of float)
0:? 'ff1' (in bool Face)
0:? 'ff2' (layout(location=5 offset=4 ) in bool)
0:? 'ff3' (layout(location=6 binding=0 offset=4 ) in bool)
0:? 'ff4' (layout(location=7 binding=0 offset=4 ) in 4-component vector of float)
0:? 's' (layout(location=1 ) in structure{smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, layout(offset=4 ) temp bool ff2, layout(binding=0 offset=4 ) temp bool ff3, layout(binding=0 offset=4 ) temp 4-component vector of float ff4})
0:? 's2' (global structure{temp 4-component vector of float i})
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform structure{temp bool b, temp bool c, temp 4-component vector of float a, temp 4-component vector of float d} s1, layout(binding=5 offset=1620 ) uniform float ff5, layout(binding=8 offset=1636 ) uniform float ff6})
0:? 's_ff1' (in bool Face)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 50
// Id's are bound by 46
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "PixelShaderFunction" 25 30 31 34 36 38 41 42 43 44
EntryPoint Fragment 4 "PixelShaderFunction" 27 35 36 45
ExecutionMode 4 OriginUpperLeft
Name 4 "PixelShaderFunction"
Name 8 "FS"
@ -95,54 +89,41 @@ gl_FragCoord origin is upper left
Name 19 ""
MemberName 19 0 "i"
Name 21 "s2"
Name 25 "ff4"
Name 30 "@entryPointOutput"
Name 31 "input"
Name 34 "a"
Name 36 "b"
Name 38 "c"
Name 41 "d"
Name 42 "ff1"
Name 43 "ff2"
Name 44 "ff3"
Name 46 "myS"
MemberName 46(myS) 0 "b"
MemberName 46(myS) 1 "c"
MemberName 46(myS) 2 "a"
MemberName 46(myS) 3 "d"
Name 47 "$Global"
MemberName 47($Global) 0 "s1"
MemberName 47($Global) 1 "ff5"
MemberName 47($Global) 2 "ff6"
Name 49 ""
Decorate 25(ff4) Offset 4
Decorate 25(ff4) Location 7
Decorate 25(ff4) Binding 0
Decorate 30(@entryPointOutput) Location 0
Decorate 31(input) Location 0
Decorate 34(a) Location 1
Decorate 36(b) Flat
Decorate 36(b) Location 2
Decorate 38(c) NoPerspective
Decorate 38(c) Centroid
Decorate 38(c) Location 3
Decorate 41(d) Centroid
Decorate 41(d) Location 4
Decorate 42(ff1) BuiltIn FrontFacing
Decorate 43(ff2) Offset 4
Decorate 43(ff2) Location 5
Decorate 44(ff3) Offset 4
Decorate 44(ff3) Location 6
Decorate 44(ff3) Binding 0
MemberDecorate 46(myS) 0 Offset 0
MemberDecorate 46(myS) 1 Offset 4
MemberDecorate 46(myS) 2 Offset 16
MemberDecorate 46(myS) 3 Offset 32
MemberDecorate 47($Global) 0 Offset 0
MemberDecorate 47($Global) 1 Offset 1620
MemberDecorate 47($Global) 2 Offset 1636
Decorate 47($Global) Block
Decorate 49 DescriptorSet 0
Name 25 "IN_S"
MemberName 25(IN_S) 0 "a"
MemberName 25(IN_S) 1 "b"
MemberName 25(IN_S) 2 "c"
MemberName 25(IN_S) 3 "d"
MemberName 25(IN_S) 4 "ff2"
MemberName 25(IN_S) 5 "ff3"
MemberName 25(IN_S) 6 "ff4"
Name 27 "s"
Name 35 "@entryPointOutput"
Name 36 "input"
Name 40 "myS"
MemberName 40(myS) 0 "b"
MemberName 40(myS) 1 "c"
MemberName 40(myS) 2 "a"
MemberName 40(myS) 3 "d"
Name 41 "$Global"
MemberName 41($Global) 0 "s1"
MemberName 41($Global) 1 "ff5"
MemberName 41($Global) 2 "ff6"
Name 43 ""
Name 45 "s_ff1"
Decorate 27(s) Location 1
Decorate 35(@entryPointOutput) Location 0
Decorate 36(input) Location 0
MemberDecorate 40(myS) 0 Offset 0
MemberDecorate 40(myS) 1 Offset 4
MemberDecorate 40(myS) 2 Offset 16
MemberDecorate 40(myS) 3 Offset 32
MemberDecorate 41($Global) 0 Offset 0
MemberDecorate 41($Global) 1 Offset 1620
MemberDecorate 41($Global) 2 Offset 1636
Decorate 41($Global) Block
Decorate 43 DescriptorSet 0
Decorate 45(s_ff1) BuiltIn FrontFacing
2: TypeVoid
3: TypeFunction 2
6: TypeBool
@ -156,28 +137,23 @@ gl_FragCoord origin is upper left
21(s2): 20(ptr) Variable Private
22: TypeInt 32 1
23: 22(int) Constant 0
24: TypePointer Input 18(fvec4)
25(ff4): 24(ptr) Variable Input
27: TypePointer Private 18(fvec4)
29: TypePointer Output 18(fvec4)
30(@entryPointOutput): 29(ptr) Variable Output
31(input): 24(ptr) Variable Input
34(a): 24(ptr) Variable Input
35: TypePointer Input 6(bool)
36(b): 35(ptr) Variable Input
37: TypePointer Input 17(float)
38(c): 37(ptr) Variable Input
39: TypeVector 17(float) 2
40: TypePointer Input 39(fvec2)
41(d): 40(ptr) Variable Input
42(ff1): 35(ptr) Variable Input
43(ff2): 35(ptr) Variable Input
44(ff3): 35(ptr) Variable Input
45: TypeInt 32 0
46(myS): TypeStruct 45(int) 45(int) 18(fvec4) 18(fvec4)
47($Global): TypeStruct 46(myS) 17(float) 17(float)
48: TypePointer Uniform 47($Global)
49: 48(ptr) Variable Uniform
24: TypeVector 17(float) 2
25(IN_S): TypeStruct 18(fvec4) 6(bool) 17(float) 24(fvec2) 6(bool) 6(bool) 18(fvec4)
26: TypePointer Input 25(IN_S)
27(s): 26(ptr) Variable Input
28: 22(int) Constant 6
29: TypePointer Input 18(fvec4)
32: TypePointer Private 18(fvec4)
34: TypePointer Output 18(fvec4)
35(@entryPointOutput): 34(ptr) Variable Output
36(input): 29(ptr) Variable Input
39: TypeInt 32 0
40(myS): TypeStruct 39(int) 39(int) 18(fvec4) 18(fvec4)
41($Global): TypeStruct 40(myS) 17(float) 17(float)
42: TypePointer Uniform 41($Global)
43: 42(ptr) Variable Uniform
44: TypePointer Input 6(bool)
45(s_ff1): 44(ptr) Variable Input
4(PixelShaderFunction): 2 Function None 3
5: Label
10(s3): 9(ptr) Variable Function
@ -187,10 +163,11 @@ gl_FragCoord origin is upper left
14: 7(bvec3) CompositeExtract 12 0
15: 7(bvec3) LogicalEqual 13 14
16: 6(bool) All 15
26: 18(fvec4) Load 25(ff4)
28: 27(ptr) AccessChain 21(s2) 23
Store 28 26
32: 18(fvec4) Load 31(input)
Store 30(@entryPointOutput) 32
30: 29(ptr) AccessChain 27(s) 28
31: 18(fvec4) Load 30
33: 32(ptr) AccessChain 21(s2) 23
Store 33 31
37: 18(fvec4) Load 36(input)
Store 35(@entryPointOutput) 37
Return
FunctionEnd

View File

@ -0,0 +1,217 @@
hlsl.struct.split-1.vert
Shader version: 450
0:? Sequence
0:17 Function Definition: main(struct-VS_INPUT-i1-vf4-i11;vf4; (temp structure{temp int x0_out, temp 4-component vector of float Position Pos_out, temp int x1_out})
0:17 Function Parameters:
0:17 'vsin' (in structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:17 'Pos_loose' (in 4-component vector of float Position)
0:? Sequence
0:20 move second child to first child (temp int)
0:20 x0_out: direct index for structure (temp int)
0:20 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:20 Constant:
0:20 0 (const int)
0:? 'x0_in' (layout(location=0 ) in int)
0:21 move second child to first child (temp 4-component vector of float)
0:21 Pos_out: direct index for structure (temp 4-component vector of float)
0:21 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:21 Constant:
0:21 1 (const int)
0:21 add (temp 4-component vector of float)
0:? 'Pos_in' (in 4-component vector of float Position)
0:21 'Pos_loose' (in 4-component vector of float Position)
0:22 move second child to first child (temp int)
0:22 x1_out: direct index for structure (temp int)
0:22 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:22 Constant:
0:22 2 (const int)
0:? 'x1_in' (layout(location=1 ) in int)
0:24 Sequence
0:24 Sequence
0:24 move second child to first child (temp int)
0:24 x0_out: direct index for structure (temp int)
0:24 '@entryPointOutput' (layout(location=0 ) out structure{temp int x0_out, temp int x1_out})
0:24 Constant:
0:24 0 (const int)
0:24 x0_out: direct index for structure (temp int)
0:24 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:24 Constant:
0:24 0 (const int)
0:24 move second child to first child (temp 4-component vector of float)
0:? 'Pos_out' (out 4-component vector of float Position)
0:24 Pos_out: direct index for structure (temp 4-component vector of float)
0:24 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:24 Constant:
0:24 1 (const int)
0:24 move second child to first child (temp int)
0:24 x1_out: direct index for structure (temp int)
0:24 '@entryPointOutput' (layout(location=0 ) out structure{temp int x0_out, temp int x1_out})
0:24 Constant:
0:24 1 (const int)
0:24 x1_out: direct index for structure (temp int)
0:24 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:24 Constant:
0:24 2 (const int)
0:24 Branch: Return
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp int x0_out, temp int x1_out})
0:? 'x0_in' (layout(location=0 ) in int)
0:? 'Pos_in' (in 4-component vector of float Position)
0:? 'x1_in' (layout(location=1 ) in int)
0:? 'Pos_loose' (in 4-component vector of float Position)
0:? 'PerVertex_out' (out block{out 4-component vector of float Position Pos_out})
Linked vertex stage:
Shader version: 450
0:? Sequence
0:17 Function Definition: main(struct-VS_INPUT-i1-vf4-i11;vf4; (temp structure{temp int x0_out, temp 4-component vector of float Position Pos_out, temp int x1_out})
0:17 Function Parameters:
0:17 'vsin' (in structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:17 'Pos_loose' (in 4-component vector of float Position)
0:? Sequence
0:20 move second child to first child (temp int)
0:20 x0_out: direct index for structure (temp int)
0:20 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:20 Constant:
0:20 0 (const int)
0:? 'x0_in' (layout(location=0 ) in int)
0:21 move second child to first child (temp 4-component vector of float)
0:21 Pos_out: direct index for structure (temp 4-component vector of float)
0:21 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:21 Constant:
0:21 1 (const int)
0:21 add (temp 4-component vector of float)
0:? 'Pos_in' (in 4-component vector of float Position)
0:21 'Pos_loose' (in 4-component vector of float Position)
0:22 move second child to first child (temp int)
0:22 x1_out: direct index for structure (temp int)
0:22 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:22 Constant:
0:22 2 (const int)
0:? 'x1_in' (layout(location=1 ) in int)
0:24 Sequence
0:24 Sequence
0:24 move second child to first child (temp int)
0:24 x0_out: direct index for structure (temp int)
0:24 '@entryPointOutput' (layout(location=0 ) out structure{temp int x0_out, temp int x1_out})
0:24 Constant:
0:24 0 (const int)
0:24 x0_out: direct index for structure (temp int)
0:24 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:24 Constant:
0:24 0 (const int)
0:24 move second child to first child (temp 4-component vector of float)
0:? 'Pos_out' (out 4-component vector of float Position)
0:24 Pos_out: direct index for structure (temp 4-component vector of float)
0:24 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:24 Constant:
0:24 1 (const int)
0:24 move second child to first child (temp int)
0:24 x1_out: direct index for structure (temp int)
0:24 '@entryPointOutput' (layout(location=0 ) out structure{temp int x0_out, temp int x1_out})
0:24 Constant:
0:24 1 (const int)
0:24 x1_out: direct index for structure (temp int)
0:24 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:24 Constant:
0:24 2 (const int)
0:24 Branch: Return
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp int x0_out, temp int x1_out})
0:? 'x0_in' (layout(location=0 ) in int)
0:? 'Pos_in' (in 4-component vector of float Position)
0:? 'x1_in' (layout(location=1 ) in int)
0:? 'Pos_loose' (in 4-component vector of float Position)
0:? 'PerVertex_out' (out block{out 4-component vector of float Position Pos_out})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 49
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 14 20 22 28 33 39 48
Name 4 "main"
Name 9 "VS_OUTPUT"
MemberName 9(VS_OUTPUT) 0 "x0_out"
MemberName 9(VS_OUTPUT) 1 "Pos_out"
MemberName 9(VS_OUTPUT) 2 "x1_out"
Name 11 "vsout"
Name 14 "x0_in"
Name 20 "Pos_in"
Name 22 "Pos_loose"
Name 28 "x1_in"
Name 31 "VS_OUTPUT"
MemberName 31(VS_OUTPUT) 0 "x0_out"
MemberName 31(VS_OUTPUT) 1 "x1_out"
Name 33 "@entryPointOutput"
Name 39 "Pos_out"
Name 46 "PerVertex_out"
MemberName 46(PerVertex_out) 0 "Pos_out"
Name 48 "PerVertex_out"
Decorate 14(x0_in) Location 0
Decorate 20(Pos_in) BuiltIn Position
Decorate 22(Pos_loose) BuiltIn Position
Decorate 28(x1_in) Location 1
Decorate 33(@entryPointOutput) Location 0
Decorate 39(Pos_out) BuiltIn Position
MemberDecorate 46(PerVertex_out) 0 BuiltIn Position
Decorate 46(PerVertex_out) Block
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
7: TypeFloat 32
8: TypeVector 7(float) 4
9(VS_OUTPUT): TypeStruct 6(int) 8(fvec4) 6(int)
10: TypePointer Function 9(VS_OUTPUT)
12: 6(int) Constant 0
13: TypePointer Input 6(int)
14(x0_in): 13(ptr) Variable Input
16: TypePointer Function 6(int)
18: 6(int) Constant 1
19: TypePointer Input 8(fvec4)
20(Pos_in): 19(ptr) Variable Input
22(Pos_loose): 19(ptr) Variable Input
25: TypePointer Function 8(fvec4)
27: 6(int) Constant 2
28(x1_in): 13(ptr) Variable Input
31(VS_OUTPUT): TypeStruct 6(int) 6(int)
32: TypePointer Output 31(VS_OUTPUT)
33(@entryPointOutput): 32(ptr) Variable Output
36: TypePointer Output 6(int)
38: TypePointer Output 8(fvec4)
39(Pos_out): 38(ptr) Variable Output
46(PerVertex_out): TypeStruct 8(fvec4)
47: TypePointer Output 46(PerVertex_out)
48(PerVertex_out): 47(ptr) Variable Output
4(main): 2 Function None 3
5: Label
11(vsout): 10(ptr) Variable Function
15: 6(int) Load 14(x0_in)
17: 16(ptr) AccessChain 11(vsout) 12
Store 17 15
21: 8(fvec4) Load 20(Pos_in)
23: 8(fvec4) Load 22(Pos_loose)
24: 8(fvec4) FAdd 21 23
26: 25(ptr) AccessChain 11(vsout) 18
Store 26 24
29: 6(int) Load 28(x1_in)
30: 16(ptr) AccessChain 11(vsout) 27
Store 30 29
34: 16(ptr) AccessChain 11(vsout) 12
35: 6(int) Load 34
37: 36(ptr) AccessChain 33(@entryPointOutput) 12
Store 37 35
40: 25(ptr) AccessChain 11(vsout) 18
41: 8(fvec4) Load 40
Store 39(Pos_out) 41
42: 16(ptr) AccessChain 11(vsout) 27
43: 6(int) Load 42
44: 36(ptr) AccessChain 33(@entryPointOutput) 18
Store 44 43
Return
FunctionEnd

View File

@ -0,0 +1,299 @@
hlsl.struct.split.array.geom
Shader version: 450
invocations = -1
max_vertices = 4
input primitive = points
output primitive = triangle_strip
0:? Sequence
0:13 Function Definition: main(u1[1];struct-PSInput-vf4-vf2-vf3-u11; (temp void)
0:13 Function Parameters:
0:13 'v' (layout(location=0 ) in 1-element array of uint)
0:13 'OutputStream' (out structure{temp 4-component vector of float Position Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
0:? Sequence
0:16 Sequence
0:16 move second child to first child (temp structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
0:16 'Out' (temp structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
0:16 Constant:
0:16 0.000000
0:16 0.000000
0:16 0.000000
0:16 0.000000
0:16 0.000000
0:16 0.000000
0:16 0.000000
0:16 0.000000
0:16 0.000000
0:16 0 (const uint)
0:18 Sequence
0:18 move second child to first child (temp int)
0:18 'x' (temp int)
0:18 Constant:
0:18 0 (const int)
0:18 Loop with condition tested first
0:18 Loop Condition
0:18 Compare Less Than (temp bool)
0:18 'x' (temp int)
0:18 Constant:
0:18 2 (const int)
0:18 Loop Body
0:19 Sequence
0:19 move second child to first child (temp int)
0:19 'y' (temp int)
0:19 Constant:
0:19 0 (const int)
0:19 Loop with condition tested first
0:19 Loop Condition
0:19 Compare Less Than (temp bool)
0:19 'y' (temp int)
0:19 Constant:
0:19 2 (const int)
0:19 Loop Body
0:20 move second child to first child (temp structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
0:20 indirect index (temp structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
0:20 indirect index (temp 3-element array of structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
0:20 'Verts' (temp 2-element array of 3-element array of structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
0:20 'x' (temp int)
0:20 'y' (temp int)
0:20 'Out' (temp structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
0:19 Loop Terminal Expression
0:19 Pre-Increment (temp int)
0:19 'y' (temp int)
0:18 Loop Terminal Expression
0:18 Pre-Increment (temp int)
0:18 'x' (temp int)
0:? Linker Objects
0:? 'v' (layout(location=0 ) in 1-element array of uint)
0:? 'OutputStream' (layout(location=0 ) out structure{temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
0:? 'PerVertex_out' (out block{out 4-component vector of float Position OutputStream_Pos})
Linked geometry stage:
Shader version: 450
invocations = 1
max_vertices = 4
input primitive = points
output primitive = triangle_strip
0:? Sequence
0:13 Function Definition: main(u1[1];struct-PSInput-vf4-vf2-vf3-u11; (temp void)
0:13 Function Parameters:
0:13 'v' (layout(location=0 ) in 1-element array of uint)
0:13 'OutputStream' (out structure{temp 4-component vector of float Position Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
0:? Sequence
0:16 Sequence
0:16 move second child to first child (temp structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
0:16 'Out' (temp structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
0:16 Constant:
0:16 0.000000
0:16 0.000000
0:16 0.000000
0:16 0.000000
0:16 0.000000
0:16 0.000000
0:16 0.000000
0:16 0.000000
0:16 0.000000
0:16 0 (const uint)
0:18 Sequence
0:18 move second child to first child (temp int)
0:18 'x' (temp int)
0:18 Constant:
0:18 0 (const int)
0:18 Loop with condition tested first
0:18 Loop Condition
0:18 Compare Less Than (temp bool)
0:18 'x' (temp int)
0:18 Constant:
0:18 2 (const int)
0:18 Loop Body
0:19 Sequence
0:19 move second child to first child (temp int)
0:19 'y' (temp int)
0:19 Constant:
0:19 0 (const int)
0:19 Loop with condition tested first
0:19 Loop Condition
0:19 Compare Less Than (temp bool)
0:19 'y' (temp int)
0:19 Constant:
0:19 2 (const int)
0:19 Loop Body
0:20 move second child to first child (temp structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
0:20 indirect index (temp structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
0:20 indirect index (temp 3-element array of structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
0:20 'Verts' (temp 2-element array of 3-element array of structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
0:20 'x' (temp int)
0:20 'y' (temp int)
0:20 'Out' (temp structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
0:19 Loop Terminal Expression
0:19 Pre-Increment (temp int)
0:19 'y' (temp int)
0:18 Loop Terminal Expression
0:18 Pre-Increment (temp int)
0:18 'x' (temp int)
0:? Linker Objects
0:? 'v' (layout(location=0 ) in 1-element array of uint)
0:? 'OutputStream' (layout(location=0 ) out structure{temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
0:? 'PerVertex_out' (out block{out 4-component vector of float Position OutputStream_Pos})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 90
Capability Geometry
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 83 86 89
ExecutionMode 4 InputPoints
ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputTriangleStrip
ExecutionMode 4 OutputVertices 4
Name 4 "main"
Name 11 "PSInput"
MemberName 11(PSInput) 0 "Pos"
MemberName 11(PSInput) 1 "TexCoord"
MemberName 11(PSInput) 2 "TerrainPos"
MemberName 11(PSInput) 3 "VertexID"
Name 13 "Out"
Name 14 "PSInput"
MemberName 14(PSInput) 0 "Pos"
MemberName 14(PSInput) 1 "TexCoord"
MemberName 14(PSInput) 2 "TerrainPos"
MemberName 14(PSInput) 3 "VertexID"
Name 39 "x"
Name 48 "y"
Name 56 "PSInput"
MemberName 56(PSInput) 0 "Pos"
MemberName 56(PSInput) 1 "TexCoord"
MemberName 56(PSInput) 2 "TerrainPos"
MemberName 56(PSInput) 3 "VertexID"
Name 62 "Verts"
Name 83 "v"
Name 84 "PSInput"
MemberName 84(PSInput) 0 "TexCoord"
MemberName 84(PSInput) 1 "TerrainPos"
MemberName 84(PSInput) 2 "VertexID"
Name 86 "OutputStream"
Name 87 "PerVertex_out"
MemberName 87(PerVertex_out) 0 "OutputStream_Pos"
Name 89 "PerVertex_out"
MemberDecorate 14(PSInput) 0 BuiltIn Position
Decorate 83(v) Location 0
Decorate 86(OutputStream) Location 0
MemberDecorate 87(PerVertex_out) 0 BuiltIn Position
Decorate 87(PerVertex_out) Block
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypeVector 6(float) 2
9: TypeVector 6(float) 3
10: TypeInt 32 0
11(PSInput): TypeStruct 7(fvec4) 8(fvec2) 9(fvec3) 10(int)
12: TypePointer Function 11(PSInput)
14(PSInput): TypeStruct 7(fvec4) 8(fvec2) 9(fvec3) 10(int)
15: 6(float) Constant 0
16: 7(fvec4) ConstantComposite 15 15 15 15
17: 8(fvec2) ConstantComposite 15 15
18: 9(fvec3) ConstantComposite 15 15 15
19: 10(int) Constant 0
20: 14(PSInput) ConstantComposite 16 17 18 19
22: TypeInt 32 1
23: 22(int) Constant 0
24: TypePointer Function 7(fvec4)
27: 22(int) Constant 1
28: TypePointer Function 8(fvec2)
31: 22(int) Constant 2
32: TypePointer Function 9(fvec3)
35: 22(int) Constant 3
36: TypePointer Function 10(int)
38: TypePointer Function 22(int)
46: TypeBool
56(PSInput): TypeStruct 7(fvec4) 8(fvec2) 9(fvec3) 10(int)
57: 10(int) Constant 3
58: TypeArray 56(PSInput) 57
59: 10(int) Constant 2
60: TypeArray 58 59
61: TypePointer Function 60
66: TypePointer Function 56(PSInput)
80: 10(int) Constant 1
81: TypeArray 10(int) 80
82: TypePointer Input 81
83(v): 82(ptr) Variable Input
84(PSInput): TypeStruct 8(fvec2) 9(fvec3) 10(int)
85: TypePointer Output 84(PSInput)
86(OutputStream): 85(ptr) Variable Output
87(PerVertex_out): TypeStruct 7(fvec4)
88: TypePointer Output 87(PerVertex_out)
89(PerVertex_out): 88(ptr) Variable Output
4(main): 2 Function None 3
5: Label
13(Out): 12(ptr) Variable Function
39(x): 38(ptr) Variable Function
48(y): 38(ptr) Variable Function
62(Verts): 61(ptr) Variable Function
21: 7(fvec4) CompositeExtract 20 0
25: 24(ptr) AccessChain 13(Out) 23
Store 25 21
26: 8(fvec2) CompositeExtract 20 1
29: 28(ptr) AccessChain 13(Out) 27
Store 29 26
30: 9(fvec3) CompositeExtract 20 2
33: 32(ptr) AccessChain 13(Out) 31
Store 33 30
34: 10(int) CompositeExtract 20 3
37: 36(ptr) AccessChain 13(Out) 35
Store 37 34
Store 39(x) 23
Branch 40
40: Label
LoopMerge 42 43 None
Branch 44
44: Label
45: 22(int) Load 39(x)
47: 46(bool) SLessThan 45 31
BranchConditional 47 41 42
41: Label
Store 48(y) 23
Branch 49
49: Label
LoopMerge 51 52 None
Branch 53
53: Label
54: 22(int) Load 48(y)
55: 46(bool) SLessThan 54 31
BranchConditional 55 50 51
50: Label
63: 22(int) Load 39(x)
64: 22(int) Load 48(y)
65: 11(PSInput) Load 13(Out)
67: 66(ptr) AccessChain 62(Verts) 63 64
68: 7(fvec4) CompositeExtract 65 0
69: 24(ptr) AccessChain 67 23
Store 69 68
70: 8(fvec2) CompositeExtract 65 1
71: 28(ptr) AccessChain 67 27
Store 71 70
72: 9(fvec3) CompositeExtract 65 2
73: 32(ptr) AccessChain 67 31
Store 73 72
74: 10(int) CompositeExtract 65 3
75: 36(ptr) AccessChain 67 35
Store 75 74
Branch 52
52: Label
76: 22(int) Load 48(y)
77: 22(int) IAdd 76 27
Store 48(y) 77
Branch 49
51: Label
Branch 43
43: Label
78: 22(int) Load 39(x)
79: 22(int) IAdd 78 27
Store 39(x) 79
Branch 40
42: Label
Return
FunctionEnd

View File

@ -0,0 +1,196 @@
hlsl.struct.split.assign.frag
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:7 Function Definition: main(i1;struct-S-f1-vf41[3]; (temp 4-component vector of float)
0:7 Function Parameters:
0:7 'i' (layout(location=0 ) in int)
0:7 'input' (in 3-element array of structure{temp float f, temp 4-component vector of float FragCoord pos})
0:? Sequence
0:9 Sequence
0:9 move second child to first child (temp float)
0:9 f: direct index for structure (temp float)
0:9 direct index (layout(location=1 ) in structure{temp float f})
0:9 'input' (layout(location=1 ) in 3-element array of structure{temp float f})
0:9 Constant:
0:9 0 (const int)
0:9 Constant:
0:9 0 (const int)
0:9 f: direct index for structure (temp float)
0:9 direct index (temp structure{temp float f, temp 4-component vector of float pos})
0:9 'a' (temp 3-element array of structure{temp float f, temp 4-component vector of float pos})
0:9 Constant:
0:9 0 (const int)
0:9 Constant:
0:9 0 (const int)
0:9 move second child to first child (temp float)
0:9 f: direct index for structure (temp float)
0:9 direct index (layout(location=1 ) in structure{temp float f})
0:9 'input' (layout(location=1 ) in 3-element array of structure{temp float f})
0:9 Constant:
0:9 1 (const int)
0:9 Constant:
0:9 0 (const int)
0:9 f: direct index for structure (temp float)
0:9 direct index (temp structure{temp float f, temp 4-component vector of float pos})
0:9 'a' (temp 3-element array of structure{temp float f, temp 4-component vector of float pos})
0:9 Constant:
0:9 1 (const int)
0:9 Constant:
0:9 0 (const int)
0:9 move second child to first child (temp float)
0:9 f: direct index for structure (temp float)
0:9 direct index (layout(location=1 ) in structure{temp float f})
0:9 'input' (layout(location=1 ) in 3-element array of structure{temp float f})
0:9 Constant:
0:9 2 (const int)
0:9 Constant:
0:9 0 (const int)
0:9 f: direct index for structure (temp float)
0:9 direct index (temp structure{temp float f, temp 4-component vector of float pos})
0:9 'a' (temp 3-element array of structure{temp float f, temp 4-component vector of float pos})
0:9 Constant:
0:9 2 (const int)
0:9 Constant:
0:9 0 (const int)
0:11 Sequence
0:11 Branch: Return
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:? 'i' (layout(location=0 ) in int)
0:? 'input' (layout(location=1 ) in 3-element array of structure{temp float f})
0:? 'input_pos' (in 3-element array of 4-component vector of float FragCoord)
Linked fragment stage:
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:7 Function Definition: main(i1;struct-S-f1-vf41[3]; (temp 4-component vector of float)
0:7 Function Parameters:
0:7 'i' (layout(location=0 ) in int)
0:7 'input' (in 3-element array of structure{temp float f, temp 4-component vector of float FragCoord pos})
0:? Sequence
0:9 Sequence
0:9 move second child to first child (temp float)
0:9 f: direct index for structure (temp float)
0:9 direct index (layout(location=1 ) in structure{temp float f})
0:9 'input' (layout(location=1 ) in 3-element array of structure{temp float f})
0:9 Constant:
0:9 0 (const int)
0:9 Constant:
0:9 0 (const int)
0:9 f: direct index for structure (temp float)
0:9 direct index (temp structure{temp float f, temp 4-component vector of float pos})
0:9 'a' (temp 3-element array of structure{temp float f, temp 4-component vector of float pos})
0:9 Constant:
0:9 0 (const int)
0:9 Constant:
0:9 0 (const int)
0:9 move second child to first child (temp float)
0:9 f: direct index for structure (temp float)
0:9 direct index (layout(location=1 ) in structure{temp float f})
0:9 'input' (layout(location=1 ) in 3-element array of structure{temp float f})
0:9 Constant:
0:9 1 (const int)
0:9 Constant:
0:9 0 (const int)
0:9 f: direct index for structure (temp float)
0:9 direct index (temp structure{temp float f, temp 4-component vector of float pos})
0:9 'a' (temp 3-element array of structure{temp float f, temp 4-component vector of float pos})
0:9 Constant:
0:9 1 (const int)
0:9 Constant:
0:9 0 (const int)
0:9 move second child to first child (temp float)
0:9 f: direct index for structure (temp float)
0:9 direct index (layout(location=1 ) in structure{temp float f})
0:9 'input' (layout(location=1 ) in 3-element array of structure{temp float f})
0:9 Constant:
0:9 2 (const int)
0:9 Constant:
0:9 0 (const int)
0:9 f: direct index for structure (temp float)
0:9 direct index (temp structure{temp float f, temp 4-component vector of float pos})
0:9 'a' (temp 3-element array of structure{temp float f, temp 4-component vector of float pos})
0:9 Constant:
0:9 2 (const int)
0:9 Constant:
0:9 0 (const int)
0:11 Sequence
0:11 Branch: Return
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:? 'i' (layout(location=0 ) in int)
0:? 'input' (layout(location=1 ) in 3-element array of structure{temp float f})
0:? 'input_pos' (in 3-element array of 4-component vector of float FragCoord)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 41
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 12 35 37 40
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 7 "S"
MemberName 7(S) 0 "f"
Name 12 "input"
Name 16 "S"
MemberName 16(S) 0 "f"
MemberName 16(S) 1 "pos"
Name 19 "a"
Name 35 "@entryPointOutput"
Name 37 "i"
Name 40 "input_pos"
Decorate 12(input) Location 1
Decorate 35(@entryPointOutput) Location 0
Decorate 37(i) Location 0
Decorate 40(input_pos) BuiltIn FragCoord
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7(S): TypeStruct 6(float)
8: TypeInt 32 0
9: 8(int) Constant 3
10: TypeArray 7(S) 9
11: TypePointer Input 10
12(input): 11(ptr) Variable Input
13: TypeInt 32 1
14: 13(int) Constant 0
15: TypeVector 6(float) 4
16(S): TypeStruct 6(float) 15(fvec4)
17: TypeArray 16(S) 9
18: TypePointer Function 17
20: TypePointer Function 6(float)
23: TypePointer Input 6(float)
25: 13(int) Constant 1
29: 13(int) Constant 2
34: TypePointer Output 15(fvec4)
35(@entryPointOutput): 34(ptr) Variable Output
36: TypePointer Input 13(int)
37(i): 36(ptr) Variable Input
38: TypeArray 15(fvec4) 9
39: TypePointer Input 38
40(input_pos): 39(ptr) Variable Input
4(main): 2 Function None 3
5: Label
19(a): 18(ptr) Variable Function
21: 20(ptr) AccessChain 19(a) 14 14
22: 6(float) Load 21
24: 23(ptr) AccessChain 12(input) 14 14
Store 24 22
26: 20(ptr) AccessChain 19(a) 25 14
27: 6(float) Load 26
28: 23(ptr) AccessChain 12(input) 25 14
Store 28 27
30: 20(ptr) AccessChain 19(a) 29 14
31: 6(float) Load 30
32: 23(ptr) AccessChain 12(input) 29 14
Store 32 31
Return
FunctionEnd

View File

@ -0,0 +1,325 @@
hlsl.struct.split.call.vert
Shader version: 450
0:? Sequence
0:17 Function Definition: Fn1(struct-VS_INPUT-i1-vf4-i11;struct-VS_OUTPUT-i1-vf4-i11; (temp void)
0:17 Function Parameters:
0:17 'fn1_in' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:17 'fn1_out' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:? Sequence
0:18 add (temp 4-component vector of float)
0:18 Pos_in: direct index for structure (temp 4-component vector of float)
0:18 'fn1_in' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:18 Constant:
0:18 1 (const int)
0:18 Pos_out: direct index for structure (temp 4-component vector of float)
0:18 'fn1_out' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:18 Constant:
0:18 1 (const int)
0:22 Function Definition: main(struct-VS_INPUT-i1-vf4-i11; (temp structure{temp int x0_out, temp 4-component vector of float Position Pos_out, temp int x1_out})
0:22 Function Parameters:
0:22 'vsin' (in structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:? Sequence
0:25 move second child to first child (temp int)
0:25 x0_out: direct index for structure (temp int)
0:25 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:25 Constant:
0:25 0 (const int)
0:? 'x0_in' (layout(location=0 ) in int)
0:26 move second child to first child (temp 4-component vector of float)
0:26 Pos_out: direct index for structure (temp 4-component vector of float)
0:26 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:26 Constant:
0:26 1 (const int)
0:? 'Pos_in' (in 4-component vector of float Position)
0:27 move second child to first child (temp int)
0:27 x1_out: direct index for structure (temp int)
0:27 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:27 Constant:
0:27 2 (const int)
0:? 'x1_in' (layout(location=1 ) in int)
0:29 Function Call: Fn1(struct-VS_INPUT-i1-vf4-i11;struct-VS_OUTPUT-i1-vf4-i11; (temp void)
0:29 Comma (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:29 Sequence
0:29 move second child to first child (temp int)
0:29 x0_in: direct index for structure (temp int)
0:29 'aggShadow' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:29 Constant:
0:29 0 (const int)
0:? 'x0_in' (layout(location=0 ) in int)
0:29 move second child to first child (temp 4-component vector of float)
0:29 Pos_in: direct index for structure (temp 4-component vector of float)
0:29 'aggShadow' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:29 Constant:
0:29 1 (const int)
0:? 'Pos_in' (in 4-component vector of float Position)
0:29 move second child to first child (temp int)
0:29 x1_in: direct index for structure (temp int)
0:29 'aggShadow' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:29 Constant:
0:29 2 (const int)
0:? 'x1_in' (layout(location=1 ) in int)
0:29 'aggShadow' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:29 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:31 Sequence
0:31 Sequence
0:31 move second child to first child (temp int)
0:31 x0_out: direct index for structure (temp int)
0:31 '@entryPointOutput' (layout(location=0 ) out structure{temp int x0_out, temp int x1_out})
0:31 Constant:
0:31 0 (const int)
0:31 x0_out: direct index for structure (temp int)
0:31 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:31 Constant:
0:31 0 (const int)
0:31 move second child to first child (temp 4-component vector of float)
0:? 'Pos_out' (out 4-component vector of float Position)
0:31 Pos_out: direct index for structure (temp 4-component vector of float)
0:31 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:31 Constant:
0:31 1 (const int)
0:31 move second child to first child (temp int)
0:31 x1_out: direct index for structure (temp int)
0:31 '@entryPointOutput' (layout(location=0 ) out structure{temp int x0_out, temp int x1_out})
0:31 Constant:
0:31 1 (const int)
0:31 x1_out: direct index for structure (temp int)
0:31 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:31 Constant:
0:31 2 (const int)
0:31 Branch: Return
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp int x0_out, temp int x1_out})
0:? 'x0_in' (layout(location=0 ) in int)
0:? 'Pos_in' (in 4-component vector of float Position)
0:? 'x1_in' (layout(location=1 ) in int)
0:? 'PerVertex_out' (out block{out 4-component vector of float Position Pos_out})
Linked vertex stage:
Shader version: 450
0:? Sequence
0:17 Function Definition: Fn1(struct-VS_INPUT-i1-vf4-i11;struct-VS_OUTPUT-i1-vf4-i11; (temp void)
0:17 Function Parameters:
0:17 'fn1_in' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:17 'fn1_out' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:? Sequence
0:18 add (temp 4-component vector of float)
0:18 Pos_in: direct index for structure (temp 4-component vector of float)
0:18 'fn1_in' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:18 Constant:
0:18 1 (const int)
0:18 Pos_out: direct index for structure (temp 4-component vector of float)
0:18 'fn1_out' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:18 Constant:
0:18 1 (const int)
0:22 Function Definition: main(struct-VS_INPUT-i1-vf4-i11; (temp structure{temp int x0_out, temp 4-component vector of float Position Pos_out, temp int x1_out})
0:22 Function Parameters:
0:22 'vsin' (in structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:? Sequence
0:25 move second child to first child (temp int)
0:25 x0_out: direct index for structure (temp int)
0:25 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:25 Constant:
0:25 0 (const int)
0:? 'x0_in' (layout(location=0 ) in int)
0:26 move second child to first child (temp 4-component vector of float)
0:26 Pos_out: direct index for structure (temp 4-component vector of float)
0:26 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:26 Constant:
0:26 1 (const int)
0:? 'Pos_in' (in 4-component vector of float Position)
0:27 move second child to first child (temp int)
0:27 x1_out: direct index for structure (temp int)
0:27 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:27 Constant:
0:27 2 (const int)
0:? 'x1_in' (layout(location=1 ) in int)
0:29 Function Call: Fn1(struct-VS_INPUT-i1-vf4-i11;struct-VS_OUTPUT-i1-vf4-i11; (temp void)
0:29 Comma (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:29 Sequence
0:29 move second child to first child (temp int)
0:29 x0_in: direct index for structure (temp int)
0:29 'aggShadow' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:29 Constant:
0:29 0 (const int)
0:? 'x0_in' (layout(location=0 ) in int)
0:29 move second child to first child (temp 4-component vector of float)
0:29 Pos_in: direct index for structure (temp 4-component vector of float)
0:29 'aggShadow' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:29 Constant:
0:29 1 (const int)
0:? 'Pos_in' (in 4-component vector of float Position)
0:29 move second child to first child (temp int)
0:29 x1_in: direct index for structure (temp int)
0:29 'aggShadow' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:29 Constant:
0:29 2 (const int)
0:? 'x1_in' (layout(location=1 ) in int)
0:29 'aggShadow' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
0:29 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:31 Sequence
0:31 Sequence
0:31 move second child to first child (temp int)
0:31 x0_out: direct index for structure (temp int)
0:31 '@entryPointOutput' (layout(location=0 ) out structure{temp int x0_out, temp int x1_out})
0:31 Constant:
0:31 0 (const int)
0:31 x0_out: direct index for structure (temp int)
0:31 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:31 Constant:
0:31 0 (const int)
0:31 move second child to first child (temp 4-component vector of float)
0:? 'Pos_out' (out 4-component vector of float Position)
0:31 Pos_out: direct index for structure (temp 4-component vector of float)
0:31 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:31 Constant:
0:31 1 (const int)
0:31 move second child to first child (temp int)
0:31 x1_out: direct index for structure (temp int)
0:31 '@entryPointOutput' (layout(location=0 ) out structure{temp int x0_out, temp int x1_out})
0:31 Constant:
0:31 1 (const int)
0:31 x1_out: direct index for structure (temp int)
0:31 'vsout' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
0:31 Constant:
0:31 2 (const int)
0:31 Branch: Return
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp int x0_out, temp int x1_out})
0:? 'x0_in' (layout(location=0 ) in int)
0:? 'Pos_in' (in 4-component vector of float Position)
0:? 'x1_in' (layout(location=1 ) in int)
0:? 'PerVertex_out' (out block{out 4-component vector of float Position Pos_out})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 72
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 28 33 37 56 62 71
Name 4 "main"
Name 9 "VS_INPUT"
MemberName 9(VS_INPUT) 0 "x0_in"
MemberName 9(VS_INPUT) 1 "Pos_in"
MemberName 9(VS_INPUT) 2 "x1_in"
Name 11 "VS_OUTPUT"
MemberName 11(VS_OUTPUT) 0 "x0_out"
MemberName 11(VS_OUTPUT) 1 "Pos_out"
MemberName 11(VS_OUTPUT) 2 "x1_out"
Name 16 "Fn1(struct-VS_INPUT-i1-vf4-i11;struct-VS_OUTPUT-i1-vf4-i11;"
Name 14 "fn1_in"
Name 15 "fn1_out"
Name 25 "vsout"
Name 28 "x0_in"
Name 33 "Pos_in"
Name 37 "x1_in"
Name 40 "VS_INPUT"
MemberName 40(VS_INPUT) 0 "x0_in"
MemberName 40(VS_INPUT) 1 "Pos_in"
MemberName 40(VS_INPUT) 2 "x1_in"
Name 42 "aggShadow"
Name 49 "param"
Name 51 "param"
Name 54 "VS_OUTPUT"
MemberName 54(VS_OUTPUT) 0 "x0_out"
MemberName 54(VS_OUTPUT) 1 "x1_out"
Name 56 "@entryPointOutput"
Name 62 "Pos_out"
Name 69 "PerVertex_out"
MemberName 69(PerVertex_out) 0 "Pos_out"
Name 71 "PerVertex_out"
Decorate 28(x0_in) Location 0
Decorate 33(Pos_in) BuiltIn Position
Decorate 37(x1_in) Location 1
Decorate 56(@entryPointOutput) Location 0
Decorate 62(Pos_out) BuiltIn Position
MemberDecorate 69(PerVertex_out) 0 BuiltIn Position
Decorate 69(PerVertex_out) Block
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
7: TypeFloat 32
8: TypeVector 7(float) 4
9(VS_INPUT): TypeStruct 6(int) 8(fvec4) 6(int)
10: TypePointer Function 9(VS_INPUT)
11(VS_OUTPUT): TypeStruct 6(int) 8(fvec4) 6(int)
12: TypePointer Function 11(VS_OUTPUT)
13: TypeFunction 2 10(ptr) 12(ptr)
18: 6(int) Constant 1
19: TypePointer Function 8(fvec4)
26: 6(int) Constant 0
27: TypePointer Input 6(int)
28(x0_in): 27(ptr) Variable Input
30: TypePointer Function 6(int)
32: TypePointer Input 8(fvec4)
33(Pos_in): 32(ptr) Variable Input
36: 6(int) Constant 2
37(x1_in): 27(ptr) Variable Input
40(VS_INPUT): TypeStruct 6(int) 8(fvec4) 6(int)
41: TypePointer Function 40(VS_INPUT)
54(VS_OUTPUT): TypeStruct 6(int) 6(int)
55: TypePointer Output 54(VS_OUTPUT)
56(@entryPointOutput): 55(ptr) Variable Output
59: TypePointer Output 6(int)
61: TypePointer Output 8(fvec4)
62(Pos_out): 61(ptr) Variable Output
69(PerVertex_out): TypeStruct 8(fvec4)
70: TypePointer Output 69(PerVertex_out)
71(PerVertex_out): 70(ptr) Variable Output
4(main): 2 Function None 3
5: Label
25(vsout): 12(ptr) Variable Function
42(aggShadow): 41(ptr) Variable Function
49(param): 41(ptr) Variable Function
51(param): 12(ptr) Variable Function
29: 6(int) Load 28(x0_in)
31: 30(ptr) AccessChain 25(vsout) 26
Store 31 29
34: 8(fvec4) Load 33(Pos_in)
35: 19(ptr) AccessChain 25(vsout) 18
Store 35 34
38: 6(int) Load 37(x1_in)
39: 30(ptr) AccessChain 25(vsout) 36
Store 39 38
43: 6(int) Load 28(x0_in)
44: 30(ptr) AccessChain 42(aggShadow) 26
Store 44 43
45: 8(fvec4) Load 33(Pos_in)
46: 19(ptr) AccessChain 42(aggShadow) 18
Store 46 45
47: 6(int) Load 37(x1_in)
48: 30(ptr) AccessChain 42(aggShadow) 36
Store 48 47
50:40(VS_INPUT) Load 42(aggShadow)
Store 49(param) 50
52:11(VS_OUTPUT) Load 25(vsout)
Store 51(param) 52
53: 2 FunctionCall 16(Fn1(struct-VS_INPUT-i1-vf4-i11;struct-VS_OUTPUT-i1-vf4-i11;) 49(param) 51(param)
57: 30(ptr) AccessChain 25(vsout) 26
58: 6(int) Load 57
60: 59(ptr) AccessChain 56(@entryPointOutput) 26
Store 60 58
63: 19(ptr) AccessChain 25(vsout) 18
64: 8(fvec4) Load 63
Store 62(Pos_out) 64
65: 30(ptr) AccessChain 25(vsout) 36
66: 6(int) Load 65
67: 59(ptr) AccessChain 56(@entryPointOutput) 18
Store 67 66
Return
FunctionEnd
16(Fn1(struct-VS_INPUT-i1-vf4-i11;struct-VS_OUTPUT-i1-vf4-i11;): 2 Function None 13
14(fn1_in): 10(ptr) FunctionParameter
15(fn1_out): 12(ptr) FunctionParameter
17: Label
20: 19(ptr) AccessChain 14(fn1_in) 18
21: 8(fvec4) Load 20
22: 19(ptr) AccessChain 15(fn1_out) 18
23: 8(fvec4) Load 22
24: 8(fvec4) FAdd 21 23
Return
FunctionEnd

View File

@ -0,0 +1,283 @@
hlsl.struct.split.nested.geom
Shader version: 450
invocations = -1
max_vertices = 3
input primitive = triangles
output primitive = triangle_strip
0:? Sequence
0:24 Function Definition: main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111; (temp void)
0:24 Function Parameters:
0:24 'tin' (in 3-element array of structure{temp 4-component vector of float Position pos, temp 2-component vector of float tc})
0:24 'ts' (out structure{temp structure{temp 4-component vector of float Position pos, temp 2-component vector of float tc} psIn, temp structure{temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:? Sequence
0:27 move second child to first child (temp 4-component vector of float)
0:27 pos: direct index for structure (temp 4-component vector of float)
0:27 psIn: direct index for structure (temp structure{temp 4-component vector of float pos, temp 2-component vector of float tc})
0:27 'o' (temp structure{temp structure{temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:27 Constant:
0:27 0 (const int)
0:27 Constant:
0:27 0 (const int)
0:? Constant:
0:? 1.000000
0:? 2.000000
0:? 3.000000
0:? 4.000000
0:28 move second child to first child (temp 2-component vector of float)
0:28 tc: direct index for structure (temp 2-component vector of float)
0:28 psIn: direct index for structure (temp structure{temp 4-component vector of float pos, temp 2-component vector of float tc})
0:28 'o' (temp structure{temp structure{temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:28 Constant:
0:28 0 (const int)
0:28 Constant:
0:28 1 (const int)
0:? Constant:
0:? 5.000000
0:? 6.000000
0:30 Sequence
0:30 Sequence
0:30 move second child to first child (temp 4-component vector of float)
0:? 'ts_psIn_pos' (out 4-component vector of float Position)
0:30 pos: direct index for structure (temp 4-component vector of float)
0:30 psIn: direct index for structure (temp structure{temp 4-component vector of float pos, temp 2-component vector of float tc})
0:30 'o' (temp structure{temp structure{temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 0 (const int)
0:30 move second child to first child (temp 2-component vector of float)
0:30 tc: direct index for structure (temp 2-component vector of float)
0:30 psIn: direct index for structure (temp structure{temp 2-component vector of float tc})
0:30 'ts' (layout(location=0 ) out structure{temp structure{temp 2-component vector of float tc} psIn, temp structure{temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 0 (const int)
0:30 tc: direct index for structure (temp 2-component vector of float)
0:30 psIn: direct index for structure (temp structure{temp 4-component vector of float pos, temp 2-component vector of float tc})
0:30 'o' (temp structure{temp structure{temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 1 (const int)
0:30 move second child to first child (temp structure{temp 2-element array of float m0_array, temp int m1})
0:30 contains_no_builtin_io: direct index for structure (temp structure{temp 2-element array of float m0_array, temp int m1})
0:30 'ts' (layout(location=0 ) out structure{temp structure{temp 2-component vector of float tc} psIn, temp structure{temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 1 (const int)
0:30 contains_no_builtin_io: direct index for structure (temp structure{temp 2-element array of float m0_array, temp int m1})
0:30 'o' (temp structure{temp structure{temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 1 (const int)
0:30 EmitVertex (temp void)
0:? Linker Objects
0:? 'tin' (layout(location=0 ) in 3-element array of structure{temp 2-component vector of float tc})
0:? 'ts' (layout(location=0 ) out structure{temp structure{temp 2-component vector of float tc} psIn, temp structure{temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:? 'PerVertex_in' (in 3-element array of block{in 4-component vector of float Position tin_pos})
0:? 'PerVertex_out' (out block{out 4-component vector of float Position ts_psIn_pos})
Linked geometry stage:
Shader version: 450
invocations = 1
max_vertices = 3
input primitive = triangles
output primitive = triangle_strip
0:? Sequence
0:24 Function Definition: main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111; (temp void)
0:24 Function Parameters:
0:24 'tin' (in 3-element array of structure{temp 4-component vector of float Position pos, temp 2-component vector of float tc})
0:24 'ts' (out structure{temp structure{temp 4-component vector of float Position pos, temp 2-component vector of float tc} psIn, temp structure{temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:? Sequence
0:27 move second child to first child (temp 4-component vector of float)
0:27 pos: direct index for structure (temp 4-component vector of float)
0:27 psIn: direct index for structure (temp structure{temp 4-component vector of float pos, temp 2-component vector of float tc})
0:27 'o' (temp structure{temp structure{temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:27 Constant:
0:27 0 (const int)
0:27 Constant:
0:27 0 (const int)
0:? Constant:
0:? 1.000000
0:? 2.000000
0:? 3.000000
0:? 4.000000
0:28 move second child to first child (temp 2-component vector of float)
0:28 tc: direct index for structure (temp 2-component vector of float)
0:28 psIn: direct index for structure (temp structure{temp 4-component vector of float pos, temp 2-component vector of float tc})
0:28 'o' (temp structure{temp structure{temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:28 Constant:
0:28 0 (const int)
0:28 Constant:
0:28 1 (const int)
0:? Constant:
0:? 5.000000
0:? 6.000000
0:30 Sequence
0:30 Sequence
0:30 move second child to first child (temp 4-component vector of float)
0:? 'ts_psIn_pos' (out 4-component vector of float Position)
0:30 pos: direct index for structure (temp 4-component vector of float)
0:30 psIn: direct index for structure (temp structure{temp 4-component vector of float pos, temp 2-component vector of float tc})
0:30 'o' (temp structure{temp structure{temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 0 (const int)
0:30 move second child to first child (temp 2-component vector of float)
0:30 tc: direct index for structure (temp 2-component vector of float)
0:30 psIn: direct index for structure (temp structure{temp 2-component vector of float tc})
0:30 'ts' (layout(location=0 ) out structure{temp structure{temp 2-component vector of float tc} psIn, temp structure{temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 0 (const int)
0:30 tc: direct index for structure (temp 2-component vector of float)
0:30 psIn: direct index for structure (temp structure{temp 4-component vector of float pos, temp 2-component vector of float tc})
0:30 'o' (temp structure{temp structure{temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 0 (const int)
0:30 Constant:
0:30 1 (const int)
0:30 move second child to first child (temp structure{temp 2-element array of float m0_array, temp int m1})
0:30 contains_no_builtin_io: direct index for structure (temp structure{temp 2-element array of float m0_array, temp int m1})
0:30 'ts' (layout(location=0 ) out structure{temp structure{temp 2-component vector of float tc} psIn, temp structure{temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 1 (const int)
0:30 contains_no_builtin_io: direct index for structure (temp structure{temp 2-element array of float m0_array, temp int m1})
0:30 'o' (temp structure{temp structure{temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:30 Constant:
0:30 1 (const int)
0:30 EmitVertex (temp void)
0:? Linker Objects
0:? 'tin' (layout(location=0 ) in 3-element array of structure{temp 2-component vector of float tc})
0:? 'ts' (layout(location=0 ) out structure{temp structure{temp 2-component vector of float tc} psIn, temp structure{temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
0:? 'PerVertex_in' (in 3-element array of block{in 4-component vector of float Position tin_pos})
0:? 'PerVertex_out' (out block{out 4-component vector of float Position ts_psIn_pos})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 68
Capability Geometry
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 33 40 60 64 67
ExecutionMode 4 Triangles
ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputTriangleStrip
ExecutionMode 4 OutputVertices 3
Name 4 "main"
Name 9 "PS_IN"
MemberName 9(PS_IN) 0 "pos"
MemberName 9(PS_IN) 1 "tc"
Name 14 "STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO"
MemberName 14(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) 0 "m0_array"
MemberName 14(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) 1 "m1"
Name 15 "GS_OUT"
MemberName 15(GS_OUT) 0 "psIn"
MemberName 15(GS_OUT) 1 "contains_no_builtin_io"
Name 17 "o"
Name 33 "ts_psIn_pos"
Name 36 "PS_IN"
MemberName 36(PS_IN) 0 "tc"
Name 37 "STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO"
MemberName 37(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) 0 "m0_array"
MemberName 37(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) 1 "m1"
Name 38 "GS_OUT"
MemberName 38(GS_OUT) 0 "psIn"
MemberName 38(GS_OUT) 1 "contains_no_builtin_io"
Name 40 "ts"
Name 56 "PS_IN"
MemberName 56(PS_IN) 0 "tc"
Name 60 "tin"
Name 61 "PerVertex_in"
MemberName 61(PerVertex_in) 0 "tin_pos"
Name 64 "PerVertex_in"
Name 65 "PerVertex_out"
MemberName 65(PerVertex_out) 0 "ts_psIn_pos"
Name 67 "PerVertex_out"
Decorate 33(ts_psIn_pos) BuiltIn Position
Decorate 40(ts) Location 0
Decorate 60(tin) Location 0
MemberDecorate 61(PerVertex_in) 0 BuiltIn Position
Decorate 61(PerVertex_in) Block
MemberDecorate 65(PerVertex_out) 0 BuiltIn Position
Decorate 65(PerVertex_out) Block
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypeVector 6(float) 2
9(PS_IN): TypeStruct 7(fvec4) 8(fvec2)
10: TypeInt 32 0
11: 10(int) Constant 2
12: TypeArray 6(float) 11
13: TypeInt 32 1
14(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO): TypeStruct 12 13(int)
15(GS_OUT): TypeStruct 9(PS_IN) 14(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO)
16: TypePointer Function 15(GS_OUT)
18: 13(int) Constant 0
19: 6(float) Constant 1065353216
20: 6(float) Constant 1073741824
21: 6(float) Constant 1077936128
22: 6(float) Constant 1082130432
23: 7(fvec4) ConstantComposite 19 20 21 22
24: TypePointer Function 7(fvec4)
26: 13(int) Constant 1
27: 6(float) Constant 1084227584
28: 6(float) Constant 1086324736
29: 8(fvec2) ConstantComposite 27 28
30: TypePointer Function 8(fvec2)
32: TypePointer Output 7(fvec4)
33(ts_psIn_pos): 32(ptr) Variable Output
36(PS_IN): TypeStruct 8(fvec2)
37(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO): TypeStruct 12 13(int)
38(GS_OUT): TypeStruct 36(PS_IN) 37(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO)
39: TypePointer Output 38(GS_OUT)
40(ts): 39(ptr) Variable Output
43: TypePointer Output 8(fvec2)
45: TypePointer Function 14(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO)
48: TypePointer Output 37(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO)
51: TypePointer Output 12
54: TypePointer Output 13(int)
56(PS_IN): TypeStruct 8(fvec2)
57: 10(int) Constant 3
58: TypeArray 56(PS_IN) 57
59: TypePointer Input 58
60(tin): 59(ptr) Variable Input
61(PerVertex_in): TypeStruct 7(fvec4)
62: TypeArray 61(PerVertex_in) 57
63: TypePointer Input 62
64(PerVertex_in): 63(ptr) Variable Input
65(PerVertex_out): TypeStruct 7(fvec4)
66: TypePointer Output 65(PerVertex_out)
67(PerVertex_out): 66(ptr) Variable Output
4(main): 2 Function None 3
5: Label
17(o): 16(ptr) Variable Function
25: 24(ptr) AccessChain 17(o) 18 18
Store 25 23
31: 30(ptr) AccessChain 17(o) 18 26
Store 31 29
34: 24(ptr) AccessChain 17(o) 18 18
35: 7(fvec4) Load 34
Store 33(ts_psIn_pos) 35
41: 30(ptr) AccessChain 17(o) 18 26
42: 8(fvec2) Load 41
44: 43(ptr) AccessChain 40(ts) 18 18
Store 44 42
46: 45(ptr) AccessChain 17(o) 26
47:14(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) Load 46
49: 48(ptr) AccessChain 40(ts) 26
50: 12 CompositeExtract 47 0
52: 51(ptr) AccessChain 49 18
Store 52 50
53: 13(int) CompositeExtract 47 1
55: 54(ptr) AccessChain 49 26
Store 55 53
EmitVertex
Return
FunctionEnd

View File

@ -0,0 +1,192 @@
hlsl.struct.split.trivial.geom
Shader version: 450
invocations = -1
max_vertices = 3
input primitive = triangles
output primitive = triangle_strip
0:? Sequence
0:14 Function Definition: main(struct-PS_IN-vf41[3];struct-GS_OUT-vf41; (temp void)
0:14 Function Parameters:
0:14 'i' (in 3-element array of structure{temp 4-component vector of float Position pos})
0:14 'ts' (out structure{temp 4-component vector of float Position pos})
0:? Sequence
0:17 Sequence
0:17 move second child to first child (temp int)
0:17 'x' (temp int)
0:17 Constant:
0:17 0 (const int)
0:17 Loop with condition tested first
0:17 Loop Condition
0:17 Compare Less Than (temp bool)
0:17 'x' (temp int)
0:17 Constant:
0:17 3 (const int)
0:17 Loop Body
0:? Sequence
0:18 move second child to first child (temp 4-component vector of float)
0:18 pos: direct index for structure (temp 4-component vector of float)
0:18 'o' (temp structure{temp 4-component vector of float pos})
0:18 Constant:
0:18 0 (const int)
0:18 indirect index (temp 4-component vector of float Position)
0:18 'i_pos' (in 3-element array of 4-component vector of float Position)
0:18 'x' (temp int)
0:19 Sequence
0:19 Sequence
0:19 move second child to first child (temp 4-component vector of float)
0:? 'ts_pos' (out 4-component vector of float Position)
0:19 pos: direct index for structure (temp 4-component vector of float)
0:19 'o' (temp structure{temp 4-component vector of float pos})
0:19 Constant:
0:19 0 (const int)
0:19 EmitVertex (temp void)
0:17 Loop Terminal Expression
0:17 Pre-Increment (temp int)
0:17 'x' (temp int)
0:? Linker Objects
0:? 'PerVertex_in' (in 3-element array of block{in 4-component vector of float Position i_pos})
0:? 'PerVertex_out' (out block{out 4-component vector of float Position ts_pos})
Linked geometry stage:
Shader version: 450
invocations = 1
max_vertices = 3
input primitive = triangles
output primitive = triangle_strip
0:? Sequence
0:14 Function Definition: main(struct-PS_IN-vf41[3];struct-GS_OUT-vf41; (temp void)
0:14 Function Parameters:
0:14 'i' (in 3-element array of structure{temp 4-component vector of float Position pos})
0:14 'ts' (out structure{temp 4-component vector of float Position pos})
0:? Sequence
0:17 Sequence
0:17 move second child to first child (temp int)
0:17 'x' (temp int)
0:17 Constant:
0:17 0 (const int)
0:17 Loop with condition tested first
0:17 Loop Condition
0:17 Compare Less Than (temp bool)
0:17 'x' (temp int)
0:17 Constant:
0:17 3 (const int)
0:17 Loop Body
0:? Sequence
0:18 move second child to first child (temp 4-component vector of float)
0:18 pos: direct index for structure (temp 4-component vector of float)
0:18 'o' (temp structure{temp 4-component vector of float pos})
0:18 Constant:
0:18 0 (const int)
0:18 indirect index (temp 4-component vector of float Position)
0:18 'i_pos' (in 3-element array of 4-component vector of float Position)
0:18 'x' (temp int)
0:19 Sequence
0:19 Sequence
0:19 move second child to first child (temp 4-component vector of float)
0:? 'ts_pos' (out 4-component vector of float Position)
0:19 pos: direct index for structure (temp 4-component vector of float)
0:19 'o' (temp structure{temp 4-component vector of float pos})
0:19 Constant:
0:19 0 (const int)
0:19 EmitVertex (temp void)
0:17 Loop Terminal Expression
0:17 Pre-Increment (temp int)
0:17 'x' (temp int)
0:? Linker Objects
0:? 'PerVertex_in' (in 3-element array of block{in 4-component vector of float Position i_pos})
0:? 'PerVertex_out' (out block{out 4-component vector of float Position ts_pos})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 49
Capability Geometry
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 28 36 45 48
ExecutionMode 4 Triangles
ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputTriangleStrip
ExecutionMode 4 OutputVertices 3
Name 4 "main"
Name 8 "x"
Name 21 "GS_OUT"
MemberName 21(GS_OUT) 0 "pos"
Name 23 "o"
Name 28 "i_pos"
Name 36 "ts_pos"
Name 42 "PerVertex_in"
MemberName 42(PerVertex_in) 0 "i_pos"
Name 45 "PerVertex_in"
Name 46 "PerVertex_out"
MemberName 46(PerVertex_out) 0 "ts_pos"
Name 48 "PerVertex_out"
Decorate 28(i_pos) BuiltIn Position
Decorate 36(ts_pos) BuiltIn Position
MemberDecorate 42(PerVertex_in) 0 BuiltIn Position
Decorate 42(PerVertex_in) Block
MemberDecorate 46(PerVertex_out) 0 BuiltIn Position
Decorate 46(PerVertex_out) Block
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
7: TypePointer Function 6(int)
9: 6(int) Constant 0
16: 6(int) Constant 3
17: TypeBool
19: TypeFloat 32
20: TypeVector 19(float) 4
21(GS_OUT): TypeStruct 20(fvec4)
22: TypePointer Function 21(GS_OUT)
24: TypeInt 32 0
25: 24(int) Constant 3
26: TypeArray 20(fvec4) 25
27: TypePointer Input 26
28(i_pos): 27(ptr) Variable Input
30: TypePointer Input 20(fvec4)
33: TypePointer Function 20(fvec4)
35: TypePointer Output 20(fvec4)
36(ts_pos): 35(ptr) Variable Output
40: 6(int) Constant 1
42(PerVertex_in): TypeStruct 20(fvec4)
43: TypeArray 42(PerVertex_in) 25
44: TypePointer Input 43
45(PerVertex_in): 44(ptr) Variable Input
46(PerVertex_out): TypeStruct 20(fvec4)
47: TypePointer Output 46(PerVertex_out)
48(PerVertex_out): 47(ptr) Variable Output
4(main): 2 Function None 3
5: Label
8(x): 7(ptr) Variable Function
23(o): 22(ptr) Variable Function
Store 8(x) 9
Branch 10
10: Label
LoopMerge 12 13 None
Branch 14
14: Label
15: 6(int) Load 8(x)
18: 17(bool) SLessThan 15 16
BranchConditional 18 11 12
11: Label
29: 6(int) Load 8(x)
31: 30(ptr) AccessChain 28(i_pos) 29
32: 20(fvec4) Load 31
34: 33(ptr) AccessChain 23(o) 9
Store 34 32
37: 33(ptr) AccessChain 23(o) 9
38: 20(fvec4) Load 37
Store 36(ts_pos) 38
EmitVertex
Branch 13
13: Label
39: 6(int) Load 8(x)
41: 6(int) IAdd 39 40
Store 8(x) 41
Branch 10
12: Label
Return
FunctionEnd

View File

@ -0,0 +1,116 @@
hlsl.struct.split.trivial.vert
Shader version: 450
0:? Sequence
0:16 Function Definition: main(struct-VS_INPUT-vf41;vf4; (temp structure{temp 4-component vector of float Position Pos})
0:16 Function Parameters:
0:16 'vsin' (in structure{temp 4-component vector of float Pos_in})
0:16 'Pos_loose' (in 4-component vector of float Position)
0:? Sequence
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 add (temp 4-component vector of float)
0:? 'Pos_in' (in 4-component vector of float Position)
0:19 'Pos_loose' (in 4-component vector of float Position)
0:21 Sequence
0:21 Sequence
0:21 move second child to first child (temp 4-component vector of float)
0:? 'Pos' (out 4-component vector of float Position)
0:21 Pos: direct index for structure (temp 4-component vector of float)
0:21 'vsout' (temp structure{temp 4-component vector of float Pos})
0:21 Constant:
0:21 0 (const int)
0:21 Branch: Return
0:? Linker Objects
0:? 'Pos_in' (in 4-component vector of float Position)
0:? 'Pos_loose' (in 4-component vector of float Position)
0:? 'PerVertex_out' (out block{out 4-component vector of float Position Pos})
Linked vertex stage:
Shader version: 450
0:? Sequence
0:16 Function Definition: main(struct-VS_INPUT-vf41;vf4; (temp structure{temp 4-component vector of float Position Pos})
0:16 Function Parameters:
0:16 'vsin' (in structure{temp 4-component vector of float Pos_in})
0:16 'Pos_loose' (in 4-component vector of float Position)
0:? Sequence
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 add (temp 4-component vector of float)
0:? 'Pos_in' (in 4-component vector of float Position)
0:19 'Pos_loose' (in 4-component vector of float Position)
0:21 Sequence
0:21 Sequence
0:21 move second child to first child (temp 4-component vector of float)
0:? 'Pos' (out 4-component vector of float Position)
0:21 Pos: direct index for structure (temp 4-component vector of float)
0:21 'vsout' (temp structure{temp 4-component vector of float Pos})
0:21 Constant:
0:21 0 (const int)
0:21 Branch: Return
0:? Linker Objects
0:? 'Pos_in' (in 4-component vector of float Position)
0:? 'Pos_loose' (in 4-component vector of float Position)
0:? 'PerVertex_out' (out block{out 4-component vector of float Position Pos})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 29
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 14 16 22 28
Name 4 "main"
Name 8 "VS_OUTPUT"
MemberName 8(VS_OUTPUT) 0 "Pos"
Name 10 "vsout"
Name 14 "Pos_in"
Name 16 "Pos_loose"
Name 22 "Pos"
Name 26 "PerVertex_out"
MemberName 26(PerVertex_out) 0 "Pos"
Name 28 "PerVertex_out"
Decorate 14(Pos_in) BuiltIn Position
Decorate 16(Pos_loose) BuiltIn Position
Decorate 22(Pos) BuiltIn Position
MemberDecorate 26(PerVertex_out) 0 BuiltIn Position
Decorate 26(PerVertex_out) Block
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8(VS_OUTPUT): TypeStruct 7(fvec4)
9: TypePointer Function 8(VS_OUTPUT)
11: TypeInt 32 1
12: 11(int) Constant 0
13: TypePointer Input 7(fvec4)
14(Pos_in): 13(ptr) Variable Input
16(Pos_loose): 13(ptr) Variable Input
19: TypePointer Function 7(fvec4)
21: TypePointer Output 7(fvec4)
22(Pos): 21(ptr) Variable Output
26(PerVertex_out): TypeStruct 7(fvec4)
27: TypePointer Output 26(PerVertex_out)
28(PerVertex_out): 27(ptr) Variable Output
4(main): 2 Function None 3
5: Label
10(vsout): 9(ptr) Variable Function
15: 7(fvec4) Load 14(Pos_in)
17: 7(fvec4) Load 16(Pos_loose)
18: 7(fvec4) FAdd 15 17
20: 19(ptr) AccessChain 10(vsout) 12
Store 20 18
23: 19(ptr) AccessChain 10(vsout) 12
24: 7(fvec4) Load 23
Store 22(Pos) 24
Return
FunctionEnd

View File

@ -1,52 +1,82 @@
hlsl.structarray.flatten.geom
ERROR: 0:10: 'vin' : recursive type not yet supported in GS input
ERROR: 1 compilation errors. No code generated.
Shader version: 450
invocations = -1
max_vertices = 4
input primitive = lines
output primitive = triangle_strip
ERROR: node is still EOpNull!
0:10 Function Definition: main(struct-VertexData-vf4-vf4-vf21[2];struct-VertexData-vf4-vf4-vf21; (temp void)
0:10 Function Parameters:
0:10 'vin' (in 2-element array of structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:10 'outStream' (out structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:? Sequence
0:16 Function Definition: main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21; (temp void)
0:16 Function Parameters:
0:16 'vin' (layout(location=0 ) in 2-element array of structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:16 'outStream' (out structure{temp 4-component vector of float Position position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:? Sequence
0:13 move second child to first child (temp 4-component vector of float)
0:13 color: direct index for structure (temp 4-component vector of float)
0:13 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:13 Constant:
0:13 1 (const int)
0:? 'vin[0].color' (layout(location=1 ) in 4-component vector of float)
0:14 move second child to first child (temp 2-component vector of float)
0:14 uv: direct index for structure (temp 2-component vector of float)
0:14 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:14 Constant:
0:14 2 (const int)
0:? 'vin[0].uv' (layout(location=2 ) in 2-component vector of float)
0:15 move second child to first child (temp 4-component vector of float)
0:15 position: direct index for structure (temp 4-component vector of float)
0:15 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:15 Constant:
0:15 0 (const int)
0:? 'vin[0].position' (layout(location=0 ) in 4-component vector of float)
0:16 Sequence
0:16 move second child to first child (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:16 'outStream' (out structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:16 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:16 EmitVertex (temp void)
0:19 move second child to first child (temp 4-component vector of float)
0:19 color: direct index for structure (temp 4-component vector of float)
0:19 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:19 Constant:
0:19 1 (const int)
0:19 color: direct index for structure (temp 4-component vector of float)
0:19 direct index (layout(location=0 ) temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:19 'vin' (layout(location=0 ) in 2-element array of structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:19 Constant:
0:19 1 (const int)
0:19 Constant:
0:19 1 (const int)
0:20 move second child to first child (temp 2-component vector of float)
0:20 uv: direct index for structure (temp 2-component vector of float)
0:20 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:20 Constant:
0:20 2 (const int)
0:20 uv: direct index for structure (temp 2-component vector of float)
0:20 direct index (layout(location=0 ) temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:20 'vin' (layout(location=0 ) in 2-element array of structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:20 Constant:
0:20 1 (const int)
0:20 Constant:
0:20 2 (const int)
0:21 move second child to first child (temp 4-component vector of float)
0:21 position: direct index for structure (temp 4-component vector of float)
0:21 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:21 Constant:
0:21 0 (const int)
0:21 position: direct index for structure (temp 4-component vector of float)
0:21 direct index (layout(location=0 ) temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:21 'vin' (layout(location=0 ) in 2-element array of structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:21 Constant:
0:21 1 (const int)
0:21 Constant:
0:21 0 (const int)
0:22 Sequence
0:22 Sequence
0:22 move second child to first child (temp 4-component vector of float)
0:? 'outStream_position' (out 4-component vector of float Position)
0:22 position: direct index for structure (temp 4-component vector of float)
0:22 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:22 Constant:
0:22 0 (const int)
0:22 move second child to first child (temp 4-component vector of float)
0:22 color: direct index for structure (temp 4-component vector of float)
0:22 'outStream' (layout(location=0 ) out structure{temp 4-component vector of float color, temp 2-component vector of float uv})
0:22 Constant:
0:22 0 (const int)
0:22 color: direct index for structure (temp 4-component vector of float)
0:22 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:22 Constant:
0:22 1 (const int)
0:22 move second child to first child (temp 2-component vector of float)
0:22 uv: direct index for structure (temp 2-component vector of float)
0:22 'outStream' (layout(location=0 ) out structure{temp 4-component vector of float color, temp 2-component vector of float uv})
0:22 Constant:
0:22 1 (const int)
0:22 uv: direct index for structure (temp 2-component vector of float)
0:22 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:22 Constant:
0:22 2 (const int)
0:22 EmitVertex (temp void)
0:? Linker Objects
0:? 'vin[0].position' (layout(location=0 ) in 4-component vector of float)
0:? 'vin[0].color' (layout(location=1 ) in 4-component vector of float)
0:? 'vin[0].uv' (layout(location=2 ) in 2-component vector of float)
0:? 'vin[1].position' (layout(location=3 ) in 4-component vector of float)
0:? 'vin[1].color' (layout(location=4 ) in 4-component vector of float)
0:? 'vin[1].uv' (layout(location=5 ) in 2-component vector of float)
0:? 'position' (layout(location=0 ) out 4-component vector of float)
0:? 'color' (layout(location=1 ) out 4-component vector of float)
0:? 'uv' (layout(location=2 ) out 2-component vector of float)
0:? 'vin' (layout(location=0 ) in 2-element array of structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:? 'outStream' (layout(location=0 ) out structure{temp 4-component vector of float color, temp 2-component vector of float uv})
0:? 'PerVertex_out' (out block{out 4-component vector of float Position outStream_position})
Linked geometry stage:
@ -57,44 +87,172 @@ invocations = 1
max_vertices = 4
input primitive = lines
output primitive = triangle_strip
ERROR: node is still EOpNull!
0:10 Function Definition: main(struct-VertexData-vf4-vf4-vf21[2];struct-VertexData-vf4-vf4-vf21; (temp void)
0:10 Function Parameters:
0:10 'vin' (in 2-element array of structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:10 'outStream' (out structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:? Sequence
0:16 Function Definition: main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21; (temp void)
0:16 Function Parameters:
0:16 'vin' (layout(location=0 ) in 2-element array of structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:16 'outStream' (out structure{temp 4-component vector of float Position position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:? Sequence
0:13 move second child to first child (temp 4-component vector of float)
0:13 color: direct index for structure (temp 4-component vector of float)
0:13 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:13 Constant:
0:13 1 (const int)
0:? 'vin[0].color' (layout(location=1 ) in 4-component vector of float)
0:14 move second child to first child (temp 2-component vector of float)
0:14 uv: direct index for structure (temp 2-component vector of float)
0:14 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:14 Constant:
0:14 2 (const int)
0:? 'vin[0].uv' (layout(location=2 ) in 2-component vector of float)
0:15 move second child to first child (temp 4-component vector of float)
0:15 position: direct index for structure (temp 4-component vector of float)
0:15 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:15 Constant:
0:15 0 (const int)
0:? 'vin[0].position' (layout(location=0 ) in 4-component vector of float)
0:16 Sequence
0:16 move second child to first child (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:16 'outStream' (out structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:16 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:16 EmitVertex (temp void)
0:19 move second child to first child (temp 4-component vector of float)
0:19 color: direct index for structure (temp 4-component vector of float)
0:19 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:19 Constant:
0:19 1 (const int)
0:19 color: direct index for structure (temp 4-component vector of float)
0:19 direct index (layout(location=0 ) temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:19 'vin' (layout(location=0 ) in 2-element array of structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:19 Constant:
0:19 1 (const int)
0:19 Constant:
0:19 1 (const int)
0:20 move second child to first child (temp 2-component vector of float)
0:20 uv: direct index for structure (temp 2-component vector of float)
0:20 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:20 Constant:
0:20 2 (const int)
0:20 uv: direct index for structure (temp 2-component vector of float)
0:20 direct index (layout(location=0 ) temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:20 'vin' (layout(location=0 ) in 2-element array of structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:20 Constant:
0:20 1 (const int)
0:20 Constant:
0:20 2 (const int)
0:21 move second child to first child (temp 4-component vector of float)
0:21 position: direct index for structure (temp 4-component vector of float)
0:21 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:21 Constant:
0:21 0 (const int)
0:21 position: direct index for structure (temp 4-component vector of float)
0:21 direct index (layout(location=0 ) temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:21 'vin' (layout(location=0 ) in 2-element array of structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:21 Constant:
0:21 1 (const int)
0:21 Constant:
0:21 0 (const int)
0:22 Sequence
0:22 Sequence
0:22 move second child to first child (temp 4-component vector of float)
0:? 'outStream_position' (out 4-component vector of float Position)
0:22 position: direct index for structure (temp 4-component vector of float)
0:22 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:22 Constant:
0:22 0 (const int)
0:22 move second child to first child (temp 4-component vector of float)
0:22 color: direct index for structure (temp 4-component vector of float)
0:22 'outStream' (layout(location=0 ) out structure{temp 4-component vector of float color, temp 2-component vector of float uv})
0:22 Constant:
0:22 0 (const int)
0:22 color: direct index for structure (temp 4-component vector of float)
0:22 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:22 Constant:
0:22 1 (const int)
0:22 move second child to first child (temp 2-component vector of float)
0:22 uv: direct index for structure (temp 2-component vector of float)
0:22 'outStream' (layout(location=0 ) out structure{temp 4-component vector of float color, temp 2-component vector of float uv})
0:22 Constant:
0:22 1 (const int)
0:22 uv: direct index for structure (temp 2-component vector of float)
0:22 'vout' (temp structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:22 Constant:
0:22 2 (const int)
0:22 EmitVertex (temp void)
0:? Linker Objects
0:? 'vin[0].position' (layout(location=0 ) in 4-component vector of float)
0:? 'vin[0].color' (layout(location=1 ) in 4-component vector of float)
0:? 'vin[0].uv' (layout(location=2 ) in 2-component vector of float)
0:? 'vin[1].position' (layout(location=3 ) in 4-component vector of float)
0:? 'vin[1].color' (layout(location=4 ) in 4-component vector of float)
0:? 'vin[1].uv' (layout(location=5 ) in 2-component vector of float)
0:? 'position' (layout(location=0 ) out 4-component vector of float)
0:? 'color' (layout(location=1 ) out 4-component vector of float)
0:? 'uv' (layout(location=2 ) out 2-component vector of float)
0:? 'vin' (layout(location=0 ) in 2-element array of structure{temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv})
0:? 'outStream' (layout(location=0 ) out structure{temp 4-component vector of float color, temp 2-component vector of float uv})
0:? 'PerVertex_out' (out block{out 4-component vector of float Position outStream_position})
SPIR-V is not generated for failed compile or link
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 52
Capability Geometry
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 19 36 41 51
ExecutionMode 4 InputLines
ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputTriangleStrip
ExecutionMode 4 OutputVertices 4
Name 4 "main"
Name 9 "PS_IN"
MemberName 9(PS_IN) 0 "position"
MemberName 9(PS_IN) 1 "color"
MemberName 9(PS_IN) 2 "uv"
Name 11 "vout"
Name 14 "VertexData"
MemberName 14(VertexData) 0 "position"
MemberName 14(VertexData) 1 "color"
MemberName 14(VertexData) 2 "uv"
Name 19 "vin"
Name 36 "outStream_position"
Name 39 "PS_IN"
MemberName 39(PS_IN) 0 "color"
MemberName 39(PS_IN) 1 "uv"
Name 41 "outStream"
Name 49 "PerVertex_out"
MemberName 49(PerVertex_out) 0 "outStream_position"
Name 51 "PerVertex_out"
Decorate 19(vin) Location 0
Decorate 36(outStream_position) BuiltIn Position
Decorate 41(outStream) Location 0
MemberDecorate 49(PerVertex_out) 0 BuiltIn Position
Decorate 49(PerVertex_out) Block
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypeVector 6(float) 2
9(PS_IN): TypeStruct 7(fvec4) 7(fvec4) 8(fvec2)
10: TypePointer Function 9(PS_IN)
12: TypeInt 32 1
13: 12(int) Constant 1
14(VertexData): TypeStruct 7(fvec4) 7(fvec4) 8(fvec2)
15: TypeInt 32 0
16: 15(int) Constant 2
17: TypeArray 14(VertexData) 16
18: TypePointer Input 17
19(vin): 18(ptr) Variable Input
20: TypePointer Input 7(fvec4)
23: TypePointer Function 7(fvec4)
25: 12(int) Constant 2
26: TypePointer Input 8(fvec2)
29: TypePointer Function 8(fvec2)
31: 12(int) Constant 0
35: TypePointer Output 7(fvec4)
36(outStream_position): 35(ptr) Variable Output
39(PS_IN): TypeStruct 7(fvec4) 8(fvec2)
40: TypePointer Output 39(PS_IN)
41(outStream): 40(ptr) Variable Output
47: TypePointer Output 8(fvec2)
49(PerVertex_out): TypeStruct 7(fvec4)
50: TypePointer Output 49(PerVertex_out)
51(PerVertex_out): 50(ptr) Variable Output
4(main): 2 Function None 3
5: Label
11(vout): 10(ptr) Variable Function
21: 20(ptr) AccessChain 19(vin) 13 13
22: 7(fvec4) Load 21
24: 23(ptr) AccessChain 11(vout) 13
Store 24 22
27: 26(ptr) AccessChain 19(vin) 13 25
28: 8(fvec2) Load 27
30: 29(ptr) AccessChain 11(vout) 25
Store 30 28
32: 20(ptr) AccessChain 19(vin) 13 31
33: 7(fvec4) Load 32
34: 23(ptr) AccessChain 11(vout) 31
Store 34 33
37: 23(ptr) AccessChain 11(vout) 31
38: 7(fvec4) Load 37
Store 36(outStream_position) 38
42: 23(ptr) AccessChain 11(vout) 13
43: 7(fvec4) Load 42
44: 35(ptr) AccessChain 41(outStream) 31
Store 44 43
45: 29(ptr) AccessChain 11(vout) 25
46: 8(fvec2) Load 45
48: 47(ptr) AccessChain 41(outStream) 13
Store 48 46
EmitVertex
Return
FunctionEnd

View File

@ -28,50 +28,42 @@ Shader version: 450
0:11 'e' (layout(location=5 ) in 4-component vector of float)
0:13 Sequence
0:13 Sequence
0:13 move second child to first child (temp 4-component vector of float)
0:? 'm[0]' (layout(location=0 ) out 4-component vector of float)
0:13 direct index (temp 4-component vector of float)
0:13 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:13 'local' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:13 Constant:
0:13 0 (const int)
0:13 move second child to first child (temp 2-element array of 4-component vector of float)
0:13 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:13 '@entryPointOutput' (out structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, smooth temp 4-component vector of float b})
0:13 Constant:
0:13 0 (const int)
0:13 move second child to first child (temp 4-component vector of float)
0:? 'm[1]' (layout(location=1 ) out 4-component vector of float)
0:13 direct index (temp 4-component vector of float)
0:13 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:13 'local' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:13 Constant:
0:13 0 (const int)
0:13 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:13 'local' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:13 Constant:
0:13 0 (const int)
0:13 move second child to first child (temp 2-component vector of uint)
0:13 coord: direct index for structure (temp 2-component vector of uint)
0:13 '@entryPointOutput' (out structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, smooth temp 4-component vector of float b})
0:13 Constant:
0:13 1 (const int)
0:13 move second child to first child (temp 2-component vector of uint)
0:? 'coord' (layout(location=2 ) out 2-component vector of uint)
0:13 coord: direct index for structure (temp 2-component vector of uint)
0:13 'local' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:13 Constant:
0:13 1 (const int)
0:13 move second child to first child (temp 4-component vector of float)
0:? 'b' (layout(location=3 ) smooth out 4-component vector of float)
0:13 b: direct index for structure (smooth temp 4-component vector of float)
0:13 '@entryPointOutput' (out structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, smooth temp 4-component vector of float b})
0:13 Constant:
0:13 2 (const int)
0:13 b: direct index for structure (temp 4-component vector of float)
0:13 'local' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:13 Constant:
0:13 2 (const int)
0:13 Branch: Return
0:? Linker Objects
0:? 'm[0]' (layout(location=0 ) out 4-component vector of float)
0:? 'm[1]' (layout(location=1 ) out 4-component vector of float)
0:? 'coord' (layout(location=2 ) out 2-component vector of uint)
0:? 'b' (layout(location=3 ) smooth out 4-component vector of float)
0:? '@entryPointOutput' (out structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, smooth temp 4-component vector of float b})
0:? 'd' (layout(location=0 ) in 4-component vector of float)
0:? 'm[0]' (layout(location=1 ) in 4-component vector of float)
0:? 'm[1]' (layout(location=2 ) in 4-component vector of float)
0:? 'coord' (layout(location=3 ) in 2-component vector of uint)
0:? 'b' (layout(location=4 ) in 4-component vector of float)
0:? 'b' (layout(location=4 ) smooth in 4-component vector of float)
0:? 'e' (layout(location=5 ) in 4-component vector of float)
0:? 'm[0]' (layout(location=0 ) out 4-component vector of float)
0:? 'm[1]' (layout(location=1 ) out 4-component vector of float)
0:? 'm[0]' (layout(location=1 ) in 4-component vector of float)
0:? 'm[1]' (layout(location=2 ) in 4-component vector of float)
@ -108,61 +100,53 @@ Shader version: 450
0:11 'e' (layout(location=5 ) in 4-component vector of float)
0:13 Sequence
0:13 Sequence
0:13 move second child to first child (temp 4-component vector of float)
0:? 'm[0]' (layout(location=0 ) out 4-component vector of float)
0:13 direct index (temp 4-component vector of float)
0:13 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:13 'local' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:13 Constant:
0:13 0 (const int)
0:13 move second child to first child (temp 2-element array of 4-component vector of float)
0:13 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:13 '@entryPointOutput' (out structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, smooth temp 4-component vector of float b})
0:13 Constant:
0:13 0 (const int)
0:13 move second child to first child (temp 4-component vector of float)
0:? 'm[1]' (layout(location=1 ) out 4-component vector of float)
0:13 direct index (temp 4-component vector of float)
0:13 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:13 'local' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:13 Constant:
0:13 0 (const int)
0:13 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:13 'local' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:13 Constant:
0:13 0 (const int)
0:13 move second child to first child (temp 2-component vector of uint)
0:13 coord: direct index for structure (temp 2-component vector of uint)
0:13 '@entryPointOutput' (out structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, smooth temp 4-component vector of float b})
0:13 Constant:
0:13 1 (const int)
0:13 move second child to first child (temp 2-component vector of uint)
0:? 'coord' (layout(location=2 ) out 2-component vector of uint)
0:13 coord: direct index for structure (temp 2-component vector of uint)
0:13 'local' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:13 Constant:
0:13 1 (const int)
0:13 move second child to first child (temp 4-component vector of float)
0:? 'b' (layout(location=3 ) smooth out 4-component vector of float)
0:13 b: direct index for structure (smooth temp 4-component vector of float)
0:13 '@entryPointOutput' (out structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, smooth temp 4-component vector of float b})
0:13 Constant:
0:13 2 (const int)
0:13 b: direct index for structure (temp 4-component vector of float)
0:13 'local' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:13 Constant:
0:13 2 (const int)
0:13 Branch: Return
0:? Linker Objects
0:? 'm[0]' (layout(location=0 ) out 4-component vector of float)
0:? 'm[1]' (layout(location=1 ) out 4-component vector of float)
0:? 'coord' (layout(location=2 ) out 2-component vector of uint)
0:? 'b' (layout(location=3 ) smooth out 4-component vector of float)
0:? '@entryPointOutput' (out structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, smooth temp 4-component vector of float b})
0:? 'd' (layout(location=0 ) in 4-component vector of float)
0:? 'm[0]' (layout(location=1 ) in 4-component vector of float)
0:? 'm[1]' (layout(location=2 ) in 4-component vector of float)
0:? 'coord' (layout(location=3 ) in 2-component vector of uint)
0:? 'b' (layout(location=4 ) in 4-component vector of float)
0:? 'b' (layout(location=4 ) smooth in 4-component vector of float)
0:? 'e' (layout(location=5 ) in 4-component vector of float)
0:? 'm[0]' (layout(location=0 ) out 4-component vector of float)
0:? 'm[1]' (layout(location=1 ) out 4-component vector of float)
0:? 'm[0]' (layout(location=1 ) in 4-component vector of float)
0:? 'm[1]' (layout(location=2 ) in 4-component vector of float)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 59
// Id's are bound by 61
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 18 20 24 32 35 41 45 50 54 58
EntryPoint Vertex 4 "main" 18 20 24 32 35 42 60
Name 4 "main"
Name 12 "VI"
MemberName 12(VI) 0 "m"
@ -174,21 +158,19 @@ Shader version: 450
Name 24 "coord"
Name 32 "d"
Name 35 "e"
Name 41 "m[0]"
Name 45 "m[1]"
Name 50 "coord"
Name 54 "b"
Name 58 "b"
Name 40 "VI"
MemberName 40(VI) 0 "m"
MemberName 40(VI) 1 "coord"
MemberName 40(VI) 2 "b"
Name 42 "@entryPointOutput"
Name 60 "b"
Decorate 18(m[1]) Location 2
Decorate 20(m[0]) Location 1
Decorate 24(coord) Location 3
Decorate 32(d) Location 0
Decorate 35(e) Location 5
Decorate 41(m[0]) Location 0
Decorate 45(m[1]) Location 1
Decorate 50(coord) Location 2
Decorate 54(b) Location 3
Decorate 58(b) Location 4
Decorate 42(@entryPointOutput) BuiltIn Position
Decorate 60(b) Location 4
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -211,16 +193,17 @@ Shader version: 450
32(d): 17(ptr) Variable Input
35(e): 17(ptr) Variable Input
38: TypePointer Function 7(fvec4)
40: TypePointer Output 7(fvec4)
41(m[0]): 40(ptr) Variable Output
42: 15(int) Constant 0
45(m[1]): 40(ptr) Variable Output
46: 15(int) Constant 1
49: TypePointer Output 11(ivec2)
50(coord): 49(ptr) Variable Output
51: TypePointer Function 11(ivec2)
54(b): 40(ptr) Variable Output
58(b): 17(ptr) Variable Input
40(VI): TypeStruct 10 11(ivec2) 7(fvec4)
41: TypePointer Output 40(VI)
42(@entryPointOutput): 41(ptr) Variable Output
43: 15(int) Constant 0
44: TypePointer Function 10
47: TypePointer Output 10
49: 15(int) Constant 1
50: TypePointer Function 11(ivec2)
53: TypePointer Output 11(ivec2)
57: TypePointer Output 7(fvec4)
60(b): 17(ptr) Variable Input
4(main): 2 Function None 3
5: Label
14(local): 13(ptr) Variable Function
@ -238,17 +221,17 @@ Shader version: 450
37: 7(fvec4) FAdd 34 36
39: 38(ptr) AccessChain 14(local) 16
Store 39 37
43: 38(ptr) AccessChain 14(local) 42 42
44: 7(fvec4) Load 43
Store 41(m[0]) 44
47: 38(ptr) AccessChain 14(local) 42 46
48: 7(fvec4) Load 47
Store 45(m[1]) 48
52: 51(ptr) AccessChain 14(local) 46
53: 11(ivec2) Load 52
Store 50(coord) 53
45: 44(ptr) AccessChain 14(local) 43
46: 10 Load 45
48: 47(ptr) AccessChain 42(@entryPointOutput) 43
Store 48 46
51: 50(ptr) AccessChain 14(local) 49
52: 11(ivec2) Load 51
54: 53(ptr) AccessChain 42(@entryPointOutput) 49
Store 54 52
55: 38(ptr) AccessChain 14(local) 16
56: 7(fvec4) Load 55
Store 54(b) 56
58: 57(ptr) AccessChain 42(@entryPointOutput) 16
Store 58 56
Return
FunctionEnd

View File

@ -0,0 +1,161 @@
hlsl.type.half.frag
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:3 Function Definition: main( (temp 4-component vector of float)
0:3 Function Parameters:
0:? Sequence
0:4 Sequence
0:4 move second child to first child (temp mediump float)
0:4 'h0' (temp mediump float)
0:4 Constant:
0:4 0.000000
0:5 Sequence
0:5 move second child to first child (temp mediump 1-component vector of float)
0:5 'h1' (temp mediump 1-component vector of float)
0:5 Constant:
0:5 1.000000
0:6 Sequence
0:6 move second child to first child (temp mediump 2-component vector of float)
0:6 'h2' (temp mediump 2-component vector of float)
0:6 Constant:
0:6 2.000000
0:6 2.000000
0:7 Sequence
0:7 move second child to first child (temp mediump 3-component vector of float)
0:7 'h3' (temp mediump 3-component vector of float)
0:7 Constant:
0:7 3.000000
0:7 3.000000
0:7 3.000000
0:8 Sequence
0:8 move second child to first child (temp mediump 4-component vector of float)
0:8 'h4' (temp mediump 4-component vector of float)
0:8 Constant:
0:8 4.000000
0:8 4.000000
0:8 4.000000
0:8 4.000000
0:10 Sequence
0:10 move second child to first child (temp 4-component vector of float)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:10 Constant:
0:10 0.000000
0:10 0.000000
0:10 0.000000
0:10 0.000000
0:10 Branch: Return
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
Linked fragment stage:
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:3 Function Definition: main( (temp 4-component vector of float)
0:3 Function Parameters:
0:? Sequence
0:4 Sequence
0:4 move second child to first child (temp mediump float)
0:4 'h0' (temp mediump float)
0:4 Constant:
0:4 0.000000
0:5 Sequence
0:5 move second child to first child (temp mediump 1-component vector of float)
0:5 'h1' (temp mediump 1-component vector of float)
0:5 Constant:
0:5 1.000000
0:6 Sequence
0:6 move second child to first child (temp mediump 2-component vector of float)
0:6 'h2' (temp mediump 2-component vector of float)
0:6 Constant:
0:6 2.000000
0:6 2.000000
0:7 Sequence
0:7 move second child to first child (temp mediump 3-component vector of float)
0:7 'h3' (temp mediump 3-component vector of float)
0:7 Constant:
0:7 3.000000
0:7 3.000000
0:7 3.000000
0:8 Sequence
0:8 move second child to first child (temp mediump 4-component vector of float)
0:8 'h4' (temp mediump 4-component vector of float)
0:8 Constant:
0:8 4.000000
0:8 4.000000
0:8 4.000000
0:8 4.000000
0:10 Sequence
0:10 move second child to first child (temp 4-component vector of float)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:10 Constant:
0:10 0.000000
0:10 0.000000
0:10 0.000000
0:10 0.000000
0:10 Branch: Return
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 31
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 28
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 8 "h0"
Name 10 "h1"
Name 14 "h2"
Name 19 "h3"
Name 24 "h4"
Name 28 "@entryPointOutput"
Decorate 8(h0) RelaxedPrecision
Decorate 10(h1) RelaxedPrecision
Decorate 14(h2) RelaxedPrecision
Decorate 19(h3) RelaxedPrecision
Decorate 24(h4) RelaxedPrecision
Decorate 28(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypePointer Function 6(float)
9: 6(float) Constant 0
11: 6(float) Constant 1065353216
12: TypeVector 6(float) 2
13: TypePointer Function 12(fvec2)
15: 6(float) Constant 1073741824
16: 12(fvec2) ConstantComposite 15 15
17: TypeVector 6(float) 3
18: TypePointer Function 17(fvec3)
20: 6(float) Constant 1077936128
21: 17(fvec3) ConstantComposite 20 20 20
22: TypeVector 6(float) 4
23: TypePointer Function 22(fvec4)
25: 6(float) Constant 1082130432
26: 22(fvec4) ConstantComposite 25 25 25 25
27: TypePointer Output 22(fvec4)
28(@entryPointOutput): 27(ptr) Variable Output
29: 22(fvec4) ConstantComposite 9 9 9 9
4(main): 2 Function None 3
5: Label
8(h0): 7(ptr) Variable Function
10(h1): 7(ptr) Variable Function
14(h2): 13(ptr) Variable Function
19(h3): 18(ptr) Variable Function
24(h4): 23(ptr) Variable Function
Store 8(h0) 9
Store 10(h1) 11
Store 14(h2) 16
Store 19(h3) 21
Store 24(h4) 26
Store 28(@entryPointOutput) 29
Return
FunctionEnd

View File

@ -0,0 +1,382 @@
hlsl.type.identifier.frag
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:6 Function Definition: fn(f1; (temp float)
0:6 Function Parameters:
0:6 'float' (in float)
0:? Sequence
0:6 Branch: Return with expression
0:6 'float' (in float)
0:9 Function Definition: main( (temp 4-component vector of float)
0:9 Function Parameters:
0:? Sequence
0:10 Sequence
0:10 move second child to first child (temp float)
0:10 'float' (temp float)
0:10 Constant:
0:10 7.000000
0:11 Sequence
0:11 move second child to first child (temp 2-element array of bool)
0:11 'bool' (temp 2-element array of bool)
0:11 Construct bool (temp 2-element array of bool)
0:11 Convert float to bool (temp bool)
0:11 'float' (temp float)
0:11 Convert float to bool (temp bool)
0:11 'float' (temp float)
0:12 Sequence
0:12 move second child to first child (temp int)
0:12 'int' (temp int)
0:12 Convert bool to int (temp int)
0:12 direct index (temp bool)
0:12 'bool' (temp 2-element array of bool)
0:12 Constant:
0:12 1 (const int)
0:13 Sequence
0:13 move second child to first child (temp uint)
0:13 'uint' (temp uint)
0:13 Convert float to uint (temp uint)
0:13 add (temp float)
0:13 'float' (temp float)
0:13 Convert int to float (temp float)
0:13 'int' (temp int)
0:14 Sequence
0:14 move second child to first child (temp mediump float)
0:14 'min16float' (temp mediump float)
0:14 Convert uint to float (temp mediump float)
0:14 'uint' (temp mediump uint)
0:15 Sequence
0:15 move second child to first child (temp mediump float)
0:15 'min10float' (temp mediump float)
0:15 'min16float' (temp mediump float)
0:16 Sequence
0:16 move second child to first child (temp mediump float)
0:16 'half' (temp mediump float)
0:16 Constant:
0:16 0.500000
0:? Sequence
0:20 move second child to first child (temp float)
0:20 float: direct index for structure (temp float)
0:20 'float' (temp structure{temp float float})
0:20 Constant:
0:20 0 (const int)
0:20 Constant:
0:20 42.000000
0:23 move second child to first child (temp bool)
0:23 direct index (temp bool)
0:23 'bool' (temp 2-element array of bool)
0:23 Constant:
0:23 0 (const int)
0:23 direct index (temp bool)
0:23 'bool' (temp 2-element array of bool)
0:23 Constant:
0:23 1 (const int)
0:25 move second child to first child (temp mediump float)
0:25 'float' (temp mediump float)
0:25 add (temp mediump float)
0:25 add (temp mediump float)
0:25 add (temp mediump float)
0:25 add (temp mediump float)
0:25 add (temp mediump float)
0:25 add (temp mediump float)
0:25 'float' (temp mediump float)
0:25 Convert int to float (temp mediump float)
0:25 'int' (temp mediump int)
0:25 Convert uint to float (temp mediump float)
0:25 'uint' (temp mediump uint)
0:25 'min16float' (temp mediump float)
0:25 'min10float' (temp mediump float)
0:25 Test condition and select (temp mediump float)
0:25 Condition
0:25 direct index (temp bool)
0:25 'bool' (temp 2-element array of bool)
0:25 Constant:
0:25 0 (const int)
0:25 true case
0:25 Convert int to float (temp mediump float)
0:25 'int' (temp mediump int)
0:25 false case
0:25 'float' (temp mediump float)
0:25 Function Call: fn(f1; (temp mediump float)
0:25 'float' (temp mediump float)
0:27 Sequence
0:27 move second child to first child (temp 4-component vector of float)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:27 Construct vec4 (temp 4-component vector of float)
0:27 'float' (temp float)
0:27 Branch: Return
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
Linked fragment stage:
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:6 Function Definition: fn(f1; (temp float)
0:6 Function Parameters:
0:6 'float' (in float)
0:? Sequence
0:6 Branch: Return with expression
0:6 'float' (in float)
0:9 Function Definition: main( (temp 4-component vector of float)
0:9 Function Parameters:
0:? Sequence
0:10 Sequence
0:10 move second child to first child (temp float)
0:10 'float' (temp float)
0:10 Constant:
0:10 7.000000
0:11 Sequence
0:11 move second child to first child (temp 2-element array of bool)
0:11 'bool' (temp 2-element array of bool)
0:11 Construct bool (temp 2-element array of bool)
0:11 Convert float to bool (temp bool)
0:11 'float' (temp float)
0:11 Convert float to bool (temp bool)
0:11 'float' (temp float)
0:12 Sequence
0:12 move second child to first child (temp int)
0:12 'int' (temp int)
0:12 Convert bool to int (temp int)
0:12 direct index (temp bool)
0:12 'bool' (temp 2-element array of bool)
0:12 Constant:
0:12 1 (const int)
0:13 Sequence
0:13 move second child to first child (temp uint)
0:13 'uint' (temp uint)
0:13 Convert float to uint (temp uint)
0:13 add (temp float)
0:13 'float' (temp float)
0:13 Convert int to float (temp float)
0:13 'int' (temp int)
0:14 Sequence
0:14 move second child to first child (temp mediump float)
0:14 'min16float' (temp mediump float)
0:14 Convert uint to float (temp mediump float)
0:14 'uint' (temp mediump uint)
0:15 Sequence
0:15 move second child to first child (temp mediump float)
0:15 'min10float' (temp mediump float)
0:15 'min16float' (temp mediump float)
0:16 Sequence
0:16 move second child to first child (temp mediump float)
0:16 'half' (temp mediump float)
0:16 Constant:
0:16 0.500000
0:? Sequence
0:20 move second child to first child (temp float)
0:20 float: direct index for structure (temp float)
0:20 'float' (temp structure{temp float float})
0:20 Constant:
0:20 0 (const int)
0:20 Constant:
0:20 42.000000
0:23 move second child to first child (temp bool)
0:23 direct index (temp bool)
0:23 'bool' (temp 2-element array of bool)
0:23 Constant:
0:23 0 (const int)
0:23 direct index (temp bool)
0:23 'bool' (temp 2-element array of bool)
0:23 Constant:
0:23 1 (const int)
0:25 move second child to first child (temp mediump float)
0:25 'float' (temp mediump float)
0:25 add (temp mediump float)
0:25 add (temp mediump float)
0:25 add (temp mediump float)
0:25 add (temp mediump float)
0:25 add (temp mediump float)
0:25 add (temp mediump float)
0:25 'float' (temp mediump float)
0:25 Convert int to float (temp mediump float)
0:25 'int' (temp mediump int)
0:25 Convert uint to float (temp mediump float)
0:25 'uint' (temp mediump uint)
0:25 'min16float' (temp mediump float)
0:25 'min10float' (temp mediump float)
0:25 Test condition and select (temp mediump float)
0:25 Condition
0:25 direct index (temp bool)
0:25 'bool' (temp 2-element array of bool)
0:25 Constant:
0:25 0 (const int)
0:25 true case
0:25 Convert int to float (temp mediump float)
0:25 'int' (temp mediump int)
0:25 false case
0:25 'float' (temp mediump float)
0:25 Function Call: fn(f1; (temp mediump float)
0:25 'float' (temp mediump float)
0:27 Sequence
0:27 move second child to first child (temp 4-component vector of float)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:27 Construct vec4 (temp 4-component vector of float)
0:27 'float' (temp float)
0:27 Branch: Return
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 92
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 88
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 10 "fn(f1;"
Name 9 "float"
Name 15 "float"
Name 22 "bool"
Name 31 "int"
Name 39 "uint"
Name 45 "min16float"
Name 48 "min10float"
Name 50 "half"
Name 52 "foo_t"
MemberName 52(foo_t) 0 "float"
Name 54 "float"
Name 82 "param"
Name 88 "@entryPointOutput"
Decorate 45(min16float) RelaxedPrecision
Decorate 46 RelaxedPrecision
Decorate 47 RelaxedPrecision
Decorate 48(min10float) RelaxedPrecision
Decorate 49 RelaxedPrecision
Decorate 50(half) RelaxedPrecision
Decorate 60 RelaxedPrecision
Decorate 61 RelaxedPrecision
Decorate 62 RelaxedPrecision
Decorate 63 RelaxedPrecision
Decorate 64 RelaxedPrecision
Decorate 65 RelaxedPrecision
Decorate 66 RelaxedPrecision
Decorate 67 RelaxedPrecision
Decorate 68 RelaxedPrecision
Decorate 69 RelaxedPrecision
Decorate 70 RelaxedPrecision
Decorate 76 RelaxedPrecision
Decorate 77 RelaxedPrecision
Decorate 79 RelaxedPrecision
Decorate 80 RelaxedPrecision
Decorate 81 RelaxedPrecision
Decorate 83 RelaxedPrecision
Decorate 84 RelaxedPrecision
Decorate 85 RelaxedPrecision
Decorate 88(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypePointer Function 6(float)
8: TypeFunction 6(float) 7(ptr)
16: 6(float) Constant 1088421888
17: TypeBool
18: TypeInt 32 0
19: 18(int) Constant 2
20: TypeArray 17(bool) 19
21: TypePointer Function 20
24: 6(float) Constant 0
29: TypeInt 32 1
30: TypePointer Function 29(int)
32: 29(int) Constant 1
33: TypePointer Function 17(bool)
36: 29(int) Constant 0
38: TypePointer Function 18(int)
51: 6(float) Constant 1056964608
52(foo_t): TypeStruct 6(float)
53: TypePointer Function 52(foo_t)
55: 6(float) Constant 1109917696
86: TypeVector 6(float) 4
87: TypePointer Output 86(fvec4)
88(@entryPointOutput): 87(ptr) Variable Output
4(main): 2 Function None 3
5: Label
15(float): 7(ptr) Variable Function
22(bool): 21(ptr) Variable Function
31(int): 30(ptr) Variable Function
39(uint): 38(ptr) Variable Function
45(min16float): 7(ptr) Variable Function
48(min10float): 7(ptr) Variable Function
50(half): 7(ptr) Variable Function
54(float): 53(ptr) Variable Function
71: 7(ptr) Variable Function
82(param): 7(ptr) Variable Function
Store 15(float) 16
23: 6(float) Load 15(float)
25: 17(bool) FOrdNotEqual 23 24
26: 6(float) Load 15(float)
27: 17(bool) FOrdNotEqual 26 24
28: 20 CompositeConstruct 25 27
Store 22(bool) 28
34: 33(ptr) AccessChain 22(bool) 32
35: 17(bool) Load 34
37: 29(int) Select 35 32 36
Store 31(int) 37
40: 6(float) Load 15(float)
41: 29(int) Load 31(int)
42: 6(float) ConvertSToF 41
43: 6(float) FAdd 40 42
44: 18(int) ConvertFToU 43
Store 39(uint) 44
46: 18(int) Load 39(uint)
47: 6(float) ConvertUToF 46
Store 45(min16float) 47
49: 6(float) Load 45(min16float)
Store 48(min10float) 49
Store 50(half) 51
56: 7(ptr) AccessChain 54(float) 36
Store 56 55
57: 33(ptr) AccessChain 22(bool) 32
58: 17(bool) Load 57
59: 33(ptr) AccessChain 22(bool) 36
Store 59 58
60: 6(float) Load 15(float)
61: 29(int) Load 31(int)
62: 6(float) ConvertSToF 61
63: 6(float) FAdd 60 62
64: 18(int) Load 39(uint)
65: 6(float) ConvertUToF 64
66: 6(float) FAdd 63 65
67: 6(float) Load 45(min16float)
68: 6(float) FAdd 66 67
69: 6(float) Load 48(min10float)
70: 6(float) FAdd 68 69
72: 33(ptr) AccessChain 22(bool) 36
73: 17(bool) Load 72
SelectionMerge 75 None
BranchConditional 73 74 78
74: Label
76: 29(int) Load 31(int)
77: 6(float) ConvertSToF 76
Store 71 77
Branch 75
78: Label
79: 6(float) Load 15(float)
Store 71 79
Branch 75
75: Label
80: 6(float) Load 71
81: 6(float) FAdd 70 80
83: 6(float) Load 15(float)
Store 82(param) 83
84: 6(float) FunctionCall 10(fn(f1;) 82(param)
85: 6(float) FAdd 81 84
Store 15(float) 85
89: 6(float) Load 15(float)
90: 86(fvec4) CompositeConstruct 89 89 89 89
Store 88(@entryPointOutput) 90
Return
FunctionEnd
10(fn(f1;): 6(float) Function None 8
9(float): 7(ptr) FunctionParameter
11: Label
12: 6(float) Load 9(float)
ReturnValue 12
FunctionEnd

View File

@ -0,0 +1,60 @@
link1.vk.frag
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:7 Function Definition: main( (global void)
0:7 Function Parameters:
0:9 Sequence
0:9 move second child to first child (temp highp 4-component vector of float)
0:9 'color' (out highp 4-component vector of float)
0:9 Function Call: getColor( (global highp 4-component vector of float)
0:? Linker Objects
0:? 'color' (out highp 4-component vector of float)
link2.vk.frag
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:5 Function Definition: getColor( (global highp 4-component vector of float)
0:5 Function Parameters:
0:7 Sequence
0:7 Branch: Return with expression
0:7 texture (global highp 4-component vector of float)
0:7 's2D' (uniform highp sampler2D)
0:7 Constant:
0:7 0.500000
0:7 0.500000
0:? Linker Objects
0:? 's2D' (uniform highp sampler2D)
Linked fragment stage:
Shader version: 450
gl_FragCoord origin is upper left
0:? Sequence
0:7 Function Definition: main( (global void)
0:7 Function Parameters:
0:9 Sequence
0:9 move second child to first child (temp highp 4-component vector of float)
0:9 'color' (out highp 4-component vector of float)
0:9 Function Call: getColor( (global highp 4-component vector of float)
0:5 Function Definition: getColor( (global highp 4-component vector of float)
0:5 Function Parameters:
0:7 Sequence
0:7 Branch: Return with expression
0:7 texture (global highp 4-component vector of float)
0:7 's2D' (uniform highp sampler2D)
0:7 Constant:
0:7 0.500000
0:7 0.500000
0:? Linker Objects
0:? 'color' (out highp 4-component vector of float)
0:? 's2D' (uniform highp sampler2D)
SPIR-V is not generated for failed compile or link

View File

@ -1,13 +1,13 @@
ERROR: 0:8000: '#include' : required extension not requested: GL_GOOGLE_include_directive
ERROR: 0:8000: '#include' : must be followed by a file designation
ERROR: 0:8000: '#include' : must be followed by a header name
ERROR: 0:8001: '#include' : required extension not requested: GL_GOOGLE_include_directive
ERROR: 0:8001: '#include' : must be followed by a file designation
ERROR: 0:8001: '#include' : must be followed by a header name
ERROR: 0:8002: '#include' : required extension not requested: GL_GOOGLE_include_directive
ERROR: 0:8002: '#include' : unexpected include directive
ERROR: 0:8002: '#include' : Could not process include directive for header name: foo
ERROR: 0:8003: '#include' : required extension not requested: GL_GOOGLE_include_directive
ERROR: 0:8003: '#include' : extra content after file designation
ERROR: 0:8003: '#include' : extra content after header name: foo
ERROR: 0:8004: '#include' : required extension not requested: GL_GOOGLE_include_directive
ERROR: 0:8004: '#include' : unexpected include directive
ERROR: 0:8004: '#include' : expected newline after header name: no-eol
ERROR: 10 compilation errors. No code generated.

View File

@ -1,8 +1,20 @@
ERROR: 0:8000: '#include' : must be followed by a file designation
ERROR: 0:8001: '#include' : must be followed by a file designation
ERROR: 0:8002: '#include' : unexpected include directive
ERROR: 0:8003: '#include' : extra content after file designation
ERROR: 0:8004: '#include' : unexpected include directive
ERROR: 5 compilation errors. No code generated.
ERROR: 0:8000: '#include' : must be followed by a header name
ERROR: 0:8001: '#include' : must be followed by a header name
ERROR: 0:8002: '#include' : Could not process include directive for header name: foo.oeu
ERROR: 0:8003: '#include' : Could not process include directive for header name: foo.oeu/ao eu/ao.h
ERROR: 0:8004: '#include' : Could not process include directive for header name: foo<oeu
ERROR: 0:8005: '#include' : Could not process include directive for header name: foo.oe>
ERROR: 0:8006: '#include' : Could not process include directive for header name: foo.oe
ERROR: 0:8007: '#include' : Could not process include directive for header name: foo"bar"
ERROR: 0:8008: '#include' : Could not process include directive for header name: foo\bar
ERROR: 0:8009: '#include' : Could not process include directive for header name: foo.oe>
ERROR: 0:8010: '#include' : Could not process include directive for header name: foo
ERROR: 0:8011: '#include' : extra content after header name: foo2.h
ERROR: 0:8012: '#include' : extra content after header name: foo.h
ERROR: 0:8014: '#include' : Could not process include directive for header name: ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789
ERROR: 0:8016: '' : header name too long
ERROR: 0:8016: '#include' : Could not process include directive for header name: ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789
ERROR: 0:8017: '#include' : expected newline after header name: no-eol
ERROR: 17 compilation errors. No code generated.

View File

@ -22,14 +22,14 @@ ERROR: 0:172: '[]' : scalar integer expression required
ERROR: 0:175: 'x' : undeclared identifier
ERROR: 0:175: '[]' : scalar integer expression required
ERROR: 0:175: 'b' : left of '[' is not of type array, matrix, or vector
ERROR: 0:175: 'a' : vector field selection out of range
ERROR: 0:175: 'a' : vector swizzle selection out of range
ERROR: 0:175: 'length' : does not operate on this type: const float
ERROR: 0:175: '' : function call, method, or subroutine call expected
ERROR: 0:175: '' : no matching overloaded function found
ERROR: 0:178: '[]' : scalar integer expression required
ERROR: 0:178: 's' : undeclared identifier
ERROR: 0:178: 's' : left of '[' is not of type array, matrix, or vector
ERROR: 0:178: 'a' : vector field selection out of range
ERROR: 0:178: 'a' : vector swizzle selection out of range
ERROR: 0:178: 'length' : does not operate on this type: const float
ERROR: 0:178: '' : function call, method, or subroutine call expected
ERROR: 0:178: '' : no matching overloaded function found

View File

@ -105,6 +105,9 @@ Warning, version 450 is not yet complete; most version-specific features are pre
MemberName 523(B2) 6 "u"
MemberName 523(B2) 7 "v"
Name 525 ""
Name 526 "sf16"
Name 527 "sf"
Name 528 "sd"
Decorate 512 ArrayStride 16
Decorate 513 ArrayStride 32
MemberDecorate 514(S) 0 Offset 0
@ -145,9 +148,9 @@ Warning, version 450 is not yet complete; most version-specific features are pre
MemberDecorate 523(B2) 7 Offset 72
Decorate 523(B2) BufferBlock
Decorate 525 DescriptorSet 0
Decorate 526 SpecId 100
Decorate 527 SpecId 101
Decorate 528 SpecId 102
Decorate 526(sf16) SpecId 100
Decorate 527(sf) SpecId 101
Decorate 528(sd) SpecId 102
2: TypeVoid
3: TypeFunction 2
28: TypeFloat 16
@ -223,14 +226,14 @@ Warning, version 450 is not yet complete; most version-specific features are pre
523(B2): TypeStruct 28(float) 29(fvec2) 151(fvec3) 519 406 520 521(S) 522
524: TypePointer Uniform 523(B2)
525: 524(ptr) Variable Uniform
526: 28(float) SpecConstant 12288
527: 164(float) SpecConstant 1048576000
528: 172(float) SpecConstant 0 1071644672
529: 164(float) SpecConstantOp 115 526
530: 164(float) SpecConstantOp 115 526
526(sf16): 28(float) SpecConstant 12288
527(sf): 164(float) SpecConstant 1048576000
528(sd): 172(float) SpecConstant 0 1071644672
529: 164(float) SpecConstantOp 115 526(sf16)
530: 164(float) SpecConstantOp 115 526(sf16)
531: 172(float) SpecConstantOp 115 530
532: 28(float) SpecConstantOp 115 527
533: 28(float) SpecConstantOp 115 528
532: 28(float) SpecConstantOp 115 527(sf)
533: 28(float) SpecConstantOp 115 528(sd)
4(main): 2 Function None 3
5: Label
Return

View File

@ -51,6 +51,11 @@ Warning, version 450 is not yet complete; most version-specific features are pre
MemberName 454(Block) 0 "i64v"
MemberName 454(Block) 1 "u64"
Name 456 "block"
Name 457 "si64"
Name 458 "su64"
Name 459 "si"
Name 460 "su"
Name 461 "sb"
MemberDecorate 28(Uniforms) 0 Offset 0
Decorate 28(Uniforms) Block
Decorate 30 DescriptorSet 0
@ -60,11 +65,11 @@ Warning, version 450 is not yet complete; most version-specific features are pre
Decorate 454(Block) Block
Decorate 456(block) DescriptorSet 0
Decorate 456(block) Binding 1
Decorate 457 SpecId 100
Decorate 458 SpecId 101
Decorate 459 SpecId 102
Decorate 460 SpecId 103
Decorate 461 SpecId 104
Decorate 457(si64) SpecId 100
Decorate 458(su64) SpecId 101
Decorate 459(si) SpecId 102
Decorate 460(su) SpecId 103
Decorate 461(sb) SpecId 104
2: TypeVoid
3: TypeFunction 2
14: TypeInt 64 0
@ -148,28 +153,28 @@ Warning, version 450 is not yet complete; most version-specific features are pre
454(Block): TypeStruct 136(ivec3) 14(int)
455: TypePointer Uniform 454(Block)
456(block): 455(ptr) Variable Uniform
457: 18(int) SpecConstant 4294967286 4294967295
458: 14(int) SpecConstant 20 0
459: 31(int) SpecConstant 4294967291
460: 21(int) SpecConstant 4
461: 55(bool) SpecConstantTrue
462: 55(bool) SpecConstantOp 171 457 69
463: 55(bool) SpecConstantOp 171 458 69
464: 18(int) SpecConstantOp 169 461 61 60
465: 14(int) SpecConstantOp 169 461 70 69
466: 31(int) SpecConstantOp 114 457
467: 18(int) SpecConstantOp 114 459
468: 21(int) SpecConstantOp 113 458
469: 14(int) SpecConstantOp 113 460
470: 18(int) SpecConstantOp 128 458 69
471: 14(int) SpecConstantOp 128 457 69
472: 21(int) SpecConstantOp 113 458
457(si64): 18(int) SpecConstant 4294967286 4294967295
458(su64): 14(int) SpecConstant 20 0
459(si): 31(int) SpecConstant 4294967291
460(su): 21(int) SpecConstant 4
461(sb): 55(bool) SpecConstantTrue
462: 55(bool) SpecConstantOp 171 457(si64) 69
463: 55(bool) SpecConstantOp 171 458(su64) 69
464: 18(int) SpecConstantOp 169 461(sb) 61 60
465: 14(int) SpecConstantOp 169 461(sb) 70 69
466: 31(int) SpecConstantOp 114 457(si64)
467: 18(int) SpecConstantOp 114 459(si)
468: 21(int) SpecConstantOp 113 458(su64)
469: 14(int) SpecConstantOp 113 460(su)
470: 18(int) SpecConstantOp 128 458(su64) 69
471: 14(int) SpecConstantOp 128 457(si64) 69
472: 21(int) SpecConstantOp 113 458(su64)
473: 31(int) SpecConstantOp 128 472 219
474: 18(int) SpecConstantOp 114 459
474: 18(int) SpecConstantOp 114 459(si)
475: 14(int) SpecConstantOp 128 474 69
476: 31(int) SpecConstantOp 114 457
476: 31(int) SpecConstantOp 114 457(si64)
477: 21(int) SpecConstantOp 128 476 219
478: 14(int) SpecConstantOp 113 460
478: 14(int) SpecConstantOp 113 460(su)
479: 18(int) SpecConstantOp 128 478 69
4(main): 2 Function None 3
5: Label

File diff suppressed because it is too large Load Diff

View File

@ -3,10 +3,11 @@ Warning, version 450 is not yet complete; most version-specific features are pre
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 37
// Id's are bound by 33
Capability Shader
Capability Groups
Capability SubgroupVoteKHR
Extension "SPV_KHR_subgroup_vote"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main"
@ -22,7 +23,7 @@ Warning, version 450 is not yet complete; most version-specific features are pre
Decorate 10(Buffers) BufferBlock
Decorate 12 DescriptorSet 0
Decorate 12 Binding 0
Decorate 36 BuiltIn WorkgroupSize
Decorate 32 BuiltIn WorkgroupSize
2: TypeVoid
3: TypeFunction 2
6: TypeBool
@ -35,11 +36,10 @@ Warning, version 450 is not yet complete; most version-specific features are pre
14: 13(int) Constant 0
15: TypePointer Uniform 9(int)
18: 9(int) Constant 0
21: 9(int) Constant 3
31: 9(int) Constant 1
34: TypeVector 9(int) 3
35: 9(int) Constant 4
36: 34(ivec3) ConstantComposite 35 35 31
27: 9(int) Constant 1
30: TypeVector 9(int) 3
31: 9(int) Constant 4
32: 30(ivec3) ConstantComposite 31 31 27
4(main): 2 Function None 3
5: Label
8(b1): 7(ptr) Variable Function
@ -48,20 +48,17 @@ Warning, version 450 is not yet complete; most version-specific features are pre
19: 6(bool) INotEqual 17 18
Store 8(b1) 19
20: 6(bool) Load 8(b1)
22: 6(bool) GroupAny 21 20
Store 8(b1) 22
23: 6(bool) Load 8(b1)
24: 6(bool) GroupAll 21 23
Store 8(b1) 24
25: 6(bool) Load 8(b1)
26: 6(bool) GroupAll 21 25
27: 6(bool) GroupAny 21 25
28: 6(bool) LogicalNot 27
29: 6(bool) LogicalOr 26 28
Store 8(b1) 29
30: 6(bool) Load 8(b1)
32: 9(int) Select 30 31 18
33: 15(ptr) AccessChain 12 14
Store 33 32
21: 6(bool) SubgroupAllKHR 20
Store 8(b1) 21
22: 6(bool) Load 8(b1)
23: 6(bool) SubgroupAnyKHR 22
Store 8(b1) 23
24: 6(bool) Load 8(b1)
25: 6(bool) SubgroupAllEqualKHR 24
Store 8(b1) 25
26: 6(bool) Load 8(b1)
28: 9(int) Select 26 27 18
29: 15(ptr) AccessChain 12 14
Store 29 28
Return
FunctionEnd

View File

@ -17,6 +17,7 @@ Warning, version 450 is not yet complete; most version-specific features are pre
MemberName 11(gl_PerVertex) 2 "gl_ClipDistance"
MemberName 11(gl_PerVertex) 3 "gl_CullDistance"
Name 13 ""
Name 18 "a"
Name 25 "gl_VertexID"
Name 26 "gl_InstanceID"
MemberDecorate 11(gl_PerVertex) 0 BuiltIn Position
@ -24,7 +25,7 @@ Warning, version 450 is not yet complete; most version-specific features are pre
MemberDecorate 11(gl_PerVertex) 2 BuiltIn ClipDistance
MemberDecorate 11(gl_PerVertex) 3 BuiltIn CullDistance
Decorate 11(gl_PerVertex) Block
Decorate 18 SpecId 11
Decorate 18(a) SpecId 11
Decorate 25(gl_VertexID) BuiltIn VertexId
Decorate 26(gl_InstanceID) BuiltIn InstanceId
2: TypeVoid
@ -41,14 +42,14 @@ Warning, version 450 is not yet complete; most version-specific features are pre
15: 14(int) Constant 0
16: 6(float) Constant 1065353216
17: 7(fvec4) ConstantComposite 16 16 16 16
18: 14(int) SpecConstant 8
18(a): 14(int) SpecConstant 8
22: TypePointer Output 7(fvec4)
24: TypePointer Input 14(int)
25(gl_VertexID): 24(ptr) Variable Input
26(gl_InstanceID): 24(ptr) Variable Input
4(main): 2 Function None 3
5: Label
19: 6(float) ConvertSToF 18
19: 6(float) ConvertSToF 18(a)
20: 7(fvec4) CompositeConstruct 19 19 19 19
21: 7(fvec4) FDiv 17 20
23: 22(ptr) AccessChain 13 15

View File

@ -12,33 +12,44 @@ Warning, version 400 is not yet complete; most version-specific features are pre
EntryPoint Vertex 4 "main" 20 22 28 53
Source GLSL 400
Name 4 "main"
Name 9 "arraySize"
Name 14 "foo(vf4[s1516];"
Name 13 "p"
Name 17 "builtin_spec_constant("
Name 20 "color"
Name 22 "ucol"
Name 28 "size"
Name 30 "spBool"
Name 34 "scale"
Name 39 "spDouble"
Name 40 "spFloat"
Name 47 "param"
Name 50 "dupArraySize"
Name 53 "dupUcol"
Name 60 "spDupBool"
Name 63 "dupScale"
Name 67 "spDupDouble"
Name 68 "spDupFloat"
Name 76 "result"
Decorate 9 SpecId 16
Decorate 30 SpecId 17
Decorate 34 SpecId 22
Decorate 39 SpecId 19
Decorate 40 SpecId 18
Decorate 50 SpecId 116
Decorate 60 SpecId 117
Decorate 63 SpecId 122
Decorate 67 SpecId 119
Decorate 68 SpecId 118
Decorate 77 SpecId 24
Name 77 "gl_MaxImageUnits"
Decorate 9(arraySize) SpecId 16
Decorate 30(spBool) SpecId 17
Decorate 34(scale) SpecId 22
Decorate 39(spDouble) SpecId 19
Decorate 40(spFloat) SpecId 18
Decorate 50(dupArraySize) SpecId 116
Decorate 60(spDupBool) SpecId 117
Decorate 63(dupScale) SpecId 122
Decorate 67(spDupDouble) SpecId 119
Decorate 68(spDupFloat) SpecId 118
Decorate 77(gl_MaxImageUnits) SpecId 24
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypeInt 32 1
9: 8(int) SpecConstant 5
10: TypeArray 7(fvec4) 9
9(arraySize): 8(int) SpecConstant 5
10: TypeArray 7(fvec4) 9(arraySize)
11: TypePointer Function 10
12: TypeFunction 2 11(ptr)
16: TypeFunction 8(int)
@ -51,41 +62,41 @@ Warning, version 400 is not yet complete; most version-specific features are pre
27: TypePointer Output 8(int)
28(size): 27(ptr) Variable Output
29: TypeBool
30: 29(bool) SpecConstantTrue
30(spBool): 29(bool) SpecConstantTrue
33: TypeInt 32 0
34: 33(int) SpecConstant 2
34(scale): 33(int) SpecConstant 2
38: TypeFloat 64
39: 38(float) SpecConstant 1413754136 1074340347
40: 6(float) SpecConstant 1078523331
41: 38(float) SpecConstantOp 115 40
50: 8(int) SpecConstant 12
51: TypeArray 7(fvec4) 50
39(spDouble): 38(float) SpecConstant 1413754136 1074340347
40(spFloat): 6(float) SpecConstant 1078523331
41: 38(float) SpecConstantOp 115 40(spFloat)
50(dupArraySize): 8(int) SpecConstant 12
51: TypeArray 7(fvec4) 50(dupArraySize)
52: TypePointer Input 51
53(dupUcol): 52(ptr) Variable Input
60: 29(bool) SpecConstantTrue
63: 33(int) SpecConstant 2
67: 38(float) SpecConstant 1413754136 1074340347
68: 6(float) SpecConstant 1078523331
69: 38(float) SpecConstantOp 115 68
60(spDupBool): 29(bool) SpecConstantTrue
63(dupScale): 33(int) SpecConstant 2
67(spDupDouble): 38(float) SpecConstant 1413754136 1074340347
68(spDupFloat): 6(float) SpecConstant 1078523331
69: 38(float) SpecConstantOp 115 68(spDupFloat)
75: TypePointer Function 8(int)
77: 8(int) SpecConstant 8
77(gl_MaxImageUnits): 8(int) SpecConstant 8
4(main): 2 Function None 3
5: Label
47(param): 11(ptr) Variable Function
25: 24(ptr) AccessChain 22(ucol) 23
26: 7(fvec4) Load 25
Store 20(color) 26
Store 28(size) 9
Store 28(size) 9(arraySize)
SelectionMerge 32 None
BranchConditional 30 31 32
BranchConditional 30(spBool) 31 32
31: Label
35: 6(float) ConvertUToF 34
35: 6(float) ConvertUToF 34(scale)
36: 7(fvec4) Load 20(color)
37: 7(fvec4) VectorTimesScalar 36 35
Store 20(color) 37
Branch 32
32: Label
42: 38(float) FDiv 39 41
42: 38(float) FDiv 39(spDouble) 41
43: 6(float) FConvert 42
44: 7(fvec4) Load 20(color)
45: 7(fvec4) CompositeConstruct 43 43 43 43
@ -105,18 +116,18 @@ Warning, version 400 is not yet complete; most version-specific features are pre
57: 7(fvec4) FAdd 56 55
Store 20(color) 57
58: 8(int) Load 28(size)
59: 8(int) IAdd 58 50
59: 8(int) IAdd 58 50(dupArraySize)
Store 28(size) 59
SelectionMerge 62 None
BranchConditional 60 61 62
BranchConditional 60(spDupBool) 61 62
61: Label
64: 6(float) ConvertUToF 63
64: 6(float) ConvertUToF 63(dupScale)
65: 7(fvec4) Load 20(color)
66: 7(fvec4) VectorTimesScalar 65 64
Store 20(color) 66
Branch 62
62: Label
70: 38(float) FDiv 67 69
70: 38(float) FDiv 67(spDupDouble) 69
71: 6(float) FConvert 70
72: 7(fvec4) Load 20(color)
73: 7(fvec4) CompositeConstruct 71 71 71 71
@ -127,7 +138,7 @@ Warning, version 400 is not yet complete; most version-specific features are pre
17(builtin_spec_constant(): 8(int) Function None 16
18: Label
76(result): 75(ptr) Variable Function
Store 76(result) 77
Store 76(result) 77(gl_MaxImageUnits)
78: 8(int) Load 76(result)
ReturnValue 78
FunctionEnd

View File

@ -18,29 +18,33 @@ Warning, version 450 is not yet complete; most version-specific features are pre
Name 12 "refer_composite_bracket_dereference("
Name 16 "refer_spec_const_array_length("
Name 18 "declare_spec_const_in_func("
Name 21 "spec_bool"
Name 27 "color"
Name 28 "spec_int"
Name 33 "len"
Name 37 "spec_float"
Name 39 "spec_double"
Name 42 "global_vec4_array_with_spec_length"
Decorate 21 SpecId 203
Decorate 28 SpecId 200
Decorate 37 SpecId 201
Decorate 39 SpecId 202
Decorate 21(spec_bool) SpecId 203
Decorate 28(spec_int) SpecId 200
Decorate 37(spec_float) SpecId 201
Decorate 39(spec_double) SpecId 202
2: TypeVoid
3: TypeFunction 2
14: TypeInt 32 1
15: TypeFunction 14(int)
20: TypeBool
21: 20(bool) SpecConstantTrue
21(spec_bool): 20(bool) SpecConstantTrue
24: TypeFloat 32
25: TypeVector 24(float) 4
26: TypePointer Output 25(fvec4)
27(color): 26(ptr) Variable Output
28: 14(int) SpecConstant 3
28(spec_int): 14(int) SpecConstant 3
32: TypePointer Function 14(int)
37: 24(float) SpecConstant 1078523331
37(spec_float): 24(float) SpecConstant 1078523331
38: TypeFloat 64
39: 38(float) SpecConstant 1413754136 1074340347
40: TypeArray 25(fvec4) 28
39(spec_double): 38(float) SpecConstant 1413754136 1074340347
40: TypeArray 25(fvec4) 28(spec_int)
41: TypePointer Input 40
42(global_vec4_array_with_spec_length): 41(ptr) Variable Input
4(main): 2 Function None 3
@ -50,9 +54,9 @@ Warning, version 450 is not yet complete; most version-specific features are pre
6(refer_primary_spec_const(): 2 Function None 3
7: Label
SelectionMerge 23 None
BranchConditional 21 22 23
BranchConditional 21(spec_bool) 22 23
22: Label
29: 24(float) ConvertSToF 28
29: 24(float) ConvertSToF 28(spec_int)
30: 25(fvec4) Load 27(color)
31: 25(fvec4) VectorTimesScalar 30 29
Store 27(color) 31
@ -75,7 +79,7 @@ Warning, version 450 is not yet complete; most version-specific features are pre
16(refer_spec_const_array_length(): 14(int) Function None 15
17: Label
33(len): 32(ptr) Variable Function
Store 33(len) 28
Store 33(len) 28(spec_int)
34: 14(int) Load 33(len)
ReturnValue 34
FunctionEnd

View File

@ -14,85 +14,90 @@ Warning, version 450 is not yet complete; most version-specific features are pre
Name 4 "main"
Name 8 "non_const_array_size_from_spec_const("
Name 11 "i"
Name 19 "sp_int"
Name 27 "array"
Decorate 19 SpecId 201
Decorate 40 SpecId 200
Decorate 42 SpecId 202
Decorate 43 SpecId 203
Decorate 45 SpecId 204
Name 40 "sp_float"
Name 42 "sp_uint"
Name 43 "sp_sint"
Name 45 "sp_double"
Decorate 19(sp_int) SpecId 201
Decorate 40(sp_float) SpecId 200
Decorate 42(sp_uint) SpecId 202
Decorate 43(sp_sint) SpecId 203
Decorate 45(sp_double) SpecId 204
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
7: TypeFunction 6(int)
10: TypePointer Function 6(int)
12: 6(int) Constant 0
19: 6(int) SpecConstant 10
19(sp_int): 6(int) SpecConstant 10
20: 6(int) Constant 2
21: 6(int) SpecConstantOp 128 19 20
21: 6(int) SpecConstantOp 128 19(sp_int) 20
22: TypeBool
24: 6(int) SpecConstantOp 128 19 20
24: 6(int) SpecConstantOp 128 19(sp_int) 20
25: TypeArray 6(int) 24
26: TypePointer Function 25
29: 6(int) Constant 1023
32: 6(int) Constant 1
34: 6(int) SpecConstantOp 128 19 32
34: 6(int) SpecConstantOp 128 19(sp_int) 32
39: TypeFloat 32
40: 39(float) SpecConstant 1078530010
40(sp_float): 39(float) SpecConstant 1078530010
41: TypeInt 32 0
42: 41(int) SpecConstant 100
43: 6(int) SpecConstant 4294967286
42(sp_uint): 41(int) SpecConstant 100
43(sp_sint): 6(int) SpecConstant 4294967286
44: TypeFloat 64
45: 44(float) SpecConstant 2333366019 1074118410
46: 39(float) SpecConstantOp 115 45
47: 44(float) SpecConstantOp 115 40
45(sp_double): 44(float) SpecConstant 2333366019 1074118410
46: 39(float) SpecConstantOp 115 45(sp_double)
47: 44(float) SpecConstantOp 115 40(sp_float)
48: 41(int) Constant 0
49: 22(bool) SpecConstantOp 171 19 48
50: 22(bool) SpecConstantOp 171 42 48
49: 22(bool) SpecConstantOp 171 19(sp_int) 48
50: 22(bool) SpecConstantOp 171 42(sp_uint) 48
51: 6(int) SpecConstantOp 169 49 32 12
52: 41(int) Constant 1
53: 41(int) SpecConstantOp 169 49 52 48
54: 41(int) SpecConstantOp 128 43 48
55: 6(int) SpecConstantOp 128 42 48
56: 6(int) SpecConstantOp 126 19
57: 6(int) SpecConstantOp 200 19
58: 6(int) SpecConstantOp 128 19 20
59: 6(int) SpecConstantOp 128 19 20
54: 41(int) SpecConstantOp 128 43(sp_sint) 48
55: 6(int) SpecConstantOp 128 42(sp_uint) 48
56: 6(int) SpecConstantOp 126 19(sp_int)
57: 6(int) SpecConstantOp 200 19(sp_int)
58: 6(int) SpecConstantOp 128 19(sp_int) 20
59: 6(int) SpecConstantOp 128 19(sp_int) 20
60: 6(int) Constant 3
61: 6(int) SpecConstantOp 130 59 60
62: 6(int) Constant 4
63: 6(int) SpecConstantOp 130 58 62
64: 6(int) SpecConstantOp 132 43 20
64: 6(int) SpecConstantOp 132 43(sp_sint) 20
65: 41(int) Constant 2
66: 41(int) SpecConstantOp 132 42 65
66: 41(int) SpecConstantOp 132 42(sp_uint) 65
67: 6(int) Constant 5
68: 6(int) SpecConstantOp 135 64 67
69: 41(int) Constant 5
70: 41(int) SpecConstantOp 134 66 69
71: 6(int) SpecConstantOp 139 43 62
71: 6(int) SpecConstantOp 139 43(sp_sint) 62
72: 41(int) Constant 4
73: 41(int) SpecConstantOp 137 42 72
74: 6(int) SpecConstantOp 132 43 60
73: 41(int) SpecConstantOp 137 42(sp_uint) 72
74: 6(int) SpecConstantOp 132 43(sp_sint) 60
75: 6(int) SpecConstantOp 135 74 67
76: 6(int) Constant 10
77: 6(int) SpecConstantOp 195 43 76
77: 6(int) SpecConstantOp 195 43(sp_sint) 76
78: 6(int) Constant 20
79: 41(int) SpecConstantOp 194 42 78
80: 6(int) SpecConstantOp 196 43 32
81: 41(int) SpecConstantOp 196 42 20
79: 41(int) SpecConstantOp 194 42(sp_uint) 78
80: 6(int) SpecConstantOp 196 43(sp_sint) 32
81: 41(int) SpecConstantOp 196 42(sp_uint) 20
82: 6(int) Constant 256
83: 6(int) SpecConstantOp 197 43 82
83: 6(int) SpecConstantOp 197 43(sp_sint) 82
84: 41(int) Constant 512
85: 41(int) SpecConstantOp 198 42 84
86: 22(bool) SpecConstantOp 177 19 43
87: 22(bool) SpecConstantOp 170 42 42
88: 22(bool) SpecConstantOp 173 19 43
85: 41(int) SpecConstantOp 198 42(sp_uint) 84
86: 22(bool) SpecConstantOp 177 19(sp_int) 43(sp_sint)
87: 22(bool) SpecConstantOp 170 42(sp_uint) 42(sp_uint)
88: 22(bool) SpecConstantOp 173 19(sp_int) 43(sp_sint)
89: 6(int) Constant 30
90: TypeVector 6(int) 4
91: 90(ivec4) SpecConstantComposite 78 89 19 19
91: 90(ivec4) SpecConstantComposite 78 89 19(sp_int) 19(sp_int)
92: 41(int) Constant 4294967295
93: 41(int) Constant 4294967294
94: TypeVector 41(int) 4
95: 94(ivec4) SpecConstantComposite 42 42 92 93
95: 94(ivec4) SpecConstantComposite 42(sp_uint) 42(sp_uint) 92 93
96: TypeVector 22(bool) 4
97: 94(ivec4) ConstantComposite 48 48 48 48
98: 96(bvec4) SpecConstantOp 171 91 97

View File

@ -0,0 +1,86 @@
spv.stereoViewRendering.tesc
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 38
Capability Geometry
Capability Tessellation
Capability ShaderViewportMaskNV
Capability ShaderStereoViewNV
Extension "SPV_NV_stereo_view_rendering"
Extension "SPV_NV_viewport_array2"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint TessellationControl 4 "main" 16 18 32
ExecutionMode 4 OutputVertices 4
Source GLSL 450
SourceExtension "GL_NV_stereo_view_rendering"
SourceExtension "GL_NV_viewport_array2"
Name 4 "main"
Name 12 "gl_PerVertex"
MemberName 12(gl_PerVertex) 0 "gl_Layer"
MemberName 12(gl_PerVertex) 1 "gl_SecondaryPositionNV"
MemberName 12(gl_PerVertex) 2 "gl_SecondaryViewportMaskNV"
Name 16 "gl_out"
Name 18 "gl_InvocationID"
Name 28 "gl_PerVertex"
MemberName 28(gl_PerVertex) 0 "gl_Position"
MemberName 28(gl_PerVertex) 1 "gl_PointSize"
MemberName 28(gl_PerVertex) 2 "gl_ClipDistance"
MemberName 28(gl_PerVertex) 3 "gl_CullDistance"
MemberName 28(gl_PerVertex) 4 "gl_SecondaryPositionNV"
Name 32 "gl_in"
MemberDecorate 12(gl_PerVertex) 0 BuiltIn Layer
MemberDecorate 12(gl_PerVertex) 0 ViewportRelativeNV
MemberDecorate 12(gl_PerVertex) 0 SecondaryViewportRelativeNV 1
MemberDecorate 12(gl_PerVertex) 1 BuiltIn SecondaryPositionNV
MemberDecorate 12(gl_PerVertex) 2 BuiltIn SecondaryViewportMaskNV
Decorate 12(gl_PerVertex) Block
Decorate 18(gl_InvocationID) BuiltIn InvocationId
MemberDecorate 28(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 28(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 28(gl_PerVertex) 2 BuiltIn ClipDistance
MemberDecorate 28(gl_PerVertex) 3 BuiltIn CullDistance
Decorate 28(gl_PerVertex) Block
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypeInt 32 0
10: 9(int) Constant 2
11: TypeArray 6(int) 10
12(gl_PerVertex): TypeStruct 6(int) 8(fvec4) 11
13: 9(int) Constant 4
14: TypeArray 12(gl_PerVertex) 13
15: TypePointer Output 14
16(gl_out): 15(ptr) Variable Output
17: TypePointer Input 6(int)
18(gl_InvocationID): 17(ptr) Variable Input
20: 6(int) Constant 2
21: 6(int) Constant 0
22: 6(int) Constant 1
23: TypePointer Output 6(int)
26: 9(int) Constant 1
27: TypeArray 7(float) 26
28(gl_PerVertex): TypeStruct 8(fvec4) 7(float) 27 27 8(fvec4)
29: 9(int) Constant 32
30: TypeArray 28(gl_PerVertex) 29
31: TypePointer Input 30
32(gl_in): 31(ptr) Variable Input
33: TypePointer Input 8(fvec4)
36: TypePointer Output 8(fvec4)
4(main): 2 Function None 3
5: Label
19: 6(int) Load 18(gl_InvocationID)
24: 23(ptr) AccessChain 16(gl_out) 19 20 21
Store 24 22
25: 6(int) Load 18(gl_InvocationID)
34: 33(ptr) AccessChain 32(gl_in) 22 21
35: 8(fvec4) Load 34
37: 36(ptr) AccessChain 16(gl_out) 25 22
Store 37 35
Return
FunctionEnd

View File

@ -0,0 +1,69 @@
spv.stereoViewRendering.vert
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 27
Capability Shader
Capability Geometry
Capability ShaderViewportIndexLayerNV
Capability ShaderViewportMaskNV
Capability ShaderStereoViewNV
Extension "SPV_NV_stereo_view_rendering"
Extension "SPV_NV_viewport_array2"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 11 19 23 26
Source GLSL 450
SourceExtension "GL_NV_stereo_view_rendering"
SourceExtension "GL_NV_viewport_array2"
Name 4 "main"
Name 11 "gl_SecondaryViewportMaskNV"
Name 19 "gl_SecondaryPositionNV"
Name 21 "gl_PerVertex"
MemberName 21(gl_PerVertex) 0 "gl_Position"
MemberName 21(gl_PerVertex) 1 "gl_PointSize"
MemberName 21(gl_PerVertex) 2 "gl_ClipDistance"
MemberName 21(gl_PerVertex) 3 "gl_CullDistance"
Name 23 ""
Name 26 "gl_Layer"
Decorate 11(gl_SecondaryViewportMaskNV) BuiltIn SecondaryViewportMaskNV
Decorate 19(gl_SecondaryPositionNV) BuiltIn SecondaryPositionNV
MemberDecorate 21(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 21(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 21(gl_PerVertex) 2 BuiltIn ClipDistance
MemberDecorate 21(gl_PerVertex) 3 BuiltIn CullDistance
Decorate 21(gl_PerVertex) Block
Decorate 26(gl_Layer) BuiltIn Layer
Decorate 26(gl_Layer) ViewportRelativeNV
Decorate 26(gl_Layer) SecondaryViewportRelativeNV 2
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
7: TypeInt 32 0
8: 7(int) Constant 1
9: TypeArray 6(int) 8
10: TypePointer Output 9
11(gl_SecondaryViewportMaskNV): 10(ptr) Variable Output
12: 6(int) Constant 0
13: 6(int) Constant 1
14: TypePointer Output 6(int)
16: TypeFloat 32
17: TypeVector 16(float) 4
18: TypePointer Output 17(fvec4)
19(gl_SecondaryPositionNV): 18(ptr) Variable Output
20: TypeArray 16(float) 8
21(gl_PerVertex): TypeStruct 17(fvec4) 16(float) 20 20
22: TypePointer Output 21(gl_PerVertex)
23: 22(ptr) Variable Output
26(gl_Layer): 14(ptr) Variable Output
4(main): 2 Function None 3
5: Label
15: 14(ptr) AccessChain 11(gl_SecondaryViewportMaskNV) 12
Store 15 13
24: 18(ptr) AccessChain 23 12
25: 17(fvec4) Load 24
Store 19(gl_SecondaryPositionNV) 25
Return
FunctionEnd

View File

@ -0,0 +1,59 @@
spv.viewportArray2.tesc
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 25
Capability Geometry
Capability Tessellation
Capability MultiViewport
Capability ShaderViewportIndexLayerNV
Capability ShaderViewportMaskNV
Extension "SPV_NV_viewport_array2"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint TessellationControl 4 "main" 14 16
ExecutionMode 4 OutputVertices 4
Source GLSL 450
SourceExtension "GL_NV_viewport_array2"
Name 4 "main"
Name 10 "gl_PerVertex"
MemberName 10(gl_PerVertex) 0 "gl_ViewportIndex"
MemberName 10(gl_PerVertex) 1 "gl_Layer"
MemberName 10(gl_PerVertex) 2 "gl_ViewportMask"
Name 14 "gl_out"
Name 16 "gl_InvocationID"
MemberDecorate 10(gl_PerVertex) 0 BuiltIn ViewportIndex
MemberDecorate 10(gl_PerVertex) 1 BuiltIn Layer
MemberDecorate 10(gl_PerVertex) 1 ViewportRelativeNV
MemberDecorate 10(gl_PerVertex) 2 BuiltIn ViewportMaskNV
Decorate 10(gl_PerVertex) Block
Decorate 16(gl_InvocationID) BuiltIn InvocationId
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
7: TypeInt 32 0
8: 7(int) Constant 2
9: TypeArray 6(int) 8
10(gl_PerVertex): TypeStruct 6(int) 6(int) 9
11: 7(int) Constant 4
12: TypeArray 10(gl_PerVertex) 11
13: TypePointer Output 12
14(gl_out): 13(ptr) Variable Output
15: TypePointer Input 6(int)
16(gl_InvocationID): 15(ptr) Variable Input
18: 6(int) Constant 2
19: 6(int) Constant 0
20: 6(int) Constant 1
21: TypePointer Output 6(int)
4(main): 2 Function None 3
5: Label
17: 6(int) Load 16(gl_InvocationID)
22: 21(ptr) AccessChain 14(gl_out) 17 18 19
Store 22 20
23: 6(int) Load 16(gl_InvocationID)
24: 21(ptr) AccessChain 14(gl_out) 23 19
Store 24 18
Return
FunctionEnd

View File

@ -0,0 +1,48 @@
spv.viewportArray2.vert
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 19
Capability Shader
Capability Geometry
Capability MultiViewport
Capability ShaderViewportIndexLayerNV
Capability ShaderViewportMaskNV
Extension "SPV_NV_viewport_array2"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 11 16 18
Source GLSL 450
SourceExtension "GL_ARB_shader_viewport_layer_array"
SourceExtension "GL_NV_viewport_array2"
Name 4 "main"
Name 11 "gl_ViewportMask"
Name 16 "gl_ViewportIndex"
Name 18 "gl_Layer"
Decorate 11(gl_ViewportMask) BuiltIn ViewportMaskNV
Decorate 16(gl_ViewportIndex) BuiltIn ViewportIndex
Decorate 18(gl_Layer) BuiltIn Layer
Decorate 18(gl_Layer) ViewportRelativeNV
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
7: TypeInt 32 0
8: 7(int) Constant 1
9: TypeArray 6(int) 8
10: TypePointer Output 9
11(gl_ViewportMask): 10(ptr) Variable Output
12: 6(int) Constant 0
13: 6(int) Constant 1
14: TypePointer Output 6(int)
16(gl_ViewportIndex): 14(ptr) Variable Output
17: 6(int) Constant 2
18(gl_Layer): 14(ptr) Variable Output
4(main): 2 Function None 3
5: Label
15: 14(ptr) AccessChain 11(gl_ViewportMask) 12
Store 15 13
Store 16(gl_ViewportIndex) 17
Return
FunctionEnd

View File

@ -11,8 +11,6 @@ ERROR: 0:34: '' : octal literal too big
ERROR: 0:35: '' : numeric literal too long
ERROR: 0:35: '' : numeric literal too big
ERROR: 0:36: '' : float literal too long
ERROR: 0:36: '' : float literal too long
ERROR: 0:36: '' : float literal too long
WARNING: 0:39: '#extension' : extension not supported: a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhooooooooooooooooooooooooooooooohhhhhhhhhhhhhhhhh01234
ERROR: 0:40: '' : name too long
WARNING: 0:40: '#extension' : extension not supported: a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhooooooooooooooooooooooooooooooohhhhhhhhhhhhhhhhh01234
@ -29,7 +27,7 @@ ERROR: 0:62: 'preprocessor evaluation' : undefined macro in expression not allow
ERROR: 0:67: '' : numeric literal too long
ERROR: 0:70: '' : name too long
ERROR: 0:70: 'preprocessor evaluation' : undefined macro in expression not allowed in es profile A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
ERROR: 28 compilation errors. No code generated.
ERROR: 26 compilation errors. No code generated.
Shader version: 300
@ -73,7 +71,7 @@ ERROR: node is still EOpNull!
0:23 move second child to first child (temp highp float)
0:23 'E3' (global highp float)
0:23 Constant:
0:23 12.000000
0:23 1.012346
0:25 Function Definition: main( (global void)
0:25 Function Parameters:
0:27 Sequence
@ -104,7 +102,7 @@ ERROR: node is still EOpNull!
0:36 move second child to first child (temp highp float)
0:36 'superF' (global highp float)
0:36 Constant:
0:36 inf
0:36 1.012346
0:? Linker Objects
0:? 'BCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789' (in highp float)
0:? 'ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789' (in highp float)
@ -169,7 +167,7 @@ ERROR: node is still EOpNull!
0:23 move second child to first child (temp highp float)
0:23 'E3' (global highp float)
0:23 Constant:
0:23 12.000000
0:23 1.012346
0:25 Function Definition: main( (global void)
0:25 Function Parameters:
0:27 Sequence
@ -200,7 +198,7 @@ ERROR: node is still EOpNull!
0:36 move second child to first child (temp highp float)
0:36 'superF' (global highp float)
0:36 Constant:
0:36 inf
0:36 1.012346
0:? Linker Objects
0:? 'BCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789' (in highp float)
0:? 'ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789' (in highp float)

View File

@ -269,56 +269,59 @@ Shader version: 450
EntryPoint Vertex 4 "main"
Source GLSL 450
Name 4 "main"
Decorate 7 SpecId 200
Decorate 11 SpecId 201
Decorate 13 SpecId 202
Name 7 "scf1"
Name 11 "scbt"
Name 13 "sci2"
Decorate 7(scf1) SpecId 200
Decorate 11(scbt) SpecId 201
Decorate 13(sci2) SpecId 202
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: 6(float) SpecConstant 1065353216
7(scf1): 6(float) SpecConstant 1065353216
8: TypeBool
9: 6(float) Constant 0
11: 8(bool) SpecConstantTrue
11(scbt): 8(bool) SpecConstantTrue
12: TypeInt 32 1
13: 12(int) SpecConstant 2
13(sci2): 12(int) SpecConstant 2
14: TypeInt 32 0
15: 14(int) Constant 0
16: 8(bool) SpecConstantOp 171 13 15
16: 8(bool) SpecConstantOp 171 13(sci2) 15
17: 6(float) Constant 1065353216
21: 12(int) Constant 0
22: 12(int) Constant 1
23: 12(int) SpecConstantOp 169 11 22 21
25: 8(bool) SpecConstantOp 166 11 11
26: 12(int) SpecConstantOp 132 13 13
30: 8(bool) SpecConstantOp 168 11
31: 12(int) SpecConstantOp 126 13
33: 8(bool) SpecConstantOp 173 13 13
35: 8(bool) SpecConstantOp 165 11 11
36: 8(bool) SpecConstantOp 171 13 13
23: 12(int) SpecConstantOp 169 11(scbt) 22 21
25: 8(bool) SpecConstantOp 166 11(scbt) 11(scbt)
26: 12(int) SpecConstantOp 132 13(sci2) 13(sci2)
30: 8(bool) SpecConstantOp 168 11(scbt)
31: 12(int) SpecConstantOp 126 13(sci2)
33: 8(bool) SpecConstantOp 173 13(sci2) 13(sci2)
35: 8(bool) SpecConstantOp 165 11(scbt) 11(scbt)
36: 8(bool) SpecConstantOp 171 13(sci2) 13(sci2)
37: TypeVector 12(int) 2
38: 37(ivec2) SpecConstantComposite 13 13
39: 37(ivec2) SpecConstantComposite 13 13
40: 37(ivec2) SpecConstantComposite 13 13
38: 37(ivec2) SpecConstantComposite 13(sci2) 13(sci2)
39: 37(ivec2) SpecConstantComposite 13(sci2) 13(sci2)
40: 37(ivec2) SpecConstantComposite 13(sci2) 13(sci2)
41: 14(int) Constant 2
42: TypeArray 37(ivec2) 41
44: TypeVector 6(float) 2
48: TypeArray 44(fvec2) 41
4(main): 2 Function None 3
5: Label
10: 8(bool) FOrdNotEqual 7 9
18: 6(float) Select 11 17 9
19: 6(float) ConvertSToF 13
20: 12(int) ConvertFToS 7
24: 6(float) FMul 7 7
27: 6(float) ConvertSToF 13
28: 6(float) FAdd 7 27
29: 6(float) FNegate 7
32: 8(bool) FOrdGreaterThan 7 7
34: 8(bool) FOrdNotEqual 7 7
10: 8(bool) FOrdNotEqual 7(scf1) 9
18: 6(float) Select 11(scbt) 17 9
19: 6(float) ConvertSToF 13(sci2)
20: 12(int) ConvertFToS 7(scf1)
24: 6(float) FMul 7(scf1) 7(scf1)
27: 6(float) ConvertSToF 13(sci2)
28: 6(float) FAdd 7(scf1) 27
29: 6(float) FNegate 7(scf1)
32: 8(bool) FOrdGreaterThan 7(scf1) 7(scf1)
34: 8(bool) FOrdNotEqual 7(scf1) 7(scf1)
43: 42 CompositeConstruct 39 40
45: 44(fvec2) CompositeConstruct 7 7
46: 44(fvec2) CompositeConstruct 7 7
47: 44(fvec2) CompositeConstruct 7 7
45: 44(fvec2) CompositeConstruct 7(scf1) 7(scf1)
46: 44(fvec2) CompositeConstruct 7(scf1) 7(scf1)
47: 44(fvec2) CompositeConstruct 7(scf1) 7(scf1)
49: 48 CompositeConstruct 46 47
Return
FunctionEnd

View File

@ -40,7 +40,8 @@ ERROR: 0:92: 'call argument' : sampler constructor must appear at point of use
ERROR: 0:93: ',' : sampler constructor must appear at point of use
ERROR: 0:94: ':' : wrong operand types: no operation ':' exists that takes a left-hand operand of type 'temp sampler2D' and a right operand of type 'temp sampler2D' (or there is no acceptable conversion)
ERROR: 0:94: 'call argument' : sampler constructor must appear at point of use
ERROR: 38 compilation errors. No code generated.
ERROR: 0:96: 'gl_NumSamples' : undeclared identifier
ERROR: 39 compilation errors. No code generated.
ERROR: Linking fragment stage: Only one push_constant block is allowed per stage

View File

@ -0,0 +1,3 @@
#define a b(
#define b(x)
b(a)

View File

@ -1,6 +1,6 @@
groupshared float4 a[100];
void main(int dti : SV_DispatchThreadID)
void main(int dti : SV_DispatchThreadID, int gti : SV_GroupThreadID)
{
dti;
dti - gti;
}

View File

@ -9,7 +9,7 @@ struct PS_OUTPUT
PS_OUTPUT Func1()
{
return PS_OUTPUT(float4(1), 2, 3, 4);
return PS_OUTPUT(float4(1,1,1,1), 2, 3, 4);
}
PS_OUTPUT main()

View File

@ -34,3 +34,8 @@ float4 ShaderFunction(float4 input) : COLOR0
return input * a1;
}
cbuffer Constants
{
float a = 1.0f, b, c = 2.0f;
};

View File

@ -18,6 +18,25 @@ void Test1()
struct mystruct2 { float a; float b; float c; };
mystruct2 test5 = { {8,}, {9,}, {10}, };
const mystruct2 constTest5 = { {8,}, {9,}, {10}, };
constTest5.c;
const float step = 1.f;
float n = 0;
const float3 a[8] = {
normalize(float3(1, 1, 1)) * (n += step),
normalize(float3(-1, -1, -1)) * (n += step),
normalize(float3(-1, -1, 1)) * (n += step),
normalize(float3(-1, 1, -1)) * (n += step),
normalize(float3(-1, 1, 1)) * (n += step),
normalize(float3(1, -1, -1)) * (n += step),
normalize(float3(1, -1, 1)) * (n += step),
normalize(float3(1, 1, -1)) * (n += step) };
const struct one { float3 a; } oneNonConst = { normalize(float3(-1, 1, 1)) * (n += step) };
const struct two { float3 a;
float3 b; } twoNonConst = { normalize(float3(-1, 1, 1)) * (n += step),
normalize(float3(-1, 1, 1)) * (n += step) };
}
struct PS_OUTPUT { float4 color : SV_Target0; };

View File

@ -0,0 +1,7 @@
uniform float4 col4;
int4 main() : SV_Target0
{
return D3DCOLORtoUBYTE4(col4);
}

View File

@ -0,0 +1,33 @@
void ShaderFunction(float inf) : COLOR0
{
float3x4 m;
// tests that convert to non-matrix swizzles
m._34 = 1.0; // AST should have a normal component select
m._m23 = 2.0; // same code
m[2][3] = 2.0; // same code
m._11_12_13_14 = float4(3.0); // AST should have normal column selection (first row)
m._m10_m11_m12_m13 = float4(3.0); // AST should have normal column selection (second row)
m[1] = float4(3.0); // same code
// tests that stay as matrix swizzles
float3 f3;
m._11_22_23 = f3;
m._21_12_31 = float3(5.0);
m._11_12_21 = 2 * f3;
// r-value
f3 = m._21_12_31;
}
float3x3 createMat3x3(float3 a, float3 b, float3 c)
{
float3x3 m;
m._11_21_31 = a;
m._12_22_32 = b;
m._13_23_33 = c;
return m;
}

View File

@ -0,0 +1,51 @@
uniform int4 ui4;
static const int cia = -4;
static const int cib = -42;
// ERROR: Ambiguous with fn1 below.
// int4 fn1(int4 p0) { return int4(1,2,3,4); }
int4 fn1(int4 p0, bool b1, bool b2 = false) {
return p0;
}
int4 fn1(int4 p0,
int4 p1 : FOO = int4(-1,-2,-3, cia),
int p2[2] : BAR = { int(1), 2 },
int p3 = abs(cib) )
{
return p0 + p1 + p2[0] + p3;
}
// These should not be ambiguous if given either an int or a float explicit second parameter.
int4 fn2(int4 p0, int x = 3)
{
return int4(10,11,12,13);
}
int4 fn2(int4 p0, float x = sin(3.3)) // OK to have a const expression as a default value
{
return p0 + int4(20,21,22,23);
}
void fn3(int p0 = 3) { }
int4 main() : SV_Target0
{
int myarray[2] = {30,31};
fn3();
fn3(5);
return fn1(100) +
fn1(101, ui4) +
fn1(102, ui4, myarray) +
fn1(103, ui4, myarray, 99) +
fn1(104, false) +
fn1(105, false, true) +
fn2(110, 11.11) + // calls int4, float form
fn2(111, 12); // calls int4, int form
}

View File

@ -0,0 +1,50 @@
uniform int4 ui4;
uniform float ufvar;
static const int cia = -4;
static const int cib = -42;
int4 fn1(int4 p0) { return int4(1,2,3,4); }
int4 fn1(int4 p0, bool b1, bool b2 = false) {
return p0;
}
int4 fn1(int4 p0,
int4 p1 : FOO = int4(-1,-2,-3, cia),
int p2[2] : BAR = { int(1), 2 },
int p3 = abs(cib) )
{
return p0 + p1 + p2[0] + p3;
}
// These should not be ambiguous if given either an int or a float explicit second parameter.
int4 fn2(int4 p0, int x = 3)
{
return int4(10,11,12,13);
}
int4 fn2(int4 p0, float x = ufvar) // ERROR: non-const expression
{
return p0 + int4(20,21,22,23);
}
void fn3(int p0 = 5, int p1) // ERROR no-default param after default param
{
}
int4 main() : SV_Target0
{
int myarray[2] = {30,31};
return fn1(100) + // ERROR: ambiguous
fn1(101, ui4) +
fn1(102, ui4, myarray) +
fn1(103, ui4, myarray, 99) +
fn1(104, false) +
fn1(105, false, true) +
fn2(112) + // ERROR: ambiguous
fn2(110, 11.11) + // calls int4, float form
fn2(111, 12); // calls int4, int form
}

View File

@ -25,5 +25,12 @@ outs PixelShaderFunction(float4 input) : COLOR0
o4.c = o1.c;
Nest nest = (Nest)0;
float2 gf2a[4] = { };
int cgi = { };
o4.b = gf2a[2].y * cgi;
return o4;
}
}
static const float2 cgf2a[3];
static const int ci;

View File

@ -0,0 +1,18 @@
#define foobarblee zzzz
#define ar qqqq
#define MACRO1(x,y) foo##x##y
// #define MACRO2 abc##def
// #define SPACE_IN_MACRO int var1
float4 main() : SV_Target0
{
// float MACRO2 = 10;
float MACRO1(b##ar,blee) = 3;
return float4(foobarblee,0,0,0);
}

View File

@ -0,0 +1,28 @@
RWTexture2D<float3> rwtx;
RWBuffer<float3> buf;
float3 SomeValue() { return float3(1,2,3); }
float4 main() : SV_Target0
{
int2 tc2 = { 0, 0 };
int tc = 0;
// Test swizzles and partial updates of L-values when writing to buffers and writable textures.
rwtx[tc2].zyx = float3(1,2,3); // full swizzle, simple RHS
rwtx[tc2].zyx = SomeValue(); // full swizzle, complex RHS
rwtx[tc2].zyx = 2; // full swizzle, modify op
// Partial updates not yet supported.
// Partial values, which will use swizzles.
// buf[tc].yz = 42; // partial swizzle, simple RHS
// buf[tc].yz = SomeValue().x; // partial swizzle, complex RHS
// buf[tc].yz += 43; // partial swizzle, modify op
// // Partial values, which will use index.
// buf[tc].y = 44; // single index, simple RHS
// buf[tc].y = SomeValue().x; // single index, complex RHS
// buf[tc].y += 45; // single index, modify op
return 0.0;
}

View File

@ -0,0 +1,25 @@
struct VS_INPUT
{
int x0_in : foo0;
float4 Pos_in : SV_Position;
int x1_in : foo1;
};
struct VS_OUTPUT
{
int x0_out : foo0;
float4 Pos_out : SV_Position;
int x1_out : foo1;
};
VS_OUTPUT main(VS_INPUT vsin, float4 Pos_loose : SV_Position)
{
VS_OUTPUT vsout;
vsout.x0_out = vsin.x0_in;
vsout.Pos_out = vsin.Pos_in + Pos_loose;
vsout.x1_out = vsin.x1_in;
return vsout;
}

View File

@ -0,0 +1,21 @@
struct PSInput
{
float4 Pos : SV_POSITION;
float2 TexCoord : TEXCOORD;
float3 TerrainPos : TERRAINPOS;
uint VertexID : VertexID;
};
typedef PSInput foo_t[2][3];
[maxvertexcount(4)]
void main(point uint v[1] : VertexID, inout TriangleStream<PSInput> OutputStream)
{
foo_t Verts;
PSInput Out = (PSInput) 0;
for (int x=0; x<2; ++x)
for (int y=0; y<2; ++y)
Verts[x][y] = Out;
}

View File

@ -0,0 +1,12 @@
struct S {
float f;
float4 pos : SV_Position;
};
float4 main(int i, S input[3]) : COLOR0
{
S a[3];
input = a;
return float3(1.0);
}

View File

@ -0,0 +1,32 @@
// Test passing split structs to functions.
struct VS_INPUT
{
int x0_in : foo0;
float4 Pos_in : SV_Position;
int x1_in : foo1;
};
struct VS_OUTPUT
{
int x0_out : foo0;
float4 Pos_out : SV_Position;
int x1_out : foo1;
};
void Fn1(VS_INPUT fn1_in, VS_OUTPUT fn1_out) {
fn1_in.Pos_in + fn1_out.Pos_out;
}
VS_OUTPUT main(VS_INPUT vsin)
{
VS_OUTPUT vsout;
vsout.x0_out = vsin.x0_in;
vsout.Pos_out = vsin.Pos_in;
vsout.x1_out = vsin.x1_in;
Fn1(vsin, vsout);
return vsout;
}

View File

@ -0,0 +1,31 @@
struct STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO
{
float m0_array[2];
int m1;
};
struct PS_IN
{
float4 pos : SV_Position;
float2 tc : TEXCOORD0;
// float c : SV_ClipDistance0;
};
struct GS_OUT
{
PS_IN psIn;
STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO contains_no_builtin_io;
};
[maxvertexcount(3)]
void main(triangle PS_IN tin[3], inout TriangleStream <GS_OUT> ts )
{
GS_OUT o;
o.psIn.pos = float4(1,2,3,4);
o.psIn.tc = float2(5,6);
ts.Append(o);
}

View File

@ -0,0 +1,21 @@
struct PS_IN
{
float4 pos : SV_Position;
};
struct GS_OUT
{
float4 pos : SV_Position;
};
[maxvertexcount(3)]
void main(triangle PS_IN i[3], inout TriangleStream <GS_OUT> ts)
{
GS_OUT o;
for (int x=0; x<3; ++x) {
o.pos = i[x].pos;
ts.Append(o);
}
}

Some files were not shown because too many files have changed in this diff Show More