SPIR-V: Move from Version .99 Rev 31 to Version 1.0, Rev 2.

This commit is contained in:
John Kessenich 2015-11-15 21:33:39 -07:00
parent 1c77f3a8d2
commit 55e7d11ce8
117 changed files with 6740 additions and 5997 deletions

View File

@ -28,7 +28,7 @@
#define GLSLstd450_H #define GLSLstd450_H
const int GLSLstd450Version = 99; const int GLSLstd450Version = 99;
const int GLSLstd450Revision = 2; const int GLSLstd450Revision = 3;
enum GLSLstd450 { enum GLSLstd450 {
GLSLstd450Bad = 0, // Don't use GLSLstd450Bad = 0, // Don't use
@ -82,47 +82,44 @@ enum GLSLstd450 {
GLSLstd450FClamp = 43, GLSLstd450FClamp = 43,
GLSLstd450UClamp = 44, GLSLstd450UClamp = 44,
GLSLstd450SClamp = 45, GLSLstd450SClamp = 45,
GLSLstd450Mix = 46, GLSLstd450FMix = 46,
GLSLstd450Step = 47, GLSLstd450IMix = 47,
GLSLstd450SmoothStep = 48, GLSLstd450Step = 48,
GLSLstd450SmoothStep = 49,
GLSLstd450Fma = 49, GLSLstd450Fma = 50,
GLSLstd450Frexp = 50, // second operand needs an OpVariable to write to GLSLstd450Frexp = 51, // second operand needs an OpVariable to write to
GLSLstd450FrexpStruct = 51, // no OpVariable operand GLSLstd450FrexpStruct = 52, // no OpVariable operand
GLSLstd450Ldexp = 52, GLSLstd450Ldexp = 53,
GLSLstd450PackSnorm4x8 = 53, GLSLstd450PackSnorm4x8 = 54,
GLSLstd450PackUnorm4x8 = 54, GLSLstd450PackUnorm4x8 = 55,
GLSLstd450PackSnorm2x16 = 55, GLSLstd450PackSnorm2x16 = 56,
GLSLstd450PackUnorm2x16 = 56, GLSLstd450PackUnorm2x16 = 57,
GLSLstd450PackHalf2x16 = 57, GLSLstd450PackHalf2x16 = 58,
GLSLstd450PackDouble2x32 = 58, GLSLstd450PackDouble2x32 = 59,
GLSLstd450UnpackSnorm2x16 = 59, GLSLstd450UnpackSnorm2x16 = 60,
GLSLstd450UnpackUnorm2x16 = 60, GLSLstd450UnpackUnorm2x16 = 61,
GLSLstd450UnpackHalf2x16 = 61, GLSLstd450UnpackHalf2x16 = 62,
GLSLstd450UnpackSnorm4x8 = 62, GLSLstd450UnpackSnorm4x8 = 63,
GLSLstd450UnpackUnorm4x8 = 63, GLSLstd450UnpackUnorm4x8 = 64,
GLSLstd450UnpackDouble2x32 = 64, GLSLstd450UnpackDouble2x32 = 65,
GLSLstd450Length = 65, GLSLstd450Length = 66,
GLSLstd450Distance = 66, GLSLstd450Distance = 67,
GLSLstd450Cross = 67, GLSLstd450Cross = 68,
GLSLstd450Normalize = 68, GLSLstd450Normalize = 69,
GLSLstd450FaceForward = 69, GLSLstd450FaceForward = 70,
GLSLstd450Reflect = 70, GLSLstd450Reflect = 71,
GLSLstd450Refract = 71, GLSLstd450Refract = 72,
GLSLstd450FindILSB = 72, GLSLstd450FindILsb = 73,
GLSLstd450FindSMSB = 73, GLSLstd450FindSMsb = 74,
GLSLstd450FindUMSB = 74, GLSLstd450FindUMsb = 75,
GLSLstd450InterpolateAtCentroid = 75, GLSLstd450InterpolateAtCentroid = 76,
GLSLstd450InterpolateAtSample = 76, GLSLstd450InterpolateAtSample = 77,
GLSLstd450InterpolateAtOffset = 77, GLSLstd450InterpolateAtOffset = 78,
GLSLstd450AddCarry = 78, // These three should move to the core instruction set
GLSLstd450SubBorrow = 79,
GLSLstd450MulExtended = 80,
GLSLstd450Count GLSLstd450Count
}; };

View File

@ -60,7 +60,10 @@ namespace spv {
namespace { namespace {
const int GlslangMagic = 0x51a; // For low-order part of the generator's magic number. Bump up
// when there is a change in the style (e.g., if SSA form changes,
// or a different instruction sequence to do something gets used).
const int GeneratorVersion = 1;
// //
// The main holder of information for translating glslang to SPIR-V. // The main holder of information for translating glslang to SPIR-V.
@ -113,13 +116,16 @@ protected:
spv::Id createNoArgOperation(glslang::TOperator op); spv::Id createNoArgOperation(glslang::TOperator op);
spv::Id getSymbolId(const glslang::TIntermSymbol* node); spv::Id getSymbolId(const glslang::TIntermSymbol* node);
void addDecoration(spv::Id id, spv::Decoration dec); void addDecoration(spv::Id id, spv::Decoration dec);
void addDecoration(spv::Id id, spv::Decoration dec, unsigned value);
void addMemberDecoration(spv::Id id, int member, spv::Decoration dec); void addMemberDecoration(spv::Id id, int member, spv::Decoration dec);
spv::Id createSpvConstant(const glslang::TType& type, const glslang::TConstUnionArray&, int& nextConst); spv::Id createSpvSpecConstant(const glslang::TIntermTyped&);
spv::Id createSpvConstant(const glslang::TType& type, const glslang::TConstUnionArray&, int& nextConst, bool specConstant);
bool isTrivialLeaf(const glslang::TIntermTyped* node); bool isTrivialLeaf(const glslang::TIntermTyped* node);
bool isTrivial(const glslang::TIntermTyped* node); bool isTrivial(const glslang::TIntermTyped* node);
spv::Id createShortCircuit(glslang::TOperator, glslang::TIntermTyped& left, glslang::TIntermTyped& right); spv::Id createShortCircuit(glslang::TOperator, glslang::TIntermTyped& left, glslang::TIntermTyped& right);
spv::Function* shaderEntry; spv::Function* shaderEntry;
spv::Instruction* entryPoint;
int sequenceDepth; int sequenceDepth;
// There is a 1:1 mapping between a spv builder and a module; this is thread safe // There is a 1:1 mapping between a spv builder and a module; this is thread safe
@ -169,7 +175,7 @@ spv::ExecutionModel TranslateExecutionModel(EShLanguage stage)
case EShLangFragment: return spv::ExecutionModelFragment; case EShLangFragment: return spv::ExecutionModelFragment;
case EShLangCompute: return spv::ExecutionModelGLCompute; case EShLangCompute: return spv::ExecutionModelGLCompute;
default: default:
spv::MissingFunctionality("GLSL stage"); assert(0);
return spv::ExecutionModelFragment; return spv::ExecutionModelFragment;
} }
} }
@ -191,12 +197,12 @@ spv::StorageClass TranslateStorageClass(const glslang::TType& type)
// TODO: how are we distuingishing between default and non-default non-writable uniforms? Do default uniforms even exist? // TODO: how are we distuingishing between default and non-default non-writable uniforms? Do default uniforms even exist?
} else { } else {
switch (type.getQualifier().storage) { switch (type.getQualifier().storage) {
case glslang::EvqShared: return spv::StorageClassWorkgroupLocal; break; case glslang::EvqShared: return spv::StorageClassWorkgroup; break;
case glslang::EvqGlobal: return spv::StorageClassPrivateGlobal; case glslang::EvqGlobal: return spv::StorageClassPrivate;
case glslang::EvqConstReadOnly: return spv::StorageClassFunction; case glslang::EvqConstReadOnly: return spv::StorageClassFunction;
case glslang::EvqTemporary: return spv::StorageClassFunction; case glslang::EvqTemporary: return spv::StorageClassFunction;
default: default:
spv::MissingFunctionality("unknown glslang storage class"); assert(0);
return spv::StorageClassFunction; return spv::StorageClassFunction;
} }
} }
@ -206,14 +212,14 @@ spv::StorageClass TranslateStorageClass(const glslang::TType& type)
spv::Dim TranslateDimensionality(const glslang::TSampler& sampler) spv::Dim TranslateDimensionality(const glslang::TSampler& sampler)
{ {
switch (sampler.dim) { switch (sampler.dim) {
case glslang::Esd1D: return spv::Dim1D; case glslang::Esd1D: return spv::Dim1D;
case glslang::Esd2D: return spv::Dim2D; case glslang::Esd2D: return spv::Dim2D;
case glslang::Esd3D: return spv::Dim3D; case glslang::Esd3D: return spv::Dim3D;
case glslang::EsdCube: return spv::DimCube; case glslang::EsdCube: return spv::DimCube;
case glslang::EsdRect: return spv::DimRect; case glslang::EsdRect: return spv::DimRect;
case glslang::EsdBuffer: return spv::DimBuffer; case glslang::EsdBuffer: return spv::DimBuffer;
default: default:
spv::MissingFunctionality("unknown sampler dimension"); assert(0);
return spv::Dim2D; return spv::Dim2D;
} }
} }
@ -240,7 +246,7 @@ spv::Decoration TranslateBlockDecoration(const glslang::TType& type)
case glslang::EvqVaryingIn: return spv::DecorationBlock; case glslang::EvqVaryingIn: return spv::DecorationBlock;
case glslang::EvqVaryingOut: return spv::DecorationBlock; case glslang::EvqVaryingOut: return spv::DecorationBlock;
default: default:
spv::MissingFunctionality("kind of block"); assert(0);
break; break;
} }
} }
@ -275,11 +281,10 @@ spv::Decoration TranslateLayoutDecoration(const glslang::TType& type)
} }
case glslang::EvqVaryingIn: case glslang::EvqVaryingIn:
case glslang::EvqVaryingOut: case glslang::EvqVaryingOut:
if (type.getQualifier().layoutPacking != glslang::ElpNone) assert(type.getQualifier().layoutPacking == glslang::ElpNone);
spv::MissingFunctionality("in/out block layout");
return (spv::Decoration)spv::BadValue; return (spv::Decoration)spv::BadValue;
default: default:
spv::MissingFunctionality("block storage qualification"); assert(0);
return (spv::Decoration)spv::BadValue; return (spv::Decoration)spv::BadValue;
} }
} }
@ -287,12 +292,16 @@ spv::Decoration TranslateLayoutDecoration(const glslang::TType& type)
} }
// Translate glslang type to SPIR-V interpolation decorations. // Translate glslang type to SPIR-V interpolation decorations.
// Returns spv::Decoration(spv::BadValue) when no decoration
// should be applied.
spv::Decoration TranslateInterpolationDecoration(const glslang::TType& type) spv::Decoration TranslateInterpolationDecoration(const glslang::TType& type)
{ {
if (type.getQualifier().smooth) if (type.getQualifier().smooth) {
return spv::DecorationSmooth; // Smooth decoration doesn't exist in SPIR-V 1.0
return (spv::Decoration)spv::BadValue;
}
if (type.getQualifier().nopersp) if (type.getQualifier().nopersp)
return spv::DecorationNoperspective; return spv::DecorationNoPerspective;
else if (type.getQualifier().patch) else if (type.getQualifier().patch)
return spv::DecorationPatch; return spv::DecorationPatch;
else if (type.getQualifier().flat) else if (type.getQualifier().flat)
@ -344,8 +353,6 @@ spv::BuiltIn TranslateBuiltInDecoration(glslang::TBuiltInVariable builtIn)
case glslang::EbvSampleId: return spv::BuiltInSampleId; case glslang::EbvSampleId: return spv::BuiltInSampleId;
case glslang::EbvSamplePosition: return spv::BuiltInSamplePosition; case glslang::EbvSamplePosition: return spv::BuiltInSamplePosition;
case glslang::EbvSampleMask: return spv::BuiltInSampleMask; case glslang::EbvSampleMask: return spv::BuiltInSampleMask;
case glslang::EbvFragColor: return spv::BuiltInFragColor;
case glslang::EbvFragData: return spv::BuiltInFragColor;
case glslang::EbvFragDepth: return spv::BuiltInFragDepth; case glslang::EbvFragDepth: return spv::BuiltInFragDepth;
case glslang::EbvHelperInvocation: return spv::BuiltInHelperInvocation; case glslang::EbvHelperInvocation: return spv::BuiltInHelperInvocation;
case glslang::EbvNumWorkGroups: return spv::BuiltInNumWorkgroups; case glslang::EbvNumWorkGroups: return spv::BuiltInNumWorkgroups;
@ -414,7 +421,7 @@ spv::ImageFormat TranslateImageFormat(const glslang::TType& type)
TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* glslangIntermediate) TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* glslangIntermediate)
: TIntermTraverser(true, false, true), shaderEntry(0), sequenceDepth(0), : TIntermTraverser(true, false, true), shaderEntry(0), sequenceDepth(0),
builder(GlslangMagic), builder((glslang::GetKhronosToolId() << 16) | GeneratorVersion),
inMain(false), mainTerminated(false), linkageOnly(false), inMain(false), mainTerminated(false), linkageOnly(false),
glslangIntermediate(glslangIntermediate) glslangIntermediate(glslangIntermediate)
{ {
@ -425,7 +432,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* gls
stdBuiltins = builder.import("GLSL.std.450"); stdBuiltins = builder.import("GLSL.std.450");
builder.setMemoryModel(spv::AddressingModelLogical, spv::MemoryModelGLSL450); builder.setMemoryModel(spv::AddressingModelLogical, spv::MemoryModelGLSL450);
shaderEntry = builder.makeMain(); shaderEntry = builder.makeMain();
builder.addEntryPoint(executionModel, shaderEntry, "main"); entryPoint = builder.addEntryPoint(executionModel, shaderEntry, "main");
// Add the source extensions // Add the source extensions
const auto& sourceExtensions = glslangIntermediate->getRequestedExtensions(); const auto& sourceExtensions = glslangIntermediate->getRequestedExtensions();
@ -451,9 +458,9 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* gls
case EShLangTessEvaluation: case EShLangTessEvaluation:
builder.addCapability(spv::CapabilityTessellation); builder.addCapability(spv::CapabilityTessellation);
switch (glslangIntermediate->getInputPrimitive()) { switch (glslangIntermediate->getInputPrimitive()) {
case glslang::ElgTriangles: mode = spv::ExecutionModeInputTriangles; break; case glslang::ElgTriangles: mode = spv::ExecutionModeTriangles; break;
case glslang::ElgQuads: mode = spv::ExecutionModeInputQuads; break; case glslang::ElgQuads: mode = spv::ExecutionModeQuads; break;
case glslang::ElgIsolines: mode = spv::ExecutionModeInputIsolines; break; case glslang::ElgIsolines: mode = spv::ExecutionModeIsolines; break;
default: mode = spv::BadValue; break; default: mode = spv::BadValue; break;
} }
if (mode != spv::BadValue) if (mode != spv::BadValue)
@ -486,7 +493,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* gls
case glslang::ElgPoints: mode = spv::ExecutionModeInputPoints; break; case glslang::ElgPoints: mode = spv::ExecutionModeInputPoints; break;
case glslang::ElgLines: mode = spv::ExecutionModeInputLines; break; case glslang::ElgLines: mode = spv::ExecutionModeInputLines; break;
case glslang::ElgLinesAdjacency: mode = spv::ExecutionModeInputLinesAdjacency; break; case glslang::ElgLinesAdjacency: mode = spv::ExecutionModeInputLinesAdjacency; break;
case glslang::ElgTriangles: mode = spv::ExecutionModeInputTriangles; break; case glslang::ElgTriangles: mode = spv::ExecutionModeTriangles; break;
case glslang::ElgTrianglesAdjacency: mode = spv::ExecutionModeInputTrianglesAdjacency; break; case glslang::ElgTrianglesAdjacency: mode = spv::ExecutionModeInputTrianglesAdjacency; break;
default: mode = spv::BadValue; break; default: mode = spv::BadValue; break;
} }
@ -520,7 +527,6 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* gls
builder.addExecutionMode(shaderEntry, spv::ExecutionModeEarlyFragmentTests); builder.addExecutionMode(shaderEntry, spv::ExecutionModeEarlyFragmentTests);
switch(glslangIntermediate->getDepth()) { switch(glslangIntermediate->getDepth()) {
case glslang::EldAny: mode = spv::ExecutionModeDepthAny; break;
case glslang::EldGreater: mode = spv::ExecutionModeDepthGreater; break; case glslang::EldGreater: mode = spv::ExecutionModeDepthGreater; break;
case glslang::EldLess: mode = spv::ExecutionModeDepthLess; break; case glslang::EldLess: mode = spv::ExecutionModeDepthLess; break;
default: mode = spv::BadValue; break; default: mode = spv::BadValue; break;
@ -591,6 +597,11 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
builder.setAccessChainRValue(id); builder.setAccessChainRValue(id);
else else
builder.setAccessChainLValue(id); builder.setAccessChainLValue(id);
} else {
// finish off the entry-point SPV instruction by adding the Input/Output <id>
spv::StorageClass sc = builder.getStorageClass(id);
if (sc == spv::StorageClassInput || sc == spv::StorageClassOutput)
entryPoint->addIdOperand(id);
} }
} }
@ -639,8 +650,7 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
node->getType().getBasicType()); node->getType().getBasicType());
// these all need their counterparts in createBinaryOperation() // these all need their counterparts in createBinaryOperation()
if (rValue == 0) assert(rValue != spv::NoResult);
spv::MissingFunctionality("createBinaryOperation");
} }
// store the result // store the result
@ -660,20 +670,13 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
// Add the next element in the chain // Add the next element in the chain
int index = 0; int index = node->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst();
if (node->getRight()->getAsConstantUnion() == 0)
spv::MissingFunctionality("direct index without a constant node");
else
index = node->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst();
if (node->getLeft()->getBasicType() == glslang::EbtBlock && node->getOp() == glslang::EOpIndexDirectStruct) { if (node->getLeft()->getBasicType() == glslang::EbtBlock && node->getOp() == glslang::EOpIndexDirectStruct) {
// This may be, e.g., an anonymous block-member selection, which generally need // This may be, e.g., an anonymous block-member selection, which generally need
// index remapping due to hidden members in anonymous blocks. // index remapping due to hidden members in anonymous blocks.
std::vector<int>& remapper = memberRemapper[node->getLeft()->getType().getStruct()]; std::vector<int>& remapper = memberRemapper[node->getLeft()->getType().getStruct()];
if (remapper.size() == 0) assert(remapper.size() > 0);
spv::MissingFunctionality("block without member remapping"); index = remapper[index];
else
index = remapper[index];
} }
if (! node->getLeft()->getType().isArray() && if (! node->getLeft()->getType().isArray() &&
@ -766,7 +769,7 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
node->getLeft()->getType().getBasicType()); node->getLeft()->getType().getBasicType());
if (! result) { if (! result) {
spv::MissingFunctionality("glslang binary operation"); spv::MissingFunctionality("unknown glslang binary operation");
} else { } else {
builder.clearAccessChain(); builder.clearAccessChain();
builder.setAccessChainRValue(result); builder.setAccessChainRValue(result);
@ -832,7 +835,7 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
// if not, then possibly an operation // if not, then possibly an operation
if (! result) if (! result)
result = createUnaryOperation(node->getOp(), precision, convertGlslangToSpvType(node->getType()), operand, node->getBasicType()); result = createUnaryOperation(node->getOp(), precision, convertGlslangToSpvType(node->getType()), operand, node->getOperand()->getBasicType());
if (result) { if (result) {
builder.clearAccessChain(); builder.clearAccessChain();
@ -862,8 +865,7 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
spv::Id result = createBinaryOperation(op, TranslatePrecisionDecoration(node->getType()), spv::Id result = createBinaryOperation(op, TranslatePrecisionDecoration(node->getType()),
convertGlslangToSpvType(node->getType()), operand, one, convertGlslangToSpvType(node->getType()), operand, one,
node->getType().getBasicType()); node->getType().getBasicType());
if (result == 0) assert(result != spv::NoResult);
spv::MissingFunctionality("createBinaryOperation for unary");
// The result of operation is always stored, but conditionally the // The result of operation is always stored, but conditionally the
// consumed result. The consumed result is always an r-value. // consumed result. The consumed result is always an r-value.
@ -886,7 +888,7 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
return false; return false;
default: default:
spv::MissingFunctionality("glslang unary"); spv::MissingFunctionality("unknown glslang unary");
break; break;
} }
@ -990,13 +992,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
{ {
if (node->isUserDefined()) if (node->isUserDefined())
result = handleUserFunctionCall(node); result = handleUserFunctionCall(node);
assert(result);
if (! result) {
spv::MissingFunctionality("glslang function call");
glslang::TConstUnionArray emptyConsts;
int nextConst = 0;
result = createSpvConstant(node->getType(), emptyConsts, nextConst);
}
builder.clearAccessChain(); builder.clearAccessChain();
builder.setAccessChainRValue(result); builder.setAccessChainRValue(result);
@ -1053,12 +1049,10 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
for (int c = 0; c < (int)arguments.size(); ++c) for (int c = 0; c < (int)arguments.size(); ++c)
constituents.push_back(arguments[c]); constituents.push_back(arguments[c]);
constructed = builder.createCompositeConstruct(resultTypeId, constituents); constructed = builder.createCompositeConstruct(resultTypeId, constituents);
} else { } else if (isMatrix)
if (isMatrix) constructed = builder.createMatrixConstructor(precision, arguments, resultTypeId);
constructed = builder.createMatrixConstructor(precision, arguments, resultTypeId); else
else constructed = builder.createConstructor(precision, arguments, resultTypeId);
constructed = builder.createConstructor(precision, arguments, resultTypeId);
}
builder.clearAccessChain(); builder.clearAccessChain();
builder.setAccessChainRValue(constructed); builder.setAccessChainRValue(constructed);
@ -1131,21 +1125,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
atomic = true; atomic = true;
break; break;
case glslang::EOpAddCarry:
case glslang::EOpSubBorrow:
case glslang::EOpUMulExtended:
case glslang::EOpIMulExtended:
case glslang::EOpBitfieldExtract:
case glslang::EOpBitfieldInsert:
spv::MissingFunctionality("integer aggregate");
break;
case glslang::EOpFma:
case glslang::EOpFrexp:
case glslang::EOpLdexp:
spv::MissingFunctionality("fma/frexp/ldexp aggregate");
break;
default: default:
break; break;
} }
@ -1171,9 +1150,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
left->getType().getBasicType(), reduceComparison); left->getType().getBasicType(), reduceComparison);
// code above should only make binOp that exists in createBinaryOperation // code above should only make binOp that exists in createBinaryOperation
if (result == 0) assert(result != spv::NoResult);
spv::MissingFunctionality("createBinaryOperation for aggregate");
builder.clearAccessChain(); builder.clearAccessChain();
builder.setAccessChainRValue(result); builder.setAccessChainRValue(result);
@ -1192,7 +1169,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
// special case l-value operands; there are just a few // special case l-value operands; there are just a few
bool lvalue = false; bool lvalue = false;
switch (node->getOp()) { switch (node->getOp()) {
//case glslang::EOpFrexp: case glslang::EOpFrexp:
case glslang::EOpModf: case glslang::EOpModf:
if (arg == 1) if (arg == 1)
lvalue = true; lvalue = true;
@ -1208,9 +1185,16 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
if (arg == 0) if (arg == 0)
lvalue = true; lvalue = true;
break; break;
//case glslang::EOpUAddCarry: case glslang::EOpAddCarry:
//case glslang::EOpUSubBorrow: case glslang::EOpSubBorrow:
//case glslang::EOpUMulExtended: if (arg == 2)
lvalue = true;
break;
case glslang::EOpUMulExtended:
case glslang::EOpIMulExtended:
if (arg >= 2)
lvalue = true;
break;
default: default:
break; break;
} }
@ -1230,7 +1214,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
result = createNoArgOperation(node->getOp()); result = createNoArgOperation(node->getOp());
break; break;
case 1: case 1:
result = createUnaryOperation(node->getOp(), precision, convertGlslangToSpvType(node->getType()), operands.front(), node->getType().getBasicType()); result = createUnaryOperation(node->getOp(), precision, convertGlslangToSpvType(node->getType()), operands.front(), glslangOperands[0]->getAsTyped()->getBasicType());
break; break;
default: default:
result = createMiscOperation(node->getOp(), precision, convertGlslangToSpvType(node->getType()), operands, node->getBasicType()); result = createMiscOperation(node->getOp(), precision, convertGlslangToSpvType(node->getType()), operands, node->getBasicType());
@ -1242,7 +1226,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
return false; return false;
if (! result) { if (! result) {
spv::MissingFunctionality("glslang aggregate"); spv::MissingFunctionality("unknown glslang aggregate");
return true; return true;
} else { } else {
builder.clearAccessChain(); builder.clearAccessChain();
@ -1350,7 +1334,7 @@ bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::T
void TGlslangToSpvTraverser::visitConstantUnion(glslang::TIntermConstantUnion* node) void TGlslangToSpvTraverser::visitConstantUnion(glslang::TIntermConstantUnion* node)
{ {
int nextConst = 0; int nextConst = 0;
spv::Id constant = createSpvConstant(node->getType(), node->getConstArray(), nextConst); spv::Id constant = createSpvConstant(node->getType(), node->getConstArray(), nextConst, false);
builder.clearAccessChain(); builder.clearAccessChain();
builder.setAccessChainRValue(constant); builder.setAccessChainRValue(constant);
@ -1418,7 +1402,7 @@ bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::T
break; break;
default: default:
spv::MissingFunctionality("branch type"); assert(0);
break; break;
} }
@ -1429,9 +1413,9 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol*
{ {
// First, steer off constants, which are not SPIR-V variables, but // First, steer off constants, which are not SPIR-V variables, but
// can still have a mapping to a SPIR-V Id. // can still have a mapping to a SPIR-V Id.
// This includes specialization constants.
if (node->getQualifier().storage == glslang::EvqConst) { if (node->getQualifier().storage == glslang::EvqConst) {
int nextConst = 0; return createSpvSpecConstant(*node);
return createSpvConstant(node->getType(), node->getConstArray(), nextConst);
} }
// Now, handle actual variables // Now, handle actual variables
@ -1453,7 +1437,7 @@ spv::Id TGlslangToSpvTraverser::getSampledType(const glslang::TSampler& sampler)
case glslang::EbtInt: return builder.makeIntType(32); case glslang::EbtInt: return builder.makeIntType(32);
case glslang::EbtUint: return builder.makeUintType(32); case glslang::EbtUint: return builder.makeUintType(32);
default: default:
spv::MissingFunctionality("sampled type"); assert(0);
return builder.makeFloatType(32); return builder.makeFloatType(32);
} }
} }
@ -1474,8 +1458,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
switch (type.getBasicType()) { switch (type.getBasicType()) {
case glslang::EbtVoid: case glslang::EbtVoid:
spvType = builder.makeVoidType(); spvType = builder.makeVoidType();
if (type.isArray()) assert (! type.isArray());
spv::MissingFunctionality("array of void");
break; break;
case glslang::EbtFloat: case glslang::EbtFloat:
spvType = builder.makeFloatType(32); spvType = builder.makeFloatType(32);
@ -1499,12 +1482,13 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
case glslang::EbtSampler: case glslang::EbtSampler:
{ {
const glslang::TSampler& sampler = type.getSampler(); const glslang::TSampler& sampler = type.getSampler();
spvType = builder.makeImageType(getSampledType(sampler), TranslateDimensionality(sampler), sampler.shadow, sampler.arrayed, sampler.ms, // an image is present, make its type
sampler.image ? 2 : 1, TranslateImageFormat(type)); spvType = builder.makeImageType(getSampledType(sampler), TranslateDimensionality(sampler), sampler.shadow, sampler.arrayed, sampler.ms,
// OpenGL "textures" need to be combined with a sampler sampler.image ? 2 : 1, TranslateImageFormat(type));
if (! sampler.image) if (! sampler.image) {
spvType = builder.makeSampledImageType(spvType); spvType = builder.makeSampledImageType(spvType);
} }
}
break; break;
case glslang::EbtStruct: case glslang::EbtStruct:
case glslang::EbtBlock: case glslang::EbtBlock:
@ -1593,7 +1577,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
} }
break; break;
default: default:
spv::MissingFunctionality("basic type"); assert(0);
break; break;
} }
@ -1620,10 +1604,14 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
spvType = builder.makeArrayType(spvType, type.getOuterArraySize()); spvType = builder.makeArrayType(spvType, type.getOuterArraySize());
} }
// TODO: layout still needs to be done hierarchically for arrays of arrays, which // TODO: explicit layout still needs to be done hierarchically for arrays of arrays, which
// may still require additional "link time" support from the front-end // may still require additional "link time" support from the front-end
// for arrays of arrays // for arrays of arrays
if (explicitLayout)
// We need to decorate array strides for types needing explicit layout,
// except for the very top if it is an array of blocks; that array is
// not laid out in memory in a way needing a stride.
if (explicitLayout && type.getBasicType() != glslang::EbtBlock)
builder.addDecoration(spvType, spv::DecorationArrayStride, getArrayStride(type)); builder.addDecoration(spvType, spv::DecorationArrayStride, getArrayStride(type));
} }
@ -1883,8 +1871,11 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
operands.push_back(*(opIt++)); operands.push_back(*(opIt++));
if (node->getOp() == glslang::EOpImageStore) if (node->getOp() == glslang::EOpImageStore)
operands.push_back(*(opIt++)); operands.push_back(*(opIt++));
// TODO: add 'sample' operand
if (node->getOp() == glslang::EOpImageLoad) { if (node->getOp() == glslang::EOpImageLoad) {
if (sampler.ms) {
operands.push_back(spv::ImageOperandsSampleMask);
operands.push_back(*(opIt++));
}
return builder.createOp(spv::OpImageRead, convertGlslangToSpvType(node->getType()), operands); return builder.createOp(spv::OpImageRead, convertGlslangToSpvType(node->getType()), operands);
} else if (node->getOp() == glslang::EOpImageStore) { } else if (node->getOp() == glslang::EOpImageStore) {
builder.createNoResultOp(spv::OpImageWrite, operands); builder.createNoResultOp(spv::OpImageWrite, operands);
@ -1909,8 +1900,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
} }
// Check for texture functions other than queries // Check for texture functions other than queries
if (cracked.gather)
spv::MissingFunctionality("texture gather");
// check for bias argument // check for bias argument
bool bias = false; bool bias = false;
@ -1925,14 +1914,18 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
bias = true; bias = true;
} }
bool cubeCompare = sampler.dim == glslang::EsdCube && sampler.arrayed && sampler.shadow;
// set the rest of the arguments // set the rest of the arguments
params.coords = arguments[1]; params.coords = arguments[1];
int extraArgs = 0; int extraArgs = 0;
if (cubeCompare)
// sort out where Dref is coming from
if (sampler.shadow && sampler.dim == glslang::EsdCube && sampler.arrayed)
params.Dref = arguments[2]; params.Dref = arguments[2];
else if (sampler.shadow) { else if (sampler.shadow && cracked.gather) {
params.Dref = arguments[2];
++extraArgs;
} else if (sampler.shadow) {
std::vector<spv::Id> indexes; std::vector<spv::Id> indexes;
int comp; int comp;
if (cracked.proj) if (cracked.proj)
@ -1954,20 +1947,28 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
params.gradY = arguments[3 + extraArgs]; params.gradY = arguments[3 + extraArgs];
extraArgs += 2; extraArgs += 2;
} }
//if (gather && compare) { if (cracked.offset) {
// params.compare = arguments[2 + extraArgs];
// ++extraArgs;
//}
if (cracked.offset || cracked.offsets) {
params.offset = arguments[2 + extraArgs]; params.offset = arguments[2 + extraArgs];
++extraArgs; ++extraArgs;
} else if (cracked.offsets) {
params.offsets = arguments[2 + extraArgs];
++extraArgs;
} }
if (bias) { if (bias) {
params.bias = arguments[2 + extraArgs]; params.bias = arguments[2 + extraArgs];
++extraArgs; ++extraArgs;
} }
if (cracked.gather && ! sampler.shadow) {
// default component is 0, if missing, otherwise an argument
if (2 + extraArgs < (int)arguments.size()) {
params.comp = arguments[2 + extraArgs];
++extraArgs;
} else {
params.comp = builder.makeIntConstant(0);
}
}
return builder.createTextureCall(precision, convertGlslangToSpvType(node->getType()), cracked.fetch, cracked.proj, params); return builder.createTextureCall(precision, convertGlslangToSpvType(node->getType()), cracked.fetch, cracked.proj, cracked.gather, params);
} }
spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAggregate* node) spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAggregate* node)
@ -2308,6 +2309,7 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv:
{ {
spv::Op unaryOp = spv::OpNop; spv::Op unaryOp = spv::OpNop;
int libCall = -1; int libCall = -1;
bool isUnsigned = typeProxy == glslang::EbtUint;
bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble; bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble;
switch (op) { switch (op) {
@ -2538,11 +2540,13 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv:
unaryOp = spv::OpBitCount; unaryOp = spv::OpBitCount;
break; break;
case glslang::EOpFindLSB: case glslang::EOpFindLSB:
libCall = spv::GLSLstd450FindILSB; libCall = spv::GLSLstd450FindILsb;
break; break;
case glslang::EOpFindMSB: case glslang::EOpFindMSB:
spv::MissingFunctionality("signed vs. unsigned FindMSB"); if (isUnsigned)
libCall = spv::GLSLstd450FindSMSB; libCall = spv::GLSLstd450FindUMsb;
else
libCall = spv::GLSLstd450FindSMsb;
break; break;
default: default:
@ -2717,7 +2721,7 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
opCode = spv::OpAtomicLoad; opCode = spv::OpAtomicLoad;
break; break;
default: default:
spv::MissingFunctionality("missing nested atomic"); assert(0);
break; break;
} }
@ -2754,6 +2758,11 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
spv::Op opCode = spv::OpNop; spv::Op opCode = spv::OpNop;
int libCall = -1; int libCall = -1;
int consumedOperands = operands.size();
spv::Id typeId0 = 0;
if (consumedOperands > 0)
typeId0 = builder.getTypeId(operands[0]);
spv::Id frexpIntType = 0;
switch (op) { switch (op) {
case glslang::EOpMin: case glslang::EOpMin:
@ -2794,7 +2803,10 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
libCall = spv::GLSLstd450SClamp; libCall = spv::GLSLstd450SClamp;
break; break;
case glslang::EOpMix: case glslang::EOpMix:
libCall = spv::GLSLstd450Mix; if (isFloat)
libCall = spv::GLSLstd450FMix;
else
libCall = spv::GLSLstd450IMix;
break; break;
case glslang::EOpStep: case glslang::EOpStep:
libCall = spv::GLSLstd450Step; libCall = spv::GLSLstd450Step;
@ -2819,6 +2831,52 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
libCall = spv::GLSLstd450Refract; libCall = spv::GLSLstd450Refract;
break; break;
case glslang::EOpAddCarry:
opCode = spv::OpIAddCarry;
typeId = builder.makeStructResultType(typeId0, typeId0);
consumedOperands = 2;
break;
case glslang::EOpSubBorrow:
opCode = spv::OpISubBorrow;
typeId = builder.makeStructResultType(typeId0, typeId0);
consumedOperands = 2;
break;
case glslang::EOpUMulExtended:
opCode = spv::OpUMulExtended;
typeId = builder.makeStructResultType(typeId0, typeId0);
consumedOperands = 2;
break;
case glslang::EOpIMulExtended:
opCode = spv::OpSMulExtended;
typeId = builder.makeStructResultType(typeId0, typeId0);
consumedOperands = 2;
break;
case glslang::EOpBitfieldExtract:
if (isUnsigned)
opCode = spv::OpBitFieldUExtract;
else
opCode = spv::OpBitFieldSExtract;
break;
case glslang::EOpBitfieldInsert:
opCode = spv::OpBitFieldInsert;
break;
case glslang::EOpFma:
libCall = spv::GLSLstd450Fma;
break;
case glslang::EOpFrexp:
libCall = spv::GLSLstd450FrexpStruct;
if (builder.getNumComponents(operands[0]) == 1)
frexpIntType = builder.makeIntegerType(32, true);
else
frexpIntType = builder.makeVectorType(builder.makeIntegerType(32, true), builder.getNumComponents(operands[0]));
typeId = builder.makeStructResultType(typeId0, frexpIntType);
consumedOperands = 1;
break;
case glslang::EOpLdexp:
libCall = spv::GLSLstd450Ldexp;
break;
default: default:
return 0; return 0;
} }
@ -2827,7 +2885,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
if (libCall >= 0) if (libCall >= 0)
id = builder.createBuiltinCall(precision, typeId, stdBuiltins, libCall, operands); id = builder.createBuiltinCall(precision, typeId, stdBuiltins, libCall, operands);
else { else {
switch (operands.size()) { switch (consumedOperands) {
case 0: case 0:
// should all be handled by visitAggregate and createNoArgOperation // should all be handled by visitAggregate and createNoArgOperation
assert(0); assert(0);
@ -2839,16 +2897,34 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
case 2: case 2:
id = builder.createBinOp(opCode, typeId, operands[0], operands[1]); id = builder.createBinOp(opCode, typeId, operands[0], operands[1]);
break; break;
case 3:
id = builder.createTriOp(opCode, typeId, operands[0], operands[1], operands[2]);
break;
default: default:
// These do not exist yet // anything 3 or over doesn't have l-value operands, so all should be consumed
assert(0 && "operation with more than 3 operands"); assert(consumedOperands == operands.size());
id = builder.createOp(opCode, typeId, operands);
break; break;
} }
} }
// Decode the return types that were structures
switch (op) {
case glslang::EOpAddCarry:
case glslang::EOpSubBorrow:
builder.createStore(builder.createCompositeExtract(id, typeId0, 1), operands[2]);
id = builder.createCompositeExtract(id, typeId0, 0);
break;
case glslang::EOpUMulExtended:
case glslang::EOpIMulExtended:
builder.createStore(builder.createCompositeExtract(id, typeId0, 0), operands[3]);
builder.createStore(builder.createCompositeExtract(id, typeId0, 1), operands[2]);
break;
case glslang::EOpFrexp:
builder.createStore(builder.createCompositeExtract(id, frexpIntType, 1), operands[1]);
id = builder.createCompositeExtract(id, typeId0, 0);
break;
default:
break;
}
builder.setPrecision(id, precision); builder.setPrecision(id, precision);
return id; return id;
@ -2883,13 +2959,13 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op)
builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsImageMemoryMask); builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsImageMemoryMask);
return 0; return 0;
case glslang::EOpMemoryBarrierShared: case glslang::EOpMemoryBarrierShared:
builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsWorkgroupLocalMemoryMask); builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsWorkgroupMemoryMask);
return 0; return 0;
case glslang::EOpGroupMemoryBarrier: case glslang::EOpGroupMemoryBarrier:
builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsWorkgroupGlobalMemoryMask); builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsCrossWorkgroupMemoryMask);
return 0; return 0;
default: default:
spv::MissingFunctionality("operation with no arguments"); spv::MissingFunctionality("unknown operation with no arguments");
return 0; return 0;
} }
} }
@ -2945,31 +3021,57 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
if (builtIn != spv::BadValue) if (builtIn != spv::BadValue)
builder.addDecoration(id, spv::DecorationBuiltIn, (int)builtIn); builder.addDecoration(id, spv::DecorationBuiltIn, (int)builtIn);
if (linkageOnly)
builder.addDecoration(id, spv::DecorationNoStaticUse);
return id; return id;
} }
// If 'dec' is valid, add no-operand decoration to an object
void TGlslangToSpvTraverser::addDecoration(spv::Id id, spv::Decoration dec) void TGlslangToSpvTraverser::addDecoration(spv::Id id, spv::Decoration dec)
{ {
if (dec != spv::BadValue) if (dec != spv::BadValue)
builder.addDecoration(id, dec); builder.addDecoration(id, dec);
} }
// If 'dec' is valid, add a one-operand decoration to an object
void TGlslangToSpvTraverser::addDecoration(spv::Id id, spv::Decoration dec, unsigned value)
{
if (dec != spv::BadValue)
builder.addDecoration(id, dec, value);
}
// If 'dec' is valid, add a no-operand decoration to a struct member
void TGlslangToSpvTraverser::addMemberDecoration(spv::Id id, int member, spv::Decoration dec) void TGlslangToSpvTraverser::addMemberDecoration(spv::Id id, int member, spv::Decoration dec)
{ {
if (dec != spv::BadValue) if (dec != spv::BadValue)
builder.addMemberDecoration(id, (unsigned)member, dec); builder.addMemberDecoration(id, (unsigned)member, dec);
} }
// Make a full tree of instructions to build a SPIR-V specialization constant,
// or regularly constant if possible.
//
// TBD: this is not yet done, nor verified to be the best design, it does do the leaf symbols though
//
// Recursively walk the nodes. The nodes form a tree whose leaves are
// regular constants, which themselves are trees that createSpvConstant()
// recursively walks. So, this function walks the "top" of the tree:
// - emit specialization constant-building instructions for specConstant
// - when running into a non-spec-constant, switch to createSpvConstant()
spv::Id TGlslangToSpvTraverser::createSpvSpecConstant(const glslang::TIntermTyped& node)
{
assert(node.getQualifier().storage == glslang::EvqConst);
// hand off to the non-spec-constant path
assert(node.getAsConstantUnion() != nullptr || node.getAsSymbolNode() != nullptr);
int nextConst = 0;
return createSpvConstant(node.getType(), node.getAsConstantUnion() ? node.getAsConstantUnion()->getConstArray() : node.getAsSymbolNode()->getConstArray(), nextConst, false);
}
// Use 'consts' as the flattened glslang source of scalar constants to recursively // Use 'consts' as the flattened glslang source of scalar constants to recursively
// build the aggregate SPIR-V constant. // build the aggregate SPIR-V constant.
// //
// If there are not enough elements present in 'consts', 0 will be substituted; // If there are not enough elements present in 'consts', 0 will be substituted;
// an empty 'consts' can be used to create a fully zeroed SPIR-V constant. // an empty 'consts' can be used to create a fully zeroed SPIR-V constant.
// //
spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TType& glslangType, const glslang::TConstUnionArray& consts, int& nextConst) spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TType& glslangType, const glslang::TConstUnionArray& consts, int& nextConst, bool specConstant)
{ {
// vector of constants for SPIR-V // vector of constants for SPIR-V
std::vector<spv::Id> spvConsts; std::vector<spv::Id> spvConsts;
@ -2980,15 +3082,15 @@ spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TType& glslangT
if (glslangType.isArray()) { if (glslangType.isArray()) {
glslang::TType elementType(glslangType, 0); glslang::TType elementType(glslangType, 0);
for (int i = 0; i < glslangType.getOuterArraySize(); ++i) for (int i = 0; i < glslangType.getOuterArraySize(); ++i)
spvConsts.push_back(createSpvConstant(elementType, consts, nextConst)); spvConsts.push_back(createSpvConstant(elementType, consts, nextConst, false));
} else if (glslangType.isMatrix()) { } else if (glslangType.isMatrix()) {
glslang::TType vectorType(glslangType, 0); glslang::TType vectorType(glslangType, 0);
for (int col = 0; col < glslangType.getMatrixCols(); ++col) for (int col = 0; col < glslangType.getMatrixCols(); ++col)
spvConsts.push_back(createSpvConstant(vectorType, consts, nextConst)); spvConsts.push_back(createSpvConstant(vectorType, consts, nextConst, false));
} else if (glslangType.getStruct()) { } else if (glslangType.getStruct()) {
glslang::TVector<glslang::TTypeLoc>::const_iterator iter; glslang::TVector<glslang::TTypeLoc>::const_iterator iter;
for (iter = glslangType.getStruct()->begin(); iter != glslangType.getStruct()->end(); ++iter) for (iter = glslangType.getStruct()->begin(); iter != glslangType.getStruct()->end(); ++iter)
spvConsts.push_back(createSpvConstant(*iter->type, consts, nextConst)); spvConsts.push_back(createSpvConstant(*iter->type, consts, nextConst, false));
} else if (glslangType.isVector()) { } else if (glslangType.isVector()) {
for (unsigned int i = 0; i < (unsigned int)glslangType.getVectorSize(); ++i) { for (unsigned int i = 0; i < (unsigned int)glslangType.getVectorSize(); ++i) {
bool zero = nextConst >= consts.size(); bool zero = nextConst >= consts.size();
@ -3009,7 +3111,7 @@ spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TType& glslangT
spvConsts.push_back(builder.makeBoolConstant(zero ? false : consts[nextConst].getBConst())); spvConsts.push_back(builder.makeBoolConstant(zero ? false : consts[nextConst].getBConst()));
break; break;
default: default:
spv::MissingFunctionality("constant vector type"); assert(0);
break; break;
} }
++nextConst; ++nextConst;
@ -3020,22 +3122,22 @@ spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TType& glslangT
spv::Id scalar = 0; spv::Id scalar = 0;
switch (glslangType.getBasicType()) { switch (glslangType.getBasicType()) {
case glslang::EbtInt: case glslang::EbtInt:
scalar = builder.makeIntConstant(zero ? 0 : consts[nextConst].getIConst()); scalar = builder.makeIntConstant(zero ? 0 : consts[nextConst].getIConst(), specConstant);
break; break;
case glslang::EbtUint: case glslang::EbtUint:
scalar = builder.makeUintConstant(zero ? 0 : consts[nextConst].getUConst()); scalar = builder.makeUintConstant(zero ? 0 : consts[nextConst].getUConst(), specConstant);
break; break;
case glslang::EbtFloat: case glslang::EbtFloat:
scalar = builder.makeFloatConstant(zero ? 0.0F : (float)consts[nextConst].getDConst()); scalar = builder.makeFloatConstant(zero ? 0.0F : (float)consts[nextConst].getDConst(), specConstant);
break; break;
case glslang::EbtDouble: case glslang::EbtDouble:
scalar = builder.makeDoubleConstant(zero ? 0.0 : consts[nextConst].getDConst()); scalar = builder.makeDoubleConstant(zero ? 0.0 : consts[nextConst].getDConst(), specConstant);
break; break;
case glslang::EbtBool: case glslang::EbtBool:
scalar = builder.makeBoolConstant(zero ? false : consts[nextConst].getBConst()); scalar = builder.makeBoolConstant(zero ? false : consts[nextConst].getBConst(), specConstant);
break; break;
default: default:
spv::MissingFunctionality("constant scalar type"); assert(0);
break; break;
} }
++nextConst; ++nextConst;
@ -3180,7 +3282,7 @@ void GetSpirvVersion(std::string& version)
{ {
const int bufSize = 100; const int bufSize = 100;
char buf[bufSize]; char buf[bufSize];
snprintf(buf, bufSize, "%d, Revision %d", spv::Version, spv::Revision); snprintf(buf, bufSize, "0x%08x, Revision %d", spv::Version, spv::Revision);
version = buf; version = buf;
} }

View File

@ -446,7 +446,6 @@ namespace spv {
idFn(asId(word++)); idFn(asId(word++));
break; break;
case spv::OperandOptionalId:
case spv::OperandVariableIds: case spv::OperandVariableIds:
for (unsigned i = 0; i < numOperands; ++i) for (unsigned i = 0; i < numOperands; ++i)
idFn(asId(word++)); idFn(asId(word++));

View File

@ -55,14 +55,12 @@
namespace spv { namespace spv {
const int SpvBuilderMagic = 0xBB; Builder::Builder(unsigned int magicNumber) :
Builder::Builder(unsigned int userNumber) :
source(SourceLanguageUnknown), source(SourceLanguageUnknown),
sourceVersion(0), sourceVersion(0),
addressModel(AddressingModelLogical), addressModel(AddressingModelLogical),
memoryModel(MemoryModelGLSL450), memoryModel(MemoryModelGLSL450),
builderNumber(userNumber << 16 | SpvBuilderMagic), builderNumber(magicNumber),
buildPoint(0), buildPoint(0),
uniqueId(0), uniqueId(0),
mainFunction(0) mainFunction(0)
@ -112,6 +110,20 @@ Id Builder::makeBoolType()
return type->getResultId(); return type->getResultId();
} }
Id Builder::makeSamplerType()
{
Instruction* type;
if (groupedTypes[OpTypeSampler].size() == 0) {
type = new Instruction(getUniqueId(), NoType, OpTypeSampler);
groupedTypes[OpTypeSampler].push_back(type);
constantsTypesGlobals.push_back(type);
module.mapInstruction(type);
} else
type = groupedTypes[OpTypeSampler].back();
return type->getResultId();
}
Id Builder::makePointer(StorageClass storageClass, Id pointee) Id Builder::makePointer(StorageClass storageClass, Id pointee)
{ {
// try to find it // try to find it
@ -176,8 +188,15 @@ Id Builder::makeFloatType(int width)
return type->getResultId(); return type->getResultId();
} }
// Make a struct without checking for duplication.
// See makeStructResultType() for non-decorated structs
// needed as the result of some instructions, which does
// check for duplicates.
Id Builder::makeStructType(std::vector<Id>& members, const char* name) Id Builder::makeStructType(std::vector<Id>& members, const char* name)
{ {
// Don't look for previous one, because in the general case,
// structs can be duplicated except for decorations.
// not found, make it // not found, make it
Instruction* type = new Instruction(getUniqueId(), NoType, OpTypeStruct); Instruction* type = new Instruction(getUniqueId(), NoType, OpTypeStruct);
for (int op = 0; op < (int)members.size(); ++op) for (int op = 0; op < (int)members.size(); ++op)
@ -190,6 +209,30 @@ Id Builder::makeStructType(std::vector<Id>& members, const char* name)
return type->getResultId(); return type->getResultId();
} }
// Make a struct for the simple results of several instructions,
// checking for duplication.
Id Builder::makeStructResultType(Id type0, Id type1)
{
// try to find it
Instruction* type;
for (int t = 0; t < (int)groupedTypes[OpTypeStruct].size(); ++t) {
type = groupedTypes[OpTypeStruct][t];
if (type->getNumOperands() != 2)
continue;
if (type->getIdOperand(0) != type0 ||
type->getIdOperand(1) != type1)
continue;
return type->getResultId();
}
// not found, make it
std::vector<spv::Id> members;
members.push_back(type0);
members.push_back(type1);
return makeStructType(members, "ResType");
}
Id Builder::makeVectorType(Id component, int size) Id Builder::makeVectorType(Id component, int size)
{ {
// try to find it // try to find it
@ -387,7 +430,7 @@ Op Builder::getMostBasicTypeClass(Id typeId) const
case OpTypePointer: case OpTypePointer:
return getMostBasicTypeClass(instr->getIdOperand(1)); return getMostBasicTypeClass(instr->getIdOperand(1));
default: default:
MissingFunctionality("getMostBasicTypeClass"); assert(0);
return OpTypeFloat; return OpTypeFloat;
} }
} }
@ -406,7 +449,7 @@ int Builder::getNumTypeComponents(Id typeId) const
case OpTypeMatrix: case OpTypeMatrix:
return instr->getImmediateOperand(1); return instr->getImmediateOperand(1);
default: default:
MissingFunctionality("getNumTypeComponents on non bool/int/float/vector/matrix"); assert(0);
return 1; return 1;
} }
} }
@ -434,7 +477,7 @@ Id Builder::getScalarTypeId(Id typeId) const
case OpTypePointer: case OpTypePointer:
return getScalarTypeId(getContainedTypeId(typeId)); return getScalarTypeId(getContainedTypeId(typeId));
default: default:
MissingFunctionality("getScalarTypeId"); assert(0);
return NoResult; return NoResult;
} }
} }
@ -457,7 +500,7 @@ Id Builder::getContainedTypeId(Id typeId, int member) const
case OpTypeStruct: case OpTypeStruct:
return instr->getIdOperand(member); return instr->getIdOperand(member);
default: default:
MissingFunctionality("getContainedTypeId"); assert(0);
return NoResult; return NoResult;
} }
} }
@ -470,12 +513,12 @@ Id Builder::getContainedTypeId(Id typeId) const
// See if a scalar constant of this type has already been created, so it // See if a scalar constant of this type has already been created, so it
// can be reused rather than duplicated. (Required by the specification). // can be reused rather than duplicated. (Required by the specification).
Id Builder::findScalarConstant(Op typeClass, Id typeId, unsigned value) const Id Builder::findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned value) const
{ {
Instruction* constant; Instruction* constant;
for (int i = 0; i < (int)groupedConstants[typeClass].size(); ++i) { for (int i = 0; i < (int)groupedConstants[typeClass].size(); ++i) {
constant = groupedConstants[typeClass][i]; constant = groupedConstants[typeClass][i];
if (constant->getNumOperands() == 1 && if (constant->getOpCode() == opcode &&
constant->getTypeId() == typeId && constant->getTypeId() == typeId &&
constant->getImmediateOperand(0) == value) constant->getImmediateOperand(0) == value)
return constant->getResultId(); return constant->getResultId();
@ -485,12 +528,12 @@ Id Builder::findScalarConstant(Op typeClass, Id typeId, unsigned value) const
} }
// Version of findScalarConstant (see above) for scalars that take two operands (e.g. a 'double'). // Version of findScalarConstant (see above) for scalars that take two operands (e.g. a 'double').
Id Builder::findScalarConstant(Op typeClass, Id typeId, unsigned v1, unsigned v2) const Id Builder::findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned v1, unsigned v2) const
{ {
Instruction* constant; Instruction* constant;
for (int i = 0; i < (int)groupedConstants[typeClass].size(); ++i) { for (int i = 0; i < (int)groupedConstants[typeClass].size(); ++i) {
constant = groupedConstants[typeClass][i]; constant = groupedConstants[typeClass][i];
if (constant->getNumOperands() == 2 && if (constant->getOpCode() == opcode &&
constant->getTypeId() == typeId && constant->getTypeId() == typeId &&
constant->getImmediateOperand(0) == v1 && constant->getImmediateOperand(0) == v1 &&
constant->getImmediateOperand(1) == v2) constant->getImmediateOperand(1) == v2)
@ -524,18 +567,17 @@ bool Builder::isConstantOpCode(Op opcode) const
} }
} }
Id Builder::makeBoolConstant(bool b) Id Builder::makeBoolConstant(bool b, bool specConstant)
{ {
Id typeId = makeBoolType(); Id typeId = makeBoolType();
Instruction* constant; Instruction* constant;
Op opcode = specConstant ? (b ? OpSpecConstantTrue : OpSpecConstantFalse) : (b ? OpConstantTrue : OpConstantFalse);
// See if we already made it // See if we already made it
Id existing = 0; Id existing = 0;
for (int i = 0; i < (int)groupedConstants[OpTypeBool].size(); ++i) { for (int i = 0; i < (int)groupedConstants[OpTypeBool].size(); ++i) {
constant = groupedConstants[OpTypeBool][i]; constant = groupedConstants[OpTypeBool][i];
if (constant->getTypeId() == typeId && if (constant->getTypeId() == typeId && constant->getOpCode() == opcode)
(b ? (constant->getOpCode() == OpConstantTrue) :
(constant->getOpCode() == OpConstantFalse)))
existing = constant->getResultId(); existing = constant->getResultId();
} }
@ -543,7 +585,7 @@ Id Builder::makeBoolConstant(bool b)
return existing; return existing;
// Make it // Make it
Instruction* c = new Instruction(getUniqueId(), typeId, b ? OpConstantTrue : OpConstantFalse); Instruction* c = new Instruction(getUniqueId(), typeId, opcode);
constantsTypesGlobals.push_back(c); constantsTypesGlobals.push_back(c);
groupedConstants[OpTypeBool].push_back(c); groupedConstants[OpTypeBool].push_back(c);
module.mapInstruction(c); module.mapInstruction(c);
@ -551,13 +593,14 @@ Id Builder::makeBoolConstant(bool b)
return c->getResultId(); return c->getResultId();
} }
Id Builder::makeIntConstant(Id typeId, unsigned value) Id Builder::makeIntConstant(Id typeId, unsigned value, bool specConstant)
{ {
Id existing = findScalarConstant(OpTypeInt, typeId, value); Op opcode = specConstant ? OpSpecConstant : OpConstant;
Id existing = findScalarConstant(OpTypeInt, opcode, typeId, value);
if (existing) if (existing)
return existing; return existing;
Instruction* c = new Instruction(getUniqueId(), typeId, OpConstant); Instruction* c = new Instruction(getUniqueId(), typeId, opcode);
c->addImmediateOperand(value); c->addImmediateOperand(value);
constantsTypesGlobals.push_back(c); constantsTypesGlobals.push_back(c);
groupedConstants[OpTypeInt].push_back(c); groupedConstants[OpTypeInt].push_back(c);
@ -566,15 +609,16 @@ Id Builder::makeIntConstant(Id typeId, unsigned value)
return c->getResultId(); return c->getResultId();
} }
Id Builder::makeFloatConstant(float f) Id Builder::makeFloatConstant(float f, bool specConstant)
{ {
Op opcode = specConstant ? OpSpecConstant : OpConstant;
Id typeId = makeFloatType(32); Id typeId = makeFloatType(32);
unsigned value = *(unsigned int*)&f; unsigned value = *(unsigned int*)&f;
Id existing = findScalarConstant(OpTypeFloat, typeId, value); Id existing = findScalarConstant(OpTypeFloat, opcode, typeId, value);
if (existing) if (existing)
return existing; return existing;
Instruction* c = new Instruction(getUniqueId(), typeId, OpConstant); Instruction* c = new Instruction(getUniqueId(), typeId, opcode);
c->addImmediateOperand(value); c->addImmediateOperand(value);
constantsTypesGlobals.push_back(c); constantsTypesGlobals.push_back(c);
groupedConstants[OpTypeFloat].push_back(c); groupedConstants[OpTypeFloat].push_back(c);
@ -583,17 +627,18 @@ Id Builder::makeFloatConstant(float f)
return c->getResultId(); return c->getResultId();
} }
Id Builder::makeDoubleConstant(double d) Id Builder::makeDoubleConstant(double d, bool specConstant)
{ {
Op opcode = specConstant ? OpSpecConstant : OpConstant;
Id typeId = makeFloatType(64); Id typeId = makeFloatType(64);
unsigned long long value = *(unsigned long long*)&d; unsigned long long value = *(unsigned long long*)&d;
unsigned op1 = value & 0xFFFFFFFF; unsigned op1 = value & 0xFFFFFFFF;
unsigned op2 = value >> 32; unsigned op2 = value >> 32;
Id existing = findScalarConstant(OpTypeFloat, typeId, op1, op2); Id existing = findScalarConstant(OpTypeFloat, opcode, typeId, op1, op2);
if (existing) if (existing)
return existing; return existing;
Instruction* c = new Instruction(getUniqueId(), typeId, OpConstant); Instruction* c = new Instruction(getUniqueId(), typeId, opcode);
c->addImmediateOperand(op1); c->addImmediateOperand(op1);
c->addImmediateOperand(op2); c->addImmediateOperand(op2);
constantsTypesGlobals.push_back(c); constantsTypesGlobals.push_back(c);
@ -644,7 +689,7 @@ Id Builder::makeCompositeConstant(Id typeId, std::vector<Id>& members)
case OpTypeMatrix: case OpTypeMatrix:
break; break;
default: default:
MissingFunctionality("Constant composite type in Builder"); assert(0);
return makeFloatConstant(0.0); return makeFloatConstant(0.0);
} }
@ -662,7 +707,7 @@ Id Builder::makeCompositeConstant(Id typeId, std::vector<Id>& members)
return c->getResultId(); return c->getResultId();
} }
void Builder::addEntryPoint(ExecutionModel model, Function* function, const char* name) Instruction* Builder::addEntryPoint(ExecutionModel model, Function* function, const char* name)
{ {
Instruction* entryPoint = new Instruction(OpEntryPoint); Instruction* entryPoint = new Instruction(OpEntryPoint);
entryPoint->addImmediateOperand(model); entryPoint->addImmediateOperand(model);
@ -670,6 +715,8 @@ void Builder::addEntryPoint(ExecutionModel model, Function* function, const char
entryPoint->addStringOperand(name); entryPoint->addStringOperand(name);
entryPoints.push_back(entryPoint); entryPoints.push_back(entryPoint);
return entryPoint;
} }
// Currently relying on the fact that all 'value' of interest are small non-negative values. // Currently relying on the fact that all 'value' of interest are small non-negative values.
@ -720,6 +767,8 @@ void Builder::addLine(Id target, Id fileName, int lineNum, int column)
void Builder::addDecoration(Id id, Decoration decoration, int num) void Builder::addDecoration(Id id, Decoration decoration, int num)
{ {
if (decoration == (spv::Decoration)spv::BadValue)
return;
Instruction* dec = new Instruction(OpDecorate); Instruction* dec = new Instruction(OpDecorate);
dec->addIdOperand(id); dec->addIdOperand(id);
dec->addImmediateOperand(decoration); dec->addImmediateOperand(decoration);
@ -833,25 +882,14 @@ Id Builder::createVariable(StorageClass storageClass, Id type, const char* name)
inst->addImmediateOperand(storageClass); inst->addImmediateOperand(storageClass);
switch (storageClass) { switch (storageClass) {
case StorageClassUniformConstant:
case StorageClassUniform:
case StorageClassInput:
case StorageClassOutput:
case StorageClassWorkgroupLocal:
case StorageClassPrivateGlobal:
case StorageClassWorkgroupGlobal:
case StorageClassAtomicCounter:
constantsTypesGlobals.push_back(inst);
module.mapInstruction(inst);
break;
case StorageClassFunction: case StorageClassFunction:
// Validation rules require the declaration in the entry block // Validation rules require the declaration in the entry block
buildPoint->getParent().addLocalVariable(inst); buildPoint->getParent().addLocalVariable(inst);
break; break;
default: default:
MissingFunctionality("storage class in createVariable"); constantsTypesGlobals.push_back(inst);
module.mapInstruction(inst);
break; break;
} }
@ -1175,7 +1213,7 @@ Id Builder::createBuiltinCall(Decoration /*precision*/, Id resultType, Id builti
// Accept all parameters needed to create a texture instruction. // Accept all parameters needed to create a texture instruction.
// Create the correct instruction based on the inputs, and make the call. // Create the correct instruction based on the inputs, and make the call.
Id Builder::createTextureCall(Decoration precision, Id resultType, bool fetch, bool proj, const TextureParameters& parameters) Id Builder::createTextureCall(Decoration precision, Id resultType, bool fetch, bool proj, bool gather, const TextureParameters& parameters)
{ {
static const int maxTextureArgs = 10; static const int maxTextureArgs = 10;
Id texArgs[maxTextureArgs] = {}; Id texArgs[maxTextureArgs] = {};
@ -1189,6 +1227,8 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool fetch, b
texArgs[numArgs++] = parameters.coords; texArgs[numArgs++] = parameters.coords;
if (parameters.Dref) if (parameters.Dref)
texArgs[numArgs++] = parameters.Dref; texArgs[numArgs++] = parameters.Dref;
if (parameters.comp)
texArgs[numArgs++] = parameters.comp;
// //
// Set up the optional arguments // Set up the optional arguments
@ -1238,6 +1278,11 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool fetch, b
opCode = OpImageSampleImplicitLod; opCode = OpImageSampleImplicitLod;
if (fetch) { if (fetch) {
opCode = OpImageFetch; opCode = OpImageFetch;
} else if (gather) {
if (parameters.Dref)
opCode = OpImageDrefGather;
else
opCode = OpImageGather;
} else if (xplicit) { } else if (xplicit) {
if (parameters.Dref) { if (parameters.Dref) {
if (proj) if (proj)
@ -1281,6 +1326,7 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool fetch, b
} }
} }
// Build the SPIR-V instruction
Instruction* textureInst = new Instruction(getUniqueId(), resultType, opCode); Instruction* textureInst = new Instruction(getUniqueId(), resultType, opCode);
for (int op = 0; op < optArgNum; ++op) for (int op = 0; op < optArgNum; ++op)
textureInst->addIdOperand(texArgs[op]); textureInst->addIdOperand(texArgs[op]);
@ -1324,8 +1370,12 @@ Id Builder::createTextureQueryCall(Op opCode, const TextureParameters& parameter
case Dim3D: case Dim3D:
numComponents = 3; numComponents = 3;
break; break;
case DimSubpassData:
MissingFunctionality("input-attachment dim");
break;
default: default:
MissingFunctionality("texture query dimensionality"); assert(0);
break; break;
} }
if (isArrayedImageType(getImageType(parameters.sampler))) if (isArrayedImageType(getImageType(parameters.sampler)))
@ -1345,7 +1395,8 @@ Id Builder::createTextureQueryCall(Op opCode, const TextureParameters& parameter
resultType = makeIntType(32); resultType = makeIntType(32);
break; break;
default: default:
MissingFunctionality("Texture query op code"); assert(0);
break;
} }
Instruction* query = new Instruction(getUniqueId(), resultType, opCode); Instruction* query = new Instruction(getUniqueId(), resultType, opCode);
@ -1359,57 +1410,6 @@ Id Builder::createTextureQueryCall(Op opCode, const TextureParameters& parameter
return query->getResultId(); return query->getResultId();
} }
// Comments in header
//Id Builder::createSamplePositionCall(Decoration precision, Id returnType, Id sampleIdx)
//{
// // Return type is only flexible type
// Function* opCode = (fSamplePosition, returnType);
//
// Instruction* instr = (opCode, sampleIdx);
// setPrecision(instr, precision);
//
// return instr;
//}
// Comments in header
//Id Builder::createBitFieldExtractCall(Decoration precision, Id id, Id offset, Id bits, bool isSigned)
//{
// Op opCode = isSigned ? sBitFieldExtract
// : uBitFieldExtract;
//
// if (isScalar(offset) == false || isScalar(bits) == false)
// MissingFunctionality("bitFieldExtract operand types");
//
// // Dest and value are matching flexible types
// Function* opCode = (opCode, id->getType(), id->getType());
//
// assert(opCode);
//
// Instruction* instr = (opCode, id, offset, bits);
// setPrecision(instr, precision);
//
// return instr;
//}
// Comments in header
//Id Builder::createBitFieldInsertCall(Decoration precision, Id base, Id insert, Id offset, Id bits)
//{
// Op opCode = bitFieldInsert;
//
// if (isScalar(offset) == false || isScalar(bits) == false)
// MissingFunctionality("bitFieldInsert operand types");
//
// // Dest, base, and insert are matching flexible types
// Function* opCode = (opCode, base->getType(), base->getType(), base->getType());
//
// assert(opCode);
//
// Instruction* instr = (opCode, base, insert, offset, bits);
// setPrecision(instr, precision);
//
// return instr;
//}
// Comments in header // Comments in header
Id Builder::createCompare(Decoration precision, Id value1, Id value2, bool equal) Id Builder::createCompare(Decoration precision, Id value1, Id value2, bool equal)
{ {
@ -1488,115 +1488,6 @@ Id Builder::createCompare(Decoration precision, Id value1, Id value2, bool equal
//return result; //return result;
} }
// Comments in header
//Id Builder::createOperation(Decoration precision, Op opCode, Id operand)
//{
// Op* opCode = 0;
//
// // Handle special return types here. Things that don't have same result type as parameter
// switch (opCode) {
// case fIsNan:
// case fIsInf:
// break;
// case fFloatBitsToInt:
// break;
// case fIntBitsTofloat:
// break;
// case fPackSnorm2x16:
// case fPackUnorm2x16:
// case fPackHalf2x16:
// break;
// case fUnpackUnorm2x16:
// case fUnpackSnorm2x16:
// case fUnpackHalf2x16:
// break;
//
// case fFrexp:
// case fLdexp:
// case fPackUnorm4x8:
// case fPackSnorm4x8:
// case fUnpackUnorm4x8:
// case fUnpackSnorm4x8:
// case fPackDouble2x32:
// case fUnpackDouble2x32:
// break;
// case fLength:
// // scalar result type
// break;
// case any:
// case all:
// // fixed result type
// break;
// case fModF:
// // modf() will return a struct that the caller must decode
// break;
// default:
// // Unary operations that have operand and dest with same flexible type
// break;
// }
//
// assert(opCode);
//
// Instruction* instr = (opCode, operand);
// setPrecision(instr, precision);
//
// return instr;
//}
//
//// Comments in header
//Id Builder::createOperation(Decoration precision, Op opCode, Id operand0, Id operand1)
//{
// Function* opCode = 0;
//
// // Handle special return types here. Things that don't have same result type as parameter
// switch (opCode) {
// case fDistance:
// case fDot2:
// case fDot3:
// case fDot4:
// // scalar result type
// break;
// case fStep:
// // first argument can be scalar, return and second argument match
// break;
// case fSmoothStep:
// // first argument can be scalar, return and second argument match
// break;
// default:
// // Binary operations that have operand and dest with same flexible type
// break;
// }
//
// assert(opCode);
//
// Instruction* instr = (opCode, operand0, operand1);
// setPrecision(instr, precision);
//
// return instr;
//}
//
//Id Builder::createOperation(Decoration precision, Op opCode, Id operand0, Id operand1, Id operand2)
//{
// Function* opCode;
//
// // Handle special return types here. Things that don't have same result type as parameter
// switch (opCode) {
// case fSmoothStep:
// // first argument can be scalar, return and second argument match
// break;
// default:
// // Use operand0 type as result type
// break;
// }
//
// assert(opCode);
//
// Instruction* instr = (opCode, operand0, operand1, operand2);
// setPrecision(instr, precision);
//
// return instr;
//}
// OpCompositeConstruct // OpCompositeConstruct
Id Builder::createCompositeConstruct(Id typeId, std::vector<Id>& constituents) Id Builder::createCompositeConstruct(Id typeId, std::vector<Id>& constituents)
{ {
@ -1625,11 +1516,8 @@ Id Builder::createConstructor(Decoration precision, const std::vector<Id>& sourc
Id scalarTypeId = getScalarTypeId(resultTypeId); Id scalarTypeId = getScalarTypeId(resultTypeId);
std::vector<Id> constituents; // accumulate the arguments for OpCompositeConstruct std::vector<Id> constituents; // accumulate the arguments for OpCompositeConstruct
for (unsigned int i = 0; i < sources.size(); ++i) { for (unsigned int i = 0; i < sources.size(); ++i) {
if (isAggregate(sources[i])) assert(! isAggregate(sources[i]));
MissingFunctionality("aggregate in vector constructor");
unsigned int sourceSize = getNumComponents(sources[i]); unsigned int sourceSize = getNumComponents(sources[i]);
unsigned int sourcesToUse = sourceSize; unsigned int sourcesToUse = sourceSize;
if (sourcesToUse + targetComponent > numTargetComponents) if (sourcesToUse + targetComponent > numTargetComponents)
sourcesToUse = numTargetComponents - targetComponent; sourcesToUse = numTargetComponents - targetComponent;
@ -1790,7 +1678,7 @@ void Builder::If::makeEndIf()
// Go back to the headerBlock and make the flow control split // Go back to the headerBlock and make the flow control split
builder.setBuildPoint(headerBlock); builder.setBuildPoint(headerBlock);
builder.createMerge(OpSelectionMerge, mergeBlock, SelectionControlMaskNone); builder.createSelectionMerge(mergeBlock, SelectionControlMaskNone);
if (elseBlock) if (elseBlock)
builder.createConditionalBranch(condition, thenBlock, elseBlock); builder.createConditionalBranch(condition, thenBlock, elseBlock);
else else
@ -1814,7 +1702,7 @@ void Builder::makeSwitch(Id selector, int numSegments, std::vector<int>& caseVal
Block* mergeBlock = new Block(getUniqueId(), function); Block* mergeBlock = new Block(getUniqueId(), function);
// make and insert the switch's selection-merge instruction // make and insert the switch's selection-merge instruction
createMerge(OpSelectionMerge, mergeBlock, SelectionControlMaskNone); createSelectionMerge(mergeBlock, SelectionControlMaskNone);
// make the switch instruction // make the switch instruction
Instruction* switchInst = new Instruction(NoResult, NoType, OpSwitch); Instruction* switchInst = new Instruction(NoResult, NoType, OpSwitch);
@ -1898,7 +1786,7 @@ void Builder::makeNewLoop(bool loopTestFirst)
getBuildPoint()->addInstruction(loop.isFirstIteration); getBuildPoint()->addInstruction(loop.isFirstIteration);
// Mark the end of the structured loop. This must exist in the loop header block. // Mark the end of the structured loop. This must exist in the loop header block.
createMerge(OpLoopMerge, loop.merge, LoopControlMaskNone); createLoopMerge(loop.merge, loop.header, LoopControlMaskNone);
// Generate code to see if this is the first iteration of the loop. // Generate code to see if this is the first iteration of the loop.
// It needs to be in its own block, since the loop merge and // It needs to be in its own block, since the loop merge and
@ -1912,7 +1800,7 @@ void Builder::makeNewLoop(bool loopTestFirst)
// Control flow after this "if" normally reconverges at the loop body. // Control flow after this "if" normally reconverges at the loop body.
// However, the loop test has a "break branch" out of this selection // However, the loop test has a "break branch" out of this selection
// construct because it can transfer control to the loop merge block. // construct because it can transfer control to the loop merge block.
createMerge(OpSelectionMerge, loop.body, SelectionControlMaskNone); createSelectionMerge(loop.body, SelectionControlMaskNone);
Block* loopTest = new Block(getUniqueId(), *loop.function); Block* loopTest = new Block(getUniqueId(), *loop.function);
createConditionalBranch(loop.isFirstIteration->getResultId(), loop.body, loopTest); createConditionalBranch(loop.isFirstIteration->getResultId(), loop.body, loopTest);
@ -1930,7 +1818,7 @@ void Builder::createLoopTestBranch(Id condition)
// the body, then this is a loop merge. Otherwise the loop merge // the body, then this is a loop merge. Otherwise the loop merge
// has already been generated and this is a conditional merge. // has already been generated and this is a conditional merge.
if (loop.testFirst) { if (loop.testFirst) {
createMerge(OpLoopMerge, loop.merge, LoopControlMaskNone); createLoopMerge(loop.merge, loop.header, LoopControlMaskNone);
// Branching to the "body" block will keep control inside // Branching to the "body" block will keep control inside
// the loop. // the loop.
createConditionalBranch(condition, loop.body, loop.merge); createConditionalBranch(condition, loop.body, loop.merge);
@ -1943,7 +1831,7 @@ void Builder::createLoopTestBranch(Id condition)
// of a merge instruction, and a block can't be the target of more // of a merge instruction, and a block can't be the target of more
// than one merge instruction, we need to make an intermediate block. // than one merge instruction, we need to make an intermediate block.
Block* stayInLoopBlock = new Block(getUniqueId(), *loop.function); Block* stayInLoopBlock = new Block(getUniqueId(), *loop.function);
createMerge(OpSelectionMerge, stayInLoopBlock, SelectionControlMaskNone); createSelectionMerge(stayInLoopBlock, SelectionControlMaskNone);
// This is the loop test. // This is the loop test.
createConditionalBranch(condition, stayInLoopBlock, loop.merge); createConditionalBranch(condition, stayInLoopBlock, loop.merge);
@ -2047,12 +1935,13 @@ void Builder::accessChainStore(Id rvalue)
{ {
assert(accessChain.isRValue == false); assert(accessChain.isRValue == false);
transferAccessChainSwizzle(true);
Id base = collapseAccessChain(); Id base = collapseAccessChain();
if (accessChain.swizzle.size() && accessChain.component != NoResult) if (accessChain.swizzle.size() && accessChain.component != NoResult)
MissingFunctionality("simultaneous l-value swizzle and dynamic component selection"); MissingFunctionality("simultaneous l-value swizzle and dynamic component selection");
// If swizzle exists, it is out-of-order or not full, we must load the target vector, // If swizzle still exists, it is out-of-order or not full, we must load the target vector,
// extract and insert elements to perform writeMask and/or swizzle. // extract and insert elements to perform writeMask and/or swizzle.
Id source = NoResult; Id source = NoResult;
if (accessChain.swizzle.size()) { if (accessChain.swizzle.size()) {
@ -2078,8 +1967,9 @@ Id Builder::accessChainLoad(Id resultType)
Id id; Id id;
if (accessChain.isRValue) { if (accessChain.isRValue) {
// transfer access chain, but keep it static, so we can stay in registers
transferAccessChainSwizzle(false);
if (accessChain.indexChain.size() > 0) { if (accessChain.indexChain.size() > 0) {
mergeAccessChainSwizzle(); // TODO: optimization: look at applying this optimization more widely
Id swizzleBase = accessChain.preSwizzleBaseType != NoType ? accessChain.preSwizzleBaseType : resultType; Id swizzleBase = accessChain.preSwizzleBaseType != NoType ? accessChain.preSwizzleBaseType : resultType;
// if all the accesses are constants, we can use OpCompositeExtract // if all the accesses are constants, we can use OpCompositeExtract
@ -2113,6 +2003,7 @@ Id Builder::accessChainLoad(Id resultType)
} else } else
id = accessChain.base; id = accessChain.base;
} else { } else {
transferAccessChainSwizzle(true);
// load through the access chain // load through the access chain
id = createLoad(collapseAccessChain()); id = createLoad(collapseAccessChain());
} }
@ -2142,6 +2033,7 @@ Id Builder::accessChainGetLValue()
{ {
assert(accessChain.isRValue == false); assert(accessChain.isRValue == false);
transferAccessChainSwizzle(true);
Id lvalue = collapseAccessChain(); Id lvalue = collapseAccessChain();
// If swizzle exists, it is out-of-order or not full, we must load the target vector, // If swizzle exists, it is out-of-order or not full, we must load the target vector,
@ -2162,7 +2054,26 @@ void Builder::dump(std::vector<unsigned int>& out) const
out.push_back(uniqueId + 1); out.push_back(uniqueId + 1);
out.push_back(0); out.push_back(0);
// First instructions, some created on the spot here: // Capabilities
for (auto cap : capabilities) {
Instruction capInst(0, 0, OpCapability);
capInst.addImmediateOperand(cap);
capInst.dump(out);
}
// TBD: OpExtension ...
dumpInstructions(out, imports);
Instruction memInst(0, 0, OpMemoryModel);
memInst.addImmediateOperand(addressModel);
memInst.addImmediateOperand(memoryModel);
memInst.dump(out);
// Instructions saved up while building:
dumpInstructions(out, entryPoints);
dumpInstructions(out, executionModes);
// Debug instructions
if (source != SourceLanguageUnknown) { if (source != SourceLanguageUnknown) {
Instruction sourceInst(0, 0, OpSource); Instruction sourceInst(0, 0, OpSource);
sourceInst.addImmediateOperand(source); sourceInst.addImmediateOperand(source);
@ -2174,28 +2085,12 @@ void Builder::dump(std::vector<unsigned int>& out) const
extInst.addStringOperand(extensions[e]); extInst.addStringOperand(extensions[e]);
extInst.dump(out); extInst.dump(out);
} }
// TBD: OpExtension ...
// Capabilities
for (auto cap : capabilities) {
Instruction capInst(0, 0, OpCapability);
capInst.addImmediateOperand(cap);
capInst.dump(out);
}
dumpInstructions(out, imports);
Instruction memInst(0, 0, OpMemoryModel);
memInst.addImmediateOperand(addressModel);
memInst.addImmediateOperand(memoryModel);
memInst.dump(out);
// Instructions saved up while building:
dumpInstructions(out, entryPoints);
dumpInstructions(out, executionModes);
dumpInstructions(out, names); dumpInstructions(out, names);
dumpInstructions(out, lines); dumpInstructions(out, lines);
// Annotation instructions
dumpInstructions(out, decorations); dumpInstructions(out, decorations);
dumpInstructions(out, constantsTypesGlobals); dumpInstructions(out, constantsTypesGlobals);
dumpInstructions(out, externals); dumpInstructions(out, externals);
@ -2207,10 +2102,13 @@ void Builder::dump(std::vector<unsigned int>& out) const
// Protected methods. // Protected methods.
// //
// Turn the described access chain in 'accessChain' into an instruction
// computing its address. This *cannot* include complex swizzles, which must
// be handled after this is called, but it does include swizzles that select
// an individual element, as a single address of a scalar type can be
// computed by an OpAccessChain instruction.
Id Builder::collapseAccessChain() Id Builder::collapseAccessChain()
{ {
// TODO: bring in an individual component swizzle here, so that a pointer
// all the way to the component level can be created.
assert(accessChain.isRValue == false); assert(accessChain.isRValue == false);
if (accessChain.indexChain.size() > 0) { if (accessChain.indexChain.size() > 0) {
@ -2222,9 +2120,12 @@ Id Builder::collapseAccessChain()
return accessChain.instr; return accessChain.instr;
} else } else
return accessChain.base; return accessChain.base;
// note that non-trivial swizzling is left pending...
} }
// clear out swizzle if it is redundant // clear out swizzle if it is redundant, that is reselecting the same components
// that would be present without the swizzle.
void Builder::simplifyAccessChainSwizzle() void Builder::simplifyAccessChainSwizzle()
{ {
// If the swizzle has fewer components than the vector, it is subsetting, and must stay // If the swizzle has fewer components than the vector, it is subsetting, and must stay
@ -2244,29 +2145,45 @@ void Builder::simplifyAccessChainSwizzle()
accessChain.preSwizzleBaseType = NoType; accessChain.preSwizzleBaseType = NoType;
} }
// clear out swizzle if it can become part of the indexes // To the extent any swizzling can become part of the chain
void Builder::mergeAccessChainSwizzle() // of accesses instead of a post operation, make it so.
// If 'dynamic' is true, include transfering a non-static component index,
// otherwise, only transfer static indexes.
//
// Also, Boolean vectors are likely to be special. While
// for external storage, they should only be integer types,
// function-local bool vectors could use sub-word indexing,
// so keep that as a separate Insert/Extract on a loaded vector.
void Builder::transferAccessChainSwizzle(bool dynamic)
{ {
// is there even a chance of doing something? Need a single-component swizzle // too complex?
if ((accessChain.swizzle.size() > 1) || if (accessChain.swizzle.size() > 1)
(accessChain.swizzle.size() == 0 && accessChain.component == NoResult))
return; return;
// TODO: optimization: remove this, but for now confine this to non-dynamic accesses // non existent?
// (the above test is correct when this is removed.) if (accessChain.swizzle.size() == 0 && accessChain.component == NoResult)
if (accessChain.component != NoResult)
return; return;
// move the swizzle over to the indexes // single component...
if (accessChain.swizzle.size() == 1)
// skip doing it for Boolean vectors
if (isBoolType(getContainedTypeId(accessChain.preSwizzleBaseType)))
return;
if (accessChain.swizzle.size() == 1) {
// handle static component
accessChain.indexChain.push_back(makeUintConstant(accessChain.swizzle.front())); accessChain.indexChain.push_back(makeUintConstant(accessChain.swizzle.front()));
else accessChain.swizzle.clear();
// note, the only valid remaining dynamic access would be to this one
// component, so don't bother even looking at accessChain.component
accessChain.preSwizzleBaseType = NoType;
accessChain.component = NoResult;
} else if (dynamic && accessChain.component != NoResult) {
// handle dynamic component
accessChain.indexChain.push_back(accessChain.component); accessChain.indexChain.push_back(accessChain.component);
accessChain.preSwizzleBaseType = NoType;
// now there is no need to track this swizzle accessChain.component = NoResult;
accessChain.component = NoResult; }
accessChain.preSwizzleBaseType = NoType;
accessChain.swizzle.clear();
} }
// Utility method for creating a new block and setting the insert point to // Utility method for creating a new block and setting the insert point to
@ -2292,14 +2209,23 @@ void Builder::createBranch(Block* block)
block->addPredecessor(buildPoint); block->addPredecessor(buildPoint);
} }
void Builder::createMerge(Op mergeCode, Block* mergeBlock, unsigned int control) void Builder::createSelectionMerge(Block* mergeBlock, unsigned int control)
{ {
Instruction* merge = new Instruction(mergeCode); Instruction* merge = new Instruction(OpSelectionMerge);
merge->addIdOperand(mergeBlock->getId()); merge->addIdOperand(mergeBlock->getId());
merge->addImmediateOperand(control); merge->addImmediateOperand(control);
buildPoint->addInstruction(merge); buildPoint->addInstruction(merge);
} }
void Builder::createLoopMerge(Block* mergeBlock, Block* continueBlock, unsigned int control)
{
Instruction* merge = new Instruction(OpLoopMerge);
merge->addIdOperand(mergeBlock->getId());
merge->addIdOperand(continueBlock->getId());
merge->addImmediateOperand(control);
buildPoint->addInstruction(merge);
}
void Builder::createConditionalBranch(Id condition, Block* thenBlock, Block* elseBlock) void Builder::createConditionalBranch(Id condition, Block* thenBlock, Block* elseBlock)
{ {
Instruction* branch = new Instruction(OpBranchConditional); Instruction* branch = new Instruction(OpBranchConditional);

View File

@ -99,12 +99,14 @@ public:
Id makeUintType(int width) { return makeIntegerType(width, false); } Id makeUintType(int width) { return makeIntegerType(width, false); }
Id makeFloatType(int width); Id makeFloatType(int width);
Id makeStructType(std::vector<Id>& members, const char*); Id makeStructType(std::vector<Id>& members, const char*);
Id makeStructResultType(Id type0, Id type1);
Id makeVectorType(Id component, int size); Id makeVectorType(Id component, int size);
Id makeMatrixType(Id component, int cols, int rows); Id makeMatrixType(Id component, int cols, int rows);
Id makeArrayType(Id element, unsigned size); Id makeArrayType(Id element, unsigned size);
Id makeRuntimeArray(Id element); Id makeRuntimeArray(Id element);
Id makeFunctionType(Id returnType, std::vector<Id>& paramTypes); Id makeFunctionType(Id returnType, std::vector<Id>& paramTypes);
Id makeImageType(Id sampledType, Dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format); Id makeImageType(Id sampledType, Dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format);
Id makeSamplerType();
Id makeSampledImageType(Id imageType); Id makeSampledImageType(Id imageType);
// For querying about types. // For querying about types.
@ -118,12 +120,14 @@ public:
Id getScalarTypeId(Id typeId) const; Id getScalarTypeId(Id typeId) const;
Id getContainedTypeId(Id typeId) const; Id getContainedTypeId(Id typeId) const;
Id getContainedTypeId(Id typeId, int) const; Id getContainedTypeId(Id typeId, int) const;
StorageClass getTypeStorageClass(Id typeId) const { return module.getStorageClass(typeId); }
bool isPointer(Id resultId) const { return isPointerType(getTypeId(resultId)); } bool isPointer(Id resultId) const { return isPointerType(getTypeId(resultId)); }
bool isScalar(Id resultId) const { return isScalarType(getTypeId(resultId)); } bool isScalar(Id resultId) const { return isScalarType(getTypeId(resultId)); }
bool isVector(Id resultId) const { return isVectorType(getTypeId(resultId)); } bool isVector(Id resultId) const { return isVectorType(getTypeId(resultId)); }
bool isMatrix(Id resultId) const { return isMatrixType(getTypeId(resultId)); } bool isMatrix(Id resultId) const { return isMatrixType(getTypeId(resultId)); }
bool isAggregate(Id resultId) const { return isAggregateType(getTypeId(resultId)); } bool isAggregate(Id resultId) const { return isAggregateType(getTypeId(resultId)); }
bool isBoolType(Id typeId) const { return groupedTypes[OpTypeBool].size() > 0 && typeId == groupedTypes[OpTypeBool].back()->getResultId(); }
bool isPointerType(Id typeId) const { return getTypeClass(typeId) == OpTypePointer; } bool isPointerType(Id typeId) const { return getTypeClass(typeId) == OpTypePointer; }
bool isScalarType(Id typeId) const { return getTypeClass(typeId) == OpTypeFloat || getTypeClass(typeId) == OpTypeInt || getTypeClass(typeId) == OpTypeBool; } bool isScalarType(Id typeId) const { return getTypeClass(typeId) == OpTypeFloat || getTypeClass(typeId) == OpTypeInt || getTypeClass(typeId) == OpTypeBool; }
@ -140,6 +144,7 @@ public:
bool isConstant(Id resultId) const { return isConstantOpCode(getOpCode(resultId)); } bool isConstant(Id resultId) const { return isConstantOpCode(getOpCode(resultId)); }
bool isConstantScalar(Id resultId) const { return getOpCode(resultId) == OpConstant; } bool isConstantScalar(Id resultId) const { return getOpCode(resultId) == OpConstant; }
unsigned int getConstantScalar(Id resultId) const { return module.getInstruction(resultId)->getImmediateOperand(0); } unsigned int getConstantScalar(Id resultId) const { return module.getInstruction(resultId)->getImmediateOperand(0); }
StorageClass getStorageClass(Id resultId) const { return getTypeStorageClass(getTypeId(resultId)); }
int getTypeNumColumns(Id typeId) const int getTypeNumColumns(Id typeId) const
{ {
@ -172,18 +177,17 @@ public:
} }
// For making new constants (will return old constant if the requested one was already made). // For making new constants (will return old constant if the requested one was already made).
Id makeBoolConstant(bool b); Id makeBoolConstant(bool b, bool specConstant = false);
Id makeIntConstant(Id typeId, unsigned value); Id makeIntConstant(int i, bool specConstant = false) { return makeIntConstant(makeIntType(32), (unsigned)i, specConstant); }
Id makeIntConstant(int i) { return makeIntConstant(makeIntType(32), (unsigned)i); } Id makeUintConstant(unsigned u, bool specConstant = false) { return makeIntConstant(makeUintType(32), u, specConstant); }
Id makeUintConstant(unsigned u) { return makeIntConstant(makeUintType(32), u); } Id makeFloatConstant(float f, bool specConstant = false);
Id makeFloatConstant(float f); Id makeDoubleConstant(double d, bool specConstant = false);
Id makeDoubleConstant(double d);
// Turn the array of constants into a proper spv constant of the requested type. // Turn the array of constants into a proper spv constant of the requested type.
Id makeCompositeConstant(Id type, std::vector<Id>& comps); Id makeCompositeConstant(Id type, std::vector<Id>& comps);
// Methods for adding information outside the CFG. // Methods for adding information outside the CFG.
void addEntryPoint(ExecutionModel, Function*, const char* name); Instruction* addEntryPoint(ExecutionModel, Function*, const char* name);
void addExecutionMode(Function*, ExecutionMode mode, int value1 = -1, int value2 = -1, int value3 = -1); void addExecutionMode(Function*, ExecutionMode mode, int value1 = -1, int value2 = -1, int value3 = -1);
void addName(Id, const char* name); void addName(Id, const char* name);
void addMemberName(Id, int member, const char* name); void addMemberName(Id, int member, const char* name);
@ -296,10 +300,11 @@ public:
Id gradX; Id gradX;
Id gradY; Id gradY;
Id sample; Id sample;
Id comp;
}; };
// Select the correct texture operation based on all inputs, and emit the correct instruction // Select the correct texture operation based on all inputs, and emit the correct instruction
Id createTextureCall(Decoration precision, Id resultType, bool fetch, bool proj, const TextureParameters&); Id createTextureCall(Decoration precision, Id resultType, bool fetch, bool proj, bool gather, const TextureParameters&);
// Emit the OpTextureQuery* instruction that was passed in. // Emit the OpTextureQuery* instruction that was passed in.
// Figure out the right return value and type, and return it. // Figure out the right return value and type, and return it.
@ -426,13 +431,13 @@ public:
// //
struct AccessChain { struct AccessChain {
Id base; // for l-values, pointer to the base object, for r-values, the base object Id base; // for l-values, pointer to the base object, for r-values, the base object
std::vector<Id> indexChain; std::vector<Id> indexChain;
Id instr; // the instruction that generates this access chain Id instr; // cache the instruction that generates this access chain
std::vector<unsigned> swizzle; std::vector<unsigned> swizzle; // each std::vector element selects the next GLSL component number
Id component; // a dynamic component index, can coexist with a swizzle, done after the swizzle Id component; // a dynamic component index, can coexist with a swizzle, done after the swizzle, NoResult if not present
Id preSwizzleBaseType; // dereferenced type, before swizzle or component is applied; NoType unless a swizzle or component is present Id preSwizzleBaseType; // dereferenced type, before swizzle or component is applied; NoType unless a swizzle or component is present
bool isRValue; bool isRValue; // true if 'base' is an r-value, otherwise, base is an l-value
}; };
// //
@ -490,15 +495,17 @@ public:
void dump(std::vector<unsigned int>&) const; void dump(std::vector<unsigned int>&) const;
protected: protected:
Id findScalarConstant(Op typeClass, Id typeId, unsigned value) const; Id makeIntConstant(Id typeId, unsigned value, bool specConstant);
Id findScalarConstant(Op typeClass, Id typeId, unsigned v1, unsigned v2) const; 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, std::vector<Id>& comps) const;
Id collapseAccessChain(); Id collapseAccessChain();
void transferAccessChainSwizzle(bool dynamic);
void simplifyAccessChainSwizzle(); void simplifyAccessChainSwizzle();
void mergeAccessChainSwizzle();
void createAndSetNoPredecessorBlock(const char*); void createAndSetNoPredecessorBlock(const char*);
void createBranch(Block* block); void createBranch(Block* block);
void createMerge(Op, Block*, unsigned int control); void createSelectionMerge(Block* mergeBlock, unsigned int control);
void createLoopMerge(Block* mergeBlock, Block* continueBlock, unsigned int control);
void createConditionalBranch(Id condition, Block* thenBlock, Block* elseBlock); void createConditionalBranch(Id condition, Block* thenBlock, Block* elseBlock);
void dumpInstructions(std::vector<unsigned int>&, const std::vector<Instruction*>&) const; void dumpInstructions(std::vector<unsigned int>&, const std::vector<Instruction*>&) const;

View File

@ -48,15 +48,17 @@
#include <sstream> #include <sstream>
#include <cstring> #include <cstring>
namespace spv {
// Include C-based headers that don't have a namespace
#include "SPIRV/GLSL.std.450.h"
}
const char* GlslStd450DebugNames[spv::GLSLstd450Count];
#include "disassemble.h" #include "disassemble.h"
#include "doc.h" #include "doc.h"
namespace spv { namespace spv {
#include "GLSL.std.450.h"
const char* GlslStd450DebugNames[spv::GLSLstd450Count];
void Kill(std::ostream& out, const char* message) void Kill(std::ostream& out, const char* message)
{ {
out << std::endl << "Disassembly failed: " << message << std::endl; out << std::endl << "Disassembly failed: " << message << std::endl;
@ -92,7 +94,7 @@ protected:
void outputMask(OperandClass operandClass, unsigned mask); void outputMask(OperandClass operandClass, unsigned mask);
void disassembleImmediates(int numOperands); void disassembleImmediates(int numOperands);
void disassembleIds(int numOperands); void disassembleIds(int numOperands);
void disassembleString(); int disassembleString();
void disassembleInstruction(Id resultId, Id typeId, Op opCode, int numOperands); void disassembleInstruction(Id resultId, Id typeId, Op opCode, int numOperands);
// Data // Data
@ -128,10 +130,10 @@ void SpirvStream::validate()
} }
// Version // Version
out << "// Module Version " << stream[word++] << std::endl; out << "// Module Version " << std::hex << stream[word++] << std::endl;
// Generator's magic number // Generator's magic number
out << "// Generated by (magic number): " << std::setbase(16) << stream[word++] << std::setbase(10) << std::endl; out << "// Generated by (magic number): " << std::hex << stream[word++] << std::dec << std::endl;
// Result <id> bound // Result <id> bound
bound = stream[word++]; bound = stream[word++];
@ -280,15 +282,18 @@ void SpirvStream::disassembleIds(int numOperands)
} }
} }
void SpirvStream::disassembleString() // return the number of operands consumed by the string
int SpirvStream::disassembleString()
{ {
int startWord = word;
out << " \""; out << " \"";
char* wordString; const char* wordString;
bool done = false; bool done = false;
do { do {
unsigned int content = stream[word]; unsigned int content = stream[word];
wordString = (char*)&content; wordString = (const char*)&content;
for (int charCount = 0; charCount < 4; ++charCount) { for (int charCount = 0; charCount < 4; ++charCount) {
if (*wordString == 0) { if (*wordString == 0) {
done = true; done = true;
@ -300,6 +305,8 @@ void SpirvStream::disassembleString()
} while (! done); } while (! done);
out << "\""; out << "\"";
return word - startWord;
} }
void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode, int numOperands) void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode, int numOperands)
@ -389,15 +396,15 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
case OperandScope: case OperandScope:
case OperandMemorySemantics: case OperandMemorySemantics:
disassembleIds(1); disassembleIds(1);
--numOperands;
// Get names for printing "(XXX)" for readability, *after* this id // Get names for printing "(XXX)" for readability, *after* this id
if (opCode == OpName) if (opCode == OpName)
idDescriptor[stream[word - 1]] = (const char*)(&stream[word]); idDescriptor[stream[word - 1]] = (const char*)(&stream[word]);
break; break;
case OperandOptionalId:
case OperandVariableIds: case OperandVariableIds:
disassembleIds(numOperands); disassembleIds(numOperands);
return; return;
case OperandOptionalImage: case OperandImageOperands:
outputMask(OperandImageOperands, stream[word++]); outputMask(OperandImageOperands, stream[word++]);
--numOperands; --numOperands;
disassembleIds(numOperands); disassembleIds(numOperands);
@ -440,6 +447,7 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
return; return;
case OperandLiteralNumber: case OperandLiteralNumber:
disassembleImmediates(1); disassembleImmediates(1);
--numOperands;
if (opCode == OpExtInst) { if (opCode == OpExtInst) {
ExtInstSet extInstSet = GLSL450Inst; ExtInstSet extInstSet = GLSL450Inst;
if (0 == memcmp("OpenCL", (const char*)(idDescriptor[stream[word-2]].c_str()), 6)) { if (0 == memcmp("OpenCL", (const char*)(idDescriptor[stream[word-2]].c_str()), 6)) {
@ -447,15 +455,16 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
} }
unsigned entrypoint = stream[word - 1]; unsigned entrypoint = stream[word - 1];
if (extInstSet == GLSL450Inst) { if (extInstSet == GLSL450Inst) {
if (entrypoint < spv::GLSLstd450Count) { if (entrypoint < GLSLstd450Count) {
out << "(" << GlslStd450DebugNames[entrypoint] << ")"; out << "(" << GlslStd450DebugNames[entrypoint] << ")";
} }
} }
} }
break; break;
case OperandOptionalLiteralString:
case OperandLiteralString: case OperandLiteralString:
disassembleString(); numOperands -= disassembleString();
return; break;
default: default:
assert(operandClass >= OperandSource && operandClass < OperandOpcode); assert(operandClass >= OperandSource && operandClass < OperandOpcode);
@ -463,10 +472,9 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
outputMask(operandClass, stream[word++]); outputMask(operandClass, stream[word++]);
else else
out << OperandClassParams[operandClass].getName(stream[word++]); out << OperandClassParams[operandClass].getName(stream[word++]);
--numOperands;
break; break;
} }
--numOperands;
} }
return; return;
@ -508,9 +516,9 @@ void GLSLstd450GetDebugNames(const char** names)
names[GLSLstd450Exp2] = "Exp2"; names[GLSLstd450Exp2] = "Exp2";
names[GLSLstd450Log2] = "Log2"; names[GLSLstd450Log2] = "Log2";
names[GLSLstd450Sqrt] = "Sqrt"; names[GLSLstd450Sqrt] = "Sqrt";
names[GLSLstd450InverseSqrt] = "Inversesqrt"; names[GLSLstd450InverseSqrt] = "InverseSqrt";
names[GLSLstd450Determinant] = "Determinant"; names[GLSLstd450Determinant] = "Determinant";
names[GLSLstd450MatrixInverse] = "Inverse"; names[GLSLstd450MatrixInverse] = "MatrixInverse";
names[GLSLstd450Modf] = "Modf"; names[GLSLstd450Modf] = "Modf";
names[GLSLstd450ModfStruct] = "ModfStruct"; names[GLSLstd450ModfStruct] = "ModfStruct";
names[GLSLstd450FMin] = "FMin"; names[GLSLstd450FMin] = "FMin";
@ -522,9 +530,10 @@ void GLSLstd450GetDebugNames(const char** names)
names[GLSLstd450FClamp] = "FClamp"; names[GLSLstd450FClamp] = "FClamp";
names[GLSLstd450SClamp] = "SClamp"; names[GLSLstd450SClamp] = "SClamp";
names[GLSLstd450UClamp] = "UClamp"; names[GLSLstd450UClamp] = "UClamp";
names[GLSLstd450Mix] = "Mix"; names[GLSLstd450FMix] = "FMix";
names[GLSLstd450IMix] = "IMix";
names[GLSLstd450Step] = "Step"; names[GLSLstd450Step] = "Step";
names[GLSLstd450SmoothStep] = "Smoothstep"; names[GLSLstd450SmoothStep] = "SmoothStep";
names[GLSLstd450Fma] = "Fma"; names[GLSLstd450Fma] = "Fma";
names[GLSLstd450Frexp] = "Frexp"; names[GLSLstd450Frexp] = "Frexp";
names[GLSLstd450FrexpStruct] = "FrexpStruct"; names[GLSLstd450FrexpStruct] = "FrexpStruct";
@ -545,15 +554,12 @@ void GLSLstd450GetDebugNames(const char** names)
names[GLSLstd450Distance] = "Distance"; names[GLSLstd450Distance] = "Distance";
names[GLSLstd450Cross] = "Cross"; names[GLSLstd450Cross] = "Cross";
names[GLSLstd450Normalize] = "Normalize"; names[GLSLstd450Normalize] = "Normalize";
names[GLSLstd450FaceForward] = "Faceforward"; names[GLSLstd450FaceForward] = "FaceForward";
names[GLSLstd450Reflect] = "Reflect"; names[GLSLstd450Reflect] = "Reflect";
names[GLSLstd450Refract] = "Refract"; names[GLSLstd450Refract] = "Refract";
names[GLSLstd450AddCarry] = "UaddCarry"; names[GLSLstd450FindILsb] = "FindILsb";
names[GLSLstd450SubBorrow] = "UsubBorrow"; names[GLSLstd450FindSMsb] = "FindSMsb";
names[GLSLstd450MulExtended] = "UmulExtended"; names[GLSLstd450FindUMsb] = "FindUMsb";
names[GLSLstd450FindILSB] = "FindILsb";
names[GLSLstd450FindSMSB] = "FindSMsb";
names[GLSLstd450FindUMSB] = "FindUMsb";
names[GLSLstd450InterpolateAtCentroid] = "InterpolateAtCentroid"; names[GLSLstd450InterpolateAtCentroid] = "InterpolateAtCentroid";
names[GLSLstd450InterpolateAtSample] = "InterpolateAtSample"; names[GLSLstd450InterpolateAtSample] = "InterpolateAtSample";
names[GLSLstd450InterpolateAtOffset] = "InterpolateAtOffset"; names[GLSLstd450InterpolateAtOffset] = "InterpolateAtOffset";

File diff suppressed because it is too large Load Diff

View File

@ -116,10 +116,9 @@ enum OpcodeClass {
enum OperandClass { enum OperandClass {
OperandNone, OperandNone,
OperandId, OperandId,
OperandOptionalId,
OperandOptionalImage,
OperandVariableIds, OperandVariableIds,
OperandOptionalLiteral, OperandOptionalLiteral,
OperandOptionalLiteralString,
OperandVariableLiterals, OperandVariableLiterals,
OperandVariableIdLiteral, OperandVariableIdLiteral,
OperandVariableLiteralId, OperandVariableLiteralId,
@ -168,18 +167,22 @@ typedef std::vector<Capability> EnumCaps;
class OperandParameters { class OperandParameters {
public: public:
OperandParameters() { } OperandParameters() { }
void push(OperandClass oc, const char* d) void push(OperandClass oc, const char* d, bool opt = false)
{ {
opClass.push_back(oc); opClass.push_back(oc);
desc.push_back(d); desc.push_back(d);
optional.push_back(opt);
} }
void setOptional();
OperandClass getClass(int op) const { return opClass[op]; } OperandClass getClass(int op) const { return opClass[op]; }
const char* getDesc(int op) const { return desc[op]; } const char* getDesc(int op) const { return desc[op]; }
bool isOptional(int op) const { return optional[op]; }
int getNum() const { return (int)opClass.size(); } int getNum() const { return (int)opClass.size(); }
protected: protected:
std::vector<OperandClass> opClass; std::vector<OperandClass> opClass;
std::vector<const char*> desc; std::vector<const char*> desc;
std::vector<bool> optional;
}; };
// Parameterize an enumerant // Parameterize an enumerant
@ -240,7 +243,7 @@ protected:
int resultPresent : 1; int resultPresent : 1;
}; };
const int OpcodeCeiling = 305; const int OpcodeCeiling = 320;
// The set of objects that hold all the instruction/operand // The set of objects that hold all the instruction/operand
// parameterization information. // parameterization information.

View File

@ -25,7 +25,6 @@
// This header is automatically generated by the same tool that creates // This header is automatically generated by the same tool that creates
// the Binary Section of the SPIR-V specification. // the Binary Section of the SPIR-V specification.
// Specification revision 31.
// Enumeration tokens for SPIR-V, in various styles: // Enumeration tokens for SPIR-V, in various styles:
// C, C++, C++11, JSON, Lua, Python // C, C++, C++11, JSON, Lua, Python
// //
@ -47,9 +46,12 @@ namespace spv {
typedef unsigned int Id; typedef unsigned int Id;
#define SPV_VERSION 10000
#define SPV_REVISION 2
static const unsigned int MagicNumber = 0x07230203; static const unsigned int MagicNumber = 0x07230203;
static const unsigned int Version = 99; static const unsigned int Version = 0x00010000;
static const unsigned int Revision = 31; static const unsigned int Revision = 2;
static const unsigned int OpCodeMask = 0xffff; static const unsigned int OpCodeMask = 0xffff;
static const unsigned int WordCountShift = 16; static const unsigned int WordCountShift = 16;
@ -57,7 +59,8 @@ enum SourceLanguage {
SourceLanguageUnknown = 0, SourceLanguageUnknown = 0,
SourceLanguageESSL = 1, SourceLanguageESSL = 1,
SourceLanguageGLSL = 2, SourceLanguageGLSL = 2,
SourceLanguageOpenCL = 3, SourceLanguageOpenCL_C = 3,
SourceLanguageOpenCL_CPP = 4,
}; };
enum ExecutionModel { enum ExecutionModel {
@ -96,7 +99,6 @@ enum ExecutionMode {
ExecutionModePointMode = 10, ExecutionModePointMode = 10,
ExecutionModeXfb = 11, ExecutionModeXfb = 11,
ExecutionModeDepthReplacing = 12, ExecutionModeDepthReplacing = 12,
ExecutionModeDepthAny = 13,
ExecutionModeDepthGreater = 14, ExecutionModeDepthGreater = 14,
ExecutionModeDepthLess = 15, ExecutionModeDepthLess = 15,
ExecutionModeDepthUnchanged = 16, ExecutionModeDepthUnchanged = 16,
@ -105,10 +107,10 @@ enum ExecutionMode {
ExecutionModeInputPoints = 19, ExecutionModeInputPoints = 19,
ExecutionModeInputLines = 20, ExecutionModeInputLines = 20,
ExecutionModeInputLinesAdjacency = 21, ExecutionModeInputLinesAdjacency = 21,
ExecutionModeInputTriangles = 22, ExecutionModeTriangles = 22,
ExecutionModeInputTrianglesAdjacency = 23, ExecutionModeInputTrianglesAdjacency = 23,
ExecutionModeInputQuads = 24, ExecutionModeQuads = 24,
ExecutionModeInputIsolines = 25, ExecutionModeIsolines = 25,
ExecutionModeOutputVertices = 26, ExecutionModeOutputVertices = 26,
ExecutionModeOutputPoints = 27, ExecutionModeOutputPoints = 27,
ExecutionModeOutputLineStrip = 28, ExecutionModeOutputLineStrip = 28,
@ -122,11 +124,12 @@ enum StorageClass {
StorageClassInput = 1, StorageClassInput = 1,
StorageClassUniform = 2, StorageClassUniform = 2,
StorageClassOutput = 3, StorageClassOutput = 3,
StorageClassWorkgroupLocal = 4, StorageClassWorkgroup = 4,
StorageClassWorkgroupGlobal = 5, StorageClassCrossWorkgroup = 5,
StorageClassPrivateGlobal = 6, StorageClassPrivate = 6,
StorageClassFunction = 7, StorageClassFunction = 7,
StorageClassGeneric = 8, StorageClassGeneric = 8,
StorageClassPushConstant = 9,
StorageClassAtomicCounter = 10, StorageClassAtomicCounter = 10,
StorageClassImage = 11, StorageClassImage = 11,
}; };
@ -138,6 +141,7 @@ enum Dim {
DimCube = 3, DimCube = 3,
DimRect = 4, DimRect = 4,
DimBuffer = 5, DimBuffer = 5,
DimSubpassData = 6,
}; };
enum SamplerAddressingMode { enum SamplerAddressingMode {
@ -235,6 +239,7 @@ enum ImageChannelDataType {
ImageChannelDataTypeHalfFloat = 13, ImageChannelDataTypeHalfFloat = 13,
ImageChannelDataTypeFloat = 14, ImageChannelDataTypeFloat = 14,
ImageChannelDataTypeUnormInt24 = 15, ImageChannelDataTypeUnormInt24 = 15,
ImageChannelDataTypeUnormInt101010_2 = 16,
}; };
enum ImageOperandsShift { enum ImageOperandsShift {
@ -245,6 +250,7 @@ enum ImageOperandsShift {
ImageOperandsOffsetShift = 4, ImageOperandsOffsetShift = 4,
ImageOperandsConstOffsetsShift = 5, ImageOperandsConstOffsetsShift = 5,
ImageOperandsSampleShift = 6, ImageOperandsSampleShift = 6,
ImageOperandsMinLodShift = 7,
}; };
enum ImageOperandsMask { enum ImageOperandsMask {
@ -256,6 +262,7 @@ enum ImageOperandsMask {
ImageOperandsOffsetMask = 0x00000010, ImageOperandsOffsetMask = 0x00000010,
ImageOperandsConstOffsetsMask = 0x00000020, ImageOperandsConstOffsetsMask = 0x00000020,
ImageOperandsSampleMask = 0x00000040, ImageOperandsSampleMask = 0x00000040,
ImageOperandsMinLodMask = 0x00000080,
}; };
enum FPFastMathModeShift { enum FPFastMathModeShift {
@ -317,8 +324,7 @@ enum Decoration {
DecorationGLSLPacked = 9, DecorationGLSLPacked = 9,
DecorationCPacked = 10, DecorationCPacked = 10,
DecorationBuiltIn = 11, DecorationBuiltIn = 11,
DecorationSmooth = 12, DecorationNoPerspective = 13,
DecorationNoperspective = 13,
DecorationFlat = 14, DecorationFlat = 14,
DecorationPatch = 15, DecorationPatch = 15,
DecorationCentroid = 16, DecorationCentroid = 16,
@ -329,10 +335,9 @@ enum Decoration {
DecorationVolatile = 21, DecorationVolatile = 21,
DecorationConstant = 22, DecorationConstant = 22,
DecorationCoherent = 23, DecorationCoherent = 23,
DecorationNonwritable = 24, DecorationNonWritable = 24,
DecorationNonreadable = 25, DecorationNonReadable = 25,
DecorationUniform = 26, DecorationUniform = 26,
DecorationNoStaticUse = 27,
DecorationSaturatedConversion = 28, DecorationSaturatedConversion = 28,
DecorationStream = 29, DecorationStream = 29,
DecorationLocation = 30, DecorationLocation = 30,
@ -347,6 +352,9 @@ enum Decoration {
DecorationFPRoundingMode = 39, DecorationFPRoundingMode = 39,
DecorationFPFastMathMode = 40, DecorationFPFastMathMode = 40,
DecorationLinkageAttributes = 41, DecorationLinkageAttributes = 41,
DecorationNoContraction = 42,
DecorationInputAttachmentIndex = 43,
DecorationAlignment = 44,
}; };
enum BuiltIn { enum BuiltIn {
@ -370,7 +378,6 @@ enum BuiltIn {
BuiltInSampleId = 18, BuiltInSampleId = 18,
BuiltInSamplePosition = 19, BuiltInSamplePosition = 19,
BuiltInSampleMask = 20, BuiltInSampleMask = 20,
BuiltInFragColor = 21,
BuiltInFragDepth = 22, BuiltInFragDepth = 22,
BuiltInHelperInvocation = 23, BuiltInHelperInvocation = 23,
BuiltInNumWorkgroups = 24, BuiltInNumWorkgroups = 24,
@ -384,13 +391,14 @@ enum BuiltIn {
BuiltInEnqueuedWorkgroupSize = 32, BuiltInEnqueuedWorkgroupSize = 32,
BuiltInGlobalOffset = 33, BuiltInGlobalOffset = 33,
BuiltInGlobalLinearId = 34, BuiltInGlobalLinearId = 34,
BuiltInWorkgroupLinearId = 35,
BuiltInSubgroupSize = 36, BuiltInSubgroupSize = 36,
BuiltInSubgroupMaxSize = 37, BuiltInSubgroupMaxSize = 37,
BuiltInNumSubgroups = 38, BuiltInNumSubgroups = 38,
BuiltInNumEnqueuedSubgroups = 39, BuiltInNumEnqueuedSubgroups = 39,
BuiltInSubgroupId = 40, BuiltInSubgroupId = 40,
BuiltInSubgroupLocalInvocationId = 41, BuiltInSubgroupLocalInvocationId = 41,
BuiltInVertexIndex = 42,
BuiltInInstanceIndex = 43,
}; };
enum SelectionControlShift { enum SelectionControlShift {
@ -431,41 +439,43 @@ enum FunctionControlMask {
}; };
enum MemorySemanticsShift { enum MemorySemanticsShift {
MemorySemanticsRelaxedShift = 0, MemorySemanticsAcquireShift = 1,
MemorySemanticsSequentiallyConsistentShift = 1, MemorySemanticsReleaseShift = 2,
MemorySemanticsAcquireShift = 2, MemorySemanticsAcquireReleaseShift = 3,
MemorySemanticsReleaseShift = 3, MemorySemanticsSequentiallyConsistentShift = 4,
MemorySemanticsUniformMemoryShift = 4, MemorySemanticsUniformMemoryShift = 6,
MemorySemanticsSubgroupMemoryShift = 5, MemorySemanticsSubgroupMemoryShift = 7,
MemorySemanticsWorkgroupLocalMemoryShift = 6, MemorySemanticsWorkgroupMemoryShift = 8,
MemorySemanticsWorkgroupGlobalMemoryShift = 7, MemorySemanticsCrossWorkgroupMemoryShift = 9,
MemorySemanticsAtomicCounterMemoryShift = 8, MemorySemanticsAtomicCounterMemoryShift = 10,
MemorySemanticsImageMemoryShift = 9, MemorySemanticsImageMemoryShift = 11,
}; };
enum MemorySemanticsMask { enum MemorySemanticsMask {
MemorySemanticsMaskNone = 0, MemorySemanticsMaskNone = 0,
MemorySemanticsRelaxedMask = 0x00000001, MemorySemanticsAcquireMask = 0x00000002,
MemorySemanticsSequentiallyConsistentMask = 0x00000002, MemorySemanticsReleaseMask = 0x00000004,
MemorySemanticsAcquireMask = 0x00000004, MemorySemanticsAcquireReleaseMask = 0x00000008,
MemorySemanticsReleaseMask = 0x00000008, MemorySemanticsSequentiallyConsistentMask = 0x00000010,
MemorySemanticsUniformMemoryMask = 0x00000010, MemorySemanticsUniformMemoryMask = 0x00000040,
MemorySemanticsSubgroupMemoryMask = 0x00000020, MemorySemanticsSubgroupMemoryMask = 0x00000080,
MemorySemanticsWorkgroupLocalMemoryMask = 0x00000040, MemorySemanticsWorkgroupMemoryMask = 0x00000100,
MemorySemanticsWorkgroupGlobalMemoryMask = 0x00000080, MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200,
MemorySemanticsAtomicCounterMemoryMask = 0x00000100, MemorySemanticsAtomicCounterMemoryMask = 0x00000400,
MemorySemanticsImageMemoryMask = 0x00000200, MemorySemanticsImageMemoryMask = 0x00000800,
}; };
enum MemoryAccessShift { enum MemoryAccessShift {
MemoryAccessVolatileShift = 0, MemoryAccessVolatileShift = 0,
MemoryAccessAlignedShift = 1, MemoryAccessAlignedShift = 1,
MemoryAccessNontemporalShift = 2,
}; };
enum MemoryAccessMask { enum MemoryAccessMask {
MemoryAccessMaskNone = 0, MemoryAccessMaskNone = 0,
MemoryAccessVolatileMask = 0x00000001, MemoryAccessVolatileMask = 0x00000001,
MemoryAccessAlignedMask = 0x00000002, MemoryAccessAlignedMask = 0x00000002,
MemoryAccessNontemporalMask = 0x00000004,
}; };
enum Scope { enum Scope {
@ -514,7 +524,6 @@ enum Capability {
CapabilityImageBasic = 13, CapabilityImageBasic = 13,
CapabilityImageReadWrite = 14, CapabilityImageReadWrite = 14,
CapabilityImageMipmap = 15, CapabilityImageMipmap = 15,
CapabilityImageSRGBWrite = 16,
CapabilityPipes = 17, CapabilityPipes = 17,
CapabilityGroups = 18, CapabilityGroups = 18,
CapabilityDeviceEnqueue = 19, CapabilityDeviceEnqueue = 19,
@ -524,7 +533,6 @@ enum Capability {
CapabilityTessellationPointSize = 23, CapabilityTessellationPointSize = 23,
CapabilityGeometryPointSize = 24, CapabilityGeometryPointSize = 24,
CapabilityImageGatherExtended = 25, CapabilityImageGatherExtended = 25,
CapabilityStorageImageExtendedFormats = 26,
CapabilityStorageImageMultisample = 27, CapabilityStorageImageMultisample = 27,
CapabilityUniformBufferArrayDynamicIndexing = 28, CapabilityUniformBufferArrayDynamicIndexing = 28,
CapabilitySampledImageArrayDynamicIndexing = 29, CapabilitySampledImageArrayDynamicIndexing = 29,
@ -534,11 +542,33 @@ enum Capability {
CapabilityCullDistance = 33, CapabilityCullDistance = 33,
CapabilityImageCubeArray = 34, CapabilityImageCubeArray = 34,
CapabilitySampleRateShading = 35, CapabilitySampleRateShading = 35,
CapabilityImageRect = 36,
CapabilitySampledRect = 37,
CapabilityGenericPointer = 38,
CapabilityInt8 = 39,
CapabilityInputAttachment = 40,
CapabilitySparseResidency = 41,
CapabilityMinLod = 42,
CapabilitySampled1D = 43,
CapabilityImage1D = 44,
CapabilitySampledCubeArray = 45,
CapabilitySampledBuffer = 46,
CapabilityImageBuffer = 47,
CapabilityImageMSArray = 48,
CapabilityStorageImageExtendedFormats = 49,
CapabilityImageQuery = 50,
CapabilityDerivativeControl = 51,
CapabilityInterpolationFunction = 52,
CapabilityTransformFeedback = 53,
CapabilityGeometryStreams = 54,
CapabilityStorageImageReadWithoutFormat = 55,
CapabilityStorageImageWriteWithoutFormat = 56,
}; };
enum Op { enum Op {
OpNop = 0, OpNop = 0,
OpUndef = 1, OpUndef = 1,
OpSourceContinued = 2,
OpSource = 3, OpSource = 3,
OpSourceExtension = 4, OpSourceExtension = 4,
OpName = 5, OpName = 5,
@ -572,6 +602,7 @@ enum Op {
OpTypeReserveId = 36, OpTypeReserveId = 36,
OpTypeQueue = 37, OpTypeQueue = 37,
OpTypePipe = 38, OpTypePipe = 38,
OpTypeForwardPointer = 39,
OpConstantTrue = 41, OpConstantTrue = 41,
OpConstantFalse = 42, OpConstantFalse = 42,
OpConstant = 43, OpConstant = 43,
@ -598,6 +629,7 @@ enum Op {
OpPtrAccessChain = 67, OpPtrAccessChain = 67,
OpArrayLength = 68, OpArrayLength = 68,
OpGenericPtrMemSemantics = 69, OpGenericPtrMemSemantics = 69,
OpInBoundsPtrAccessChain = 70,
OpDecorate = 71, OpDecorate = 71,
OpMemberDecorate = 72, OpMemberDecorate = 72,
OpDecorationGroup = 73, OpDecorationGroup = 73,
@ -625,7 +657,7 @@ enum Op {
OpImageDrefGather = 97, OpImageDrefGather = 97,
OpImageRead = 98, OpImageRead = 98,
OpImageWrite = 99, OpImageWrite = 99,
OpImageQueryDim = 100, OpImage = 100,
OpImageQueryFormat = 101, OpImageQueryFormat = 101,
OpImageQueryOrder = 102, OpImageQueryOrder = 102,
OpImageQuerySizeLod = 103, OpImageQuerySizeLod = 103,
@ -674,7 +706,8 @@ enum Op {
OpDot = 148, OpDot = 148,
OpIAddCarry = 149, OpIAddCarry = 149,
OpISubBorrow = 150, OpISubBorrow = 150,
OpIMulExtended = 151, OpUMulExtended = 151,
OpSMulExtended = 152,
OpAny = 154, OpAny = 154,
OpAll = 155, OpAll = 155,
OpIsNan = 156, OpIsNan = 156,
@ -769,8 +802,8 @@ enum Op {
OpUnreachable = 255, OpUnreachable = 255,
OpLifetimeStart = 256, OpLifetimeStart = 256,
OpLifetimeStop = 257, OpLifetimeStop = 257,
OpAsyncGroupCopy = 259, OpGroupAsyncCopy = 259,
OpWaitGroupEvents = 260, OpGroupWaitEvents = 260,
OpGroupAll = 261, OpGroupAll = 261,
OpGroupAny = 262, OpGroupAny = 262,
OpGroupBroadcast = 263, OpGroupBroadcast = 263,
@ -811,6 +844,21 @@ enum Op {
OpCaptureEventProfilingInfo = 302, OpCaptureEventProfilingInfo = 302,
OpGetDefaultQueue = 303, OpGetDefaultQueue = 303,
OpBuildNDRange = 304, OpBuildNDRange = 304,
OpImageSparseSampleImplicitLod = 305,
OpImageSparseSampleExplicitLod = 306,
OpImageSparseSampleDrefImplicitLod = 307,
OpImageSparseSampleDrefExplicitLod = 308,
OpImageSparseSampleProjImplicitLod = 309,
OpImageSparseSampleProjExplicitLod = 310,
OpImageSparseSampleProjDrefImplicitLod = 311,
OpImageSparseSampleProjDrefExplicitLod = 312,
OpImageSparseFetch = 313,
OpImageSparseGather = 314,
OpImageSparseDrefGather = 315,
OpImageSparseTexelsResident = 316,
OpNoLine = 317,
OpAtomicFlagTestAndSet = 318,
OpAtomicFlagClear = 319,
}; };
// Overload operator| for mask bit combining // Overload operator| for mask bit combining

View File

@ -74,18 +74,14 @@ const MemorySemanticsMask MemorySemanticsAllMemory = (MemorySemanticsMask)0x3FF;
class Instruction { class Instruction {
public: public:
Instruction(Id resultId, Id typeId, Op opCode) : resultId(resultId), typeId(typeId), opCode(opCode), string(0) { } Instruction(Id resultId, Id typeId, Op opCode) : resultId(resultId), typeId(typeId), opCode(opCode) { }
explicit Instruction(Op opCode) : resultId(NoResult), typeId(NoType), opCode(opCode), string(0) { } explicit Instruction(Op opCode) : resultId(NoResult), typeId(NoType), opCode(opCode) { }
virtual ~Instruction() virtual ~Instruction() {}
{
delete string;
}
void addIdOperand(Id id) { operands.push_back(id); } void addIdOperand(Id id) { operands.push_back(id); }
void addImmediateOperand(unsigned int immediate) { operands.push_back(immediate); } void addImmediateOperand(unsigned int immediate) { operands.push_back(immediate); }
void addStringOperand(const char* str) void addStringOperand(const char* str)
{ {
originalString = str; originalString = str;
string = new std::vector<unsigned int>;
unsigned int word; unsigned int word;
char* wordString = (char*)&word; char* wordString = (char*)&word;
char* wordPtr = wordString; char* wordPtr = wordString;
@ -96,7 +92,7 @@ public:
*(wordPtr++) = c; *(wordPtr++) = c;
++charCount; ++charCount;
if (charCount == 4) { if (charCount == 4) {
string->push_back(word); addImmediateOperand(word);
wordPtr = wordString; wordPtr = wordString;
charCount = 0; charCount = 0;
} }
@ -107,7 +103,7 @@ public:
// pad with 0s // pad with 0s
for (; charCount < 4; ++charCount) for (; charCount < 4; ++charCount)
*(wordPtr++) = 0; *(wordPtr++) = 0;
string->push_back(word); addImmediateOperand(word);
} }
} }
Op getOpCode() const { return opCode; } Op getOpCode() const { return opCode; }
@ -128,8 +124,6 @@ public:
if (resultId) if (resultId)
++wordCount; ++wordCount;
wordCount += (unsigned int)operands.size(); wordCount += (unsigned int)operands.size();
if (string)
wordCount += (unsigned int)string->size();
// Write out the beginning of the instruction // Write out the beginning of the instruction
out.push_back(((wordCount) << WordCountShift) | opCode); out.push_back(((wordCount) << WordCountShift) | opCode);
@ -141,9 +135,6 @@ public:
// Write out the operands // Write out the operands
for (int op = 0; op < (int)operands.size(); ++op) for (int op = 0; op < (int)operands.size(); ++op)
out.push_back(operands[op]); out.push_back(operands[op]);
if (string)
for (int op = 0; op < (int)string->size(); ++op)
out.push_back((*string)[op]);
} }
protected: protected:
@ -152,7 +143,6 @@ protected:
Id typeId; Id typeId;
Op opCode; Op opCode;
std::vector<Id> operands; std::vector<Id> operands;
std::vector<unsigned int>* string; // usually non-existent
std::string originalString; // could be optimized away; convenience for getting string operand std::string originalString; // could be optimized away; convenience for getting string operand
}; };

View File

@ -788,6 +788,7 @@ int C_DECL main(int argc, char* argv[])
glslang::GetSpirvVersion(spirvVersion); glslang::GetSpirvVersion(spirvVersion);
printf("SPIR-V Version %s\n", spirvVersion.c_str()); printf("SPIR-V Version %s\n", spirvVersion.c_str());
printf("GLSL.std.450 Version %d, Revision %d\n", GLSLstd450Version, GLSLstd450Revision); printf("GLSL.std.450 Version %d, Revision %d\n", GLSLstd450Version, GLSLstd450Revision);
printf("Khronos Tool ID %d\n", glslang::GetKhronosToolId());
if (Worklist.empty()) if (Worklist.empty())
return ESuccess; return ESuccess;
} }

View File

@ -3,16 +3,16 @@ spv.100ops.frag
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 47 // Id's are bound by 47
Source ESSL 100
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main"
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source ESSL 100
Name 4 "main" Name 4 "main"
Name 8 "foo(" Name 8 "foo("
Name 11 "face1" Name 11 "face1"
@ -27,15 +27,14 @@ Linked fragment stage:
Decorate 21(low) RelaxedPrecision Decorate 21(low) RelaxedPrecision
Decorate 26(high) RelaxedPrecision Decorate 26(high) RelaxedPrecision
Decorate 36(gl_FragColor) RelaxedPrecision Decorate 36(gl_FragColor) RelaxedPrecision
Decorate 36(gl_FragColor) BuiltIn FragColor
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
7: TypeFunction 6(float) 7: TypeFunction 6(float)
10: TypePointer PrivateGlobal 6(float) 10: TypePointer Private 6(float)
11(face1): 10(ptr) Variable PrivateGlobal 11(face1): 10(ptr) Variable Private
12: 6(float) Constant 1093664768 12: 6(float) Constant 1093664768
13(face2): 10(ptr) Variable PrivateGlobal 13(face2): 10(ptr) Variable Private
14: 6(float) Constant 3221225472 14: 6(float) Constant 3221225472
15: TypeInt 32 1 15: TypeInt 32 1
16: TypePointer Function 15(int) 16: TypePointer Function 15(int)

View File

@ -5,4 +5,301 @@ WARNING: 0:34: '#extension' : extension is only partially supported: GL_ARB_gpu_
Linked fragment stage: Linked fragment stage:
Missing functionality: texture gather // Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 212
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 78 17 68 98 182 183 184 185 185 171
ExecutionMode 4 OriginLowerLeft
Source GLSL 130
SourceExtension "GL_ARB_gpu_shader5"
SourceExtension "GL_ARB_shader_texture_lod"
SourceExtension "GL_ARB_shading_language_420pack"
SourceExtension "GL_ARB_texture_cube_map_array"
SourceExtension "GL_ARB_texture_gather"
SourceExtension "GL_ARB_texture_rectangle"
Name 4 "main"
Name 6 "bar3("
Name 8 "bar4("
Name 10 "bar5("
Name 12 "bar6("
Name 17 "o"
Name 21 "samp2D"
Name 37 "samp2DA"
Name 47 "samp2DR"
Name 55 "samp2DS"
Name 68 "io"
Name 72 "Sca"
Name 78 "i"
Name 86 "Isca"
Name 98 "uo"
Name 102 "Usca"
Name 113 "a"
Name 117 "Scas"
Name 122 "f"
Name 131 "c"
Name 152 "a1"
Name 155 "m43"
Name 158 "b"
Name 165 "sampC"
Name 171 "gl_ClipDistance"
Name 181 "b"
Name 182 "fflat"
Name 183 "fsmooth"
Name 184 "fnop"
Name 185 "gl_Color"
Name 192 "bounds"
Name 193 "s2D"
Name 194 "s2DR"
Name 198 "s2DRS"
Name 202 "s1D"
Name 203 "s2DS"
Name 205 "f"
Name 207 "v2"
Name 209 "v3"
Name 211 "v4"
Decorate 171(gl_ClipDistance) BuiltIn ClipDistance
Decorate 182(fflat) Flat
Decorate 184(fnop) NoPerspective
Decorate 192(bounds) Binding 0
2: TypeVoid
3: TypeFunction 2
14: TypeFloat 32
15: TypeVector 14(float) 4
16: TypePointer Output 15(fvec4)
17(o): 16(ptr) Variable Output
18: TypeImage 14(float) 2D sampled format:Unknown
19: TypeSampledImage 18
20: TypePointer UniformConstant 19
21(samp2D): 20(ptr) Variable UniformConstant
23: TypeVector 14(float) 2
24: 14(float) Constant 1050253722
25: 23(fvec2) ConstantComposite 24 24
26: TypeInt 32 1
27: TypeVector 26(int) 2
28: 26(int) Constant 1
29: 27(ivec2) ConstantComposite 28 28
30: 26(int) Constant 0
34: TypeImage 14(float) 2D array sampled format:Unknown
35: TypeSampledImage 34
36: TypePointer UniformConstant 35
37(samp2DA): 36(ptr) Variable UniformConstant
39: TypeVector 14(float) 3
40: 39(fvec3) ConstantComposite 24 24 24
44: TypeImage 14(float) Rect sampled format:Unknown
45: TypeSampledImage 44
46: TypePointer UniformConstant 45
47(samp2DR): 46(ptr) Variable UniformConstant
52: TypeImage 14(float) 2D depth sampled format:Unknown
53: TypeSampledImage 52
54: TypePointer UniformConstant 53
55(samp2DS): 54(ptr) Variable UniformConstant
57: 14(float) Constant 1067869798
62: 26(int) Constant 2
66: TypeVector 26(int) 3
67: TypePointer Output 66(ivec3)
68(io): 67(ptr) Variable Output
69: TypeImage 14(float) Cube array sampled format:Unknown
70: TypeSampledImage 69
71: TypePointer UniformConstant 70
72(Sca): 71(ptr) Variable UniformConstant
74: 26(int) Constant 3
77: TypePointer Input 15(fvec4)
78(i): 77(ptr) Variable Input
83: TypeImage 26(int) Cube array sampled format:Unknown
84: TypeSampledImage 83
85: TypePointer UniformConstant 84
86(Isca): 85(ptr) Variable UniformConstant
89: 14(float) Constant 1060320051
90: TypeVector 26(int) 4
95: TypeInt 32 0
96: TypeVector 95(int) 4
97: TypePointer Output 96(ivec4)
98(uo): 97(ptr) Variable Output
99: TypeImage 95(int) Cube array sampled format:Unknown
100: TypeSampledImage 99
101: TypePointer UniformConstant 100
102(Usca): 101(ptr) Variable UniformConstant
108: 14(float) Constant 1071225242
112: TypePointer Private 39(fvec3)
113(a): 112(ptr) Variable Private
114: TypeImage 14(float) Cube depth array sampled format:Unknown
115: TypeSampledImage 114
116: TypePointer UniformConstant 115
117(Scas): 116(ptr) Variable UniformConstant
121: TypePointer Function 14(float)
125: 95(int) Constant 1
126: TypePointer Input 14(float)
130: TypePointer Function 90(ivec4)
134: 14(float) Constant 1036831949
135: 39(fvec3) ConstantComposite 134 134 134
136: 14(float) Constant 1045220557
137: 39(fvec3) ConstantComposite 136 136 136
153: TypeMatrix 39(fvec3) 4
154: TypePointer Function 153
159: 14(float) Constant 1073741824
162: TypeImage 14(float) Cube sampled format:Unknown
163: TypeSampledImage 162
164: TypePointer UniformConstant 163
165(sampC): 164(ptr) Variable UniformConstant
168: 95(int) Constant 4
169: TypeArray 14(float) 168
170: TypePointer Input 169
171(gl_ClipDistance): 170(ptr) Variable Input
174: TypePointer Output 14(float)
180: TypePointer Private 14(float)
181(b): 180(ptr) Variable Private
182(fflat): 126(ptr) Variable Input
183(fsmooth): 126(ptr) Variable Input
184(fnop): 126(ptr) Variable Input
185(gl_Color): 77(ptr) Variable Input
186: 95(int) Constant 3
187: TypeArray 26(int) 186
188: 26(int) Constant 10
189: 26(int) Constant 23
190: 26(int) Constant 32
191: 187 ConstantComposite 188 189 190
192(bounds): 20(ptr) Variable UniformConstant
193(s2D): 20(ptr) Variable UniformConstant
194(s2DR): 46(ptr) Variable UniformConstant
195: TypeImage 14(float) Rect depth sampled format:Unknown
196: TypeSampledImage 195
197: TypePointer UniformConstant 196
198(s2DRS): 197(ptr) Variable UniformConstant
199: TypeImage 14(float) 1D sampled format:Unknown
200: TypeSampledImage 199
201: TypePointer UniformConstant 200
202(s1D): 201(ptr) Variable UniformConstant
203(s2DS): 54(ptr) Variable UniformConstant
204: TypePointer UniformConstant 14(float)
205(f): 204(ptr) Variable UniformConstant
206: TypePointer UniformConstant 23(fvec2)
207(v2): 206(ptr) Variable UniformConstant
208: TypePointer UniformConstant 39(fvec3)
209(v3): 208(ptr) Variable UniformConstant
210: TypePointer UniformConstant 15(fvec4)
211(v4): 210(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
166: 163 Load 165(sampC)
167: 15(fvec4) ImageGather 166 137 30
Store 17(o) 167
172: 126(ptr) AccessChain 171(gl_ClipDistance) 74
173: 14(float) Load 172
175: 174(ptr) AccessChain 17(o) 125
Store 175 173
176: 2 FunctionCall 6(bar3()
177: 2 FunctionCall 8(bar4()
178: 2 FunctionCall 10(bar5()
179: 2 FunctionCall 12(bar6()
Return
FunctionEnd
6(bar3(): 2 Function None 3
7: Label
22: 19 Load 21(samp2D)
31: 15(fvec4) ImageGather 22 25 30 ConstOffset 29
32: 15(fvec4) Load 17(o)
33: 15(fvec4) FAdd 32 31
Store 17(o) 33
38: 35 Load 37(samp2DA)
41: 15(fvec4) ImageGather 38 40 30 ConstOffset 29
42: 15(fvec4) Load 17(o)
43: 15(fvec4) FAdd 42 41
Store 17(o) 43
Return
FunctionEnd
8(bar4(): 2 Function None 3
9: Label
48: 45 Load 47(samp2DR)
49: 15(fvec4) ImageGather 48 25 30 ConstOffset 29
50: 15(fvec4) Load 17(o)
51: 15(fvec4) FAdd 50 49
Store 17(o) 51
56: 53 Load 55(samp2DS)
58: 15(fvec4) ImageDrefGather 56 25 57 ConstOffset 29
59: 15(fvec4) Load 17(o)
60: 15(fvec4) FAdd 59 58
Store 17(o) 60
61: 19 Load 21(samp2D)
63: 15(fvec4) ImageGather 61 25 62 ConstOffset 29
64: 15(fvec4) Load 17(o)
65: 15(fvec4) FAdd 64 63
Store 17(o) 65
Return
FunctionEnd
10(bar5(): 2 Function None 3
11: Label
122(f): 121(ptr) Variable Function
131(c): 130(ptr) Variable Function
73: 70 Load 72(Sca)
75: 66(ivec3) ImageQuerySizeLod 73 74
Store 68(io) 75
76: 70 Load 72(Sca)
79: 15(fvec4) Load 78(i)
80: 15(fvec4) ImageSampleImplicitLod 76 79
81: 15(fvec4) Load 17(o)
82: 15(fvec4) FAdd 81 80
Store 17(o) 82
87: 84 Load 86(Isca)
88: 15(fvec4) Load 78(i)
91: 90(ivec4) ImageSampleImplicitLod 87 88 Bias 89
92: 66(ivec3) VectorShuffle 91 91 0 1 2
93: 66(ivec3) Load 68(io)
94: 66(ivec3) IAdd 93 92
Store 68(io) 94
103: 100 Load 102(Usca)
104: 15(fvec4) Load 78(i)
105: 96(ivec4) ImageSampleImplicitLod 103 104
Store 98(uo) 105
106: 70 Load 72(Sca)
107: 15(fvec4) Load 78(i)
109: 15(fvec4) ImageSampleExplicitLod 106 107 Lod 108
110: 15(fvec4) Load 17(o)
111: 15(fvec4) FAdd 110 109
Store 17(o) 111
118: 115 Load 117(Scas)
119: 66(ivec3) ImageQuerySizeLod 118 74
120: 39(fvec3) ConvertSToF 119
Store 113(a) 120
123: 115 Load 117(Scas)
124: 15(fvec4) Load 78(i)
127: 126(ptr) AccessChain 78(i) 125
128: 14(float) Load 127
129: 14(float) ImageSampleDrefImplicitLod 123 124 128 Bias 128
Store 122(f) 129
132: 84 Load 86(Isca)
133: 15(fvec4) Load 78(i)
138: 90(ivec4) ImageSampleExplicitLod 132 133 Grad 135 137
Store 131(c) 138
139: 39(fvec3) Load 113(a)
140: 14(float) Load 122(f)
141: 90(ivec4) Load 131(c)
142: 15(fvec4) ConvertSToF 141
143: 15(fvec4) CompositeConstruct 140 140 140 140
144: 15(fvec4) FAdd 143 142
145: 14(float) CompositeExtract 139 0
146: 14(float) CompositeExtract 139 1
147: 14(float) CompositeExtract 139 2
148: 14(float) CompositeExtract 144 0
149: 15(fvec4) CompositeConstruct 145 146 147 148
150: 15(fvec4) Load 17(o)
151: 15(fvec4) FAdd 150 149
Store 17(o) 151
Return
FunctionEnd
12(bar6(): 2 Function None 3
13: Label
152(a1): 121(ptr) Variable Function
155(m43): 154(ptr) Variable Function
158(b): 121(ptr) Variable Function
156: 121(ptr) AccessChain 155(m43) 74 125
157: 14(float) Load 156
Store 152(a1) 157
160: 14(float) Load 152(a1)
161: 14(float) FMul 159 160
Store 158(b) 161
Return
FunctionEnd

View File

@ -3,16 +3,16 @@ spv.140.frag
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 92 // Id's are bound by 97
Source GLSL 140
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 43 28 33 33
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 140
Name 4 "main" Name 4 "main"
Name 8 "foo(" Name 8 "foo("
Name 11 "i1" Name 11 "i1"
@ -20,54 +20,56 @@ Linked fragment stage:
Name 24 "i2" Name 24 "i2"
Name 28 "o" Name 28 "o"
Name 33 "gl_ClipDistance" Name 33 "gl_ClipDistance"
Name 42 "k" Name 43 "k"
Name 54 "sampR" Name 55 "sampR"
Name 61 "sampB" Name 62 "sampB"
Name 85 "samp2Da" Name 84 "samp2Da"
Name 89 "bn" Name 88 "bn"
MemberName 89(bn) 0 "matra" MemberName 88(bn) 0 "matra"
MemberName 89(bn) 1 "matca" MemberName 88(bn) 1 "matca"
MemberName 89(bn) 2 "matr" MemberName 88(bn) 2 "matr"
MemberName 89(bn) 3 "matc" MemberName 88(bn) 3 "matc"
MemberName 89(bn) 4 "matrdef" MemberName 88(bn) 4 "matrdef"
Name 91 "" Name 90 ""
Name 93 "bi"
MemberName 93(bi) 0 "v"
Name 96 "bname"
Decorate 16(gl_FrontFacing) BuiltIn FrontFacing Decorate 16(gl_FrontFacing) BuiltIn FrontFacing
Decorate 33(gl_ClipDistance) Smooth
Decorate 33(gl_ClipDistance) BuiltIn ClipDistance Decorate 33(gl_ClipDistance) BuiltIn ClipDistance
Decorate 42(k) Smooth Decorate 87 ArrayStride 64
Decorate 85(samp2Da) NoStaticUse Decorate 87 ArrayStride 64
Decorate 88 ArrayStride 64 MemberDecorate 88(bn) 0 RowMajor
Decorate 88 ArrayStride 64 MemberDecorate 88(bn) 0 Offset 0
MemberDecorate 89(bn) 0 RowMajor MemberDecorate 88(bn) 0 MatrixStride 16
MemberDecorate 89(bn) 0 Offset 0 MemberDecorate 88(bn) 1 ColMajor
MemberDecorate 89(bn) 0 MatrixStride 16 MemberDecorate 88(bn) 1 Offset 256
MemberDecorate 89(bn) 1 ColMajor MemberDecorate 88(bn) 1 MatrixStride 16
MemberDecorate 89(bn) 1 Offset 256 MemberDecorate 88(bn) 2 RowMajor
MemberDecorate 89(bn) 1 MatrixStride 16 MemberDecorate 88(bn) 2 Offset 512
MemberDecorate 89(bn) 2 RowMajor MemberDecorate 88(bn) 2 MatrixStride 16
MemberDecorate 89(bn) 2 Offset 512 MemberDecorate 88(bn) 3 ColMajor
MemberDecorate 89(bn) 2 MatrixStride 16 MemberDecorate 88(bn) 3 Offset 576
MemberDecorate 89(bn) 3 ColMajor MemberDecorate 88(bn) 3 MatrixStride 16
MemberDecorate 89(bn) 3 Offset 576 MemberDecorate 88(bn) 4 RowMajor
MemberDecorate 89(bn) 3 MatrixStride 16 MemberDecorate 88(bn) 4 Offset 640
MemberDecorate 89(bn) 4 RowMajor MemberDecorate 88(bn) 4 MatrixStride 16
MemberDecorate 89(bn) 4 Offset 640 Decorate 88(bn) Block
MemberDecorate 89(bn) 4 MatrixStride 16 Decorate 92 ArrayStride 12
Decorate 89(bn) Block MemberDecorate 93(bi) 0 Offset 0
Decorate 91 NoStaticUse Decorate 93(bi) Block
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
7: TypeFunction 6(float) 7: TypeFunction 6(float)
10: TypePointer PrivateGlobal 6(float) 10: TypePointer Private 6(float)
11(i1): 10(ptr) Variable PrivateGlobal 11(i1): 10(ptr) Variable Private
12: TypePointer Function 6(float) 12: TypePointer Function 6(float)
14: TypeBool 14: TypeBool
15: TypePointer Input 14(bool) 15: TypePointer Input 14(bool)
16(gl_FrontFacing): 15(ptr) Variable Input 16(gl_FrontFacing): 15(ptr) Variable Input
20: 6(float) Constant 3221225472 20: 6(float) Constant 3221225472
22: 6(float) Constant 1073741824 22: 6(float) Constant 1073741824
24(i2): 10(ptr) Variable PrivateGlobal 24(i2): 10(ptr) Variable Private
25: 6(float) Constant 1120665600 25: 6(float) Constant 1120665600
26: TypeVector 6(float) 4 26: TypeVector 6(float) 4
27: TypePointer Output 26(fvec4) 27: TypePointer Output 26(fvec4)
@ -80,32 +82,41 @@ Linked fragment stage:
34: TypeInt 32 1 34: TypeInt 32 1
35: 34(int) Constant 2 35: 34(int) Constant 2
36: TypePointer Input 6(float) 36: TypePointer Input 6(float)
41: TypePointer Input 26(fvec4) 39: 29(int) Constant 1
42(k): 41(ptr) Variable Input 40: TypePointer Output 6(float)
44: TypeVector 34(int) 4 42: TypePointer Input 26(fvec4)
51: TypeImage 6(float) Rect sampled format:Unknown 43(k): 42(ptr) Variable Input
52: TypeSampledImage 51 45: TypeVector 34(int) 4
53: TypePointer UniformConstant 52 50: 29(int) Constant 2
54(sampR): 53(ptr) Variable UniformConstant 52: TypeImage 6(float) Rect sampled format:Unknown
56: TypeVector 34(int) 2 53: TypeSampledImage 52
58: TypeImage 34(int) Buffer sampled format:Unknown 54: TypePointer UniformConstant 53
59: TypeSampledImage 58 55(sampR): 54(ptr) Variable UniformConstant
60: TypePointer UniformConstant 59 57: TypeVector 34(int) 2
61(sampB): 60(ptr) Variable UniformConstant 59: TypeImage 34(int) Buffer sampled format:Unknown
66: TypeVector 6(float) 2 60: TypeSampledImage 59
69: 6(float) Constant 1120403456 61: TypePointer UniformConstant 60
62(sampB): 61(ptr) Variable UniformConstant
67: TypeVector 6(float) 2
70: 6(float) Constant 1120403456
72: 29(int) Constant 3
80: TypeImage 6(float) 2D sampled format:Unknown 80: TypeImage 6(float) 2D sampled format:Unknown
81: TypeSampledImage 80 81: TypeSampledImage 80
82: 29(int) Constant 3 82: TypeArray 81 72
83: TypeArray 81 82 83: TypePointer UniformConstant 82
84: TypePointer UniformConstant 83 84(samp2Da): 83(ptr) Variable UniformConstant
85(samp2Da): 84(ptr) Variable UniformConstant 85: TypeMatrix 26(fvec4) 4
86: TypeMatrix 26(fvec4) 4 86: 29(int) Constant 4
87: 29(int) Constant 4 87: TypeArray 85 86
88: TypeArray 86 87 88(bn): TypeStruct 87 87 85 85 85
89(bn): TypeStruct 88 88 86 86 86 89: TypePointer Uniform 88(bn)
90: TypePointer Uniform 89(bn) 90: 89(ptr) Variable Uniform
91: 90(ptr) Variable Uniform 91: TypeVector 6(float) 3
92: TypeArray 91(fvec3) 50
93(bi): TypeStruct 92
94: TypeArray 93(bi) 86
95: TypePointer Uniform 94
96(bname): 95(ptr) Variable Uniform
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
13: 12(ptr) Variable Function 13: 12(ptr) Variable Function
@ -124,33 +135,29 @@ Linked fragment stage:
Store 24(i2) 25 Store 24(i2) 25
37: 36(ptr) AccessChain 33(gl_ClipDistance) 35 37: 36(ptr) AccessChain 33(gl_ClipDistance) 35
38: 6(float) Load 37 38: 6(float) Load 37
39: 26(fvec4) Load 28(o) 41: 40(ptr) AccessChain 28(o) 39
40: 26(fvec4) CompositeInsert 38 39 1 Store 41 38
Store 28(o) 40 44: 26(fvec4) Load 43(k)
43: 26(fvec4) Load 42(k) 46: 45(ivec4) ConvertFToS 44
45: 44(ivec4) ConvertFToS 43 47: 34(int) CompositeExtract 46 0
46: 34(int) CompositeExtract 45 0 48: 36(ptr) AccessChain 33(gl_ClipDistance) 47
47: 36(ptr) AccessChain 33(gl_ClipDistance) 46 49: 6(float) Load 48
48: 6(float) Load 47 51: 40(ptr) AccessChain 28(o) 50
49: 26(fvec4) Load 28(o) Store 51 49
50: 26(fvec4) CompositeInsert 48 49 2 56: 53 Load 55(sampR)
Store 28(o) 50 58: 57(ivec2) ImageQuerySize 56
55: 52 Load 54(sampR) 63: 60 Load 62(sampB)
57: 56(ivec2) ImageQuerySize 55 64: 34(int) ImageQuerySize 63
62: 59 Load 61(sampB) 65: 57(ivec2) CompositeConstruct 64 64
63: 34(int) ImageQuerySize 62 66: 57(ivec2) IAdd 58 65
64: 56(ivec2) CompositeConstruct 63 63 68: 67(fvec2) ConvertSToF 66
65: 56(ivec2) IAdd 57 64 69: 6(float) CompositeExtract 68 0
67: 66(fvec2) ConvertSToF 65 71: 6(float) FDiv 69 70
68: 6(float) CompositeExtract 67 0 73: 40(ptr) AccessChain 28(o) 72
70: 6(float) FDiv 68 69 Store 73 71
71: 26(fvec4) Load 28(o) 74: 6(float) FunctionCall 8(foo()
72: 26(fvec4) CompositeInsert 70 71 3 75: 40(ptr) AccessChain 28(o) 50
Store 28(o) 72 Store 75 74
73: 6(float) FunctionCall 8(foo()
74: 26(fvec4) Load 28(o)
75: 26(fvec4) CompositeInsert 73 74 2
Store 28(o) 75
Return Return
FunctionEnd FunctionEnd
8(foo(): 6(float) Function None 7 8(foo(): 6(float) Function None 7

View File

@ -3,19 +3,19 @@ spv.150.geom
Linked geometry stage: Linked geometry stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 71 // Id's are bound by 71
Source GLSL 150
Capability Geometry Capability Geometry
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" EntryPoint Geometry 4 "main" 18 70 10 29 33
ExecutionMode 4 InputTrianglesAdjacency ExecutionMode 4 InputTrianglesAdjacency
ExecutionMode 4 Invocations 0 ExecutionMode 4 Invocations 0
ExecutionMode 4 OutputTriangleStrip ExecutionMode 4 OutputTriangleStrip
ExecutionMode 4 OutputVertices 30 ExecutionMode 4 OutputVertices 30
Source GLSL 150
Name 4 "main" Name 4 "main"
Name 8 "fromVertex" Name 8 "fromVertex"
MemberName 8(fromVertex) 0 "color" MemberName 8(fromVertex) 0 "color"
@ -61,7 +61,6 @@ Linked geometry stage:
Decorate 68(toFragment) Block Decorate 68(toFragment) Block
Decorate 68(toFragment) Stream 3 Decorate 68(toFragment) Stream 3
Decorate 70(toF) Stream 3 Decorate 70(toF) Stream 3
Decorate 70(toF) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32

View File

@ -3,30 +3,23 @@ spv.150.vert
Linked vertex stage: Linked vertex stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 52 // Id's are bound by 50
Source GLSL 150
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" EntryPoint Vertex 4 "main" 17 39 48 49
Source GLSL 150
Name 4 "main" Name 4 "main"
Name 13 "gl_PerVertex" Name 11 "gl_PerVertex"
MemberName 13(gl_PerVertex) 0 "gl_Position" MemberName 11(gl_PerVertex) 0 "gl_Position"
MemberName 13(gl_PerVertex) 1 "gl_PointSize" MemberName 11(gl_PerVertex) 1 "gl_PointSize"
MemberName 13(gl_PerVertex) 2 "gl_ClipDistance" MemberName 11(gl_PerVertex) 2 "gl_ClipDistance"
MemberName 13(gl_PerVertex) 3 "gl_ClipVertex" Name 13 ""
MemberName 13(gl_PerVertex) 4 "gl_FrontColor" Name 17 "iv4"
MemberName 13(gl_PerVertex) 5 "gl_BackColor" Name 23 "ps"
MemberName 13(gl_PerVertex) 6 "gl_FrontSecondaryColor"
MemberName 13(gl_PerVertex) 7 "gl_BackSecondaryColor"
MemberName 13(gl_PerVertex) 8 "gl_TexCoord"
MemberName 13(gl_PerVertex) 9 "gl_FogFragCoord"
Name 15 ""
Name 19 "iv4"
Name 25 "ps"
Name 35 "s1" Name 35 "s1"
MemberName 35(s1) 0 "a" MemberName 35(s1) 0 "a"
MemberName 35(s1) 1 "a2" MemberName 35(s1) 1 "a2"
@ -36,19 +29,16 @@ Linked vertex stage:
MemberName 37(s2) 1 "d" MemberName 37(s2) 1 "d"
Name 39 "s2out" Name 39 "s2out"
Name 41 "i" Name 41 "i"
Name 48 "ui" Name 46 "ui"
Name 50 "gl_VertexID" Name 48 "gl_VertexID"
Name 51 "gl_InstanceID" Name 49 "gl_InstanceID"
MemberDecorate 13(gl_PerVertex) 0 Invariant MemberDecorate 11(gl_PerVertex) 0 Invariant
MemberDecorate 13(gl_PerVertex) 0 BuiltIn Position MemberDecorate 11(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 13(gl_PerVertex) 1 BuiltIn PointSize MemberDecorate 11(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 13(gl_PerVertex) 2 BuiltIn ClipDistance MemberDecorate 11(gl_PerVertex) 2 BuiltIn ClipDistance
Decorate 13(gl_PerVertex) Block Decorate 11(gl_PerVertex) Block
Decorate 48(ui) NoStaticUse Decorate 48(gl_VertexID) BuiltIn VertexId
Decorate 50(gl_VertexID) BuiltIn VertexId Decorate 49(gl_InstanceID) BuiltIn InstanceId
Decorate 50(gl_VertexID) NoStaticUse
Decorate 51(gl_InstanceID) BuiltIn InstanceId
Decorate 51(gl_InstanceID) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -56,52 +46,50 @@ Linked vertex stage:
8: TypeInt 32 0 8: TypeInt 32 0
9: 8(int) Constant 4 9: 8(int) Constant 4
10: TypeArray 6(float) 9 10: TypeArray 6(float) 9
11: 8(int) Constant 1 11(gl_PerVertex): TypeStruct 7(fvec4) 6(float) 10
12: TypeArray 7(fvec4) 11 12: TypePointer Output 11(gl_PerVertex)
13(gl_PerVertex): TypeStruct 7(fvec4) 6(float) 10 7(fvec4) 7(fvec4) 7(fvec4) 7(fvec4) 7(fvec4) 12 6(float) 13: 12(ptr) Variable Output
14: TypePointer Output 13(gl_PerVertex) 14: TypeInt 32 1
15: 14(ptr) Variable Output 15: 14(int) Constant 0
16: TypeInt 32 1 16: TypePointer Input 7(fvec4)
17: 16(int) Constant 0 17(iv4): 16(ptr) Variable Input
18: TypePointer Input 7(fvec4) 19: TypePointer Output 7(fvec4)
19(iv4): 18(ptr) Variable Input 21: 14(int) Constant 1
21: TypePointer Output 7(fvec4) 22: TypePointer UniformConstant 6(float)
23: 16(int) Constant 1 23(ps): 22(ptr) Variable UniformConstant
24: TypePointer UniformConstant 6(float) 25: TypePointer Output 6(float)
25(ps): 24(ptr) Variable UniformConstant 27: 14(int) Constant 2
27: TypePointer Output 6(float) 28: 8(int) Constant 0
29: 16(int) Constant 2 29: TypePointer Input 6(float)
33: 8(int) Constant 3 33: 8(int) Constant 3
34: TypeArray 7(fvec4) 33 34: TypeArray 7(fvec4) 33
35(s1): TypeStruct 16(int) 16(int) 34 35(s1): TypeStruct 14(int) 14(int) 34
36: TypeArray 35(s1) 9 36: TypeArray 35(s1) 9
37(s2): TypeStruct 16(int) 36 37(s2): TypeStruct 14(int) 36
38: TypePointer Output 37(s2) 38: TypePointer Output 37(s2)
39(s2out): 38(ptr) Variable Output 39(s2out): 38(ptr) Variable Output
40: TypePointer Function 16(int) 40: TypePointer Function 14(int)
47: TypePointer UniformConstant 16(int) 45: TypePointer UniformConstant 14(int)
48(ui): 47(ptr) Variable UniformConstant 46(ui): 45(ptr) Variable UniformConstant
49: TypePointer Input 16(int) 47: TypePointer Input 14(int)
50(gl_VertexID): 49(ptr) Variable Input 48(gl_VertexID): 47(ptr) Variable Input
51(gl_InstanceID): 49(ptr) Variable Input 49(gl_InstanceID): 47(ptr) Variable Input
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
41(i): 40(ptr) Variable Function 41(i): 40(ptr) Variable Function
20: 7(fvec4) Load 19(iv4) 18: 7(fvec4) Load 17(iv4)
22: 21(ptr) AccessChain 15 17 20: 19(ptr) AccessChain 13 15
Store 22 20 Store 20 18
26: 6(float) Load 25(ps) 24: 6(float) Load 23(ps)
28: 27(ptr) AccessChain 15 23 26: 25(ptr) AccessChain 13 21
Store 28 26 Store 26 24
30: 7(fvec4) Load 19(iv4) 30: 29(ptr) AccessChain 17(iv4) 28
31: 6(float) CompositeExtract 30 0 31: 6(float) Load 30
32: 27(ptr) AccessChain 15 29 29 32: 25(ptr) AccessChain 13 27 27
Store 32 31 Store 32 31
42: 16(int) Load 41(i) 42: 14(int) Load 41(i)
43: 6(float) Load 25(ps) 43: 6(float) Load 23(ps)
44: 21(ptr) AccessChain 39(s2out) 23 42 29 29 44: 25(ptr) AccessChain 39(s2out) 21 42 27 27 33
45: 7(fvec4) Load 44 Store 44 43
46: 7(fvec4) CompositeInsert 43 45 3
Store 44 46
Return Return
FunctionEnd FunctionEnd

View File

@ -3,15 +3,15 @@ spv.300BuiltIns.vert
Linked vertex stage: Linked vertex stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 40 // Id's are bound by 40
Source ESSL 300
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" EntryPoint Vertex 4 "main" 25 11 39
Source ESSL 300
Name 4 "main" Name 4 "main"
Name 8 "i" Name 8 "i"
Name 11 "gl_VertexID" Name 11 "gl_VertexID"
@ -28,7 +28,6 @@ Linked vertex stage:
Decorate 25(ps) RelaxedPrecision Decorate 25(ps) RelaxedPrecision
Decorate 33(gl_PointSize) BuiltIn PointSize Decorate 33(gl_PointSize) BuiltIn PointSize
Decorate 39(gl_InstanceID) BuiltIn InstanceId Decorate 39(gl_InstanceID) BuiltIn InstanceId
Decorate 39(gl_InstanceID) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1

View File

@ -3,16 +3,16 @@ spv.300layout.frag
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 37 // Id's are bound by 37
Source ESSL 300
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 29 11 9 26 15
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source ESSL 300
Name 4 "main" Name 4 "main"
Name 9 "c" Name 9 "c"
Name 11 "color" Name 11 "color"
@ -25,13 +25,11 @@ Linked fragment stage:
Decorate 9(c) RelaxedPrecision Decorate 9(c) RelaxedPrecision
Decorate 9(c) Location 7 Decorate 9(c) Location 7
Decorate 11(color) RelaxedPrecision Decorate 11(color) RelaxedPrecision
Decorate 11(color) Smooth
MemberDecorate 13(S) 0 RelaxedPrecision MemberDecorate 13(S) 0 RelaxedPrecision
MemberDecorate 13(S) 1 RelaxedPrecision MemberDecorate 13(S) 1 RelaxedPrecision
Decorate 26(p) RelaxedPrecision Decorate 26(p) RelaxedPrecision
Decorate 26(p) Location 3 Decorate 26(p) Location 3
Decorate 29(pos) RelaxedPrecision Decorate 29(pos) RelaxedPrecision
Decorate 29(pos) Smooth
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32

View File

@ -3,15 +3,15 @@ spv.300layoutp.vert
Linked vertex stage: Linked vertex stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 114 // Id's are bound by 117
Source ESSL 300
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" EntryPoint Vertex 4 "main" 53 11 73 9 51 61 81 115 116
Source ESSL 300
Name 4 "main" Name 4 "main"
Name 9 "pos" Name 9 "pos"
Name 11 "p" Name 11 "p"
@ -36,13 +36,12 @@ Linked vertex stage:
Name 61 "iout" Name 61 "iout"
Name 67 "uiuin" Name 67 "uiuin"
Name 73 "aiv2" Name 73 "aiv2"
Name 77 "S" Name 79 "S"
MemberName 77(S) 0 "c" MemberName 79(S) 0 "c"
MemberName 77(S) 1 "f" MemberName 79(S) 1 "f"
Name 79 "s" Name 81 "s"
Name 112 "gl_VertexID" Name 115 "gl_VertexID"
Name 113 "gl_InstanceID" Name 116 "gl_InstanceID"
Decorate 9(pos) Smooth
Decorate 11(p) Location 3 Decorate 11(p) Location 3
MemberDecorate 17(Transform) 0 RowMajor MemberDecorate 17(Transform) 0 RowMajor
MemberDecorate 17(Transform) 0 Offset 0 MemberDecorate 17(Transform) 0 Offset 0
@ -63,14 +62,11 @@ Linked vertex stage:
MemberDecorate 43(T2) 1 RowMajor MemberDecorate 43(T2) 1 RowMajor
Decorate 43(T2) GLSLShared Decorate 43(T2) GLSLShared
Decorate 43(T2) Block Decorate 43(T2) Block
Decorate 51(color) Smooth
Decorate 53(c) Location 7 Decorate 53(c) Location 7
Decorate 61(iout) Flat Decorate 61(iout) Flat
Decorate 73(aiv2) Location 9 Decorate 73(aiv2) Location 9
Decorate 112(gl_VertexID) BuiltIn VertexId Decorate 115(gl_VertexID) BuiltIn VertexId
Decorate 112(gl_VertexID) NoStaticUse Decorate 116(gl_InstanceID) BuiltIn InstanceId
Decorate 113(gl_InstanceID) BuiltIn InstanceId
Decorate 113(gl_InstanceID) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -116,20 +112,23 @@ Linked vertex stage:
71: TypeVector 16(int) 2 71: TypeVector 16(int) 2
72: TypePointer Input 71(ivec2) 72: TypePointer Input 71(ivec2)
73(aiv2): 72(ptr) Variable Input 73(aiv2): 72(ptr) Variable Input
77(S): TypeStruct 14(fvec3) 6(float) 74: 29(int) Constant 1
78: TypePointer Output 77(S) 75: TypePointer Input 16(int)
79(s): 78(ptr) Variable Output 79(S): TypeStruct 14(fvec3) 6(float)
84: TypePointer Output 6(float) 80: TypePointer Output 79(S)
86: TypePointer Uniform 14(fvec3) 81(s): 80(ptr) Variable Output
89: 6(float) Constant 1065353216 84: 29(int) Constant 0
90: 14(fvec3) ConstantComposite 89 89 89 85: TypePointer Input 6(float)
91: TypeVector 42(bool) 3 88: TypePointer Output 6(float)
97: TypePointer Uniform 30(ivec3) 90: TypePointer Uniform 14(fvec3)
100: 29(int) Constant 5 93: 6(float) Constant 1065353216
101: 30(ivec3) ConstantComposite 100 100 100 94: 14(fvec3) ConstantComposite 93 93 93
111: TypePointer Input 16(int) 95: TypeVector 42(bool) 3
112(gl_VertexID): 111(ptr) Variable Input 101: TypePointer Uniform 30(ivec3)
113(gl_InstanceID): 111(ptr) Variable Input 104: 29(int) Constant 5
105: 30(ivec3) ConstantComposite 104 104 104
115(gl_VertexID): 75(ptr) Variable Input
116(gl_InstanceID): 75(ptr) Variable Input
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
12: 7(fvec4) Load 11(p) 12: 7(fvec4) Load 11(p)
@ -159,41 +158,41 @@ Linked vertex stage:
68: 29(int) Load 67(uiuin) 68: 29(int) Load 67(uiuin)
69: 16(int) Bitcast 68 69: 16(int) Bitcast 68
70: 16(int) IAdd 65 69 70: 16(int) IAdd 65 69
74: 71(ivec2) Load 73(aiv2) 76: 75(ptr) AccessChain 73(aiv2) 74
75: 16(int) CompositeExtract 74 1 77: 16(int) Load 76
76: 16(int) IAdd 70 75 78: 16(int) IAdd 70 77
Store 61(iout) 76 Store 61(iout) 78
80: 14(fvec3) Load 53(c) 82: 14(fvec3) Load 53(c)
81: 50(ptr) AccessChain 79(s) 20 83: 50(ptr) AccessChain 81(s) 20
Store 81 80 Store 83 82
82: 7(fvec4) Load 11(p) 86: 85(ptr) AccessChain 11(p) 84
83: 6(float) CompositeExtract 82 0 87: 6(float) Load 86
85: 84(ptr) AccessChain 79(s) 24 89: 88(ptr) AccessChain 81(s) 24
Store 85 83 Store 89 87
87: 86(ptr) AccessChain 35 55 24 91: 90(ptr) AccessChain 35 55 24
88: 14(fvec3) Load 87 92: 14(fvec3) Load 91
92: 91(bvec3) FOrdNotEqual 88 90 96: 95(bvec3) FOrdNotEqual 92 94
93: 42(bool) Any 92 97: 42(bool) Any 96
94: 42(bool) LogicalNot 93 98: 42(bool) LogicalNot 97
SelectionMerge 96 None SelectionMerge 100 None
BranchConditional 94 95 96 BranchConditional 98 99 100
95: Label 99: Label
98: 97(ptr) AccessChain 35 62 55 102: 101(ptr) AccessChain 35 62 55
99: 30(ivec3) Load 98 103: 30(ivec3) Load 102
102: 91(bvec3) INotEqual 99 101 106: 95(bvec3) INotEqual 103 105
103: 42(bool) Any 102 107: 42(bool) Any 106
Branch 96 Branch 100
96: Label 100: Label
104: 42(bool) Phi 93 5 103 95 108: 42(bool) Phi 97 5 107 99
SelectionMerge 106 None SelectionMerge 110 None
BranchConditional 104 105 106 BranchConditional 108 109 110
105: Label 109: Label
107: 50(ptr) AccessChain 79(s) 20 111: 50(ptr) AccessChain 81(s) 20
108: 14(fvec3) Load 107 112: 14(fvec3) Load 111
109: 14(fvec3) CompositeConstruct 89 89 89 113: 14(fvec3) CompositeConstruct 93 93 93
110: 14(fvec3) FAdd 108 109 114: 14(fvec3) FAdd 112 113
Store 107 110 Store 111 114
Branch 106 Branch 110
106: Label 110: Label
Return Return
FunctionEnd FunctionEnd

87
Test/baseResults/spv.310.comp.out Normal file → Executable file
View File

@ -5,16 +5,16 @@ Warning, version 310 is not yet complete; most version-specific features are pre
Linked compute stage: Linked compute stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 67 // Id's are bound by 67
Source ESSL 310
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main" EntryPoint GLCompute 4 "main"
ExecutionMode 4 LocalSize 16 32 4 ExecutionMode 4 LocalSize 16 32 4
Source ESSL 310
Name 4 "main" Name 4 "main"
Name 13 "outb" Name 13 "outb"
MemberName 13(outb) 0 "f" MemberName 13(outb) 0 "f"
@ -27,21 +27,20 @@ Linked compute stage:
MemberName 24(outbna) 0 "k" MemberName 24(outbna) 0 "k"
MemberName 24(outbna) 1 "na" MemberName 24(outbna) 1 "na"
Name 26 "outbnamena" Name 26 "outbnamena"
Name 43 "i" Name 42 "i"
Name 49 "outs" Name 48 "outs"
MemberName 49(outs) 0 "s" MemberName 48(outs) 0 "s"
MemberName 49(outs) 1 "va" MemberName 48(outs) 1 "va"
Name 51 "outnames" Name 50 "outnames"
Name 54 "gl_LocalInvocationID" Name 53 "gl_LocalInvocationID"
Decorate 13(outb) GLSLShared Decorate 13(outb) GLSLShared
Decorate 13(outb) BufferBlock Decorate 13(outb) BufferBlock
Decorate 24(outbna) GLSLShared Decorate 24(outbna) GLSLShared
Decorate 24(outbna) BufferBlock Decorate 24(outbna) BufferBlock
Decorate 49(outs) GLSLShared Decorate 48(outs) GLSLShared
Decorate 49(outs) BufferBlock Decorate 48(outs) BufferBlock
Decorate 54(gl_LocalInvocationID) BuiltIn LocalInvocationId Decorate 53(gl_LocalInvocationID) BuiltIn LocalInvocationId
Decorate 66 BuiltIn WorkgroupSize Decorate 66 BuiltIn WorkgroupSize
Decorate 66 NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 0 6: TypeInt 32 0
@ -56,8 +55,8 @@ Linked compute stage:
15(outbname): 14(ptr) Variable Uniform 15(outbname): 14(ptr) Variable Uniform
16: TypeInt 32 1 16: TypeInt 32 1
17: 16(int) Constant 0 17: 16(int) Constant 0
18: TypePointer WorkgroupLocal 10(float) 18: TypePointer Workgroup 10(float)
19(s): 18(ptr) Variable WorkgroupLocal 19(s): 18(ptr) Variable Workgroup
21: TypePointer Uniform 10(float) 21: TypePointer Uniform 10(float)
23: TypeVector 10(float) 4 23: TypeVector 10(float) 4
24(outbna): TypeStruct 16(int) 23(fvec4) 24(outbna): TypeStruct 16(int) 23(fvec4)
@ -67,24 +66,25 @@ Linked compute stage:
30: TypePointer Uniform 23(fvec4) 30: TypePointer Uniform 23(fvec4)
32: 16(int) Constant 3 32: 16(int) Constant 3
33: 16(int) Constant 18 33: 16(int) Constant 18
34: TypePointer Uniform 11(fvec3) 36: 16(int) Constant 17
38: 16(int) Constant 17 37: 10(float) Constant 1077936128
39: 10(float) Constant 1077936128 38: 11(fvec3) ConstantComposite 37 37 37
40: 11(fvec3) ConstantComposite 39 39 39 39: TypePointer Uniform 11(fvec3)
42: TypePointer WorkgroupLocal 16(int) 41: TypePointer Workgroup 16(int)
43(i): 42(ptr) Variable WorkgroupLocal 42(i): 41(ptr) Variable Workgroup
48: TypeRuntimeArray 23(fvec4) 47: TypeRuntimeArray 23(fvec4)
49(outs): TypeStruct 16(int) 48 48(outs): TypeStruct 16(int) 47
50: TypePointer Uniform 49(outs) 49: TypePointer Uniform 48(outs)
51(outnames): 50(ptr) Variable Uniform 50(outnames): 49(ptr) Variable Uniform
52: TypeVector 6(int) 3 51: TypeVector 6(int) 3
53: TypePointer Input 52(ivec3) 52: TypePointer Input 51(ivec3)
54(gl_LocalInvocationID): 53(ptr) Variable Input 53(gl_LocalInvocationID): 52(ptr) Variable Input
54: TypePointer Input 6(int)
61: TypePointer Uniform 16(int) 61: TypePointer Uniform 16(int)
63: 6(int) Constant 16 63: 6(int) Constant 16
64: 6(int) Constant 32 64: 6(int) Constant 32
65: 6(int) Constant 4 65: 6(int) Constant 4
66: 52(ivec3) ConstantComposite 63 64 65 66: 51(ivec3) ConstantComposite 63 64 65
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
MemoryBarrier 7 8 MemoryBarrier 7 8
@ -96,25 +96,24 @@ Linked compute stage:
29: 23(fvec4) CompositeConstruct 28 28 28 28 29: 23(fvec4) CompositeConstruct 28 28 28 28
31: 30(ptr) AccessChain 26(outbnamena) 27 31: 30(ptr) AccessChain 26(outbnamena) 27
Store 31 29 Store 31 29
35: 34(ptr) AccessChain 15(outbname) 32 33 34: 21(ptr) AccessChain 15(outbname) 32 33 9
36: 11(fvec3) Load 35 35: 10(float) Load 34
37: 10(float) CompositeExtract 36 0 Store 19(s) 35
Store 19(s) 37 40: 39(ptr) AccessChain 15(outbname) 32 36
41: 34(ptr) AccessChain 15(outbname) 32 38 Store 40 38
Store 41 40 43: 16(int) Load 42(i)
44: 16(int) Load 43(i) 44: 10(float) Load 19(s)
45: 10(float) Load 19(s) 45: 11(fvec3) CompositeConstruct 44 44 44
46: 11(fvec3) CompositeConstruct 45 45 45 46: 39(ptr) AccessChain 15(outbname) 32 43
47: 34(ptr) AccessChain 15(outbname) 32 44 Store 46 45
Store 47 46 55: 54(ptr) AccessChain 53(gl_LocalInvocationID) 9
55: 52(ivec3) Load 54(gl_LocalInvocationID) 56: 6(int) Load 55
56: 6(int) CompositeExtract 55 0
57: 10(float) Load 19(s) 57: 10(float) Load 19(s)
58: 23(fvec4) CompositeConstruct 57 57 57 57 58: 23(fvec4) CompositeConstruct 57 57 57 57
59: 30(ptr) AccessChain 51(outnames) 27 56 59: 30(ptr) AccessChain 50(outnames) 27 56
Store 59 58 Store 59 58
60: 16(int) ArrayLength 15(outbname) 3 60: 16(int) ArrayLength 15(outbname) 3
62: 61(ptr) AccessChain 51(outnames) 17 62: 61(ptr) AccessChain 50(outnames) 17
Store 62 60 Store 62 60
Return Return
FunctionEnd FunctionEnd

View File

@ -3,20 +3,20 @@ spv.330.geom
Linked geometry stage: Linked geometry stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 32 // Id's are bound by 32
Source GLSL 330
SourceExtension "GL_ARB_separate_shader_objects"
Capability Geometry Capability Geometry
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" EntryPoint Geometry 4 "main" 20 13
ExecutionMode 4 InputTriangles ExecutionMode 4 Triangles
ExecutionMode 4 Invocations 0 ExecutionMode 4 Invocations 0
ExecutionMode 4 OutputTriangleStrip ExecutionMode 4 OutputTriangleStrip
ExecutionMode 4 OutputVertices 3 ExecutionMode 4 OutputVertices 3
Source GLSL 330
SourceExtension "GL_ARB_separate_shader_objects"
Name 4 "main" Name 4 "main"
Name 11 "gl_PerVertex" Name 11 "gl_PerVertex"
MemberName 11(gl_PerVertex) 0 "gl_Position" MemberName 11(gl_PerVertex) 0 "gl_Position"

View File

@ -5,4 +5,170 @@ Warning, version 400 is not yet complete; most version-specific features are pre
Linked fragment stage: Linked fragment stage:
Missing functionality: texture gather // Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 125
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 50 44 11 96 69 119 56
ExecutionMode 4 OriginLowerLeft
Source GLSL 400
SourceExtension "GL_ARB_separate_shader_objects"
Name 4 "main"
Name 6 "foo23("
Name 11 "outp"
Name 15 "u2drs"
Name 36 "v"
Name 42 "arrayedSampler"
Name 44 "i"
Name 50 "c2D"
Name 56 "gl_ClipDistance"
Name 69 "uoutp"
Name 73 "samp2dr"
Name 96 "ioutp"
Name 100 "isamp2DA"
Name 117 "gl_FragCoord"
Name 119 "vl2"
Decorate 44(i) Flat
Decorate 56(gl_ClipDistance) BuiltIn ClipDistance
Decorate 117(gl_FragCoord) BuiltIn FragCoord
Decorate 119(vl2) Location 6
2: TypeVoid
3: TypeFunction 2
8: TypeFloat 32
9: TypeVector 8(float) 4
10: TypePointer Output 9(fvec4)
11(outp): 10(ptr) Variable Output
12: TypeImage 8(float) Rect depth sampled format:Unknown
13: TypeSampledImage 12
14: TypePointer UniformConstant 13
15(u2drs): 14(ptr) Variable UniformConstant
18: TypeVector 8(float) 2
19: 8(float) Constant 0
20: 18(fvec2) ConstantComposite 19 19
21: TypeInt 32 1
22: TypeVector 21(int) 2
23: 21(int) Constant 3
24: 21(int) Constant 4
25: 22(ivec2) ConstantComposite 23 24
28: TypeInt 32 0
29: 28(int) Constant 0
30: TypePointer Output 8(float)
35: TypePointer Function 9(fvec4)
37: TypeImage 8(float) 2D sampled format:Unknown
38: TypeSampledImage 37
39: 28(int) Constant 5
40: TypeArray 38 39
41: TypePointer UniformConstant 40
42(arrayedSampler): 41(ptr) Variable UniformConstant
43: TypePointer Input 21(int)
44(i): 43(ptr) Variable Input
46: TypePointer UniformConstant 38
49: TypePointer Input 18(fvec2)
50(c2D): 49(ptr) Variable Input
53: 28(int) Constant 2
54: TypeArray 8(float) 53
55: TypePointer Input 54
56(gl_ClipDistance): 55(ptr) Variable Input
57: 21(int) Constant 1
58: TypePointer Input 8(float)
62: TypeVector 8(float) 3
67: TypeVector 28(int) 4
68: TypePointer Output 67(ivec4)
69(uoutp): 68(ptr) Variable Output
70: TypeImage 28(int) Rect sampled format:Unknown
71: TypeSampledImage 70
72: TypePointer UniformConstant 71
73(samp2dr): 72(ptr) Variable UniformConstant
76: 28(int) Constant 4
77: TypeArray 22(ivec2) 76
78: 21(int) Constant 2
79: 22(ivec2) ConstantComposite 57 78
80: 21(int) Constant 15
81: 21(int) Constant 16
82: 22(ivec2) ConstantComposite 80 81
83: 21(int) Constant 4294967294
84: 21(int) Constant 0
85: 22(ivec2) ConstantComposite 83 84
86: 77 ConstantComposite 79 25 82 85
94: TypeVector 21(int) 4
95: TypePointer Output 94(ivec4)
96(ioutp): 95(ptr) Variable Output
97: TypeImage 21(int) 2D array sampled format:Unknown
98: TypeSampledImage 97
99: TypePointer UniformConstant 98
100(isamp2DA): 99(ptr) Variable UniformConstant
102: 8(float) Constant 1036831949
103: 62(fvec3) ConstantComposite 102 102 102
104: 22(ivec2) ConstantComposite 57 57
116: TypePointer Input 9(fvec4)
117(gl_FragCoord): 116(ptr) Variable Input
119(vl2): 116(ptr) Variable Input
4(main): 2 Function None 3
5: Label
36(v): 35(ptr) Variable Function
45: 21(int) Load 44(i)
47: 46(ptr) AccessChain 42(arrayedSampler) 45
48: 38 Load 47
51: 18(fvec2) Load 50(c2D)
52: 9(fvec4) ImageSampleImplicitLod 48 51
Store 36(v) 52
59: 58(ptr) AccessChain 56(gl_ClipDistance) 57
60: 8(float) Load 59
61: 30(ptr) AccessChain 11(outp) 29
Store 61 60
63: 9(fvec4) Load 36(v)
64: 62(fvec3) VectorShuffle 63 63 1 2 3
65: 9(fvec4) Load 11(outp)
66: 9(fvec4) VectorShuffle 65 64 0 4 5 6
Store 11(outp) 66
74: 71 Load 73(samp2dr)
75: 18(fvec2) Load 50(c2D)
87: 67(ivec4) ImageGather 74 75 78 ConstOffsets 86
Store 69(uoutp) 87
88: 46(ptr) AccessChain 42(arrayedSampler) 84
89: 38 Load 88
90: 18(fvec2) Load 50(c2D)
91: 9(fvec4) ImageGather 89 90 84
92: 9(fvec4) Load 11(outp)
93: 9(fvec4) FAdd 92 91
Store 11(outp) 93
101: 98 Load 100(isamp2DA)
105: 94(ivec4) ImageGather 101 103 23 ConstOffset 104
Store 96(ioutp) 105
106: 98 Load 100(isamp2DA)
107: 94(ivec4) ImageGather 106 103 23 ConstOffset 104
108: 94(ivec4) Load 96(ioutp)
109: 94(ivec4) IAdd 108 107
Store 96(ioutp) 109
110: 98 Load 100(isamp2DA)
111: 21(int) Load 44(i)
112: 22(ivec2) CompositeConstruct 111 111
113: 94(ivec4) ImageGather 110 103 84 Offset 112
114: 94(ivec4) Load 96(ioutp)
115: 94(ivec4) IAdd 114 113
Store 96(ioutp) 115
118: 9(fvec4) Load 117(gl_FragCoord)
120: 9(fvec4) Load 119(vl2)
121: 9(fvec4) FAdd 118 120
122: 9(fvec4) Load 11(outp)
123: 9(fvec4) FAdd 122 121
Store 11(outp) 123
124: 2 FunctionCall 6(foo23()
Return
FunctionEnd
6(foo23(): 2 Function None 3
7: Label
16: 13 Load 15(u2drs)
17: 9(fvec4) Load 11(outp)
26: 8(float) CompositeExtract 17 3
27: 8(float) ImageSampleProjDrefExplicitLod 16 17 26 Grad ConstOffset 20 20 25
31: 30(ptr) AccessChain 11(outp) 29
32: 8(float) Load 31
33: 8(float) FAdd 32 27
34: 30(ptr) AccessChain 11(outp) 29
Store 34 33
Return
FunctionEnd

View File

@ -5,17 +5,17 @@ Warning, version 400 is not yet complete; most version-specific features are pre
Linked tessellation control stage: Linked tessellation control stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 90 // Id's are bound by 90
Source GLSL 400
SourceExtension "GL_ARB_separate_shader_objects"
Capability Tessellation Capability Tessellation
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint TessellationControl 4 "main" EntryPoint TessellationControl 4 "main" 52 76 80 81 84 85 88 89
ExecutionMode 4 OutputVertices 4 ExecutionMode 4 OutputVertices 4
Source GLSL 400
SourceExtension "GL_ARB_separate_shader_objects"
Name 4 "main" Name 4 "main"
Name 12 "a" Name 12 "a"
Name 17 "p" Name 17 "p"
@ -62,19 +62,11 @@ Linked tessellation control stage:
Decorate 63(gl_TessLevelOuter) BuiltIn TessLevelOuter Decorate 63(gl_TessLevelOuter) BuiltIn TessLevelOuter
Decorate 70(gl_TessLevelInner) Patch Decorate 70(gl_TessLevelInner) Patch
Decorate 70(gl_TessLevelInner) BuiltIn TessLevelInner Decorate 70(gl_TessLevelInner) BuiltIn TessLevelInner
Decorate 75(outa) NoStaticUse
Decorate 76(patchOut) Patch Decorate 76(patchOut) Patch
Decorate 76(patchOut) NoStaticUse
Decorate 80(inb) NoStaticUse
Decorate 81(ind) NoStaticUse
Decorate 84(ivla) Location 3 Decorate 84(ivla) Location 3
Decorate 84(ivla) NoStaticUse
Decorate 85(ivlb) Location 4 Decorate 85(ivlb) Location 4
Decorate 85(ivlb) NoStaticUse
Decorate 88(ovla) Location 3 Decorate 88(ovla) Location 3
Decorate 88(ovla) NoStaticUse
Decorate 89(ovlb) Location 4 Decorate 89(ovlb) Location 4
Decorate 89(ovlb) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 0 6: TypeInt 32 0
@ -121,8 +113,8 @@ Linked tessellation control stage:
70(gl_TessLevelInner): 69(ptr) Variable Output 70(gl_TessLevelInner): 69(ptr) Variable Output
71: 14(float) Constant 1067869798 71: 14(float) Constant 1067869798
73: TypeArray 10(int) 49 73: TypeArray 10(int) 49
74: TypePointer PrivateGlobal 73 74: TypePointer Private 73
75(outa): 74(ptr) Variable PrivateGlobal 75(outa): 74(ptr) Variable Private
76(patchOut): 54(ptr) Variable Output 76(patchOut): 54(ptr) Variable Output
77: TypeVector 14(float) 2 77: TypeVector 14(float) 2
78: TypeArray 77(fvec2) 20 78: TypeArray 77(fvec2) 20

View File

@ -5,20 +5,20 @@ Warning, version 400 is not yet complete; most version-specific features are pre
Linked tessellation evaluation stage: Linked tessellation evaluation stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 98 // Id's are bound by 98
Source GLSL 400
SourceExtension "GL_ARB_separate_shader_objects"
Capability Tessellation Capability Tessellation
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint TessellationEvaluation 4 "main" EntryPoint TessellationEvaluation 4 "main" 77 68 81 82 86 90 93 94 97
ExecutionMode 4 InputTriangles ExecutionMode 4 Triangles
ExecutionMode 4 SpacingFractionalOdd ExecutionMode 4 SpacingFractionalOdd
ExecutionMode 4 VertexOrderCcw ExecutionMode 4 VertexOrderCcw
ExecutionMode 4 PointMode ExecutionMode 4 PointMode
Source GLSL 400
SourceExtension "GL_ARB_separate_shader_objects"
Name 4 "main" Name 4 "main"
Name 8 "a" Name 8 "a"
Name 13 "p" Name 13 "p"
@ -72,19 +72,11 @@ Linked tessellation evaluation stage:
MemberDecorate 66(gl_PerVertex) 2 BuiltIn ClipDistance MemberDecorate 66(gl_PerVertex) 2 BuiltIn ClipDistance
Decorate 66(gl_PerVertex) Block Decorate 66(gl_PerVertex) Block
Decorate 77(patchIn) Patch Decorate 77(patchIn) Patch
Decorate 77(patchIn) NoStaticUse
Decorate 81(inb) NoStaticUse
Decorate 82(ind) NoStaticUse
Decorate 83(testblb) Block Decorate 83(testblb) Block
Decorate 86(blb) NoStaticUse
Decorate 87(testbld) Block Decorate 87(testbld) Block
Decorate 90(bld) NoStaticUse
Decorate 93(ivla) Location 23 Decorate 93(ivla) Location 23
Decorate 93(ivla) NoStaticUse
Decorate 94(ivlb) Location 24 Decorate 94(ivlb) Location 24
Decorate 94(ivlb) NoStaticUse
Decorate 97(ovla) Location 23 Decorate 97(ovla) Location 23
Decorate 97(ovla) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1

View File

@ -5,4 +5,126 @@ Warning, version 420 is not yet complete; most version-specific features are pre
Linked geometry stage: Linked geometry stage:
Missing functionality: texture gather // Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 74
Capability Geometry
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main" 14 23 46
ExecutionMode 4 Triangles
ExecutionMode 4 Invocations 4
ExecutionMode 4 OutputLineStrip
ExecutionMode 4 OutputVertices 127
Source GLSL 420
Name 4 "main"
Name 8 "p"
Name 9 "gl_PerVertex"
MemberName 9(gl_PerVertex) 0 "gl_PointSize"
Name 14 "gl_in"
Name 21 "gl_PerVertex"
MemberName 21(gl_PerVertex) 0 "gl_PointSize"
Name 23 ""
Name 28 "gl_ViewportIndex"
Name 31 "id"
Name 33 "gl_InvocationID"
Name 37 "v"
Name 41 "s2D"
Name 46 "coord"
Name 64 "i"
Name 67 "indexable"
Name 73 "v4"
MemberDecorate 9(gl_PerVertex) 0 BuiltIn PointSize
Decorate 9(gl_PerVertex) Block
MemberDecorate 21(gl_PerVertex) 0 BuiltIn PointSize
Decorate 21(gl_PerVertex) Block
Decorate 21(gl_PerVertex) Stream 0
Decorate 23 Stream 0
Decorate 28(gl_ViewportIndex) Stream 0
Decorate 28(gl_ViewportIndex) BuiltIn ViewportIndex
Decorate 33(gl_InvocationID) BuiltIn InvocationId
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypePointer Function 6(float)
9(gl_PerVertex): TypeStruct 6(float)
10: TypeInt 32 0
11: 10(int) Constant 3
12: TypeArray 9(gl_PerVertex) 11
13: TypePointer Input 12
14(gl_in): 13(ptr) Variable Input
15: TypeInt 32 1
16: 15(int) Constant 1
17: 15(int) Constant 0
18: TypePointer Input 6(float)
21(gl_PerVertex): TypeStruct 6(float)
22: TypePointer Output 21(gl_PerVertex)
23: 22(ptr) Variable Output
25: TypePointer Output 6(float)
27: TypePointer Output 15(int)
28(gl_ViewportIndex): 27(ptr) Variable Output
29: 15(int) Constant 7
30: TypePointer Function 15(int)
32: TypePointer Input 15(int)
33(gl_InvocationID): 32(ptr) Variable Input
35: TypeVector 6(float) 4
36: TypePointer Function 35(fvec4)
38: TypeImage 6(float) 2D sampled format:Unknown
39: TypeSampledImage 38
40: TypePointer UniformConstant 39
41(s2D): 40(ptr) Variable UniformConstant
43: TypeVector 6(float) 2
44: TypeArray 43(fvec2) 11
45: TypePointer Input 44
46(coord): 45(ptr) Variable Input
47: TypePointer Input 43(fvec2)
50: TypeVector 15(int) 2
51: 10(int) Constant 5
52: TypeArray 50(ivec2) 51
53: 50(ivec2) ConstantComposite 17 16
54: 15(int) Constant 4294967294
55: 50(ivec2) ConstantComposite 16 54
56: 15(int) Constant 3
57: 50(ivec2) ConstantComposite 17 56
58: 15(int) Constant 4294967293
59: 50(ivec2) ConstantComposite 58 17
60: 15(int) Constant 2
61: 50(ivec2) ConstantComposite 60 16
62: 52 ConstantComposite 53 55 57 59 61
63: TypePointer UniformConstant 15(int)
64(i): 63(ptr) Variable UniformConstant
66: TypePointer Function 52
68: TypePointer Function 50(ivec2)
72: TypePointer UniformConstant 35(fvec4)
73(v4): 72(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
8(p): 7(ptr) Variable Function
31(id): 30(ptr) Variable Function
37(v): 36(ptr) Variable Function
67(indexable): 66(ptr) Variable Function
19: 18(ptr) AccessChain 14(gl_in) 16 17
20: 6(float) Load 19
Store 8(p) 20
24: 6(float) Load 8(p)
26: 25(ptr) AccessChain 23 17
Store 26 24
Store 28(gl_ViewportIndex) 29
EmitStreamVertex 16
EndStreamPrimitive 17
EmitVertex
EndPrimitive
34: 15(int) Load 33(gl_InvocationID)
Store 31(id) 34
42: 39 Load 41(s2D)
48: 47(ptr) AccessChain 46(coord) 17
49: 43(fvec2) Load 48
65: 15(int) Load 64(i)
Store 67(indexable) 62
69: 68(ptr) AccessChain 67(indexable) 65
70: 50(ivec2) Load 69
71: 35(fvec4) ImageGather 42 49 17 Offset 70
Store 37(v) 71
Return
FunctionEnd

View File

@ -5,65 +5,52 @@ Warning, version 430 is not yet complete; most version-specific features are pre
Linked vertex stage: Linked vertex stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 62 // Id's are bound by 63
Source GLSL 430
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" EntryPoint Vertex 4 "main" 12 23 44 45 34 61 62
Source GLSL 430
Name 4 "main" Name 4 "main"
Name 10 "gl_PerVertex" Name 10 "gl_PerVertex"
MemberName 10(gl_PerVertex) 0 "gl_ClipDistance" MemberName 10(gl_PerVertex) 0 "gl_ClipDistance"
Name 12 "" Name 12 ""
Name 23 "bad" Name 23 "bad"
Name 34 "badorder3" Name 34 "badorder3"
Name 38 "f" Name 39 "f"
Name 42 "uv4" Name 43 "uv4"
Name 43 "badorder" Name 44 "badorder"
Name 44 "badorder2" Name 45 "badorder2"
Name 45 "boundblock" Name 46 "boundblock"
MemberName 45(boundblock) 0 "aoeu" MemberName 46(boundblock) 0 "aoeu"
Name 47 "boundInst" Name 48 "boundInst"
Name 48 "anonblock" Name 49 "anonblock"
MemberName 48(anonblock) 0 "aoeu" MemberName 49(anonblock) 0 "aoeu"
Name 50 "" Name 51 ""
Name 54 "sampb1" Name 55 "sampb1"
Name 57 "sampb2" Name 58 "sampb2"
Name 58 "sampb4" Name 59 "sampb4"
Name 60 "gl_VertexID" Name 61 "gl_VertexID"
Name 61 "gl_InstanceID" Name 62 "gl_InstanceID"
MemberDecorate 10(gl_PerVertex) 0 BuiltIn ClipDistance MemberDecorate 10(gl_PerVertex) 0 BuiltIn ClipDistance
Decorate 10(gl_PerVertex) Block Decorate 10(gl_PerVertex) Block
Decorate 34(badorder3) Flat Decorate 34(badorder3) Flat
Decorate 42(uv4) Location 4 Decorate 43(uv4) Location 4
Decorate 42(uv4) NoStaticUse Decorate 45(badorder2) Invariant
Decorate 28 NoStaticUse Decorate 46(boundblock) GLSLShared
Decorate 28 NoStaticUse Decorate 46(boundblock) Block
Decorate 43(badorder) NoStaticUse Decorate 48(boundInst) Binding 3
Decorate 44(badorder2) Smooth Decorate 49(anonblock) GLSLShared
Decorate 44(badorder2) Invariant Decorate 49(anonblock) Block
Decorate 44(badorder2) NoStaticUse Decorate 51 Binding 7
Decorate 45(boundblock) GLSLShared Decorate 55(sampb1) Binding 4
Decorate 45(boundblock) Block Decorate 58(sampb2) Binding 5
Decorate 47(boundInst) Binding 3 Decorate 59(sampb4) Binding 31
Decorate 47(boundInst) NoStaticUse Decorate 61(gl_VertexID) BuiltIn VertexId
Decorate 48(anonblock) GLSLShared Decorate 62(gl_InstanceID) BuiltIn InstanceId
Decorate 48(anonblock) Block
Decorate 50 Binding 7
Decorate 50 NoStaticUse
Decorate 54(sampb1) Binding 4
Decorate 54(sampb1) NoStaticUse
Decorate 57(sampb2) Binding 5
Decorate 57(sampb2) NoStaticUse
Decorate 58(sampb4) Binding 31
Decorate 58(sampb4) NoStaticUse
Decorate 60(gl_VertexID) BuiltIn VertexId
Decorate 60(gl_VertexID) NoStaticUse
Decorate 61(gl_InstanceID) BuiltIn InstanceId
Decorate 61(gl_InstanceID) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -83,52 +70,53 @@ Linked vertex stage:
21: TypeArray 19(fvec4) 20 21: TypeArray 19(fvec4) 20
22: TypePointer Input 21 22: TypePointer Input 21
23(bad): 22(ptr) Variable Input 23(bad): 22(ptr) Variable Input
24: TypePointer Input 19(fvec4) 24: 7(int) Constant 0
25: TypePointer Input 6(float)
28: 6(float) Constant 1082549862 28: 6(float) Constant 1082549862
29: TypeBool 29: TypeBool
33: TypePointer Output 19(fvec4) 33: TypePointer Output 19(fvec4)
34(badorder3): 33(ptr) Variable Output 34(badorder3): 33(ptr) Variable Output
37: TypePointer UniformConstant 6(float) 35: TypePointer Input 19(fvec4)
38(f): 37(ptr) Variable UniformConstant 38: TypePointer UniformConstant 6(float)
41: TypePointer UniformConstant 19(fvec4) 39(f): 38(ptr) Variable UniformConstant
42(uv4): 41(ptr) Variable UniformConstant 42: TypePointer UniformConstant 19(fvec4)
43(badorder): 24(ptr) Variable Input 43(uv4): 42(ptr) Variable UniformConstant
44(badorder2): 33(ptr) Variable Output 44(badorder): 35(ptr) Variable Input
45(boundblock): TypeStruct 13(int) 45(badorder2): 33(ptr) Variable Output
46: TypePointer Uniform 45(boundblock) 46(boundblock): TypeStruct 13(int)
47(boundInst): 46(ptr) Variable Uniform 47: TypePointer Uniform 46(boundblock)
48(anonblock): TypeStruct 13(int) 48(boundInst): 47(ptr) Variable Uniform
49: TypePointer Uniform 48(anonblock) 49(anonblock): TypeStruct 13(int)
50: 49(ptr) Variable Uniform 50: TypePointer Uniform 49(anonblock)
51: TypeImage 6(float) 2D sampled format:Unknown 51: 50(ptr) Variable Uniform
52: TypeSampledImage 51 52: TypeImage 6(float) 2D sampled format:Unknown
53: TypePointer UniformConstant 52 53: TypeSampledImage 52
54(sampb1): 53(ptr) Variable UniformConstant 54: TypePointer UniformConstant 53
55: TypeArray 52 20 55(sampb1): 54(ptr) Variable UniformConstant
56: TypePointer UniformConstant 55 56: TypeArray 53 20
57(sampb2): 56(ptr) Variable UniformConstant 57: TypePointer UniformConstant 56
58(sampb4): 53(ptr) Variable UniformConstant 58(sampb2): 57(ptr) Variable UniformConstant
59: TypePointer Input 13(int) 59(sampb4): 54(ptr) Variable UniformConstant
60(gl_VertexID): 59(ptr) Variable Input 60: TypePointer Input 13(int)
61(gl_InstanceID): 59(ptr) Variable Input 61(gl_VertexID): 60(ptr) Variable Input
62(gl_InstanceID): 60(ptr) Variable Input
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
18: 17(ptr) AccessChain 12 14 15 18: 17(ptr) AccessChain 12 14 15
Store 18 16 Store 18 16
25: 24(ptr) AccessChain 23(bad) 14 26: 25(ptr) AccessChain 23(bad) 14 24
26: 19(fvec4) Load 25 27: 6(float) Load 26
27: 6(float) CompositeExtract 26 0
30: 29(bool) FOrdEqual 27 28 30: 29(bool) FOrdEqual 27 28
SelectionMerge 32 None SelectionMerge 32 None
BranchConditional 30 31 32 BranchConditional 30 31 32
31: Label 31: Label
35: 24(ptr) AccessChain 23(bad) 14 36: 35(ptr) AccessChain 23(bad) 14
36: 19(fvec4) Load 35 37: 19(fvec4) Load 36
Store 34(badorder3) 36 Store 34(badorder3) 37
Branch 32 Branch 32
32: Label 32: Label
39: 6(float) Load 38(f) 40: 6(float) Load 39(f)
40: 17(ptr) AccessChain 12 14 14 41: 17(ptr) AccessChain 12 14 14
Store 40 39 Store 41 40
Return Return
FunctionEnd FunctionEnd

View File

@ -5,16 +5,16 @@ Warning, version 430 is not yet complete; most version-specific features are pre
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 103 // Id's are bound by 103
Source GLSL 430
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 77 38 43
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 430
Name 4 "main" Name 4 "main"
Name 17 "foo(f1[5][7];" Name 17 "foo(f1[5][7];"
Name 16 "a" Name 16 "a"
@ -33,8 +33,6 @@ Linked fragment stage:
Name 93 "uAofA" Name 93 "uAofA"
MemberName 93(uAofA) 0 "f" MemberName 93(uAofA) 0 "f"
Name 97 "nameAofA" Name 97 "nameAofA"
Decorate 43(g5) Smooth
Decorate 77(infloat) Smooth
Decorate 93(uAofA) GLSLShared Decorate 93(uAofA) GLSLShared
Decorate 93(uAofA) Block Decorate 93(uAofA) Block
2: TypeVoid 2: TypeVoid
@ -58,8 +56,8 @@ Linked fragment stage:
37: TypePointer Output 6(float) 37: TypePointer Output 6(float)
38(outfloat): 37(ptr) Variable Output 38(outfloat): 37(ptr) Variable Output
39: 6(float) Constant 0 39: 6(float) Constant 0
40: TypePointer PrivateGlobal 14 40: TypePointer Private 14
41(g4): 40(ptr) Variable PrivateGlobal 41(g4): 40(ptr) Variable Private
42: TypePointer Input 11 42: TypePointer Input 11
43(g5): 42(ptr) Variable Input 43(g5): 42(ptr) Variable Input
48: 6(float) Constant 1077936128 48: 6(float) Constant 1077936128
@ -74,15 +72,15 @@ Linked fragment stage:
61: TypeArray 59 60 61: TypeArray 59 60
62: 7(int) Constant 1 62: 7(int) Constant 1
63: TypeArray 61 62 63: TypeArray 61 62
64: TypePointer PrivateGlobal 63 64: TypePointer Private 63
65(many): 64(ptr) Variable PrivateGlobal 65(many): 64(ptr) Variable Private
66: TypePointer UniformConstant 21(int) 66: TypePointer UniformConstant 21(int)
67(i): 66(ptr) Variable UniformConstant 67(i): 66(ptr) Variable UniformConstant
69(j): 66(ptr) Variable UniformConstant 69(j): 66(ptr) Variable UniformConstant
71(k): 66(ptr) Variable UniformConstant 71(k): 66(ptr) Variable UniformConstant
76: TypePointer Input 6(float) 76: TypePointer Input 6(float)
77(infloat): 76(ptr) Variable Input 77(infloat): 76(ptr) Variable Input
79: TypePointer PrivateGlobal 6(float) 79: TypePointer Private 6(float)
91: TypeArray 6(float) 13 91: TypeArray 6(float) 13
92: TypeArray 91 60 92: TypeArray 91 60
93(uAofA): TypeStruct 92 93(uAofA): TypeStruct 92

View File

@ -3,32 +3,29 @@ spv.Operations.frag
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 416 // Id's are bound by 418
Source GLSL 130
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main"
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main" Name 4 "main"
Name 9 "v" Name 9 "v"
Name 11 "uv4" Name 11 "uv4"
Name 20 "i" Name 20 "i"
Name 22 "ui" Name 22 "ui"
Name 169 "uf" Name 172 "uf"
Name 216 "b" Name 219 "b"
Name 250 "ub41" Name 253 "ub41"
Name 252 "ub42" Name 255 "ub42"
Name 316 "f" Name 318 "f"
Name 395 "gl_FragColor" Name 397 "gl_FragColor"
Name 413 "uiv4" Name 415 "uiv4"
Name 415 "ub" Name 417 "ub"
Decorate 395(gl_FragColor) BuiltIn FragColor
Decorate 413(uiv4) NoStaticUse
Decorate 415(ub) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -40,36 +37,38 @@ Linked fragment stage:
19: TypePointer Function 18(int) 19: TypePointer Function 18(int)
21: TypePointer UniformConstant 18(int) 21: TypePointer UniformConstant 18(int)
22(ui): 21(ptr) Variable UniformConstant 22(ui): 21(ptr) Variable UniformConstant
168: TypePointer UniformConstant 6(float) 129: TypeInt 32 0
169(uf): 168(ptr) Variable UniformConstant 130: 129(int) Constant 0
214: TypeBool 131: TypePointer Function 6(float)
215: TypePointer Function 214(bool) 171: TypePointer UniformConstant 6(float)
219: TypeVector 214(bool) 4 172(uf): 171(ptr) Variable UniformConstant
249: TypePointer UniformConstant 219(bvec4) 217: TypeBool
250(ub41): 249(ptr) Variable UniformConstant 218: TypePointer Function 217(bool)
252(ub42): 249(ptr) Variable UniformConstant 222: TypeVector 217(bool) 4
306: 18(int) Constant 2 252: TypePointer UniformConstant 222(bvec4)
313: 18(int) Constant 1 253(ub41): 252(ptr) Variable UniformConstant
315: TypePointer Function 6(float) 255(ub42): 252(ptr) Variable UniformConstant
345: TypeVector 6(float) 3 309: 18(int) Constant 2
364: 6(float) Constant 1073741824 316: 18(int) Constant 1
371: 6(float) Constant 1065353216 347: TypeVector 6(float) 3
376: 18(int) Constant 66 366: 6(float) Constant 1073741824
382: 18(int) Constant 17 373: 6(float) Constant 1065353216
394: TypePointer Output 7(fvec4) 378: 18(int) Constant 66
395(gl_FragColor): 394(ptr) Variable Output 384: 18(int) Constant 17
411: TypeVector 18(int) 4 396: TypePointer Output 7(fvec4)
412: TypePointer UniformConstant 411(ivec4) 397(gl_FragColor): 396(ptr) Variable Output
413(uiv4): 412(ptr) Variable UniformConstant 413: TypeVector 18(int) 4
414: TypePointer UniformConstant 214(bool) 414: TypePointer UniformConstant 413(ivec4)
415(ub): 414(ptr) Variable UniformConstant 415(uiv4): 414(ptr) Variable UniformConstant
416: TypePointer UniformConstant 217(bool)
417(ub): 416(ptr) Variable UniformConstant
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
9(v): 8(ptr) Variable Function 9(v): 8(ptr) Variable Function
20(i): 19(ptr) Variable Function 20(i): 19(ptr) Variable Function
216(b): 215(ptr) Variable Function 219(b): 218(ptr) Variable Function
316(f): 315(ptr) Variable Function 318(f): 131(ptr) Variable Function
396: 8(ptr) Variable Function 398: 8(ptr) Variable Function
12: 7(fvec4) Load 11(uv4) 12: 7(fvec4) Load 11(uv4)
13: 7(fvec4) ExtInst 1(GLSL.std.450) 11(Radians) 12 13: 7(fvec4) ExtInst 1(GLSL.std.450) 11(Radians) 12
Store 9(v) 13 Store 9(v) 13
@ -174,7 +173,7 @@ Linked fragment stage:
98: 7(fvec4) FAdd 97 96 98: 7(fvec4) FAdd 97 96
Store 9(v) 98 Store 9(v) 98
99: 7(fvec4) Load 9(v) 99: 7(fvec4) Load 9(v)
100: 7(fvec4) ExtInst 1(GLSL.std.450) 32(Inversesqrt) 99 100: 7(fvec4) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 99
101: 7(fvec4) Load 9(v) 101: 7(fvec4) Load 9(v)
102: 7(fvec4) FAdd 101 100 102: 7(fvec4) FAdd 101 100
Store 9(v) 102 Store 9(v) 102
@ -210,346 +209,346 @@ Linked fragment stage:
127: 7(fvec4) FAdd 126 125 127: 7(fvec4) FAdd 126 125
Store 9(v) 127 Store 9(v) 127
128: 7(fvec4) Load 9(v) 128: 7(fvec4) Load 9(v)
129: 7(fvec4) Load 9(v) 132: 131(ptr) AccessChain 9(v) 130
130: 6(float) CompositeExtract 129 0 133: 6(float) Load 132
131: 7(fvec4) CompositeConstruct 130 130 130 130 134: 7(fvec4) CompositeConstruct 133 133 133 133
132: 7(fvec4) FMod 128 131 135: 7(fvec4) FMod 128 134
133: 7(fvec4) Load 9(v) 136: 7(fvec4) Load 9(v)
134: 7(fvec4) FAdd 133 132 137: 7(fvec4) FAdd 136 135
Store 9(v) 134 Store 9(v) 137
135: 7(fvec4) Load 9(v)
136: 7(fvec4) Load 11(uv4)
137: 7(fvec4) ExtInst 1(GLSL.std.450) 37(FMin) 135 136
138: 7(fvec4) Load 9(v) 138: 7(fvec4) Load 9(v)
139: 7(fvec4) FAdd 138 137 139: 7(fvec4) Load 11(uv4)
Store 9(v) 139 140: 7(fvec4) ExtInst 1(GLSL.std.450) 37(FMin) 138 139
140: 7(fvec4) Load 9(v) 141: 7(fvec4) Load 9(v)
141: 7(fvec4) Load 11(uv4) 142: 7(fvec4) FAdd 141 140
142: 7(fvec4) ExtInst 1(GLSL.std.450) 40(FMax) 140 141 Store 9(v) 142
143: 7(fvec4) Load 9(v) 143: 7(fvec4) Load 9(v)
144: 7(fvec4) FAdd 143 142 144: 7(fvec4) Load 11(uv4)
Store 9(v) 144 145: 7(fvec4) ExtInst 1(GLSL.std.450) 40(FMax) 143 144
145: 7(fvec4) Load 9(v) 146: 7(fvec4) Load 9(v)
146: 7(fvec4) Load 11(uv4) 147: 7(fvec4) FAdd 146 145
147: 7(fvec4) Load 11(uv4) Store 9(v) 147
148: 7(fvec4) ExtInst 1(GLSL.std.450) 43(FClamp) 145 146 147 148: 7(fvec4) Load 9(v)
149: 7(fvec4) Load 9(v) 149: 7(fvec4) Load 11(uv4)
150: 7(fvec4) FAdd 149 148 150: 7(fvec4) Load 11(uv4)
Store 9(v) 150 151: 7(fvec4) ExtInst 1(GLSL.std.450) 43(FClamp) 148 149 150
151: 7(fvec4) Load 9(v)
152: 7(fvec4) Load 9(v) 152: 7(fvec4) Load 9(v)
153: 7(fvec4) Load 9(v) 153: 7(fvec4) FAdd 152 151
154: 7(fvec4) ExtInst 1(GLSL.std.450) 46(Mix) 151 152 153 Store 9(v) 153
154: 7(fvec4) Load 9(v)
155: 7(fvec4) Load 9(v) 155: 7(fvec4) Load 9(v)
156: 7(fvec4) FAdd 155 154 156: 7(fvec4) Load 9(v)
Store 9(v) 156 157: 7(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 154 155 156
157: 7(fvec4) Load 9(v)
158: 7(fvec4) Load 9(v) 158: 7(fvec4) Load 9(v)
159: 7(fvec4) ExtInst 1(GLSL.std.450) 47(Step) 157 158 159: 7(fvec4) FAdd 158 157
Store 9(v) 159
160: 7(fvec4) Load 9(v) 160: 7(fvec4) Load 9(v)
161: 7(fvec4) FAdd 160 159 161: 7(fvec4) Load 9(v)
Store 9(v) 161 162: 7(fvec4) ExtInst 1(GLSL.std.450) 48(Step) 160 161
162: 7(fvec4) Load 9(v)
163: 7(fvec4) Load 9(v) 163: 7(fvec4) Load 9(v)
164: 7(fvec4) Load 9(v) 164: 7(fvec4) FAdd 163 162
165: 7(fvec4) ExtInst 1(GLSL.std.450) 48(Smoothstep) 162 163 164 Store 9(v) 164
165: 7(fvec4) Load 9(v)
166: 7(fvec4) Load 9(v) 166: 7(fvec4) Load 9(v)
167: 7(fvec4) FAdd 166 165 167: 7(fvec4) Load 9(v)
Store 9(v) 167 168: 7(fvec4) ExtInst 1(GLSL.std.450) 49(SmoothStep) 165 166 167
170: 6(float) Load 169(uf) 169: 7(fvec4) Load 9(v)
171: 7(fvec4) Load 9(v) 170: 7(fvec4) FAdd 169 168
172: 7(fvec4) ExtInst 1(GLSL.std.450) 47(Step) 170 171 Store 9(v) 170
173: 7(fvec4) Load 9(v) 173: 6(float) Load 172(uf)
174: 7(fvec4) FAdd 173 172 174: 7(fvec4) Load 9(v)
Store 9(v) 174 175: 7(fvec4) ExtInst 1(GLSL.std.450) 48(Step) 173 174
175: 6(float) Load 169(uf) 176: 7(fvec4) Load 9(v)
176: 6(float) Load 169(uf) 177: 7(fvec4) FAdd 176 175
177: 7(fvec4) Load 9(v) Store 9(v) 177
178: 7(fvec4) ExtInst 1(GLSL.std.450) 48(Smoothstep) 175 176 177 178: 6(float) Load 172(uf)
179: 7(fvec4) Load 9(v) 179: 6(float) Load 172(uf)
180: 7(fvec4) FAdd 179 178 180: 7(fvec4) Load 9(v)
Store 9(v) 180 181: 7(fvec4) ExtInst 1(GLSL.std.450) 49(SmoothStep) 178 179 180
181: 7(fvec4) Load 9(v) 182: 7(fvec4) Load 9(v)
182: 7(fvec4) ExtInst 1(GLSL.std.450) 68(Normalize) 181 183: 7(fvec4) FAdd 182 181
183: 7(fvec4) Load 9(v) Store 9(v) 183
184: 7(fvec4) FAdd 183 182 184: 7(fvec4) Load 9(v)
Store 9(v) 184 185: 7(fvec4) ExtInst 1(GLSL.std.450) 69(Normalize) 184
185: 7(fvec4) Load 9(v)
186: 7(fvec4) Load 9(v) 186: 7(fvec4) Load 9(v)
187: 7(fvec4) Load 9(v) 187: 7(fvec4) FAdd 186 185
188: 7(fvec4) ExtInst 1(GLSL.std.450) 69(Faceforward) 185 186 187 Store 9(v) 187
188: 7(fvec4) Load 9(v)
189: 7(fvec4) Load 9(v) 189: 7(fvec4) Load 9(v)
190: 7(fvec4) FAdd 189 188 190: 7(fvec4) Load 9(v)
Store 9(v) 190 191: 7(fvec4) ExtInst 1(GLSL.std.450) 70(FaceForward) 188 189 190
191: 7(fvec4) Load 9(v)
192: 7(fvec4) Load 9(v) 192: 7(fvec4) Load 9(v)
193: 7(fvec4) ExtInst 1(GLSL.std.450) 70(Reflect) 191 192 193: 7(fvec4) FAdd 192 191
Store 9(v) 193
194: 7(fvec4) Load 9(v) 194: 7(fvec4) Load 9(v)
195: 7(fvec4) FAdd 194 193 195: 7(fvec4) Load 9(v)
Store 9(v) 195 196: 7(fvec4) ExtInst 1(GLSL.std.450) 71(Reflect) 194 195
196: 7(fvec4) Load 9(v)
197: 7(fvec4) Load 9(v) 197: 7(fvec4) Load 9(v)
198: 6(float) Load 169(uf) 198: 7(fvec4) FAdd 197 196
199: 7(fvec4) ExtInst 1(GLSL.std.450) 71(Refract) 196 197 198 Store 9(v) 198
199: 7(fvec4) Load 9(v)
200: 7(fvec4) Load 9(v) 200: 7(fvec4) Load 9(v)
201: 7(fvec4) FAdd 200 199 201: 6(float) Load 172(uf)
Store 9(v) 201 202: 7(fvec4) ExtInst 1(GLSL.std.450) 72(Refract) 199 200 201
202: 7(fvec4) Load 9(v) 203: 7(fvec4) Load 9(v)
203: 7(fvec4) DPdx 202 204: 7(fvec4) FAdd 203 202
204: 7(fvec4) Load 9(v) Store 9(v) 204
205: 7(fvec4) FAdd 204 203 205: 7(fvec4) Load 9(v)
Store 9(v) 205 206: 7(fvec4) DPdx 205
206: 7(fvec4) Load 9(v) 207: 7(fvec4) Load 9(v)
207: 7(fvec4) DPdy 206 208: 7(fvec4) FAdd 207 206
208: 7(fvec4) Load 9(v) Store 9(v) 208
209: 7(fvec4) FAdd 208 207 209: 7(fvec4) Load 9(v)
Store 9(v) 209 210: 7(fvec4) DPdy 209
210: 7(fvec4) Load 9(v) 211: 7(fvec4) Load 9(v)
211: 7(fvec4) Fwidth 210 212: 7(fvec4) FAdd 211 210
212: 7(fvec4) Load 9(v) Store 9(v) 212
213: 7(fvec4) FAdd 212 211 213: 7(fvec4) Load 9(v)
Store 9(v) 213 214: 7(fvec4) Fwidth 213
217: 7(fvec4) Load 9(v) 215: 7(fvec4) Load 9(v)
218: 7(fvec4) Load 11(uv4) 216: 7(fvec4) FAdd 215 214
220: 219(bvec4) FOrdLessThan 217 218 Store 9(v) 216
221: 214(bool) Any 220 220: 7(fvec4) Load 9(v)
Store 216(b) 221 221: 7(fvec4) Load 11(uv4)
222: 214(bool) Load 216(b) 223: 222(bvec4) FOrdLessThan 220 221
SelectionMerge 224 None 224: 217(bool) Any 223
BranchConditional 222 223 224 Store 219(b) 224
223: Label 225: 217(bool) Load 219(b)
225: 7(fvec4) Load 9(v) SelectionMerge 227 None
226: 7(fvec4) Load 11(uv4) BranchConditional 225 226 227
227: 219(bvec4) FOrdLessThanEqual 225 226 226: Label
228: 214(bool) Any 227 228: 7(fvec4) Load 9(v)
Branch 224 229: 7(fvec4) Load 11(uv4)
224: Label 230: 222(bvec4) FOrdLessThanEqual 228 229
229: 214(bool) Phi 222 5 228 223 231: 217(bool) Any 230
Store 216(b) 229 Branch 227
230: 214(bool) Load 216(b) 227: Label
SelectionMerge 232 None 232: 217(bool) Phi 225 5 231 226
BranchConditional 230 231 232 Store 219(b) 232
231: Label 233: 217(bool) Load 219(b)
233: 7(fvec4) Load 9(v) SelectionMerge 235 None
234: 7(fvec4) Load 11(uv4) BranchConditional 233 234 235
235: 219(bvec4) FOrdGreaterThan 233 234 234: Label
236: 214(bool) Any 235 236: 7(fvec4) Load 9(v)
Branch 232 237: 7(fvec4) Load 11(uv4)
232: Label 238: 222(bvec4) FOrdGreaterThan 236 237
237: 214(bool) Phi 230 224 236 231 239: 217(bool) Any 238
Store 216(b) 237 Branch 235
238: 214(bool) Load 216(b) 235: Label
SelectionMerge 240 None 240: 217(bool) Phi 233 227 239 234
BranchConditional 238 239 240 Store 219(b) 240
239: Label 241: 217(bool) Load 219(b)
241: 7(fvec4) Load 9(v) SelectionMerge 243 None
242: 7(fvec4) Load 11(uv4) BranchConditional 241 242 243
243: 219(bvec4) FOrdGreaterThanEqual 241 242 242: Label
244: 214(bool) Any 243 244: 7(fvec4) Load 9(v)
Branch 240 245: 7(fvec4) Load 11(uv4)
240: Label 246: 222(bvec4) FOrdGreaterThanEqual 244 245
245: 214(bool) Phi 238 232 244 239 247: 217(bool) Any 246
Store 216(b) 245 Branch 243
246: 214(bool) Load 216(b) 243: Label
SelectionMerge 248 None 248: 217(bool) Phi 241 235 247 242
BranchConditional 246 247 248 Store 219(b) 248
247: Label 249: 217(bool) Load 219(b)
251: 219(bvec4) Load 250(ub41) SelectionMerge 251 None
253: 219(bvec4) Load 252(ub42) BranchConditional 249 250 251
254: 219(bvec4) IEqual 251 253 250: Label
255: 214(bool) Any 254 254: 222(bvec4) Load 253(ub41)
Branch 248 256: 222(bvec4) Load 255(ub42)
248: Label 257: 222(bvec4) IEqual 254 256
256: 214(bool) Phi 246 240 255 247 258: 217(bool) Any 257
Store 216(b) 256 Branch 251
257: 214(bool) Load 216(b) 251: Label
SelectionMerge 259 None 259: 217(bool) Phi 249 243 258 250
BranchConditional 257 258 259 Store 219(b) 259
258: Label 260: 217(bool) Load 219(b)
260: 219(bvec4) Load 250(ub41) SelectionMerge 262 None
261: 219(bvec4) Load 252(ub42) BranchConditional 260 261 262
262: 219(bvec4) INotEqual 260 261 261: Label
263: 214(bool) Any 262 263: 222(bvec4) Load 253(ub41)
Branch 259 264: 222(bvec4) Load 255(ub42)
259: Label 265: 222(bvec4) INotEqual 263 264
264: 214(bool) Phi 257 248 263 258 266: 217(bool) Any 265
Store 216(b) 264 Branch 262
265: 214(bool) Load 216(b) 262: Label
266: 219(bvec4) Load 250(ub41) 267: 217(bool) Phi 260 251 266 261
267: 214(bool) Any 266 Store 219(b) 267
268: 214(bool) LogicalAnd 265 267 268: 217(bool) Load 219(b)
Store 216(b) 268 269: 222(bvec4) Load 253(ub41)
269: 214(bool) Load 216(b) 270: 217(bool) Any 269
270: 219(bvec4) Load 250(ub41) 271: 217(bool) LogicalAnd 268 270
271: 214(bool) All 270 Store 219(b) 271
272: 214(bool) LogicalAnd 269 271 272: 217(bool) Load 219(b)
Store 216(b) 272 273: 222(bvec4) Load 253(ub41)
273: 214(bool) Load 216(b) 274: 217(bool) All 273
SelectionMerge 275 None 275: 217(bool) LogicalAnd 272 274
BranchConditional 273 274 275 Store 219(b) 275
274: Label 276: 217(bool) Load 219(b)
276: 219(bvec4) Load 250(ub41) SelectionMerge 278 None
277: 219(bvec4) LogicalNot 276 BranchConditional 276 277 278
278: 214(bool) Any 277 277: Label
Branch 275 279: 222(bvec4) Load 253(ub41)
275: Label 280: 222(bvec4) LogicalNot 279
279: 214(bool) Phi 273 259 278 274 281: 217(bool) Any 280
Store 216(b) 279 Branch 278
280: 18(int) Load 20(i) 278: Label
281: 18(int) Load 22(ui) 282: 217(bool) Phi 276 262 281 277
282: 18(int) IAdd 280 281 Store 219(b) 282
283: 18(int) Load 20(i) 283: 18(int) Load 20(i)
284: 18(int) IMul 282 283 284: 18(int) Load 22(ui)
285: 18(int) Load 22(ui) 285: 18(int) IAdd 283 284
286: 18(int) ISub 284 285 286: 18(int) Load 20(i)
287: 18(int) Load 20(i) 287: 18(int) IMul 285 286
288: 18(int) SDiv 286 287 288: 18(int) Load 22(ui)
Store 20(i) 288 289: 18(int) ISub 287 288
289: 18(int) Load 20(i) 290: 18(int) Load 20(i)
290: 18(int) Load 22(ui) 291: 18(int) SDiv 289 290
291: 18(int) SMod 289 290
Store 20(i) 291 Store 20(i) 291
292: 18(int) Load 20(i) 292: 18(int) Load 20(i)
293: 18(int) Load 22(ui) 293: 18(int) Load 22(ui)
294: 214(bool) IEqual 292 293 294: 18(int) SMod 292 293
295: 214(bool) LogicalNot 294 Store 20(i) 294
SelectionMerge 297 None 295: 18(int) Load 20(i)
BranchConditional 295 296 297 296: 18(int) Load 22(ui)
296: Label 297: 217(bool) IEqual 295 296
298: 18(int) Load 20(i) 298: 217(bool) LogicalNot 297
299: 18(int) Load 22(ui) SelectionMerge 300 None
300: 214(bool) INotEqual 298 299 BranchConditional 298 299 300
299: Label
301: 18(int) Load 20(i) 301: 18(int) Load 20(i)
302: 18(int) Load 22(ui) 302: 18(int) Load 22(ui)
303: 214(bool) IEqual 301 302 303: 217(bool) INotEqual 301 302
304: 214(bool) LogicalAnd 300 303 304: 18(int) Load 20(i)
305: 18(int) Load 20(i) 305: 18(int) Load 22(ui)
307: 214(bool) INotEqual 305 306 306: 217(bool) IEqual 304 305
308: 214(bool) LogicalNotEqual 304 307 307: 217(bool) LogicalAnd 303 306
Branch 297 308: 18(int) Load 20(i)
297: Label 310: 217(bool) INotEqual 308 309
309: 214(bool) Phi 294 275 308 296 311: 217(bool) LogicalNotEqual 307 310
SelectionMerge 311 None Branch 300
BranchConditional 309 310 311 300: Label
310: Label 312: 217(bool) Phi 297 278 311 299
312: 18(int) Load 20(i) SelectionMerge 314 None
314: 18(int) IAdd 312 313 BranchConditional 312 313 314
Store 20(i) 314 313: Label
Branch 311 315: 18(int) Load 20(i)
311: Label 317: 18(int) IAdd 315 316
317: 6(float) Load 169(uf) Store 20(i) 317
318: 6(float) Load 169(uf) Branch 314
319: 6(float) FAdd 317 318 314: Label
320: 6(float) Load 169(uf) 319: 6(float) Load 172(uf)
321: 6(float) FMul 319 320 320: 6(float) Load 172(uf)
322: 6(float) Load 169(uf) 321: 6(float) FAdd 319 320
323: 6(float) FSub 321 322 322: 6(float) Load 172(uf)
324: 6(float) Load 169(uf) 323: 6(float) FMul 321 322
325: 6(float) FDiv 323 324 324: 6(float) Load 172(uf)
Store 316(f) 325 325: 6(float) FSub 323 324
326: 7(fvec4) Load 9(v) 326: 6(float) Load 172(uf)
327: 6(float) ExtInst 1(GLSL.std.450) 65(Length) 326 327: 6(float) FDiv 325 326
328: 6(float) Load 316(f) Store 318(f) 327
329: 6(float) FAdd 328 327 328: 7(fvec4) Load 9(v)
Store 316(f) 329 329: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 328
330: 7(fvec4) Load 9(v) 330: 6(float) Load 318(f)
331: 7(fvec4) Load 9(v) 331: 6(float) FAdd 330 329
332: 6(float) ExtInst 1(GLSL.std.450) 66(Distance) 330 331 Store 318(f) 331
333: 6(float) Load 316(f) 332: 7(fvec4) Load 9(v)
334: 6(float) FAdd 333 332 333: 7(fvec4) Load 9(v)
Store 316(f) 334 334: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 332 333
335: 7(fvec4) Load 9(v) 335: 6(float) Load 318(f)
336: 7(fvec4) Load 9(v) 336: 6(float) FAdd 335 334
337: 6(float) Dot 335 336 Store 318(f) 336
338: 6(float) Load 316(f) 337: 7(fvec4) Load 9(v)
339: 6(float) FAdd 338 337 338: 7(fvec4) Load 9(v)
Store 316(f) 339 339: 6(float) Dot 337 338
340: 6(float) Load 316(f) 340: 6(float) Load 318(f)
341: 6(float) Load 169(uf) 341: 6(float) FAdd 340 339
342: 6(float) FMul 340 341 Store 318(f) 341
343: 6(float) Load 316(f) 342: 6(float) Load 318(f)
344: 6(float) FAdd 343 342 343: 6(float) Load 172(uf)
Store 316(f) 344 344: 6(float) FMul 342 343
346: 7(fvec4) Load 9(v) 345: 6(float) Load 318(f)
347: 345(fvec3) VectorShuffle 346 346 0 1 2 346: 6(float) FAdd 345 344
Store 318(f) 346
348: 7(fvec4) Load 9(v) 348: 7(fvec4) Load 9(v)
349: 345(fvec3) VectorShuffle 348 348 0 1 2 349: 347(fvec3) VectorShuffle 348 348 0 1 2
350: 345(fvec3) ExtInst 1(GLSL.std.450) 67(Cross) 347 349 350: 7(fvec4) Load 9(v)
351: 6(float) CompositeExtract 350 0 351: 347(fvec3) VectorShuffle 350 350 0 1 2
352: 6(float) Load 316(f) 352: 347(fvec3) ExtInst 1(GLSL.std.450) 68(Cross) 349 351
353: 6(float) FAdd 352 351 353: 6(float) CompositeExtract 352 0
Store 316(f) 353 354: 6(float) Load 318(f)
354: 6(float) Load 316(f) 355: 6(float) FAdd 354 353
355: 6(float) Load 169(uf) Store 318(f) 355
356: 214(bool) FOrdEqual 354 355 356: 6(float) Load 318(f)
357: 214(bool) LogicalNot 356 357: 6(float) Load 172(uf)
SelectionMerge 359 None 358: 217(bool) FOrdEqual 356 357
BranchConditional 357 358 359 359: 217(bool) LogicalNot 358
358: Label SelectionMerge 361 None
360: 6(float) Load 316(f) BranchConditional 359 360 361
361: 6(float) Load 169(uf) 360: Label
362: 214(bool) FOrdNotEqual 360 361 362: 6(float) Load 318(f)
363: 6(float) Load 316(f) 363: 6(float) Load 172(uf)
365: 214(bool) FOrdNotEqual 363 364 364: 217(bool) FOrdNotEqual 362 363
366: 214(bool) LogicalAnd 362 365 365: 6(float) Load 318(f)
Branch 359 367: 217(bool) FOrdNotEqual 365 366
359: Label 368: 217(bool) LogicalAnd 364 367
367: 214(bool) Phi 356 311 366 358 Branch 361
SelectionMerge 369 None 361: Label
BranchConditional 367 368 369 369: 217(bool) Phi 358 314 368 360
368: Label SelectionMerge 371 None
370: 6(float) Load 316(f) BranchConditional 369 370 371
372: 6(float) FAdd 370 371 370: Label
Store 316(f) 372 372: 6(float) Load 318(f)
Branch 369 374: 6(float) FAdd 372 373
369: Label Store 318(f) 374
373: 18(int) Load 22(ui) Branch 371
374: 18(int) Load 20(i) 371: Label
375: 18(int) BitwiseAnd 374 373 375: 18(int) Load 22(ui)
Store 20(i) 375 376: 18(int) Load 20(i)
377: 18(int) Load 20(i) 377: 18(int) BitwiseAnd 376 375
378: 18(int) BitwiseOr 377 376 Store 20(i) 377
Store 20(i) 378 379: 18(int) Load 20(i)
379: 18(int) Load 22(ui) 380: 18(int) BitwiseOr 379 378
380: 18(int) Load 20(i) Store 20(i) 380
381: 18(int) BitwiseXor 380 379 381: 18(int) Load 22(ui)
Store 20(i) 381 382: 18(int) Load 20(i)
383: 18(int) Load 20(i) 383: 18(int) BitwiseXor 382 381
384: 18(int) SMod 383 382 Store 20(i) 383
Store 20(i) 384
385: 18(int) Load 20(i) 385: 18(int) Load 20(i)
386: 18(int) ShiftRightArithmetic 385 306 386: 18(int) SMod 385 384
Store 20(i) 386 Store 20(i) 386
387: 18(int) Load 22(ui) 387: 18(int) Load 20(i)
388: 18(int) Load 20(i) 388: 18(int) ShiftRightArithmetic 387 309
389: 18(int) ShiftLeftLogical 388 387 Store 20(i) 388
Store 20(i) 389 389: 18(int) Load 22(ui)
390: 18(int) Load 20(i) 390: 18(int) Load 20(i)
391: 18(int) Not 390 391: 18(int) ShiftLeftLogical 390 389
Store 20(i) 391 Store 20(i) 391
392: 214(bool) Load 216(b) 392: 18(int) Load 20(i)
393: 214(bool) LogicalNot 392 393: 18(int) Not 392
Store 216(b) 393 Store 20(i) 393
397: 214(bool) Load 216(b) 394: 217(bool) Load 219(b)
SelectionMerge 399 None 395: 217(bool) LogicalNot 394
BranchConditional 397 398 408 Store 219(b) 395
398: Label 399: 217(bool) Load 219(b)
400: 18(int) Load 20(i) SelectionMerge 401 None
401: 6(float) ConvertSToF 400 BranchConditional 399 400 410
402: 7(fvec4) CompositeConstruct 401 401 401 401 400: Label
403: 6(float) Load 316(f) 402: 18(int) Load 20(i)
403: 6(float) ConvertSToF 402
404: 7(fvec4) CompositeConstruct 403 403 403 403 404: 7(fvec4) CompositeConstruct 403 403 403 403
405: 7(fvec4) FAdd 402 404 405: 6(float) Load 318(f)
406: 7(fvec4) Load 9(v) 406: 7(fvec4) CompositeConstruct 405 405 405 405
407: 7(fvec4) FAdd 405 406 407: 7(fvec4) FAdd 404 406
Store 396 407 408: 7(fvec4) Load 9(v)
Branch 399 409: 7(fvec4) FAdd 407 408
408: Label Store 398 409
409: 7(fvec4) Load 9(v) Branch 401
Store 396 409 410: Label
Branch 399 411: 7(fvec4) Load 9(v)
399: Label Store 398 411
410: 7(fvec4) Load 396 Branch 401
Store 395(gl_FragColor) 410 401: Label
412: 7(fvec4) Load 398
Store 397(gl_FragColor) 412
Return Return
FunctionEnd FunctionEnd

View File

@ -5,16 +5,16 @@ Warning, version 420 is not yet complete; most version-specific features are pre
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 197 // Id's are bound by 197
Source GLSL 420
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 65
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 420
Name 4 "main" Name 4 "main"
Name 8 "S" Name 8 "S"
MemberName 8(S) 0 "color" MemberName 8(S) 0 "color"
@ -88,6 +88,7 @@ Linked fragment stage:
68: 67(int) Constant 0 68: 67(int) Constant 0
95: TypeVector 6(float) 2 95: TypeVector 6(float) 2
109: 67(int) Constant 2 109: 67(int) Constant 2
136: TypePointer Output 6(float)
141: 6(float) Constant 0 141: 6(float) Constant 0
142: 7(fvec3) ConstantComposite 141 141 141 142: 7(fvec3) ConstantComposite 141 141 141
143: TypePointer Function 8(S) 143: TypePointer Function 8(S)
@ -306,12 +307,11 @@ Linked fragment stage:
59: Label 59: Label
134: 13(int) Load 57(comp) 134: 13(int) Load 57(comp)
135: 6(float) CompositeExtract 56(i) 0 0 135: 6(float) CompositeExtract 56(i) 0 0
136: 7(fvec3) Load 65(OutColor) 137: 136(ptr) AccessChain 65(OutColor) 134
137: 6(float) VectorExtractDynamic 136 134 138: 6(float) Load 137
138: 6(float) FAdd 137 135 139: 6(float) FAdd 138 135
139: 7(fvec3) Load 65(OutColor) 140: 136(ptr) AccessChain 65(OutColor) 134
140: 7(fvec3) VectorInsertDynamic 139 138 134 Store 140 139
Store 65(OutColor) 140
Return Return
FunctionEnd FunctionEnd
62(GetColor13(struct-S-vf31;i1;): 2 Function None 15 62(GetColor13(struct-S-vf31;i1;): 2 Function None 15

View File

@ -3,27 +3,25 @@ spv.always-discard.frag
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 80 // Id's are bound by 84
Source GLSL 110
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 21
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 110
Name 4 "main" Name 4 "main"
Name 9 "white" Name 9 "white"
Name 12 "black" Name 12 "black"
Name 15 "color" Name 15 "color"
Name 18 "x" Name 18 "x"
Name 21 "tex_coord" Name 21 "tex_coord"
Name 27 "y" Name 30 "y"
Name 32 "radius" Name 36 "radius"
Name 55 "gl_FragColor" Name 59 "gl_FragColor"
Decorate 21(tex_coord) Smooth
Decorate 55(gl_FragColor) BuiltIn FragColor
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -37,94 +35,98 @@ Linked fragment stage:
19: TypeVector 6(float) 2 19: TypeVector 6(float) 2
20: TypePointer Input 19(fvec2) 20: TypePointer Input 19(fvec2)
21(tex_coord): 20(ptr) Variable Input 21(tex_coord): 20(ptr) Variable Input
24: 6(float) Constant 1073741824 22: TypeInt 32 0
42: TypeBool 23: 22(int) Constant 0
47: 6(float) Constant 1066192077 24: TypePointer Input 6(float)
54: TypePointer Output 7(fvec4) 27: 6(float) Constant 1073741824
55(gl_FragColor): 54(ptr) Variable Output 31: 22(int) Constant 1
58: 6(float) Constant 1067030938 46: TypeBool
67: 6(float) Constant 1061158912 51: 6(float) Constant 1066192077
72: 6(float) Constant 1098907648 58: TypePointer Output 7(fvec4)
59(gl_FragColor): 58(ptr) Variable Output
62: 6(float) Constant 1067030938
71: 6(float) Constant 1061158912
76: 6(float) Constant 1098907648
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
9(white): 8(ptr) Variable Function 9(white): 8(ptr) Variable Function
12(black): 8(ptr) Variable Function 12(black): 8(ptr) Variable Function
15(color): 8(ptr) Variable Function 15(color): 8(ptr) Variable Function
18(x): 17(ptr) Variable Function 18(x): 17(ptr) Variable Function
27(y): 17(ptr) Variable Function 30(y): 17(ptr) Variable Function
32(radius): 17(ptr) Variable Function 36(radius): 17(ptr) Variable Function
Store 9(white) 11 Store 9(white) 11
Store 12(black) 14 Store 12(black) 14
16: 7(fvec4) Load 9(white) 16: 7(fvec4) Load 9(white)
Store 15(color) 16 Store 15(color) 16
22: 19(fvec2) Load 21(tex_coord) 25: 24(ptr) AccessChain 21(tex_coord) 23
23: 6(float) CompositeExtract 22 0 26: 6(float) Load 25
25: 6(float) FMul 23 24 28: 6(float) FMul 26 27
26: 6(float) FSub 25 10 29: 6(float) FSub 28 10
Store 18(x) 26 Store 18(x) 29
28: 19(fvec2) Load 21(tex_coord) 32: 24(ptr) AccessChain 21(tex_coord) 31
29: 6(float) CompositeExtract 28 1 33: 6(float) Load 32
30: 6(float) FMul 29 24 34: 6(float) FMul 33 27
31: 6(float) FSub 30 10 35: 6(float) FSub 34 10
Store 27(y) 31 Store 30(y) 35
33: 6(float) Load 18(x) 37: 6(float) Load 18(x)
34: 6(float) Load 18(x) 38: 6(float) Load 18(x)
35: 6(float) FMul 33 34 39: 6(float) FMul 37 38
36: 6(float) Load 27(y) 40: 6(float) Load 30(y)
37: 6(float) Load 27(y) 41: 6(float) Load 30(y)
38: 6(float) FMul 36 37 42: 6(float) FMul 40 41
39: 6(float) FAdd 35 38 43: 6(float) FAdd 39 42
40: 6(float) ExtInst 1(GLSL.std.450) 31(Sqrt) 39 44: 6(float) ExtInst 1(GLSL.std.450) 31(Sqrt) 43
Store 32(radius) 40 Store 36(radius) 44
41: 6(float) Load 32(radius) 45: 6(float) Load 36(radius)
43: 42(bool) FOrdGreaterThan 41 10 47: 46(bool) FOrdGreaterThan 45 10
SelectionMerge 45 None SelectionMerge 49 None
BranchConditional 43 44 45 BranchConditional 47 48 49
44: Label 48: Label
46: 6(float) Load 32(radius) 50: 6(float) Load 36(radius)
48: 42(bool) FOrdGreaterThan 46 47 52: 46(bool) FOrdGreaterThan 50 51
SelectionMerge 50 None SelectionMerge 54 None
BranchConditional 48 49 50 BranchConditional 52 53 54
49: Label 53: Label
51: 7(fvec4) Load 15(color) 55: 7(fvec4) Load 15(color)
52: 7(fvec4) CompositeConstruct 10 10 10 10 56: 7(fvec4) CompositeConstruct 10 10 10 10
53: 7(fvec4) FAdd 51 52 57: 7(fvec4) FAdd 55 56
Store 15(color) 53 Store 15(color) 57
Branch 50 Branch 54
50: Label 54: Label
56: 7(fvec4) Load 15(color) 60: 7(fvec4) Load 15(color)
Store 55(gl_FragColor) 56 Store 59(gl_FragColor) 60
57: 6(float) Load 32(radius) 61: 6(float) Load 36(radius)
59: 42(bool) FOrdGreaterThan 57 58 63: 46(bool) FOrdGreaterThan 61 62
SelectionMerge 61 None SelectionMerge 65 None
BranchConditional 59 60 61 BranchConditional 63 64 65
60: Label 64: Label
62: 7(fvec4) Load 15(color) 66: 7(fvec4) Load 15(color)
63: 7(fvec4) CompositeConstruct 10 10 10 10 67: 7(fvec4) CompositeConstruct 10 10 10 10
64: 7(fvec4) FAdd 62 63 68: 7(fvec4) FAdd 66 67
Store 15(color) 64 Store 15(color) 68
Branch 61 Branch 65
61: Label 65: Label
Branch 45 Branch 49
45: Label 49: Label
Kill Kill
65: Label 69: Label
66: 6(float) Load 32(radius) 70: 6(float) Load 36(radius)
68: 42(bool) FOrdGreaterThanEqual 66 67 72: 46(bool) FOrdGreaterThanEqual 70 71
SelectionMerge 70 None SelectionMerge 74 None
BranchConditional 68 69 70 BranchConditional 72 73 74
69: Label 73: Label
71: 6(float) Load 32(radius) 75: 6(float) Load 36(radius)
73: 6(float) ExtInst 1(GLSL.std.450) 26(Pow) 71 72 77: 6(float) ExtInst 1(GLSL.std.450) 26(Pow) 75 76
74: 6(float) FDiv 73 24 78: 6(float) FDiv 77 27
75: 6(float) ExtInst 1(GLSL.std.450) 4(FAbs) 74 79: 6(float) ExtInst 1(GLSL.std.450) 4(FAbs) 78
76: 7(fvec4) Load 15(color) 80: 7(fvec4) Load 15(color)
77: 7(fvec4) CompositeConstruct 75 75 75 75 81: 7(fvec4) CompositeConstruct 79 79 79 79
78: 7(fvec4) FSub 76 77 82: 7(fvec4) FSub 80 81
Store 15(color) 78 Store 15(color) 82
Branch 70 Branch 74
70: Label 74: Label
79: 7(fvec4) Load 15(color) 83: 7(fvec4) Load 15(color)
Store 55(gl_FragColor) 79 Store 59(gl_FragColor) 83
Return Return
FunctionEnd FunctionEnd

View File

@ -3,26 +3,24 @@ spv.always-discard2.frag
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 36 // Id's are bound by 40
Source GLSL 110
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 21
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 110
Name 4 "main" Name 4 "main"
Name 9 "white" Name 9 "white"
Name 12 "black" Name 12 "black"
Name 15 "color" Name 15 "color"
Name 18 "x" Name 18 "x"
Name 21 "tex_coord" Name 21 "tex_coord"
Name 27 "y" Name 30 "y"
Name 34 "gl_FragColor" Name 38 "gl_FragColor"
Decorate 21(tex_coord) Smooth
Decorate 34(gl_FragColor) BuiltIn FragColor
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -36,29 +34,33 @@ Linked fragment stage:
19: TypeVector 6(float) 2 19: TypeVector 6(float) 2
20: TypePointer Input 19(fvec2) 20: TypePointer Input 19(fvec2)
21(tex_coord): 20(ptr) Variable Input 21(tex_coord): 20(ptr) Variable Input
24: 6(float) Constant 1073741824 22: TypeInt 32 0
33: TypePointer Output 7(fvec4) 23: 22(int) Constant 0
34(gl_FragColor): 33(ptr) Variable Output 24: TypePointer Input 6(float)
27: 6(float) Constant 1073741824
31: 22(int) Constant 1
37: TypePointer Output 7(fvec4)
38(gl_FragColor): 37(ptr) Variable Output
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
9(white): 8(ptr) Variable Function 9(white): 8(ptr) Variable Function
12(black): 8(ptr) Variable Function 12(black): 8(ptr) Variable Function
15(color): 8(ptr) Variable Function 15(color): 8(ptr) Variable Function
18(x): 17(ptr) Variable Function 18(x): 17(ptr) Variable Function
27(y): 17(ptr) Variable Function 30(y): 17(ptr) Variable Function
Store 9(white) 11 Store 9(white) 11
Store 12(black) 14 Store 12(black) 14
16: 7(fvec4) Load 9(white) 16: 7(fvec4) Load 9(white)
Store 15(color) 16 Store 15(color) 16
22: 19(fvec2) Load 21(tex_coord) 25: 24(ptr) AccessChain 21(tex_coord) 23
23: 6(float) CompositeExtract 22 0 26: 6(float) Load 25
25: 6(float) FMul 23 24 28: 6(float) FMul 26 27
26: 6(float) FSub 25 10 29: 6(float) FSub 28 10
Store 18(x) 26 Store 18(x) 29
28: 19(fvec2) Load 21(tex_coord) 32: 24(ptr) AccessChain 21(tex_coord) 31
29: 6(float) CompositeExtract 28 1 33: 6(float) Load 32
30: 6(float) FMul 29 24 34: 6(float) FMul 33 27
31: 6(float) FSub 30 10 35: 6(float) FSub 34 10
Store 27(y) 31 Store 30(y) 35
Kill Kill
FunctionEnd FunctionEnd

View File

@ -6,16 +6,16 @@ Linked compute stage:
TBD functionality: Is atomic_uint an opaque handle in the uniform storage class, or an addresses in the atomic storage class? TBD functionality: Is atomic_uint an opaque handle in the uniform storage class, or an addresses in the atomic storage class?
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 64 // Id's are bound by 74
Source ESSL 310
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main" EntryPoint GLCompute 4 "main"
ExecutionMode 4 LocalSize 1 1 1 ExecutionMode 4 LocalSize 1 1 1
Source ESSL 310
Name 4 "main" Name 4 "main"
Name 10 "func(au1;" Name 10 "func(au1;"
Name 9 "c" Name 9 "c"
@ -29,14 +29,19 @@ TBD functionality: Is atomic_uint an opaque handle in the uniform storage class,
Name 40 "origu" Name 40 "origu"
Name 42 "atomu" Name 42 "atomu"
Name 44 "value" Name 44 "value"
Name 61 "arrX" Name 61 "dataSSB"
Name 62 "arrY" MemberName 61(dataSSB) 0 "f"
Name 63 "arrZ" MemberName 61(dataSSB) 1 "n_frames_rendered"
Name 63 "result"
Name 71 "arrX"
Name 72 "arrY"
Name 73 "arrZ"
Decorate 20(counter) Binding 0 Decorate 20(counter) Binding 0
Decorate 28(countArr) Binding 0 Decorate 28(countArr) Binding 0
Decorate 61(arrX) NoStaticUse MemberDecorate 61(dataSSB) 0 Offset 0
Decorate 62(arrY) NoStaticUse MemberDecorate 61(dataSSB) 1 Offset 16
Decorate 63(arrZ) NoStaticUse Decorate 61(dataSSB) BufferBlock
Decorate 63(result) Binding 0
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 0 6: TypeInt 32 0
@ -44,7 +49,7 @@ TBD functionality: Is atomic_uint an opaque handle in the uniform storage class,
8: TypeFunction 6(int) 7(ptr) 8: TypeFunction 6(int) 7(ptr)
14: 6(int) Constant 1 14: 6(int) Constant 1
15: 6(int) Constant 0 15: 6(int) Constant 0
18: 6(int) Constant 256 18: 6(int) Constant 1024
19: TypePointer AtomicCounter 6(int) 19: TypePointer AtomicCounter 6(int)
20(counter): 19(ptr) Variable AtomicCounter 20(counter): 19(ptr) Variable AtomicCounter
25: 6(int) Constant 4 25: 6(int) Constant 4
@ -54,21 +59,29 @@ TBD functionality: Is atomic_uint an opaque handle in the uniform storage class,
29: TypeInt 32 1 29: TypeInt 32 1
30: 29(int) Constant 2 30: 29(int) Constant 2
34: TypePointer Function 29(int) 34: TypePointer Function 29(int)
36: TypePointer WorkgroupLocal 29(int) 36: TypePointer Workgroup 29(int)
37(atomi): 36(ptr) Variable WorkgroupLocal 37(atomi): 36(ptr) Variable Workgroup
38: 29(int) Constant 3 38: 29(int) Constant 3
41: TypePointer WorkgroupLocal 6(int) 41: TypePointer Workgroup 6(int)
42(atomu): 41(ptr) Variable WorkgroupLocal 42(atomu): 41(ptr) Variable Workgroup
43: TypePointer UniformConstant 6(int) 43: TypePointer UniformConstant 6(int)
44(value): 43(ptr) Variable UniformConstant 44(value): 43(ptr) Variable UniformConstant
47: 6(int) Constant 7 47: 6(int) Constant 7
52: 29(int) Constant 7 52: 29(int) Constant 7
56: 6(int) Constant 10 56: 6(int) Constant 10
59: TypeArray 29(int) 14 59: TypeFloat 32
60: TypePointer PrivateGlobal 59 60: TypeVector 29(int) 4
61(arrX): 60(ptr) Variable PrivateGlobal 61(dataSSB): TypeStruct 59(float) 60(ivec4)
62(arrY): 60(ptr) Variable PrivateGlobal 62: TypePointer Uniform 61(dataSSB)
63(arrZ): 60(ptr) Variable PrivateGlobal 63(result): 62(ptr) Variable Uniform
64: 29(int) Constant 1
65: 6(int) Constant 2
66: TypePointer Uniform 29(int)
69: TypeArray 29(int) 14
70: TypePointer Private 69
71(arrX): 70(ptr) Variable Private
72(arrY): 70(ptr) Variable Private
73(arrZ): 70(ptr) Variable Private
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
21(param): 7(ptr) Variable Function 21(param): 7(ptr) Variable Function
@ -113,5 +126,7 @@ TBD functionality: Is atomic_uint an opaque handle in the uniform storage class,
57: 6(int) Load 44(value) 57: 6(int) Load 44(value)
58: 6(int) AtomicCompareExchange 42(atomu) 14 15 15 57 56 58: 6(int) AtomicCompareExchange 42(atomu) 14 15 15 57 56
Store 40(origu) 58 Store 40(origu) 58
67: 66(ptr) AccessChain 63(result) 64 65
68: 29(int) AtomicIAdd 67 14 15 64
Return Return
FunctionEnd FunctionEnd

View File

@ -1,25 +1,25 @@
spv.conditionalDiscard.frag spv.conditionalDiscard.frag
Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 36 // Id's are bound by 36
Source GLSL 110
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 17
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 400
Name 4 "main" Name 4 "main"
Name 9 "v" Name 9 "v"
Name 13 "tex" Name 13 "tex"
Name 17 "coord" Name 17 "coord"
Name 34 "gl_FragColor" Name 34 "gl_FragColor"
Decorate 17(coord) Smooth
Decorate 34(gl_FragColor) BuiltIn FragColor
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32

View File

@ -3,16 +3,16 @@ spv.conversion.frag
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 452 // Id's are bound by 455
Source GLSL 130
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 39 446 448 157 53 450 452 454
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main" Name 4 "main"
Name 8 "b" Name 8 "b"
Name 11 "u_i" Name 11 "u_i"
@ -34,50 +34,29 @@ Linked fragment stage:
Name 114 "f3" Name 114 "f3"
Name 118 "f4" Name 118 "f4"
Name 157 "i_i4" Name 157 "i_i4"
Name 321 "gl_FragColor" Name 322 "gl_FragColor"
Name 414 "cv2" Name 417 "cv2"
Name 415 "cv5" Name 418 "cv5"
Name 425 "u_b" Name 428 "u_b"
Name 427 "u_b2" Name 430 "u_b2"
Name 429 "u_b3" Name 432 "u_b3"
Name 431 "u_b4" Name 434 "u_b4"
Name 433 "u_i2" Name 436 "u_i2"
Name 435 "u_i3" Name 438 "u_i3"
Name 437 "u_i4" Name 440 "u_i4"
Name 438 "i_b" Name 441 "i_b"
Name 439 "i_b2" Name 442 "i_b2"
Name 440 "i_b3" Name 443 "i_b3"
Name 441 "i_b4" Name 444 "i_b4"
Name 443 "i_i2" Name 446 "i_i2"
Name 445 "i_i3" Name 448 "i_i3"
Name 447 "i_f2" Name 450 "i_f2"
Name 449 "i_f3" Name 452 "i_f3"
Name 451 "i_f4" Name 454 "i_f4"
Decorate 39(i_i) Flat Decorate 39(i_i) Flat
Decorate 53(i_f) Smooth
Decorate 157(i_i4) Flat Decorate 157(i_i4) Flat
Decorate 321(gl_FragColor) BuiltIn FragColor Decorate 446(i_i2) Flat
Decorate 425(u_b) NoStaticUse Decorate 448(i_i3) Flat
Decorate 427(u_b2) NoStaticUse
Decorate 429(u_b3) NoStaticUse
Decorate 431(u_b4) NoStaticUse
Decorate 433(u_i2) NoStaticUse
Decorate 435(u_i3) NoStaticUse
Decorate 437(u_i4) NoStaticUse
Decorate 438(i_b) NoStaticUse
Decorate 439(i_b2) NoStaticUse
Decorate 440(i_b3) NoStaticUse
Decorate 441(i_b4) NoStaticUse
Decorate 443(i_i2) Flat
Decorate 443(i_i2) NoStaticUse
Decorate 445(i_i3) Flat
Decorate 445(i_i3) NoStaticUse
Decorate 447(i_f2) Smooth
Decorate 447(i_f2) NoStaticUse
Decorate 449(i_f3) Smooth
Decorate 449(i_f3) NoStaticUse
Decorate 451(i_f4) Smooth
Decorate 451(i_f4) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeBool 6: TypeBool
@ -140,36 +119,39 @@ Linked fragment stage:
157(i_i4): 156(ptr) Variable Input 157(i_i4): 156(ptr) Variable Input
159: TypeVector 13(int) 4 159: TypeVector 13(int) 4
160: 159(ivec4) ConstantComposite 14 14 14 14 160: 159(ivec4) ConstantComposite 14 14 14 14
320: TypePointer Output 95(fvec4) 315: 13(int) Constant 1
321(gl_FragColor): 320(ptr) Variable Output 321: TypePointer Output 95(fvec4)
424: TypePointer UniformConstant 6(bool) 322(gl_FragColor): 321(ptr) Variable Output
425(u_b): 424(ptr) Variable UniformConstant 367: 13(int) Constant 2
426: TypePointer UniformConstant 23(bvec2) 380: 13(int) Constant 3
427(u_b2): 426(ptr) Variable UniformConstant 427: TypePointer UniformConstant 6(bool)
428: TypePointer UniformConstant 31(bvec3) 428(u_b): 427(ptr) Variable UniformConstant
429(u_b3): 428(ptr) Variable UniformConstant 429: TypePointer UniformConstant 23(bvec2)
430: TypePointer UniformConstant 43(bvec4) 430(u_b2): 429(ptr) Variable UniformConstant
431(u_b4): 430(ptr) Variable UniformConstant 431: TypePointer UniformConstant 31(bvec3)
432: TypePointer UniformConstant 66(ivec2) 432(u_b3): 431(ptr) Variable UniformConstant
433(u_i2): 432(ptr) Variable UniformConstant 433: TypePointer UniformConstant 43(bvec4)
434: TypePointer UniformConstant 79(ivec3) 434(u_b4): 433(ptr) Variable UniformConstant
435(u_i3): 434(ptr) Variable UniformConstant 435: TypePointer UniformConstant 66(ivec2)
436: TypePointer UniformConstant 92(ivec4) 436(u_i2): 435(ptr) Variable UniformConstant
437(u_i4): 436(ptr) Variable UniformConstant 437: TypePointer UniformConstant 79(ivec3)
438(i_b): 424(ptr) Variable UniformConstant 438(u_i3): 437(ptr) Variable UniformConstant
439(i_b2): 426(ptr) Variable UniformConstant 439: TypePointer UniformConstant 92(ivec4)
440(i_b3): 428(ptr) Variable UniformConstant 440(u_i4): 439(ptr) Variable UniformConstant
441(i_b4): 430(ptr) Variable UniformConstant 441(i_b): 427(ptr) Variable UniformConstant
442: TypePointer Input 66(ivec2) 442(i_b2): 429(ptr) Variable UniformConstant
443(i_i2): 442(ptr) Variable Input 443(i_b3): 431(ptr) Variable UniformConstant
444: TypePointer Input 79(ivec3) 444(i_b4): 433(ptr) Variable UniformConstant
445(i_i3): 444(ptr) Variable Input 445: TypePointer Input 66(ivec2)
446: TypePointer Input 69(fvec2) 446(i_i2): 445(ptr) Variable Input
447(i_f2): 446(ptr) Variable Input 447: TypePointer Input 79(ivec3)
448: TypePointer Input 82(fvec3) 448(i_i3): 447(ptr) Variable Input
449(i_f3): 448(ptr) Variable Input 449: TypePointer Input 69(fvec2)
450: TypePointer Input 95(fvec4) 450(i_f2): 449(ptr) Variable Input
451(i_f4): 450(ptr) Variable Input 451: TypePointer Input 82(fvec3)
452(i_f3): 451(ptr) Variable Input
453: TypePointer Input 95(fvec4)
454(i_f4): 453(ptr) Variable Input
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
8(b): 7(ptr) Variable Function 8(b): 7(ptr) Variable Function
@ -186,9 +168,9 @@ Linked fragment stage:
118(f4): 117(ptr) Variable Function 118(f4): 117(ptr) Variable Function
297: 105(ptr) Variable Function 297: 105(ptr) Variable Function
307: 105(ptr) Variable Function 307: 105(ptr) Variable Function
322: 117(ptr) Variable Function 323: 117(ptr) Variable Function
414(cv2): 93(ptr) Variable Function 417(cv2): 93(ptr) Variable Function
415(cv5): 44(ptr) Variable Function 418(cv5): 44(ptr) Variable Function
12: 9(int) Load 11(u_i) 12: 9(int) Load 11(u_i)
15: 6(bool) INotEqual 12 14 15: 6(bool) INotEqual 12 14
19: 16(float) Load 18(u_f) 19: 16(float) Load 18(u_f)
@ -455,8 +437,8 @@ Linked fragment stage:
Store 297 302 Store 297 302
Branch 300 Branch 300
303: Label 303: Label
304: 69(fvec2) Load 110(f2) 304: 105(ptr) AccessChain 110(f2) 14
305: 16(float) CompositeExtract 304 0 305: 16(float) Load 304
Store 297 305 Store 297 305
Branch 300 Branch 300
300: Label 300: Label
@ -466,130 +448,130 @@ Linked fragment stage:
SelectionMerge 311 None SelectionMerge 311 None
BranchConditional 309 310 314 BranchConditional 309 310 314
310: Label 310: Label
312: 82(fvec3) Load 114(f3) 312: 105(ptr) AccessChain 114(f3) 14
313: 16(float) CompositeExtract 312 0 313: 16(float) Load 312
Store 307 313 Store 307 313
Branch 311 Branch 311
314: Label 314: Label
315: 66(ivec2) Load 68(i2) 316: 57(ptr) AccessChain 68(i2) 315
316: 9(int) CompositeExtract 315 1 317: 9(int) Load 316
317: 16(float) ConvertSToF 316 318: 16(float) ConvertSToF 317
Store 307 317 Store 307 318
Branch 311 Branch 311
311: Label 311: Label
318: 16(float) Load 307 319: 16(float) Load 307
319: 16(float) FAdd 306 318 320: 16(float) FAdd 306 319
Store 106(f) 319 Store 106(f) 320
Branch 296 Branch 296
296: Label 296: Label
323: 6(bool) Load 8(b) 324: 6(bool) Load 8(b)
324: 23(bvec2) Load 25(b2) 325: 23(bvec2) Load 25(b2)
325: 6(bool) CompositeExtract 324 0 326: 6(bool) CompositeExtract 325 0
326: 6(bool) LogicalOr 323 325 327: 6(bool) LogicalOr 324 326
327: 23(bvec2) Load 25(b2) 328: 23(bvec2) Load 25(b2)
328: 6(bool) CompositeExtract 327 1 329: 6(bool) CompositeExtract 328 1
329: 6(bool) LogicalOr 326 328 330: 6(bool) LogicalOr 327 329
330: 31(bvec3) Load 33(b3) 331: 31(bvec3) Load 33(b3)
331: 6(bool) CompositeExtract 330 0 332: 6(bool) CompositeExtract 331 0
332: 6(bool) LogicalOr 329 331 333: 6(bool) LogicalOr 330 332
333: 31(bvec3) Load 33(b3) 334: 31(bvec3) Load 33(b3)
334: 6(bool) CompositeExtract 333 1 335: 6(bool) CompositeExtract 334 1
335: 6(bool) LogicalOr 332 334 336: 6(bool) LogicalOr 333 335
336: 31(bvec3) Load 33(b3) 337: 31(bvec3) Load 33(b3)
337: 6(bool) CompositeExtract 336 2 338: 6(bool) CompositeExtract 337 2
338: 6(bool) LogicalOr 335 337 339: 6(bool) LogicalOr 336 338
339: 43(bvec4) Load 45(b4) 340: 43(bvec4) Load 45(b4)
340: 6(bool) CompositeExtract 339 0 341: 6(bool) CompositeExtract 340 0
341: 6(bool) LogicalOr 338 340 342: 6(bool) LogicalOr 339 341
342: 43(bvec4) Load 45(b4) 343: 43(bvec4) Load 45(b4)
343: 6(bool) CompositeExtract 342 1 344: 6(bool) CompositeExtract 343 1
344: 6(bool) LogicalOr 341 343 345: 6(bool) LogicalOr 342 344
345: 43(bvec4) Load 45(b4) 346: 43(bvec4) Load 45(b4)
346: 6(bool) CompositeExtract 345 2 347: 6(bool) CompositeExtract 346 2
347: 6(bool) LogicalOr 344 346 348: 6(bool) LogicalOr 345 347
348: 43(bvec4) Load 45(b4) 349: 43(bvec4) Load 45(b4)
349: 6(bool) CompositeExtract 348 3 350: 6(bool) CompositeExtract 349 3
350: 6(bool) LogicalOr 347 349 351: 6(bool) LogicalOr 348 350
SelectionMerge 352 None SelectionMerge 353 None
BranchConditional 350 351 412 BranchConditional 351 352 415
351: Label 352: Label
353: 9(int) Load 58(i) 354: 9(int) Load 58(i)
354: 66(ivec2) Load 68(i2) 355: 57(ptr) AccessChain 68(i2) 14
355: 9(int) CompositeExtract 354 0 356: 9(int) Load 355
356: 9(int) IAdd 353 355 357: 9(int) IAdd 354 356
357: 66(ivec2) Load 68(i2) 358: 57(ptr) AccessChain 68(i2) 315
358: 9(int) CompositeExtract 357 1 359: 9(int) Load 358
359: 9(int) IAdd 356 358 360: 9(int) IAdd 357 359
360: 79(ivec3) Load 81(i3) 361: 57(ptr) AccessChain 81(i3) 14
361: 9(int) CompositeExtract 360 0 362: 9(int) Load 361
362: 9(int) IAdd 359 361 363: 9(int) IAdd 360 362
363: 79(ivec3) Load 81(i3) 364: 57(ptr) AccessChain 81(i3) 315
364: 9(int) CompositeExtract 363 1 365: 9(int) Load 364
365: 9(int) IAdd 362 364 366: 9(int) IAdd 363 365
366: 79(ivec3) Load 81(i3) 368: 57(ptr) AccessChain 81(i3) 367
367: 9(int) CompositeExtract 366 2 369: 9(int) Load 368
368: 9(int) IAdd 365 367 370: 9(int) IAdd 366 369
369: 92(ivec4) Load 94(i4) 371: 57(ptr) AccessChain 94(i4) 14
370: 9(int) CompositeExtract 369 0 372: 9(int) Load 371
371: 9(int) IAdd 368 370 373: 9(int) IAdd 370 372
372: 92(ivec4) Load 94(i4) 374: 57(ptr) AccessChain 94(i4) 315
373: 9(int) CompositeExtract 372 1 375: 9(int) Load 374
374: 9(int) IAdd 371 373 376: 9(int) IAdd 373 375
375: 92(ivec4) Load 94(i4) 377: 57(ptr) AccessChain 94(i4) 367
376: 9(int) CompositeExtract 375 2 378: 9(int) Load 377
377: 9(int) IAdd 374 376 379: 9(int) IAdd 376 378
378: 92(ivec4) Load 94(i4) 381: 57(ptr) AccessChain 94(i4) 380
379: 9(int) CompositeExtract 378 3 382: 9(int) Load 381
380: 9(int) IAdd 377 379 383: 9(int) IAdd 379 382
381: 16(float) ConvertSToF 380 384: 16(float) ConvertSToF 383
382: 16(float) Load 106(f) 385: 16(float) Load 106(f)
383: 16(float) FAdd 381 382 386: 16(float) FAdd 384 385
384: 69(fvec2) Load 110(f2) 387: 105(ptr) AccessChain 110(f2) 14
385: 16(float) CompositeExtract 384 0 388: 16(float) Load 387
386: 16(float) FAdd 383 385
387: 69(fvec2) Load 110(f2)
388: 16(float) CompositeExtract 387 1
389: 16(float) FAdd 386 388 389: 16(float) FAdd 386 388
390: 82(fvec3) Load 114(f3) 390: 105(ptr) AccessChain 110(f2) 315
391: 16(float) CompositeExtract 390 0 391: 16(float) Load 390
392: 16(float) FAdd 389 391 392: 16(float) FAdd 389 391
393: 82(fvec3) Load 114(f3) 393: 105(ptr) AccessChain 114(f3) 14
394: 16(float) CompositeExtract 393 1 394: 16(float) Load 393
395: 16(float) FAdd 392 394 395: 16(float) FAdd 392 394
396: 82(fvec3) Load 114(f3) 396: 105(ptr) AccessChain 114(f3) 315
397: 16(float) CompositeExtract 396 2 397: 16(float) Load 396
398: 16(float) FAdd 395 397 398: 16(float) FAdd 395 397
399: 95(fvec4) Load 118(f4) 399: 105(ptr) AccessChain 114(f3) 367
400: 16(float) CompositeExtract 399 0 400: 16(float) Load 399
401: 16(float) FAdd 398 400 401: 16(float) FAdd 398 400
402: 95(fvec4) Load 118(f4) 402: 105(ptr) AccessChain 118(f4) 14
403: 16(float) CompositeExtract 402 1 403: 16(float) Load 402
404: 16(float) FAdd 401 403 404: 16(float) FAdd 401 403
405: 95(fvec4) Load 118(f4) 405: 105(ptr) AccessChain 118(f4) 315
406: 16(float) CompositeExtract 405 2 406: 16(float) Load 405
407: 16(float) FAdd 404 406 407: 16(float) FAdd 404 406
408: 95(fvec4) Load 118(f4) 408: 105(ptr) AccessChain 118(f4) 367
409: 16(float) CompositeExtract 408 3 409: 16(float) Load 408
410: 16(float) FAdd 407 409 410: 16(float) FAdd 407 409
411: 95(fvec4) CompositeConstruct 410 410 410 410 411: 105(ptr) AccessChain 118(f4) 380
Store 322 411 412: 16(float) Load 411
Branch 352 413: 16(float) FAdd 410 412
412: Label 414: 95(fvec4) CompositeConstruct 413 413 413 413
Store 322 151 Store 323 414
Branch 352 Branch 353
352: Label 415: Label
413: 95(fvec4) Load 322 Store 323 151
Store 321(gl_FragColor) 413 Branch 353
Store 414(cv2) 102 353: Label
416: 92(ivec4) Load 414(cv2) 416: 95(fvec4) Load 323
417: 43(bvec4) INotEqual 416 160 Store 322(gl_FragColor) 416
Store 415(cv5) 417 Store 417(cv2) 102
418: 43(bvec4) Load 415(cv5) 419: 92(ivec4) Load 417(cv2)
419: 95(fvec4) Select 418 151 150 420: 43(bvec4) INotEqual 419 160
420: 16(float) CompositeExtract 419 0 Store 418(cv5) 420
421: 95(fvec4) Load 321(gl_FragColor) 421: 43(bvec4) Load 418(cv5)
422: 95(fvec4) CompositeConstruct 420 420 420 420 422: 95(fvec4) Select 421 151 150
423: 95(fvec4) FAdd 421 422 423: 16(float) CompositeExtract 422 0
Store 321(gl_FragColor) 423 424: 95(fvec4) Load 322(gl_FragColor)
425: 95(fvec4) CompositeConstruct 423 423 423 423
426: 95(fvec4) FAdd 424 425
Store 322(gl_FragColor) 426
Return Return
FunctionEnd FunctionEnd

View File

@ -5,21 +5,19 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 20 // Id's are bound by 20
Source GLSL 130
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 16
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main" Name 4 "main"
Name 12 "gl_FragData" Name 12 "gl_FragData"
Name 16 "Color" Name 16 "Color"
Decorate 12(gl_FragData) BuiltIn FragColor
Decorate 16(Color) Smooth
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32

View File

@ -5,22 +5,20 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 22 // Id's are bound by 22
Source GLSL 130
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 18
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main" Name 4 "main"
Name 12 "gl_FragData" Name 12 "gl_FragData"
Name 15 "i" Name 15 "i"
Name 18 "Color" Name 18 "Color"
Decorate 12(gl_FragData) BuiltIn FragColor
Decorate 18(Color) Smooth
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32

View File

@ -6,25 +6,23 @@ WARNING: 0:4: varying deprecated in version 130; may be removed in future releas
Linked vertex stage: Linked vertex stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 38 // Id's are bound by 38
Source GLSL 130
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" EntryPoint Vertex 4 "main" 26 23 37
Source GLSL 130
Name 4 "main" Name 4 "main"
Name 8 "i" Name 8 "i"
Name 23 "colorOut" Name 23 "colorOut"
Name 26 "color" Name 26 "color"
Name 32 "gl_Position" Name 32 "gl_Position"
Name 37 "gl_VertexID" Name 37 "gl_VertexID"
Decorate 23(colorOut) Smooth
Decorate 32(gl_Position) BuiltIn Position Decorate 32(gl_Position) BuiltIn Position
Decorate 37(gl_VertexID) BuiltIn VertexId Decorate 37(gl_VertexID) BuiltIn VertexId
Decorate 37(gl_VertexID) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1
@ -54,7 +52,7 @@ Linked vertex stage:
10: Label 10: Label
13: 6(int) Load 8(i) 13: 6(int) Load 8(i)
16: 15(bool) SLessThan 13 14 16: 15(bool) SLessThan 13 14
LoopMerge 11 None LoopMerge 11 10 None
BranchConditional 16 12 11 BranchConditional 16 12 11
12: Label 12: Label
24: 6(int) Load 8(i) 24: 6(int) Load 8(i)

View File

@ -5,27 +5,23 @@ Warning, version 450 is not yet complete; most version-specific features are pre
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 18 // Id's are bound by 15
Source GLSL 450
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 14 10 8 8
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
ExecutionMode 4 DepthAny ExecutionMode 4 DepthGreater
ExecutionMode 4 DepthReplacing ExecutionMode 4 DepthReplacing
Source GLSL 450
Name 4 "main" Name 4 "main"
Name 8 "gl_FragDepth" Name 8 "gl_FragDepth"
Name 10 "Depth" Name 10 "Depth"
Name 14 "gl_FragColor" Name 14 "Color"
Name 16 "Color"
Decorate 8(gl_FragDepth) BuiltIn FragDepth Decorate 8(gl_FragDepth) BuiltIn FragDepth
Decorate 10(Depth) Smooth
Decorate 14(gl_FragColor) BuiltIn FragColor
Decorate 16(Color) Smooth
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -34,15 +30,11 @@ Linked fragment stage:
9: TypePointer Input 6(float) 9: TypePointer Input 6(float)
10(Depth): 9(ptr) Variable Input 10(Depth): 9(ptr) Variable Input
12: TypeVector 6(float) 4 12: TypeVector 6(float) 4
13: TypePointer Output 12(fvec4) 13: TypePointer Input 12(fvec4)
14(gl_FragColor): 13(ptr) Variable Output 14(Color): 13(ptr) Variable Input
15: TypePointer Input 12(fvec4)
16(Color): 15(ptr) Variable Input
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
11: 6(float) Load 10(Depth) 11: 6(float) Load 10(Depth)
Store 8(gl_FragDepth) 11 Store 8(gl_FragDepth) 11
17: 12(fvec4) Load 16(Color)
Store 14(gl_FragColor) 17
Return Return
FunctionEnd FunctionEnd

View File

@ -3,27 +3,25 @@ spv.discard-dce.frag
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 80 // Id's are bound by 84
Source GLSL 110
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 21
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 110
Name 4 "main" Name 4 "main"
Name 9 "white" Name 9 "white"
Name 12 "black" Name 12 "black"
Name 15 "color" Name 15 "color"
Name 18 "x" Name 18 "x"
Name 21 "tex_coord" Name 21 "tex_coord"
Name 27 "y" Name 30 "y"
Name 32 "radius" Name 36 "radius"
Name 55 "gl_FragColor" Name 59 "gl_FragColor"
Decorate 21(tex_coord) Smooth
Decorate 55(gl_FragColor) BuiltIn FragColor
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -37,92 +35,96 @@ Linked fragment stage:
19: TypeVector 6(float) 2 19: TypeVector 6(float) 2
20: TypePointer Input 19(fvec2) 20: TypePointer Input 19(fvec2)
21(tex_coord): 20(ptr) Variable Input 21(tex_coord): 20(ptr) Variable Input
24: 6(float) Constant 1073741824 22: TypeInt 32 0
42: TypeBool 23: 22(int) Constant 0
47: 6(float) Constant 1066192077 24: TypePointer Input 6(float)
54: TypePointer Output 7(fvec4) 27: 6(float) Constant 1073741824
55(gl_FragColor): 54(ptr) Variable Output 31: 22(int) Constant 1
58: 6(float) Constant 1067030938 46: TypeBool
67: 6(float) Constant 1061158912 51: 6(float) Constant 1066192077
72: 6(float) Constant 1098907648 58: TypePointer Output 7(fvec4)
59(gl_FragColor): 58(ptr) Variable Output
62: 6(float) Constant 1067030938
71: 6(float) Constant 1061158912
76: 6(float) Constant 1098907648
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
9(white): 8(ptr) Variable Function 9(white): 8(ptr) Variable Function
12(black): 8(ptr) Variable Function 12(black): 8(ptr) Variable Function
15(color): 8(ptr) Variable Function 15(color): 8(ptr) Variable Function
18(x): 17(ptr) Variable Function 18(x): 17(ptr) Variable Function
27(y): 17(ptr) Variable Function 30(y): 17(ptr) Variable Function
32(radius): 17(ptr) Variable Function 36(radius): 17(ptr) Variable Function
Store 9(white) 11 Store 9(white) 11
Store 12(black) 14 Store 12(black) 14
16: 7(fvec4) Load 9(white) 16: 7(fvec4) Load 9(white)
Store 15(color) 16 Store 15(color) 16
22: 19(fvec2) Load 21(tex_coord) 25: 24(ptr) AccessChain 21(tex_coord) 23
23: 6(float) CompositeExtract 22 0 26: 6(float) Load 25
25: 6(float) FMul 23 24 28: 6(float) FMul 26 27
26: 6(float) FSub 25 10 29: 6(float) FSub 28 10
Store 18(x) 26 Store 18(x) 29
28: 19(fvec2) Load 21(tex_coord) 32: 24(ptr) AccessChain 21(tex_coord) 31
29: 6(float) CompositeExtract 28 1 33: 6(float) Load 32
30: 6(float) FMul 29 24 34: 6(float) FMul 33 27
31: 6(float) FSub 30 10 35: 6(float) FSub 34 10
Store 27(y) 31 Store 30(y) 35
33: 6(float) Load 18(x) 37: 6(float) Load 18(x)
34: 6(float) Load 18(x) 38: 6(float) Load 18(x)
35: 6(float) FMul 33 34 39: 6(float) FMul 37 38
36: 6(float) Load 27(y) 40: 6(float) Load 30(y)
37: 6(float) Load 27(y) 41: 6(float) Load 30(y)
38: 6(float) FMul 36 37 42: 6(float) FMul 40 41
39: 6(float) FAdd 35 38 43: 6(float) FAdd 39 42
40: 6(float) ExtInst 1(GLSL.std.450) 31(Sqrt) 39 44: 6(float) ExtInst 1(GLSL.std.450) 31(Sqrt) 43
Store 32(radius) 40 Store 36(radius) 44
41: 6(float) Load 32(radius) 45: 6(float) Load 36(radius)
43: 42(bool) FOrdGreaterThan 41 10 47: 46(bool) FOrdGreaterThan 45 10
SelectionMerge 45 None SelectionMerge 49 None
BranchConditional 43 44 45 BranchConditional 47 48 49
44: Label 48: Label
46: 6(float) Load 32(radius) 50: 6(float) Load 36(radius)
48: 42(bool) FOrdGreaterThan 46 47 52: 46(bool) FOrdGreaterThan 50 51
SelectionMerge 50 None SelectionMerge 54 None
BranchConditional 48 49 50 BranchConditional 52 53 54
49: Label 53: Label
51: 7(fvec4) Load 15(color) 55: 7(fvec4) Load 15(color)
52: 7(fvec4) CompositeConstruct 10 10 10 10 56: 7(fvec4) CompositeConstruct 10 10 10 10
53: 7(fvec4) FAdd 51 52 57: 7(fvec4) FAdd 55 56
Store 15(color) 53 Store 15(color) 57
Branch 50 Branch 54
50: Label 54: Label
56: 7(fvec4) Load 15(color) 60: 7(fvec4) Load 15(color)
Store 55(gl_FragColor) 56 Store 59(gl_FragColor) 60
57: 6(float) Load 32(radius) 61: 6(float) Load 36(radius)
59: 42(bool) FOrdGreaterThan 57 58 63: 46(bool) FOrdGreaterThan 61 62
SelectionMerge 61 None SelectionMerge 65 None
BranchConditional 59 60 61 BranchConditional 63 64 65
60: Label 64: Label
62: 7(fvec4) Load 15(color) 66: 7(fvec4) Load 15(color)
63: 7(fvec4) CompositeConstruct 10 10 10 10 67: 7(fvec4) CompositeConstruct 10 10 10 10
64: 7(fvec4) FAdd 62 63 68: 7(fvec4) FAdd 66 67
Store 15(color) 64 Store 15(color) 68
Branch 61 Branch 65
61: Label 65: Label
Kill Kill
45: Label 49: Label
66: 6(float) Load 32(radius) 70: 6(float) Load 36(radius)
68: 42(bool) FOrdGreaterThanEqual 66 67 72: 46(bool) FOrdGreaterThanEqual 70 71
SelectionMerge 70 None SelectionMerge 74 None
BranchConditional 68 69 70 BranchConditional 72 73 74
69: Label 73: Label
71: 6(float) Load 32(radius) 75: 6(float) Load 36(radius)
73: 6(float) ExtInst 1(GLSL.std.450) 26(Pow) 71 72 77: 6(float) ExtInst 1(GLSL.std.450) 26(Pow) 75 76
74: 6(float) FDiv 73 24 78: 6(float) FDiv 77 27
75: 6(float) ExtInst 1(GLSL.std.450) 4(FAbs) 74 79: 6(float) ExtInst 1(GLSL.std.450) 4(FAbs) 78
76: 7(fvec4) Load 15(color) 80: 7(fvec4) Load 15(color)
77: 7(fvec4) CompositeConstruct 75 75 75 75 81: 7(fvec4) CompositeConstruct 79 79 79 79
78: 7(fvec4) FSub 76 77 82: 7(fvec4) FSub 80 81
Store 15(color) 78 Store 15(color) 82
Branch 70 Branch 74
70: Label 74: Label
79: 7(fvec4) Load 15(color) 83: 7(fvec4) Load 15(color)
Store 55(gl_FragColor) 79 Store 59(gl_FragColor) 83
Return Return
FunctionEnd FunctionEnd

View File

@ -3,23 +3,21 @@ spv.do-simple.vert
Linked vertex stage: Linked vertex stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 29 // Id's are bound by 29
Source ESSL 300
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" EntryPoint Vertex 4 "main" 27 28
Source ESSL 300
Name 4 "main" Name 4 "main"
Name 8 "i" Name 8 "i"
Name 27 "gl_VertexID" Name 27 "gl_VertexID"
Name 28 "gl_InstanceID" Name 28 "gl_InstanceID"
Decorate 27(gl_VertexID) BuiltIn VertexId Decorate 27(gl_VertexID) BuiltIn VertexId
Decorate 27(gl_VertexID) NoStaticUse
Decorate 28(gl_InstanceID) BuiltIn InstanceId Decorate 28(gl_InstanceID) BuiltIn InstanceId
Decorate 28(gl_InstanceID) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1
@ -40,7 +38,7 @@ Linked vertex stage:
Branch 10 Branch 10
10: Label 10: Label
13: 14(bool) Phi 15 5 25 12 13: 14(bool) Phi 15 5 25 12
LoopMerge 11 None LoopMerge 11 10 None
Branch 16 Branch 16
16: Label 16: Label
SelectionMerge 12 None SelectionMerge 12 None

View File

@ -3,15 +3,15 @@ spv.do-while-continue-break.vert
Linked vertex stage: Linked vertex stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 51 // Id's are bound by 51
Source ESSL 300
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" EntryPoint Vertex 4 "main" 49 50
Source ESSL 300
Name 4 "main" Name 4 "main"
Name 8 "i" Name 8 "i"
Name 24 "A" Name 24 "A"
@ -24,9 +24,7 @@ Linked vertex stage:
Name 49 "gl_VertexID" Name 49 "gl_VertexID"
Name 50 "gl_InstanceID" Name 50 "gl_InstanceID"
Decorate 49(gl_VertexID) BuiltIn VertexId Decorate 49(gl_VertexID) BuiltIn VertexId
Decorate 49(gl_VertexID) NoStaticUse
Decorate 50(gl_InstanceID) BuiltIn InstanceId Decorate 50(gl_InstanceID) BuiltIn InstanceId
Decorate 50(gl_InstanceID) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1
@ -60,7 +58,7 @@ Linked vertex stage:
Branch 10 Branch 10
10: Label 10: Label
13: 14(bool) Phi 15 5 31 28 31 38 13: 14(bool) Phi 15 5 31 28 31 38
LoopMerge 11 None LoopMerge 11 10 None
Branch 16 Branch 16
16: Label 16: Label
SelectionMerge 12 None SelectionMerge 12 None

View File

@ -3,24 +3,22 @@ spv.doWhileLoop.frag
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 37 // Id's are bound by 40
Source GLSL 110
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 11
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 110
Name 4 "main" Name 4 "main"
Name 9 "color" Name 9 "color"
Name 11 "BaseColor" Name 11 "BaseColor"
Name 24 "d" Name 27 "d"
Name 29 "bigColor" Name 32 "bigColor"
Name 35 "gl_FragColor" Name 38 "gl_FragColor"
Decorate 11(BaseColor) Smooth
Decorate 35(gl_FragColor) BuiltIn FragColor
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -30,13 +28,16 @@ Linked fragment stage:
11(BaseColor): 10(ptr) Variable Input 11(BaseColor): 10(ptr) Variable Input
17: TypeBool 17: TypeBool
18: 17(bool) ConstantTrue 18: 17(bool) ConstantTrue
23: TypePointer UniformConstant 6(float) 21: TypeInt 32 0
24(d): 23(ptr) Variable UniformConstant 22: 21(int) Constant 0
28: TypePointer UniformConstant 7(fvec4) 23: TypePointer Function 6(float)
29(bigColor): 28(ptr) Variable UniformConstant 26: TypePointer UniformConstant 6(float)
33: 17(bool) ConstantFalse 27(d): 26(ptr) Variable UniformConstant
34: TypePointer Output 7(fvec4) 31: TypePointer UniformConstant 7(fvec4)
35(gl_FragColor): 34(ptr) Variable Output 32(bigColor): 31(ptr) Variable UniformConstant
36: 17(bool) ConstantFalse
37: TypePointer Output 7(fvec4)
38(gl_FragColor): 37(ptr) Variable Output
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
9(color): 8(ptr) Variable Function 9(color): 8(ptr) Variable Function
@ -44,29 +45,29 @@ Linked fragment stage:
Store 9(color) 12 Store 9(color) 12
Branch 13 Branch 13
13: Label 13: Label
16: 17(bool) Phi 18 5 33 15 16: 17(bool) Phi 18 5 36 15
LoopMerge 14 None LoopMerge 14 13 None
Branch 19 Branch 19
19: Label 19: Label
SelectionMerge 15 None SelectionMerge 15 None
BranchConditional 16 15 20 BranchConditional 16 15 20
20: Label 20: Label
21: 7(fvec4) Load 9(color) 24: 23(ptr) AccessChain 9(color) 22
22: 6(float) CompositeExtract 21 0 25: 6(float) Load 24
25: 6(float) Load 24(d) 28: 6(float) Load 27(d)
26: 17(bool) FOrdLessThan 22 25 29: 17(bool) FOrdLessThan 25 28
SelectionMerge 27 None SelectionMerge 30 None
BranchConditional 26 27 14 BranchConditional 29 30 14
27: Label 30: Label
Branch 15 Branch 15
15: Label 15: Label
30: 7(fvec4) Load 29(bigColor) 33: 7(fvec4) Load 32(bigColor)
31: 7(fvec4) Load 9(color) 34: 7(fvec4) Load 9(color)
32: 7(fvec4) FAdd 31 30 35: 7(fvec4) FAdd 34 33
Store 9(color) 32 Store 9(color) 35
Branch 13 Branch 13
14: Label 14: Label
36: 7(fvec4) Load 9(color) 39: 7(fvec4) Load 9(color)
Store 35(gl_FragColor) 36 Store 38(gl_FragColor) 39
Return Return
FunctionEnd FunctionEnd

View File

@ -5,16 +5,16 @@ Warning, version 430 is not yet complete; most version-specific features are pre
Linked compute stage: Linked compute stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 62 // Id's are bound by 62
Source GLSL 430
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main" EntryPoint GLCompute 4 "main"
ExecutionMode 4 LocalSize 1 1 1 ExecutionMode 4 LocalSize 1 1 1
Source GLSL 430
Name 4 "main" Name 4 "main"
Name 8 "bufName" Name 8 "bufName"
MemberName 8(bufName) 0 "f" MemberName 8(bufName) 0 "f"
@ -32,12 +32,6 @@ Linked compute stage:
Decorate 8(bufName) BufferBlock Decorate 8(bufName) BufferBlock
Decorate 26(gl_GlobalInvocationID) BuiltIn GlobalInvocationId Decorate 26(gl_GlobalInvocationID) BuiltIn GlobalInvocationId
Decorate 33(gl_LocalInvocationID) BuiltIn LocalInvocationId Decorate 33(gl_LocalInvocationID) BuiltIn LocalInvocationId
Decorate 13 NoStaticUse
Decorate 56 NoStaticUse
Decorate 13 NoStaticUse
Decorate 13 NoStaticUse
Decorate 58(roll) NoStaticUse
Decorate 61(destTex) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -99,7 +93,7 @@ Linked compute stage:
41: 40(fvec2) ConvertSToF 39 41: 40(fvec2) ConvertSToF 39
43: 40(fvec2) CompositeConstruct 42 42 43: 40(fvec2) CompositeConstruct 42 42
44: 40(fvec2) FDiv 41 43 44: 40(fvec2) FDiv 41 43
45: 6(float) ExtInst 1(GLSL.std.450) 65(Length) 44 45: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 44
46: 7(float) FConvert 45 46: 7(float) FConvert 45
Store 32(localCoef) 46 Store 32(localCoef) 46
Store 49(aa) 53 Store 49(aa) 53

View File

@ -3,16 +3,16 @@ spv.earlyReturnDiscard.frag
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 111 // Id's are bound by 112
Source GLSL 110
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 18 11
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 110
Name 4 "main" Name 4 "main"
Name 9 "color" Name 9 "color"
Name 11 "BaseColor" Name 11 "BaseColor"
@ -22,16 +22,12 @@ Linked fragment stage:
Name 21 "d" Name 21 "d"
Name 27 "bigColor" Name 27 "bigColor"
Name 32 "smallColor" Name 32 "smallColor"
Name 38 "minimum" Name 41 "minimum"
Name 52 "threshhold" Name 53 "threshhold"
Name 63 "threshhold2" Name 65 "threshhold2"
Name 77 "b" Name 79 "b"
Name 106 "gl_FragColor" Name 107 "gl_FragColor"
Name 110 "threshhold3" Name 111 "threshhold3"
Decorate 11(BaseColor) Smooth
Decorate 18(c) Smooth
Decorate 106(gl_FragColor) BuiltIn FragColor
Decorate 110(threshhold3) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -48,15 +44,20 @@ Linked fragment stage:
23: TypeBool 23: TypeBool
27(bigColor): 14(ptr) Variable UniformConstant 27(bigColor): 14(ptr) Variable UniformConstant
32(smallColor): 14(ptr) Variable UniformConstant 32(smallColor): 14(ptr) Variable UniformConstant
38(minimum): 20(ptr) Variable UniformConstant 36: TypeInt 32 0
46: 6(float) Constant 1065353216 37: 36(int) Constant 2
52(threshhold): 20(ptr) Variable UniformConstant 38: TypePointer Function 6(float)
63(threshhold2): 20(ptr) Variable UniformConstant 41(minimum): 20(ptr) Variable UniformConstant
76: TypePointer UniformConstant 23(bool) 49: 6(float) Constant 1065353216
77(b): 76(ptr) Variable UniformConstant 53(threshhold): 20(ptr) Variable UniformConstant
105: TypePointer Output 7(fvec4) 62: 36(int) Constant 3
106(gl_FragColor): 105(ptr) Variable Output 65(threshhold2): 20(ptr) Variable UniformConstant
110(threshhold3): 20(ptr) Variable UniformConstant 78: TypePointer UniformConstant 23(bool)
79(b): 78(ptr) Variable UniformConstant
87: 36(int) Constant 0
106: TypePointer Output 7(fvec4)
107(gl_FragColor): 106(ptr) Variable Output
111(threshhold3): 20(ptr) Variable UniformConstant
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
9(color): 8(ptr) Variable Function 9(color): 8(ptr) Variable Function
@ -83,96 +84,92 @@ Linked fragment stage:
Store 9(color) 35 Store 9(color) 35
Branch 26 Branch 26
26: Label 26: Label
36: 7(fvec4) Load 9(color) 39: 38(ptr) AccessChain 9(color) 37
37: 6(float) CompositeExtract 36 2 40: 6(float) Load 39
39: 6(float) Load 38(minimum) 42: 6(float) Load 41(minimum)
40: 23(bool) FOrdLessThan 37 39 43: 23(bool) FOrdLessThan 40 42
SelectionMerge 42 None SelectionMerge 45 None
BranchConditional 40 41 42 BranchConditional 43 44 45
41: Label 44: Label
Return Return
42: Label 45: Label
44: 7(fvec4) Load 9(color) 47: 38(ptr) AccessChain 9(color) 37
45: 6(float) CompositeExtract 44 2 48: 6(float) Load 47
47: 6(float) FAdd 45 46 50: 6(float) FAdd 48 49
48: 7(fvec4) Load 9(color) Store 47 50
49: 7(fvec4) CompositeInsert 47 48 2 51: 38(ptr) AccessChain 9(color) 37
Store 9(color) 49 52: 6(float) Load 51
50: 7(fvec4) Load 9(color) 54: 6(float) Load 53(threshhold)
51: 6(float) CompositeExtract 50 2 55: 23(bool) FOrdGreaterThan 52 54
53: 6(float) Load 52(threshhold) SelectionMerge 57 None
54: 23(bool) FOrdGreaterThan 51 53 BranchConditional 55 56 57
SelectionMerge 56 None 56: Label
BranchConditional 54 55 56
55: Label
Kill Kill
56: Label 57: Label
58: 7(fvec4) Load 9(color) 59: 7(fvec4) Load 9(color)
59: 7(fvec4) CompositeConstruct 46 46 46 46 60: 7(fvec4) CompositeConstruct 49 49 49 49
60: 7(fvec4) FAdd 58 59 61: 7(fvec4) FAdd 59 60
Store 9(color) 60 Store 9(color) 61
61: 7(fvec4) Load 9(color) 63: 38(ptr) AccessChain 9(color) 62
62: 6(float) CompositeExtract 61 3 64: 6(float) Load 63
64: 6(float) Load 63(threshhold2) 66: 6(float) Load 65(threshhold2)
65: 23(bool) FOrdGreaterThan 62 64 67: 23(bool) FOrdGreaterThan 64 66
SelectionMerge 67 None SelectionMerge 69 None
BranchConditional 65 66 98 BranchConditional 67 68 99
66: Label 68: Label
68: 7(fvec4) Load 9(color) 70: 38(ptr) AccessChain 9(color) 37
69: 6(float) CompositeExtract 68 2 71: 6(float) Load 70
70: 6(float) Load 63(threshhold2) 72: 6(float) Load 65(threshhold2)
71: 23(bool) FOrdGreaterThan 69 70 73: 23(bool) FOrdGreaterThan 71 72
SelectionMerge 73 None SelectionMerge 75 None
BranchConditional 71 72 75 BranchConditional 73 74 77
72: Label 74: Label
Return Return
75: Label 77: Label
78: 23(bool) Load 77(b) 80: 23(bool) Load 79(b)
SelectionMerge 80 None SelectionMerge 82 None
BranchConditional 78 79 86 BranchConditional 80 81 86
79: Label 81: Label
81: 7(fvec4) Load 9(color) 83: 38(ptr) AccessChain 9(color) 37
82: 6(float) CompositeExtract 81 2 84: 6(float) Load 83
83: 6(float) FAdd 82 46 85: 6(float) FAdd 84 49
84: 7(fvec4) Load 9(color) Store 83 85
85: 7(fvec4) CompositeInsert 83 84 2 Branch 82
Store 9(color) 85
Branch 80
86: Label 86: Label
87: 7(fvec4) Load 9(color) 88: 38(ptr) AccessChain 9(color) 87
88: 6(float) CompositeExtract 87 0 89: 6(float) Load 88
89: 6(float) Load 38(minimum) 90: 6(float) Load 41(minimum)
90: 23(bool) FOrdLessThan 88 89 91: 23(bool) FOrdLessThan 89 90
SelectionMerge 92 None SelectionMerge 93 None
BranchConditional 90 91 94 BranchConditional 91 92 95
91: Label 92: Label
Kill Kill
94: Label 95: Label
95: 7(fvec4) Load 9(color) 96: 7(fvec4) Load 9(color)
96: 7(fvec4) CompositeConstruct 46 46 46 46 97: 7(fvec4) CompositeConstruct 49 49 49 49
97: 7(fvec4) FAdd 95 96 98: 7(fvec4) FAdd 96 97
Store 9(color) 97 Store 9(color) 98
Branch 92 Branch 93
92: Label 93: Label
Branch 80 Branch 82
80: Label 82: Label
Branch 73 Branch 75
73: Label 75: Label
Branch 67 Branch 69
98: Label 99: Label
99: 23(bool) Load 77(b) 100: 23(bool) Load 79(b)
SelectionMerge 101 None SelectionMerge 102 None
BranchConditional 99 100 103 BranchConditional 100 101 104
100: Label 101: Label
Kill Kill
103: Label 104: Label
Return Return
101: Label 102: Label
Branch 67 Branch 69
67: Label 69: Label
107: 7(fvec4) Load 9(color) 108: 7(fvec4) Load 9(color)
108: 7(fvec4) Load 13(color2) 109: 7(fvec4) Load 13(color2)
109: 7(fvec4) FMul 107 108 110: 7(fvec4) FMul 108 109
Store 106(gl_FragColor) 109 Store 107(gl_FragColor) 110
Return Return
FunctionEnd FunctionEnd

View File

@ -3,16 +3,16 @@ spv.flowControl.frag
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 41 // Id's are bound by 41
Source GLSL 120
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 18 11
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 120
Name 4 "main" Name 4 "main"
Name 9 "color" Name 9 "color"
Name 11 "BaseColor" Name 11 "BaseColor"
@ -23,9 +23,6 @@ Linked fragment stage:
Name 27 "bigColor" Name 27 "bigColor"
Name 32 "smallColor" Name 32 "smallColor"
Name 37 "gl_FragColor" Name 37 "gl_FragColor"
Decorate 11(BaseColor) Smooth
Decorate 18(c) Smooth
Decorate 37(gl_FragColor) BuiltIn FragColor
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32

View File

@ -3,15 +3,15 @@ spv.for-continue-break.vert
Linked vertex stage: Linked vertex stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 48 // Id's are bound by 48
Source ESSL 300
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" EntryPoint Vertex 4 "main" 46 47
Source ESSL 300
Name 4 "main" Name 4 "main"
Name 8 "i" Name 8 "i"
Name 17 "A" Name 17 "A"
@ -24,9 +24,7 @@ Linked vertex stage:
Name 46 "gl_VertexID" Name 46 "gl_VertexID"
Name 47 "gl_InstanceID" Name 47 "gl_InstanceID"
Decorate 46(gl_VertexID) BuiltIn VertexId Decorate 46(gl_VertexID) BuiltIn VertexId
Decorate 46(gl_VertexID) NoStaticUse
Decorate 47(gl_InstanceID) BuiltIn InstanceId Decorate 47(gl_InstanceID) BuiltIn InstanceId
Decorate 47(gl_InstanceID) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1
@ -57,7 +55,7 @@ Linked vertex stage:
10: Label 10: Label
13: 6(int) Load 8(i) 13: 6(int) Load 8(i)
16: 15(bool) SLessThan 13 14 16: 15(bool) SLessThan 13 14
LoopMerge 11 None LoopMerge 11 10 None
BranchConditional 16 12 11 BranchConditional 16 12 11
12: Label 12: Label
Store 17(A) 18 Store 17(A) 18

View File

@ -3,24 +3,22 @@ spv.for-simple.vert
Linked vertex stage: Linked vertex stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 25 // Id's are bound by 25
Source ESSL 300
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" EntryPoint Vertex 4 "main" 23 24
Source ESSL 300
Name 4 "main" Name 4 "main"
Name 8 "i" Name 8 "i"
Name 17 "j" Name 17 "j"
Name 23 "gl_VertexID" Name 23 "gl_VertexID"
Name 24 "gl_InstanceID" Name 24 "gl_InstanceID"
Decorate 23(gl_VertexID) BuiltIn VertexId Decorate 23(gl_VertexID) BuiltIn VertexId
Decorate 23(gl_VertexID) NoStaticUse
Decorate 24(gl_InstanceID) BuiltIn InstanceId Decorate 24(gl_InstanceID) BuiltIn InstanceId
Decorate 24(gl_InstanceID) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1
@ -42,7 +40,7 @@ Linked vertex stage:
10: Label 10: Label
13: 6(int) Load 8(i) 13: 6(int) Load 8(i)
16: 15(bool) SLessThan 13 14 16: 15(bool) SLessThan 13 14
LoopMerge 11 None LoopMerge 11 10 None
BranchConditional 16 12 11 BranchConditional 16 12 11
12: Label 12: Label
Store 17(j) 18 Store 17(j) 18

View File

@ -3,16 +3,16 @@ spv.forLoop.frag
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 122 // Id's are bound by 122
Source GLSL 130
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 11 97
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main" Name 4 "main"
Name 9 "color" Name 9 "color"
Name 11 "BaseColor" Name 11 "BaseColor"
@ -23,15 +23,12 @@ Linked fragment stage:
Name 38 "sum" Name 38 "sum"
Name 40 "i" Name 40 "i"
Name 50 "v4" Name 50 "v4"
Name 59 "i" Name 60 "i"
Name 65 "tv4" Name 66 "tv4"
Name 83 "r" Name 83 "r"
Name 89 "i" Name 89 "i"
Name 97 "f" Name 97 "f"
Name 110 "i" Name 110 "i"
Decorate 11(BaseColor) Smooth
Decorate 35(gl_FragColor) BuiltIn FragColor
Decorate 97(f) Smooth
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -57,10 +54,12 @@ Linked fragment stage:
48: TypeVector 47(int) 4 48: TypeVector 47(int) 4
49: TypePointer UniformConstant 48(ivec4) 49: TypePointer UniformConstant 48(ivec4)
50(v4): 49(ptr) Variable UniformConstant 50(v4): 49(ptr) Variable UniformConstant
70: 47(int) Constant 4 52: TypePointer UniformConstant 47(int)
71: 47(int) Constant 4
84: TypeVector 6(float) 3 84: TypeVector 6(float) 3
96: TypePointer Input 6(float) 96: TypePointer Input 6(float)
97(f): 96(ptr) Variable Input 97(f): 96(ptr) Variable Input
99: 47(int) Constant 3
115: 13(int) Constant 16 115: 13(int) Constant 16
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
@ -68,8 +67,8 @@ Linked fragment stage:
15(i): 14(ptr) Variable Function 15(i): 14(ptr) Variable Function
38(sum): 37(ptr) Variable Function 38(sum): 37(ptr) Variable Function
40(i): 14(ptr) Variable Function 40(i): 14(ptr) Variable Function
59(i): 14(ptr) Variable Function 60(i): 14(ptr) Variable Function
65(tv4): 8(ptr) Variable Function 66(tv4): 8(ptr) Variable Function
83(r): 8(ptr) Variable Function 83(r): 8(ptr) Variable Function
89(i): 14(ptr) Variable Function 89(i): 14(ptr) Variable Function
110(i): 14(ptr) Variable Function 110(i): 14(ptr) Variable Function
@ -81,7 +80,7 @@ Linked fragment stage:
20: 13(int) Load 15(i) 20: 13(int) Load 15(i)
23: 13(int) Load 22(Count) 23: 13(int) Load 22(Count)
25: 24(bool) SLessThan 20 23 25: 24(bool) SLessThan 20 23
LoopMerge 18 None LoopMerge 18 17 None
BranchConditional 25 19 18 BranchConditional 25 19 18
19: Label 19: Label
28: 7(fvec4) Load 27(bigColor) 28: 7(fvec4) Load 27(bigColor)
@ -101,46 +100,45 @@ Linked fragment stage:
41: Label 41: Label
44: 13(int) Load 40(i) 44: 13(int) Load 40(i)
46: 24(bool) SLessThan 44 45 46: 24(bool) SLessThan 44 45
LoopMerge 42 None LoopMerge 42 41 None
BranchConditional 46 43 42 BranchConditional 46 43 42
43: Label 43: Label
51: 13(int) Load 40(i) 51: 13(int) Load 40(i)
52: 48(ivec4) Load 50(v4) 53: 52(ptr) AccessChain 50(v4) 51
53: 47(int) VectorExtractDynamic 52 51 54: 47(int) Load 53
54: 6(float) ConvertUToF 53 55: 6(float) ConvertUToF 54
55: 6(float) Load 38(sum) 56: 6(float) Load 38(sum)
56: 6(float) FAdd 55 54 57: 6(float) FAdd 56 55
Store 38(sum) 56 Store 38(sum) 57
57: 13(int) Load 40(i) 58: 13(int) Load 40(i)
58: 13(int) IAdd 57 32 59: 13(int) IAdd 58 32
Store 40(i) 58 Store 40(i) 59
Branch 41 Branch 41
42: Label 42: Label
Store 59(i) 16 Store 60(i) 16
Branch 60 Branch 61
60: Label
63: 13(int) Load 59(i)
64: 24(bool) SLessThan 63 45
LoopMerge 61 None
BranchConditional 64 62 61
62: Label
66: 13(int) Load 59(i)
67: 13(int) Load 59(i)
68: 48(ivec4) Load 50(v4)
69: 47(int) VectorExtractDynamic 68 67
71: 47(int) IMul 69 70
72: 6(float) ConvertUToF 71
73: 7(fvec4) Load 65(tv4)
74: 7(fvec4) VectorInsertDynamic 73 72 66
Store 65(tv4) 74
75: 13(int) Load 59(i)
76: 13(int) IAdd 75 32
Store 59(i) 76
Branch 60
61: Label 61: Label
64: 13(int) Load 60(i)
65: 24(bool) SLessThan 64 45
LoopMerge 62 61 None
BranchConditional 65 63 62
63: Label
67: 13(int) Load 60(i)
68: 13(int) Load 60(i)
69: 52(ptr) AccessChain 50(v4) 68
70: 47(int) Load 69
72: 47(int) IMul 70 71
73: 6(float) ConvertUToF 72
74: 37(ptr) AccessChain 66(tv4) 67
Store 74 73
75: 13(int) Load 60(i)
76: 13(int) IAdd 75 32
Store 60(i) 76
Branch 61
62: Label
77: 6(float) Load 38(sum) 77: 6(float) Load 38(sum)
78: 7(fvec4) CompositeConstruct 77 77 77 77 78: 7(fvec4) CompositeConstruct 77 77 77 77
79: 7(fvec4) Load 65(tv4) 79: 7(fvec4) Load 66(tv4)
80: 7(fvec4) FAdd 78 79 80: 7(fvec4) FAdd 78 79
81: 7(fvec4) Load 35(gl_FragColor) 81: 7(fvec4) Load 35(gl_FragColor)
82: 7(fvec4) FAdd 81 80 82: 7(fvec4) FAdd 81 80
@ -156,13 +154,12 @@ Linked fragment stage:
93: 13(int) Load 89(i) 93: 13(int) Load 89(i)
94: 13(int) Load 22(Count) 94: 13(int) Load 22(Count)
95: 24(bool) SLessThan 93 94 95: 24(bool) SLessThan 93 94
LoopMerge 91 None LoopMerge 91 90 None
BranchConditional 95 92 91 BranchConditional 95 92 91
92: Label 92: Label
98: 6(float) Load 97(f) 98: 6(float) Load 97(f)
99: 7(fvec4) Load 83(r) 100: 37(ptr) AccessChain 83(r) 99
100: 7(fvec4) CompositeInsert 98 99 3 Store 100 98
Store 83(r) 100
101: 13(int) Load 89(i) 101: 13(int) Load 89(i)
102: 13(int) IAdd 101 32 102: 13(int) IAdd 101 32
Store 89(i) 102 Store 89(i) 102
@ -181,7 +178,7 @@ Linked fragment stage:
111: Label 111: Label
114: 13(int) Load 110(i) 114: 13(int) Load 110(i)
116: 24(bool) SLessThan 114 115 116: 24(bool) SLessThan 114 115
LoopMerge 112 None LoopMerge 112 111 None
BranchConditional 116 113 112 BranchConditional 116 113 112
113: Label 113: Label
117: 6(float) Load 97(f) 117: 6(float) Load 97(f)

36
Test/baseResults/spv.forwardFun.frag.out Normal file → Executable file
View File

@ -3,16 +3,16 @@ spv.forwardFun.frag
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 57 // Id's are bound by 60
Source ESSL 100
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 20
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source ESSL 100
Name 4 "main" Name 4 "main"
Name 6 "bar(" Name 6 "bar("
Name 10 "unreachableReturn(" Name 10 "unreachableReturn("
@ -24,16 +24,13 @@ Linked fragment stage:
Name 27 "f" Name 27 "f"
Name 30 "gl_FragColor" Name 30 "gl_FragColor"
Name 36 "d" Name 36 "d"
Name 56 "bigColor" Name 59 "bigColor"
Decorate 18(color) RelaxedPrecision Decorate 18(color) RelaxedPrecision
Decorate 20(BaseColor) RelaxedPrecision Decorate 20(BaseColor) RelaxedPrecision
Decorate 20(BaseColor) Smooth
Decorate 27(f) RelaxedPrecision Decorate 27(f) RelaxedPrecision
Decorate 30(gl_FragColor) RelaxedPrecision Decorate 30(gl_FragColor) RelaxedPrecision
Decorate 30(gl_FragColor) BuiltIn FragColor
Decorate 36(d) RelaxedPrecision Decorate 36(d) RelaxedPrecision
Decorate 56(bigColor) RelaxedPrecision Decorate 59(bigColor) RelaxedPrecision
Decorate 56(bigColor) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
8: TypeFloat 32 8: TypeFloat 32
@ -52,8 +49,11 @@ Linked fragment stage:
39: TypeBool 39: TypeBool
43: 8(float) Constant 1067030938 43: 8(float) Constant 1067030938
46: 8(float) Constant 1083179008 46: 8(float) Constant 1083179008
55: TypePointer UniformConstant 12(fvec4) 49: TypeInt 32 0
56(bigColor): 55(ptr) Variable UniformConstant 50: 49(int) Constant 0
53: 49(int) Constant 1
58: TypePointer UniformConstant 12(fvec4)
59(bigColor): 58(ptr) Variable UniformConstant
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
18(color): 13(ptr) Variable Function 18(color): 13(ptr) Variable Function
@ -95,10 +95,10 @@ Linked fragment stage:
16(foo(vf4;): 8(float) Function None 14 16(foo(vf4;): 8(float) Function None 14
15(bar): 13(ptr) FunctionParameter 15(bar): 13(ptr) FunctionParameter
17: Label 17: Label
49: 12(fvec4) Load 15(bar) 51: 26(ptr) AccessChain 15(bar) 50
50: 8(float) CompositeExtract 49 0 52: 8(float) Load 51
51: 12(fvec4) Load 15(bar) 54: 26(ptr) AccessChain 15(bar) 53
52: 8(float) CompositeExtract 51 1 55: 8(float) Load 54
53: 8(float) FAdd 50 52 56: 8(float) FAdd 52 55
ReturnValue 53 ReturnValue 56
FunctionEnd FunctionEnd

158
Test/baseResults/spv.functionCall.frag.out Normal file → Executable file
View File

@ -5,16 +5,16 @@ WARNING: 0:4: varying deprecated in version 130; may be removed in future releas
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 73 // Id's are bound by 76
Source GLSL 130
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 57
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main" Name 4 "main"
Name 11 "foo(vf4;" Name 11 "foo(vf4;"
Name 10 "bar" Name 10 "bar"
@ -22,17 +22,14 @@ Linked fragment stage:
Name 16 "unreachableReturn(" Name 16 "unreachableReturn("
Name 18 "missingReturn(" Name 18 "missingReturn("
Name 21 "h" Name 21 "h"
Name 30 "d" Name 34 "d"
Name 51 "color" Name 55 "color"
Name 53 "BaseColor" Name 57 "BaseColor"
Name 54 "param" Name 58 "param"
Name 60 "f" Name 63 "f"
Name 62 "g" Name 65 "g"
Name 65 "gl_FragColor" Name 68 "gl_FragColor"
Name 72 "bigColor" Name 75 "bigColor"
Decorate 53(BaseColor) Smooth
Decorate 65(gl_FragColor) BuiltIn FragColor
Decorate 72(bigColor) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -40,57 +37,60 @@ Linked fragment stage:
8: TypePointer Function 7(fvec4) 8: TypePointer Function 7(fvec4)
9: TypeFunction 6(float) 8(ptr) 9: TypeFunction 6(float) 8(ptr)
15: TypeFunction 6(float) 15: TypeFunction 6(float)
20: TypePointer PrivateGlobal 6(float) 20: TypePointer Private 6(float)
21(h): 20(ptr) Variable PrivateGlobal 21(h): 20(ptr) Variable Private
22: 6(float) Constant 0 22: 6(float) Constant 0
29: TypePointer UniformConstant 6(float) 23: TypeInt 32 0
30(d): 29(ptr) Variable UniformConstant 24: 23(int) Constant 0
32: 6(float) Constant 1082549862 25: TypePointer Function 6(float)
33: TypeBool 28: 23(int) Constant 1
37: 6(float) Constant 1067030938 33: TypePointer UniformConstant 6(float)
40: 6(float) Constant 1083179008 34(d): 33(ptr) Variable UniformConstant
48: 6(float) Constant 1081711002 36: 6(float) Constant 1082549862
52: TypePointer Input 7(fvec4) 37: TypeBool
53(BaseColor): 52(ptr) Variable Input 41: 6(float) Constant 1067030938
59: TypePointer Function 6(float) 44: 6(float) Constant 1083179008
64: TypePointer Output 7(fvec4) 52: 6(float) Constant 1081711002
65(gl_FragColor): 64(ptr) Variable Output 56: TypePointer Input 7(fvec4)
71: TypePointer UniformConstant 7(fvec4) 57(BaseColor): 56(ptr) Variable Input
72(bigColor): 71(ptr) Variable UniformConstant 67: TypePointer Output 7(fvec4)
68(gl_FragColor): 67(ptr) Variable Output
74: TypePointer UniformConstant 7(fvec4)
75(bigColor): 74(ptr) Variable UniformConstant
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
51(color): 8(ptr) Variable Function 55(color): 8(ptr) Variable Function
54(param): 8(ptr) Variable Function 58(param): 8(ptr) Variable Function
60(f): 59(ptr) Variable Function 63(f): 25(ptr) Variable Function
62(g): 59(ptr) Variable Function 65(g): 25(ptr) Variable Function
Store 21(h) 22 Store 21(h) 22
55: 7(fvec4) Load 53(BaseColor) 59: 7(fvec4) Load 57(BaseColor)
Store 54(param) 55 Store 58(param) 59
56: 6(float) FunctionCall 11(foo(vf4;) 54(param) 60: 6(float) FunctionCall 11(foo(vf4;) 58(param)
57: 7(fvec4) CompositeConstruct 56 56 56 56 61: 7(fvec4) CompositeConstruct 60 60 60 60
Store 51(color) 57 Store 55(color) 61
58: 2 FunctionCall 13(bar() 62: 2 FunctionCall 13(bar()
61: 6(float) FunctionCall 16(unreachableReturn() 64: 6(float) FunctionCall 16(unreachableReturn()
Store 60(f) 61 Store 63(f) 64
63: 6(float) FunctionCall 18(missingReturn() 66: 6(float) FunctionCall 18(missingReturn()
Store 62(g) 63 Store 65(g) 66
66: 7(fvec4) Load 51(color) 69: 7(fvec4) Load 55(color)
67: 6(float) Load 60(f) 70: 6(float) Load 63(f)
68: 7(fvec4) VectorTimesScalar 66 67 71: 7(fvec4) VectorTimesScalar 69 70
69: 6(float) Load 21(h) 72: 6(float) Load 21(h)
70: 7(fvec4) VectorTimesScalar 68 69 73: 7(fvec4) VectorTimesScalar 71 72
Store 65(gl_FragColor) 70 Store 68(gl_FragColor) 73
Return Return
FunctionEnd FunctionEnd
11(foo(vf4;): 6(float) Function None 9 11(foo(vf4;): 6(float) Function None 9
10(bar): 8(ptr) FunctionParameter 10(bar): 8(ptr) FunctionParameter
12: Label 12: Label
23: 7(fvec4) Load 10(bar) 26: 25(ptr) AccessChain 10(bar) 24
24: 6(float) CompositeExtract 23 0 27: 6(float) Load 26
25: 7(fvec4) Load 10(bar) 29: 25(ptr) AccessChain 10(bar) 28
26: 6(float) CompositeExtract 25 1 30: 6(float) Load 29
27: 6(float) FAdd 24 26 31: 6(float) FAdd 27 30
ReturnValue 27 ReturnValue 31
FunctionEnd FunctionEnd
13(bar(): 2 Function None 3 13(bar(): 2 Function None 3
14: Label 14: Label
@ -98,29 +98,29 @@ Linked fragment stage:
FunctionEnd FunctionEnd
16(unreachableReturn(): 6(float) Function None 15 16(unreachableReturn(): 6(float) Function None 15
17: Label 17: Label
31: 6(float) Load 30(d) 35: 6(float) Load 34(d)
34: 33(bool) FOrdLessThan 31 32 38: 37(bool) FOrdLessThan 35 36
SelectionMerge 36 None SelectionMerge 40 None
BranchConditional 34 35 39 BranchConditional 38 39 43
35: Label
ReturnValue 37
39: Label 39: Label
ReturnValue 40 ReturnValue 41
36: Label 43: Label
42: 6(float) Undef ReturnValue 44
ReturnValue 42 40: Label
46: 6(float) Undef
ReturnValue 46
FunctionEnd FunctionEnd
18(missingReturn(): 6(float) Function None 15 18(missingReturn(): 6(float) Function None 15
19: Label 19: Label
43: 6(float) Load 30(d) 47: 6(float) Load 34(d)
44: 33(bool) FOrdLessThan 43 40 48: 37(bool) FOrdLessThan 47 44
SelectionMerge 46 None SelectionMerge 50 None
BranchConditional 44 45 46 BranchConditional 48 49 50
45: Label 49: Label
47: 6(float) Load 30(d) 51: 6(float) Load 34(d)
Store 21(h) 47 Store 21(h) 51
ReturnValue 48 ReturnValue 52
46: Label 50: Label
50: 6(float) Undef 54: 6(float) Undef
ReturnValue 50 ReturnValue 54
FunctionEnd FunctionEnd

View File

@ -5,16 +5,16 @@ Warning, version 400 is not yet complete; most version-specific features are pre
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 158 // Id's are bound by 153
Source GLSL 400
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main"
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 400
Name 4 "main" Name 4 "main"
Name 15 "foo(i1;i1;i1;i1;i1;i1;" Name 15 "foo(i1;i1;i1;i1;i1;i1;"
Name 9 "a" Name 9 "a"
@ -29,26 +29,25 @@ Linked fragment stage:
Name 24 "r" Name 24 "r"
Name 28 "foo3(" Name 28 "foo3("
Name 30 "sum" Name 30 "sum"
Name 72 "u" Name 74 "u"
Name 84 "t" Name 86 "t"
Name 87 "s" Name 89 "s"
MemberName 87(s) 0 "t" MemberName 89(s) 0 "t"
Name 89 "f" Name 91 "f"
Name 96 "color" Name 95 "color"
Name 102 "e" Name 101 "e"
Name 102 "param"
Name 103 "param" Name 103 "param"
Name 104 "param" Name 104 "param"
Name 105 "param" Name 105 "param"
Name 106 "param" Name 120 "ret"
Name 125 "ret" Name 122 "tempReturn"
Name 127 "tempReturn" Name 127 "tempArg"
Name 132 "tempArg" Name 128 "param"
Name 133 "param" Name 129 "param"
Name 134 "param" Name 130 "param"
Name 135 "param" Name 133 "arg"
Name 138 "arg" Name 149 "gl_FragColor"
Name 154 "gl_FragColor"
Decorate 154(gl_FragColor) BuiltIn FragColor
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1
@ -64,106 +63,101 @@ Linked fragment stage:
43: 6(int) Constant 1024 43: 6(int) Constant 1024
61: 17(float) Constant 1077936128 61: 17(float) Constant 1077936128
65: 17(float) Constant 1084227584 65: 17(float) Constant 1084227584
71: TypePointer UniformConstant 17(float) 66: TypeInt 32 0
72(u): 71(ptr) Variable UniformConstant 67: 66(int) Constant 1
74: 17(float) Constant 1078774989 73: TypePointer UniformConstant 17(float)
75: TypeBool 74(u): 73(ptr) Variable UniformConstant
80: 6(int) Constant 1000000 76: 17(float) Constant 1078774989
82: 6(int) Constant 2000000 77: TypeBool
85: 6(int) Constant 2 82: 6(int) Constant 1000000
86: TypeVector 6(int) 4 84: 6(int) Constant 2000000
87(s): TypeStruct 86(ivec4) 87: 6(int) Constant 2
88: TypePointer Function 87(s) 88: TypeVector 6(int) 4
90: 6(int) Constant 0 89(s): TypeStruct 88(ivec4)
91: 6(int) Constant 32 90: TypePointer Function 89(s)
92: TypePointer Function 86(ivec4) 92: 6(int) Constant 0
97: 6(int) Constant 1 93: 6(int) Constant 32
101: 6(int) Constant 8 96: 6(int) Constant 1
116: 6(int) Constant 128 100: 6(int) Constant 8
126: TypePointer PrivateGlobal 6(int) 112: 6(int) Constant 128
127(tempReturn): 126(ptr) Variable PrivateGlobal 121: TypePointer Private 6(int)
128: 17(float) Constant 1082130432 122(tempReturn): 121(ptr) Variable Private
129: 17(float) Constant 1065353216 123: 17(float) Constant 1082130432
130: 17(float) Constant 1073741824 124: 17(float) Constant 1065353216
131: 19(fvec3) ConstantComposite 129 130 61 125: 17(float) Constant 1073741824
152: TypeVector 17(float) 4 126: 19(fvec3) ConstantComposite 124 125 61
153: TypePointer Output 152(fvec4) 147: TypeVector 17(float) 4
154(gl_FragColor): 153(ptr) Variable Output 148: TypePointer Output 147(fvec4)
149(gl_FragColor): 148(ptr) Variable Output
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
84(t): 7(ptr) Variable Function 86(t): 7(ptr) Variable Function
89(f): 88(ptr) Variable Function 91(f): 90(ptr) Variable Function
96(color): 7(ptr) Variable Function 95(color): 7(ptr) Variable Function
102(e): 7(ptr) Variable Function 101(e): 7(ptr) Variable Function
102(param): 7(ptr) Variable Function
103(param): 7(ptr) Variable Function 103(param): 7(ptr) Variable Function
104(param): 7(ptr) Variable Function 104(param): 7(ptr) Variable Function
105(param): 7(ptr) Variable Function 105(param): 7(ptr) Variable Function
106(param): 7(ptr) Variable Function 120(ret): 18(ptr) Variable Function
125(ret): 18(ptr) Variable Function 127(tempArg): 7(ptr) Variable Function
132(tempArg): 7(ptr) Variable Function 128(param): 18(ptr) Variable Function
133(param): 18(ptr) Variable Function 129(param): 20(ptr) Variable Function
134(param): 20(ptr) Variable Function 130(param): 7(ptr) Variable Function
135(param): 7(ptr) Variable Function 133(arg): 18(ptr) Variable Function
138(arg): 18(ptr) Variable Function Store 86(t) 87
Store 84(t) 85 94: 7(ptr) AccessChain 91(f) 92 67
93: 92(ptr) AccessChain 89(f) 90 Store 94 93
94: 86(ivec4) Load 93 97: 6(int) Load 86(t)
95: 86(ivec4) CompositeInsert 91 94 1 98: 6(int) Load 86(t)
Store 93 95 99: 6(int) IAdd 97 98
98: 6(int) Load 84(t) Store 102(param) 96
99: 6(int) Load 84(t) Store 103(param) 99
100: 6(int) IAdd 98 99 106: 7(ptr) AccessChain 91(f) 92 67
Store 103(param) 97 107: 6(int) Load 106
Store 104(param) 100 Store 105(param) 107
107: 92(ptr) AccessChain 89(f) 90 108: 6(int) FunctionCall 15(foo(i1;i1;i1;i1;i1;i1;) 102(param) 87 103(param) 100 104(param) 105(param)
108: 86(ivec4) Load 107 109: 6(int) Load 104(param)
109: 6(int) CompositeExtract 108 1 Store 101(e) 109
Store 106(param) 109 110: 6(int) Load 105(param)
110: 6(int) FunctionCall 15(foo(i1;i1;i1;i1;i1;i1;) 103(param) 85 104(param) 101 105(param) 106(param) 111: 7(ptr) AccessChain 91(f) 92 67
111: 6(int) Load 105(param) Store 111 110
Store 102(e) 111 Store 95(color) 108
112: 6(int) Load 106(param) 113: 6(int) Load 101(e)
113: 92(ptr) AccessChain 89(f) 90 114: 7(ptr) AccessChain 91(f) 92 67
114: 86(ivec4) Load 113 115: 6(int) Load 114
115: 86(ivec4) CompositeInsert 112 114 1 116: 6(int) IAdd 113 115
Store 113 115 117: 6(int) IMul 112 116
Store 96(color) 110 118: 6(int) Load 95(color)
117: 6(int) Load 102(e) 119: 6(int) IAdd 118 117
118: 92(ptr) AccessChain 89(f) 90 Store 95(color) 119
119: 86(ivec4) Load 118 Store 128(param) 123
120: 6(int) CompositeExtract 119 1 Store 129(param) 126
121: 6(int) IAdd 117 120 131: 6(int) FunctionCall 25(foo2(f1;vf3;i1;) 128(param) 129(param) 130(param)
122: 6(int) IMul 116 121 132: 6(int) Load 130(param)
123: 6(int) Load 96(color) Store 127(tempArg) 132
124: 6(int) IAdd 123 122 Store 122(tempReturn) 131
Store 96(color) 124 134: 6(int) Load 127(tempArg)
Store 133(param) 128 135: 17(float) ConvertSToF 134
Store 134(param) 131 Store 133(arg) 135
136: 6(int) FunctionCall 25(foo2(f1;vf3;i1;) 133(param) 134(param) 135(param) 136: 6(int) Load 122(tempReturn)
137: 6(int) Load 135(param) 137: 17(float) ConvertSToF 136
Store 132(tempArg) 137 Store 120(ret) 137
Store 127(tempReturn) 136 138: 17(float) Load 120(ret)
139: 6(int) Load 132(tempArg) 139: 17(float) Load 133(arg)
140: 17(float) ConvertSToF 139 140: 17(float) FAdd 138 139
Store 138(arg) 140 141: 6(int) ConvertFToS 140
141: 6(int) Load 127(tempReturn) 142: 6(int) Load 95(color)
142: 17(float) ConvertSToF 141 143: 6(int) IAdd 142 141
Store 125(ret) 142 Store 95(color) 143
143: 17(float) Load 125(ret) 144: 6(int) FunctionCall 28(foo3()
144: 17(float) Load 138(arg) 145: 6(int) Load 95(color)
145: 17(float) FAdd 143 144 146: 6(int) IAdd 145 144
146: 6(int) ConvertFToS 145 Store 95(color) 146
147: 6(int) Load 96(color) 150: 6(int) Load 95(color)
148: 6(int) IAdd 147 146 151: 17(float) ConvertSToF 150
Store 96(color) 148 152: 147(fvec4) CompositeConstruct 151 151 151 151
149: 6(int) FunctionCall 28(foo3() Store 149(gl_FragColor) 152
150: 6(int) Load 96(color)
151: 6(int) IAdd 150 149
Store 96(color) 151
155: 6(int) Load 96(color)
156: 17(float) ConvertSToF 155
157: 152(fvec4) CompositeConstruct 156 156 156 156
Store 154(gl_FragColor) 157
Return Return
FunctionEnd FunctionEnd
15(foo(i1;i1;i1;i1;i1;i1;): 6(int) Function None 8 15(foo(i1;i1;i1;i1;i1;i1;): 6(int) Function None 8
@ -219,20 +213,20 @@ Linked fragment stage:
63: 17(float) FMul 61 62 63: 17(float) FMul 61 62
64: 6(int) ConvertFToS 63 64: 6(int) ConvertFToS 63
Store 24(r) 64 Store 24(r) 64
66: 19(fvec3) Load 23(b) 68: 18(ptr) AccessChain 23(b) 67
67: 17(float) CompositeExtract 66 1 69: 17(float) Load 68
68: 17(float) FMul 65 67 70: 17(float) FMul 65 69
69: 6(int) ConvertFToS 68 71: 6(int) ConvertFToS 70
ReturnValue 69 ReturnValue 71
FunctionEnd FunctionEnd
28(foo3(): 6(int) Function None 27 28(foo3(): 6(int) Function None 27
29: Label 29: Label
73: 17(float) Load 72(u) 75: 17(float) Load 74(u)
76: 75(bool) FOrdGreaterThan 73 74 78: 77(bool) FOrdGreaterThan 75 76
SelectionMerge 78 None SelectionMerge 80 None
BranchConditional 76 77 78 BranchConditional 78 79 80
77: Label 79: Label
Kill Kill
78: Label 80: Label
ReturnValue 82 ReturnValue 84
FunctionEnd FunctionEnd

View File

@ -5,53 +5,52 @@ Warning, version 450 is not yet complete; most version-specific features are pre
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 383 // Id's are bound by 372
Source GLSL 450
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 356
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 450
Name 4 "main" Name 4 "main"
Name 9 "iv" Name 9 "iv"
Name 15 "i1D" Name 15 "i1D"
Name 25 "i2D" Name 27 "i2D"
Name 36 "i3D" Name 38 "i3D"
Name 43 "iCube" Name 45 "iCube"
Name 53 "iCubeArray" Name 55 "iCubeArray"
Name 60 "i2DRect" Name 62 "i2DRect"
Name 70 "i1DArray" Name 72 "i1DArray"
Name 80 "i2DArray" Name 82 "i2DArray"
Name 87 "iBuffer" Name 89 "iBuffer"
Name 97 "i2DMS" Name 98 "i2DMS"
Name 107 "i2DMSArray" Name 108 "i2DMSArray"
Name 128 "v" Name 127 "v"
Name 133 "ic1D" Name 132 "ic1D"
Name 143 "ic2D" Name 142 "ic2D"
Name 153 "ic3D" Name 152 "ic3D"
Name 231 "ui" Name 229 "ui"
Name 235 "ii1D" Name 232 "ii1D"
Name 249 "ui2D" Name 245 "ui2D"
Name 252 "value" Name 248 "value"
Name 367 "fragData" Name 356 "fragData"
Name 382 "ic4D" Name 371 "ic4D"
Decorate 15(i1D) Binding 0 Decorate 15(i1D) Binding 0
Decorate 25(i2D) Binding 1 Decorate 27(i2D) Binding 1
Decorate 36(i3D) Binding 2 Decorate 38(i3D) Binding 2
Decorate 43(iCube) Binding 3 Decorate 45(iCube) Binding 3
Decorate 53(iCubeArray) Binding 4 Decorate 55(iCubeArray) Binding 4
Decorate 60(i2DRect) Binding 5 Decorate 62(i2DRect) Binding 5
Decorate 70(i1DArray) Binding 6 Decorate 72(i1DArray) Binding 6
Decorate 80(i2DArray) Binding 7 Decorate 82(i2DArray) Binding 7
Decorate 87(iBuffer) Binding 8 Decorate 89(iBuffer) Binding 8
Decorate 97(i2DMS) Binding 9 Decorate 98(i2DMS) Binding 9
Decorate 107(i2DMSArray) Binding 10 Decorate 108(i2DMSArray) Binding 10
Decorate 235(ii1D) Binding 11 Decorate 232(ii1D) Binding 11
Decorate 249(ui2D) Binding 12 Decorate 245(ui2D) Binding 12
Decorate 382(ic4D) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1
@ -63,436 +62,425 @@ Linked fragment stage:
13: TypeImage 12(float) 1D nonsampled format:Rgba32f 13: TypeImage 12(float) 1D nonsampled format:Rgba32f
14: TypePointer UniformConstant 13 14: TypePointer UniformConstant 13
15(i1D): 14(ptr) Variable UniformConstant 15(i1D): 14(ptr) Variable UniformConstant
23: TypeImage 12(float) 2D nonsampled format:Rgba32f 18: TypeInt 32 0
24: TypePointer UniformConstant 23 19: 18(int) Constant 0
25(i2D): 24(ptr) Variable UniformConstant 20: TypePointer Function 6(int)
27: TypeVector 6(int) 2 25: TypeImage 12(float) 2D nonsampled format:Rgba32f
34: TypeImage 12(float) 3D nonsampled format:Rgba32f 26: TypePointer UniformConstant 25
35: TypePointer UniformConstant 34 27(i2D): 26(ptr) Variable UniformConstant
36(i3D): 35(ptr) Variable UniformConstant 29: TypeVector 6(int) 2
41: TypeImage 12(float) Cube nonsampled format:Rgba32f 36: TypeImage 12(float) 3D nonsampled format:Rgba32f
42: TypePointer UniformConstant 41 37: TypePointer UniformConstant 36
43(iCube): 42(ptr) Variable UniformConstant 38(i3D): 37(ptr) Variable UniformConstant
51: TypeImage 12(float) Cube array nonsampled format:Rgba32f 43: TypeImage 12(float) Cube nonsampled format:Rgba32f
52: TypePointer UniformConstant 51 44: TypePointer UniformConstant 43
53(iCubeArray): 52(ptr) Variable UniformConstant 45(iCube): 44(ptr) Variable UniformConstant
58: TypeImage 12(float) Rect nonsampled format:Rgba32f 53: TypeImage 12(float) Cube array nonsampled format:Rgba32f
59: TypePointer UniformConstant 58 54: TypePointer UniformConstant 53
60(i2DRect): 59(ptr) Variable UniformConstant 55(iCubeArray): 54(ptr) Variable UniformConstant
68: TypeImage 12(float) 1D array nonsampled format:Rgba32f 60: TypeImage 12(float) Rect nonsampled format:Rgba32f
69: TypePointer UniformConstant 68 61: TypePointer UniformConstant 60
70(i1DArray): 69(ptr) Variable UniformConstant 62(i2DRect): 61(ptr) Variable UniformConstant
78: TypeImage 12(float) 2D array nonsampled format:Rgba32f 70: TypeImage 12(float) 1D array nonsampled format:Rgba32f
79: TypePointer UniformConstant 78 71: TypePointer UniformConstant 70
80(i2DArray): 79(ptr) Variable UniformConstant 72(i1DArray): 71(ptr) Variable UniformConstant
85: TypeImage 12(float) Buffer nonsampled format:Rgba32f 80: TypeImage 12(float) 2D array nonsampled format:Rgba32f
86: TypePointer UniformConstant 85 81: TypePointer UniformConstant 80
87(iBuffer): 86(ptr) Variable UniformConstant 82(i2DArray): 81(ptr) Variable UniformConstant
95: TypeImage 12(float) 2D multi-sampled nonsampled format:Rgba32f 87: TypeImage 12(float) Buffer nonsampled format:Rgba32f
96: TypePointer UniformConstant 95 88: TypePointer UniformConstant 87
97(i2DMS): 96(ptr) Variable UniformConstant 89(iBuffer): 88(ptr) Variable UniformConstant
105: TypeImage 12(float) 2D array multi-sampled nonsampled format:Rgba32f 96: TypeImage 12(float) 2D multi-sampled nonsampled format:Rgba32f
106: TypePointer UniformConstant 105 97: TypePointer UniformConstant 96
107(i2DMSArray): 106(ptr) Variable UniformConstant 98(i2DMS): 97(ptr) Variable UniformConstant
126: TypeVector 12(float) 4 106: TypeImage 12(float) 2D array multi-sampled nonsampled format:Rgba32f
127: TypePointer Function 126(fvec4) 107: TypePointer UniformConstant 106
129: 12(float) Constant 0 108(i2DMSArray): 107(ptr) Variable UniformConstant
130: 126(fvec4) ConstantComposite 129 129 129 129 125: TypeVector 12(float) 4
132: TypePointer UniformConstant 6(int) 126: TypePointer Function 125(fvec4)
133(ic1D): 132(ptr) Variable UniformConstant 128: 12(float) Constant 0
142: TypePointer UniformConstant 27(ivec2) 129: 125(fvec4) ConstantComposite 128 128 128 128
143(ic2D): 142(ptr) Variable UniformConstant 131: TypePointer UniformConstant 6(int)
152: TypePointer UniformConstant 7(ivec3) 132(ic1D): 131(ptr) Variable UniformConstant
153(ic3D): 152(ptr) Variable UniformConstant 141: TypePointer UniformConstant 29(ivec2)
211: 6(int) Constant 1 142(ic2D): 141(ptr) Variable UniformConstant
217: 6(int) Constant 2 151: TypePointer UniformConstant 7(ivec3)
221: 6(int) Constant 3 152(ic3D): 151(ptr) Variable UniformConstant
227: 6(int) Constant 4 210: 6(int) Constant 1
229: TypeInt 32 0 216: 6(int) Constant 2
230: TypePointer Function 229(int) 220: 6(int) Constant 3
232: 229(int) Constant 0 226: 6(int) Constant 4
233: TypeImage 6(int) 1D nonsampled format:R32i 228: TypePointer Function 18(int)
234: TypePointer UniformConstant 233 230: TypeImage 6(int) 1D nonsampled format:R32i
235(ii1D): 234(ptr) Variable UniformConstant 231: TypePointer UniformConstant 230
237: 6(int) Constant 10 232(ii1D): 231(ptr) Variable UniformConstant
238: TypePointer Image 6(int) 234: 6(int) Constant 10
240: 229(int) Constant 1 235: TypePointer Image 6(int)
247: TypeImage 229(int) 2D nonsampled format:R32ui 237: 18(int) Constant 1
248: TypePointer UniformConstant 247 243: TypeImage 18(int) 2D nonsampled format:R32ui
249(ui2D): 248(ptr) Variable UniformConstant 244: TypePointer UniformConstant 243
251: TypePointer UniformConstant 229(int) 245(ui2D): 244(ptr) Variable UniformConstant
252(value): 251(ptr) Variable UniformConstant 247: TypePointer UniformConstant 18(int)
254: TypePointer Image 229(int) 248(value): 247(ptr) Variable UniformConstant
260: 6(int) Constant 11 250: TypePointer Image 18(int)
275: 6(int) Constant 12 256: 6(int) Constant 11
290: 6(int) Constant 13 270: 6(int) Constant 12
305: 6(int) Constant 14 284: 6(int) Constant 13
320: 6(int) Constant 15 298: 6(int) Constant 14
335: 6(int) Constant 16 312: 6(int) Constant 15
350: 6(int) Constant 18 326: 6(int) Constant 16
351: 6(int) Constant 17 340: 6(int) Constant 18
360: 229(int) Constant 19 341: 6(int) Constant 17
366: TypePointer Output 126(fvec4) 349: 18(int) Constant 19
367(fragData): 366(ptr) Variable Output 355: TypePointer Output 125(fvec4)
373: TypeBool 356(fragData): 355(ptr) Variable Output
380: TypeVector 6(int) 4 362: TypeBool
381: TypePointer UniformConstant 380(ivec4) 369: TypeVector 6(int) 4
382(ic4D): 381(ptr) Variable UniformConstant 370: TypePointer UniformConstant 369(ivec4)
371(ic4D): 370(ptr) Variable UniformConstant
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
9(iv): 8(ptr) Variable Function 9(iv): 8(ptr) Variable Function
128(v): 127(ptr) Variable Function 127(v): 126(ptr) Variable Function
231(ui): 230(ptr) Variable Function 229(ui): 228(ptr) Variable Function
368: 127(ptr) Variable Function 357: 126(ptr) Variable Function
Store 9(iv) 11 Store 9(iv) 11
16: 13 Load 15(i1D) 16: 13 Load 15(i1D)
17: 6(int) ImageQuerySize 16 17: 6(int) ImageQuerySize 16
18: 7(ivec3) Load 9(iv) 21: 20(ptr) AccessChain 9(iv) 19
19: 6(int) CompositeExtract 18 0 22: 6(int) Load 21
20: 6(int) IAdd 19 17 23: 6(int) IAdd 22 17
21: 7(ivec3) Load 9(iv) 24: 20(ptr) AccessChain 9(iv) 19
22: 7(ivec3) CompositeInsert 20 21 0 Store 24 23
Store 9(iv) 22 28: 25 Load 27(i2D)
26: 23 Load 25(i2D) 30: 29(ivec2) ImageQuerySize 28
28: 27(ivec2) ImageQuerySize 26 31: 7(ivec3) Load 9(iv)
29: 7(ivec3) Load 9(iv) 32: 29(ivec2) VectorShuffle 31 31 0 1
30: 27(ivec2) VectorShuffle 29 29 0 1 33: 29(ivec2) IAdd 32 30
31: 27(ivec2) IAdd 30 28 34: 7(ivec3) Load 9(iv)
32: 7(ivec3) Load 9(iv) 35: 7(ivec3) VectorShuffle 34 33 3 4 2
33: 7(ivec3) VectorShuffle 32 31 3 4 2 Store 9(iv) 35
Store 9(iv) 33 39: 36 Load 38(i3D)
37: 34 Load 36(i3D) 40: 7(ivec3) ImageQuerySize 39
38: 7(ivec3) ImageQuerySize 37 41: 7(ivec3) Load 9(iv)
39: 7(ivec3) Load 9(iv) 42: 7(ivec3) IAdd 41 40
40: 7(ivec3) IAdd 39 38 Store 9(iv) 42
Store 9(iv) 40 46: 43 Load 45(iCube)
44: 41 Load 43(iCube) 47: 29(ivec2) ImageQuerySize 46
45: 27(ivec2) ImageQuerySize 44 48: 7(ivec3) Load 9(iv)
46: 7(ivec3) Load 9(iv) 49: 29(ivec2) VectorShuffle 48 48 0 1
47: 27(ivec2) VectorShuffle 46 46 0 1 50: 29(ivec2) IAdd 49 47
48: 27(ivec2) IAdd 47 45 51: 7(ivec3) Load 9(iv)
49: 7(ivec3) Load 9(iv) 52: 7(ivec3) VectorShuffle 51 50 3 4 2
50: 7(ivec3) VectorShuffle 49 48 3 4 2 Store 9(iv) 52
Store 9(iv) 50 56: 53 Load 55(iCubeArray)
54: 51 Load 53(iCubeArray) 57: 7(ivec3) ImageQuerySize 56
55: 7(ivec3) ImageQuerySize 54 58: 7(ivec3) Load 9(iv)
56: 7(ivec3) Load 9(iv) 59: 7(ivec3) IAdd 58 57
57: 7(ivec3) IAdd 56 55 Store 9(iv) 59
Store 9(iv) 57 63: 60 Load 62(i2DRect)
61: 58 Load 60(i2DRect) 64: 29(ivec2) ImageQuerySize 63
62: 27(ivec2) ImageQuerySize 61 65: 7(ivec3) Load 9(iv)
63: 7(ivec3) Load 9(iv) 66: 29(ivec2) VectorShuffle 65 65 0 1
64: 27(ivec2) VectorShuffle 63 63 0 1 67: 29(ivec2) IAdd 66 64
65: 27(ivec2) IAdd 64 62 68: 7(ivec3) Load 9(iv)
66: 7(ivec3) Load 9(iv) 69: 7(ivec3) VectorShuffle 68 67 3 4 2
67: 7(ivec3) VectorShuffle 66 65 3 4 2 Store 9(iv) 69
Store 9(iv) 67 73: 70 Load 72(i1DArray)
71: 68 Load 70(i1DArray) 74: 29(ivec2) ImageQuerySize 73
72: 27(ivec2) ImageQuerySize 71 75: 7(ivec3) Load 9(iv)
73: 7(ivec3) Load 9(iv) 76: 29(ivec2) VectorShuffle 75 75 0 1
74: 27(ivec2) VectorShuffle 73 73 0 1 77: 29(ivec2) IAdd 76 74
75: 27(ivec2) IAdd 74 72 78: 7(ivec3) Load 9(iv)
76: 7(ivec3) Load 9(iv) 79: 7(ivec3) VectorShuffle 78 77 3 4 2
77: 7(ivec3) VectorShuffle 76 75 3 4 2 Store 9(iv) 79
Store 9(iv) 77 83: 80 Load 82(i2DArray)
81: 78 Load 80(i2DArray) 84: 7(ivec3) ImageQuerySize 83
82: 7(ivec3) ImageQuerySize 81 85: 7(ivec3) Load 9(iv)
83: 7(ivec3) Load 9(iv) 86: 7(ivec3) IAdd 85 84
84: 7(ivec3) IAdd 83 82 Store 9(iv) 86
Store 9(iv) 84 90: 87 Load 89(iBuffer)
88: 85 Load 87(iBuffer) 91: 6(int) ImageQuerySize 90
89: 6(int) ImageQuerySize 88 92: 20(ptr) AccessChain 9(iv) 19
90: 7(ivec3) Load 9(iv) 93: 6(int) Load 92
91: 6(int) CompositeExtract 90 0 94: 6(int) IAdd 93 91
92: 6(int) IAdd 91 89 95: 20(ptr) AccessChain 9(iv) 19
93: 7(ivec3) Load 9(iv) Store 95 94
94: 7(ivec3) CompositeInsert 92 93 0 99: 96 Load 98(i2DMS)
Store 9(iv) 94 100: 29(ivec2) ImageQuerySize 99
98: 95 Load 97(i2DMS) 101: 7(ivec3) Load 9(iv)
99: 27(ivec2) ImageQuerySize 98 102: 29(ivec2) VectorShuffle 101 101 0 1
100: 7(ivec3) Load 9(iv) 103: 29(ivec2) IAdd 102 100
101: 27(ivec2) VectorShuffle 100 100 0 1 104: 7(ivec3) Load 9(iv)
102: 27(ivec2) IAdd 101 99 105: 7(ivec3) VectorShuffle 104 103 3 4 2
103: 7(ivec3) Load 9(iv) Store 9(iv) 105
104: 7(ivec3) VectorShuffle 103 102 3 4 2 109: 106 Load 108(i2DMSArray)
Store 9(iv) 104 110: 7(ivec3) ImageQuerySize 109
108: 105 Load 107(i2DMSArray) 111: 7(ivec3) Load 9(iv)
109: 7(ivec3) ImageQuerySize 108 112: 7(ivec3) IAdd 111 110
110: 7(ivec3) Load 9(iv) Store 9(iv) 112
111: 7(ivec3) IAdd 110 109 113: 96 Load 98(i2DMS)
Store 9(iv) 111 114: 6(int) ImageQuerySamples 113
112: 95 Load 97(i2DMS) 115: 20(ptr) AccessChain 9(iv) 19
113: 6(int) ImageQuerySamples 112 116: 6(int) Load 115
114: 7(ivec3) Load 9(iv) 117: 6(int) IAdd 116 114
115: 6(int) CompositeExtract 114 0 118: 20(ptr) AccessChain 9(iv) 19
116: 6(int) IAdd 115 113 Store 118 117
117: 7(ivec3) Load 9(iv) 119: 106 Load 108(i2DMSArray)
118: 7(ivec3) CompositeInsert 116 117 0
Store 9(iv) 118
119: 105 Load 107(i2DMSArray)
120: 6(int) ImageQuerySamples 119 120: 6(int) ImageQuerySamples 119
121: 7(ivec3) Load 9(iv) 121: 20(ptr) AccessChain 9(iv) 19
122: 6(int) CompositeExtract 121 0 122: 6(int) Load 121
123: 6(int) IAdd 122 120 123: 6(int) IAdd 122 120
124: 7(ivec3) Load 9(iv) 124: 20(ptr) AccessChain 9(iv) 19
125: 7(ivec3) CompositeInsert 123 124 0 Store 124 123
Store 9(iv) 125 Store 127(v) 129
Store 128(v) 130 130: 13 Load 15(i1D)
131: 13 Load 15(i1D) 133: 6(int) Load 132(ic1D)
134: 6(int) Load 133(ic1D) 134: 125(fvec4) ImageRead 130 133
135: 126(fvec4) ImageRead 131 134 135: 125(fvec4) Load 127(v)
136: 126(fvec4) Load 128(v) 136: 125(fvec4) FAdd 135 134
137: 126(fvec4) FAdd 136 135 Store 127(v) 136
Store 128(v) 137 137: 13 Load 15(i1D)
138: 13 Load 15(i1D) 138: 6(int) Load 132(ic1D)
139: 6(int) Load 133(ic1D) 139: 125(fvec4) Load 127(v)
140: 126(fvec4) Load 128(v) ImageWrite 137 138 139
ImageWrite 138 139 140 140: 25 Load 27(i2D)
141: 23 Load 25(i2D) 143: 29(ivec2) Load 142(ic2D)
144: 27(ivec2) Load 143(ic2D) 144: 125(fvec4) ImageRead 140 143
145: 126(fvec4) ImageRead 141 144 145: 125(fvec4) Load 127(v)
146: 126(fvec4) Load 128(v) 146: 125(fvec4) FAdd 145 144
147: 126(fvec4) FAdd 146 145 Store 127(v) 146
Store 128(v) 147 147: 25 Load 27(i2D)
148: 23 Load 25(i2D) 148: 29(ivec2) Load 142(ic2D)
149: 27(ivec2) Load 143(ic2D) 149: 125(fvec4) Load 127(v)
150: 126(fvec4) Load 128(v) ImageWrite 147 148 149
ImageWrite 148 149 150 150: 36 Load 38(i3D)
151: 34 Load 36(i3D) 153: 7(ivec3) Load 152(ic3D)
154: 7(ivec3) Load 153(ic3D) 154: 125(fvec4) ImageRead 150 153
155: 126(fvec4) ImageRead 151 154 155: 125(fvec4) Load 127(v)
156: 126(fvec4) Load 128(v) 156: 125(fvec4) FAdd 155 154
157: 126(fvec4) FAdd 156 155 Store 127(v) 156
Store 128(v) 157 157: 36 Load 38(i3D)
158: 34 Load 36(i3D) 158: 7(ivec3) Load 152(ic3D)
159: 7(ivec3) Load 153(ic3D) 159: 125(fvec4) Load 127(v)
160: 126(fvec4) Load 128(v) ImageWrite 157 158 159
ImageWrite 158 159 160 160: 43 Load 45(iCube)
161: 41 Load 43(iCube) 161: 7(ivec3) Load 152(ic3D)
162: 7(ivec3) Load 153(ic3D) 162: 125(fvec4) ImageRead 160 161
163: 126(fvec4) ImageRead 161 162 163: 125(fvec4) Load 127(v)
164: 126(fvec4) Load 128(v) 164: 125(fvec4) FAdd 163 162
165: 126(fvec4) FAdd 164 163 Store 127(v) 164
Store 128(v) 165 165: 43 Load 45(iCube)
166: 41 Load 43(iCube) 166: 7(ivec3) Load 152(ic3D)
167: 7(ivec3) Load 153(ic3D) 167: 125(fvec4) Load 127(v)
168: 126(fvec4) Load 128(v) ImageWrite 165 166 167
ImageWrite 166 167 168 168: 53 Load 55(iCubeArray)
169: 51 Load 53(iCubeArray) 169: 7(ivec3) Load 152(ic3D)
170: 7(ivec3) Load 153(ic3D) 170: 125(fvec4) ImageRead 168 169
171: 126(fvec4) ImageRead 169 170 171: 125(fvec4) Load 127(v)
172: 126(fvec4) Load 128(v) 172: 125(fvec4) FAdd 171 170
173: 126(fvec4) FAdd 172 171 Store 127(v) 172
Store 128(v) 173 173: 53 Load 55(iCubeArray)
174: 51 Load 53(iCubeArray) 174: 7(ivec3) Load 152(ic3D)
175: 7(ivec3) Load 153(ic3D) 175: 125(fvec4) Load 127(v)
176: 126(fvec4) Load 128(v) ImageWrite 173 174 175
ImageWrite 174 175 176 176: 60 Load 62(i2DRect)
177: 58 Load 60(i2DRect) 177: 29(ivec2) Load 142(ic2D)
178: 27(ivec2) Load 143(ic2D) 178: 125(fvec4) ImageRead 176 177
179: 126(fvec4) ImageRead 177 178 179: 125(fvec4) Load 127(v)
180: 126(fvec4) Load 128(v) 180: 125(fvec4) FAdd 179 178
181: 126(fvec4) FAdd 180 179 Store 127(v) 180
Store 128(v) 181 181: 60 Load 62(i2DRect)
182: 58 Load 60(i2DRect) 182: 29(ivec2) Load 142(ic2D)
183: 27(ivec2) Load 143(ic2D) 183: 125(fvec4) Load 127(v)
184: 126(fvec4) Load 128(v) ImageWrite 181 182 183
ImageWrite 182 183 184 184: 70 Load 72(i1DArray)
185: 68 Load 70(i1DArray) 185: 29(ivec2) Load 142(ic2D)
186: 27(ivec2) Load 143(ic2D) 186: 125(fvec4) ImageRead 184 185
187: 126(fvec4) ImageRead 185 186 187: 125(fvec4) Load 127(v)
188: 126(fvec4) Load 128(v) 188: 125(fvec4) FAdd 187 186
189: 126(fvec4) FAdd 188 187 Store 127(v) 188
Store 128(v) 189 189: 70 Load 72(i1DArray)
190: 68 Load 70(i1DArray) 190: 29(ivec2) Load 142(ic2D)
191: 27(ivec2) Load 143(ic2D) 191: 125(fvec4) Load 127(v)
192: 126(fvec4) Load 128(v) ImageWrite 189 190 191
ImageWrite 190 191 192 192: 80 Load 82(i2DArray)
193: 78 Load 80(i2DArray) 193: 7(ivec3) Load 152(ic3D)
194: 7(ivec3) Load 153(ic3D) 194: 125(fvec4) ImageRead 192 193
195: 126(fvec4) ImageRead 193 194 195: 125(fvec4) Load 127(v)
196: 126(fvec4) Load 128(v) 196: 125(fvec4) FAdd 195 194
197: 126(fvec4) FAdd 196 195 Store 127(v) 196
Store 128(v) 197 197: 80 Load 82(i2DArray)
198: 78 Load 80(i2DArray) 198: 7(ivec3) Load 152(ic3D)
199: 7(ivec3) Load 153(ic3D) 199: 125(fvec4) Load 127(v)
200: 126(fvec4) Load 128(v) ImageWrite 197 198 199
ImageWrite 198 199 200 200: 87 Load 89(iBuffer)
201: 85 Load 87(iBuffer) 201: 6(int) Load 132(ic1D)
202: 6(int) Load 133(ic1D) 202: 125(fvec4) ImageRead 200 201
203: 126(fvec4) ImageRead 201 202 203: 125(fvec4) Load 127(v)
204: 126(fvec4) Load 128(v) 204: 125(fvec4) FAdd 203 202
205: 126(fvec4) FAdd 204 203 Store 127(v) 204
Store 128(v) 205 205: 87 Load 89(iBuffer)
206: 85 Load 87(iBuffer) 206: 6(int) Load 132(ic1D)
207: 6(int) Load 133(ic1D) 207: 125(fvec4) Load 127(v)
208: 126(fvec4) Load 128(v) ImageWrite 205 206 207
ImageWrite 206 207 208 208: 96 Load 98(i2DMS)
209: 95 Load 97(i2DMS) 209: 29(ivec2) Load 142(ic2D)
210: 27(ivec2) Load 143(ic2D) 211: 125(fvec4) ImageRead 208 209 Sample 210
212: 126(fvec4) ImageRead 209 210 212: 125(fvec4) Load 127(v)
213: 126(fvec4) Load 128(v) 213: 125(fvec4) FAdd 212 211
214: 126(fvec4) FAdd 213 212 Store 127(v) 213
Store 128(v) 214 214: 96 Load 98(i2DMS)
215: 95 Load 97(i2DMS) 215: 29(ivec2) Load 142(ic2D)
216: 27(ivec2) Load 143(ic2D) 217: 125(fvec4) Load 127(v)
218: 126(fvec4) Load 128(v) ImageWrite 214 215 216
ImageWrite 215 216 217 218: 106 Load 108(i2DMSArray)
219: 105 Load 107(i2DMSArray) 219: 7(ivec3) Load 152(ic3D)
220: 7(ivec3) Load 153(ic3D) 221: 125(fvec4) ImageRead 218 219 Sample 220
222: 126(fvec4) ImageRead 219 220 222: 125(fvec4) Load 127(v)
223: 126(fvec4) Load 128(v) 223: 125(fvec4) FAdd 222 221
224: 126(fvec4) FAdd 223 222 Store 127(v) 223
Store 128(v) 224 224: 106 Load 108(i2DMSArray)
225: 105 Load 107(i2DMSArray) 225: 7(ivec3) Load 152(ic3D)
226: 7(ivec3) Load 153(ic3D) 227: 125(fvec4) Load 127(v)
228: 126(fvec4) Load 128(v) ImageWrite 224 225 226
ImageWrite 225 226 227 Store 229(ui) 19
Store 231(ui) 232 233: 6(int) Load 132(ic1D)
236: 6(int) Load 133(ic1D) 236: 235(ptr) ImageTexelPointer 232(ii1D) 233 0
239: 238(ptr) ImageTexelPointer 235(ii1D) 236 0 238: 6(int) AtomicIAdd 236 237 19 234
241: 6(int) AtomicIAdd 239 240 232 237 239: 20(ptr) AccessChain 9(iv) 19
242: 7(ivec3) Load 9(iv) 240: 6(int) Load 239
243: 6(int) CompositeExtract 242 0 241: 6(int) IAdd 240 238
244: 6(int) IAdd 243 241 242: 20(ptr) AccessChain 9(iv) 19
245: 7(ivec3) Load 9(iv) Store 242 241
246: 7(ivec3) CompositeInsert 244 245 0 246: 29(ivec2) Load 142(ic2D)
Store 9(iv) 246 249: 18(int) Load 248(value)
250: 27(ivec2) Load 143(ic2D) 251: 250(ptr) ImageTexelPointer 245(ui2D) 246 0
253: 229(int) Load 252(value) 252: 18(int) AtomicIAdd 251 237 19 249
255: 254(ptr) ImageTexelPointer 249(ui2D) 250 0 253: 18(int) Load 229(ui)
256: 229(int) AtomicIAdd 255 240 232 253 254: 18(int) IAdd 253 252
257: 229(int) Load 231(ui) Store 229(ui) 254
258: 229(int) IAdd 257 256 255: 6(int) Load 132(ic1D)
Store 231(ui) 258 257: 235(ptr) ImageTexelPointer 232(ii1D) 255 0
259: 6(int) Load 133(ic1D) 258: 6(int) AtomicSMin 257 237 19 256
261: 238(ptr) ImageTexelPointer 235(ii1D) 259 0 259: 20(ptr) AccessChain 9(iv) 19
262: 6(int) AtomicSMin 261 240 232 260 260: 6(int) Load 259
263: 7(ivec3) Load 9(iv) 261: 6(int) IAdd 260 258
264: 6(int) CompositeExtract 263 0 262: 20(ptr) AccessChain 9(iv) 19
265: 6(int) IAdd 264 262 Store 262 261
266: 7(ivec3) Load 9(iv) 263: 29(ivec2) Load 142(ic2D)
267: 7(ivec3) CompositeInsert 265 266 0 264: 18(int) Load 248(value)
Store 9(iv) 267 265: 250(ptr) ImageTexelPointer 245(ui2D) 263 0
268: 27(ivec2) Load 143(ic2D) 266: 18(int) AtomicUMin 265 237 19 264
269: 229(int) Load 252(value) 267: 18(int) Load 229(ui)
270: 254(ptr) ImageTexelPointer 249(ui2D) 268 0 268: 18(int) IAdd 267 266
271: 229(int) AtomicUMin 270 240 232 269 Store 229(ui) 268
272: 229(int) Load 231(ui) 269: 6(int) Load 132(ic1D)
273: 229(int) IAdd 272 271 271: 235(ptr) ImageTexelPointer 232(ii1D) 269 0
Store 231(ui) 273 272: 6(int) AtomicSMax 271 237 19 270
274: 6(int) Load 133(ic1D) 273: 20(ptr) AccessChain 9(iv) 19
276: 238(ptr) ImageTexelPointer 235(ii1D) 274 0 274: 6(int) Load 273
277: 6(int) AtomicSMax 276 240 232 275 275: 6(int) IAdd 274 272
278: 7(ivec3) Load 9(iv) 276: 20(ptr) AccessChain 9(iv) 19
279: 6(int) CompositeExtract 278 0 Store 276 275
280: 6(int) IAdd 279 277 277: 29(ivec2) Load 142(ic2D)
281: 7(ivec3) Load 9(iv) 278: 18(int) Load 248(value)
282: 7(ivec3) CompositeInsert 280 281 0 279: 250(ptr) ImageTexelPointer 245(ui2D) 277 0
Store 9(iv) 282 280: 18(int) AtomicUMax 279 237 19 278
283: 27(ivec2) Load 143(ic2D) 281: 18(int) Load 229(ui)
284: 229(int) Load 252(value) 282: 18(int) IAdd 281 280
285: 254(ptr) ImageTexelPointer 249(ui2D) 283 0 Store 229(ui) 282
286: 229(int) AtomicUMax 285 240 232 284 283: 6(int) Load 132(ic1D)
287: 229(int) Load 231(ui) 285: 235(ptr) ImageTexelPointer 232(ii1D) 283 0
288: 229(int) IAdd 287 286 286: 6(int) AtomicAnd 285 237 19 284
Store 231(ui) 288 287: 20(ptr) AccessChain 9(iv) 19
289: 6(int) Load 133(ic1D) 288: 6(int) Load 287
291: 238(ptr) ImageTexelPointer 235(ii1D) 289 0 289: 6(int) IAdd 288 286
292: 6(int) AtomicAnd 291 240 232 290 290: 20(ptr) AccessChain 9(iv) 19
293: 7(ivec3) Load 9(iv) Store 290 289
294: 6(int) CompositeExtract 293 0 291: 29(ivec2) Load 142(ic2D)
295: 6(int) IAdd 294 292 292: 18(int) Load 248(value)
296: 7(ivec3) Load 9(iv) 293: 250(ptr) ImageTexelPointer 245(ui2D) 291 0
297: 7(ivec3) CompositeInsert 295 296 0 294: 18(int) AtomicAnd 293 237 19 292
Store 9(iv) 297 295: 18(int) Load 229(ui)
298: 27(ivec2) Load 143(ic2D) 296: 18(int) IAdd 295 294
299: 229(int) Load 252(value) Store 229(ui) 296
300: 254(ptr) ImageTexelPointer 249(ui2D) 298 0 297: 6(int) Load 132(ic1D)
301: 229(int) AtomicAnd 300 240 232 299 299: 235(ptr) ImageTexelPointer 232(ii1D) 297 0
302: 229(int) Load 231(ui) 300: 6(int) AtomicOr 299 237 19 298
303: 229(int) IAdd 302 301 301: 20(ptr) AccessChain 9(iv) 19
Store 231(ui) 303 302: 6(int) Load 301
304: 6(int) Load 133(ic1D) 303: 6(int) IAdd 302 300
306: 238(ptr) ImageTexelPointer 235(ii1D) 304 0 304: 20(ptr) AccessChain 9(iv) 19
307: 6(int) AtomicOr 306 240 232 305 Store 304 303
308: 7(ivec3) Load 9(iv) 305: 29(ivec2) Load 142(ic2D)
309: 6(int) CompositeExtract 308 0 306: 18(int) Load 248(value)
310: 6(int) IAdd 309 307 307: 250(ptr) ImageTexelPointer 245(ui2D) 305 0
311: 7(ivec3) Load 9(iv) 308: 18(int) AtomicOr 307 237 19 306
312: 7(ivec3) CompositeInsert 310 311 0 309: 18(int) Load 229(ui)
Store 9(iv) 312 310: 18(int) IAdd 309 308
313: 27(ivec2) Load 143(ic2D) Store 229(ui) 310
314: 229(int) Load 252(value) 311: 6(int) Load 132(ic1D)
315: 254(ptr) ImageTexelPointer 249(ui2D) 313 0 313: 235(ptr) ImageTexelPointer 232(ii1D) 311 0
316: 229(int) AtomicOr 315 240 232 314 314: 6(int) AtomicXor 313 237 19 312
317: 229(int) Load 231(ui) 315: 20(ptr) AccessChain 9(iv) 19
318: 229(int) IAdd 317 316 316: 6(int) Load 315
Store 231(ui) 318 317: 6(int) IAdd 316 314
319: 6(int) Load 133(ic1D) 318: 20(ptr) AccessChain 9(iv) 19
321: 238(ptr) ImageTexelPointer 235(ii1D) 319 0 Store 318 317
322: 6(int) AtomicXor 321 240 232 320 319: 29(ivec2) Load 142(ic2D)
323: 7(ivec3) Load 9(iv) 320: 18(int) Load 248(value)
324: 6(int) CompositeExtract 323 0 321: 250(ptr) ImageTexelPointer 245(ui2D) 319 0
325: 6(int) IAdd 324 322 322: 18(int) AtomicXor 321 237 19 320
326: 7(ivec3) Load 9(iv) 323: 18(int) Load 229(ui)
327: 7(ivec3) CompositeInsert 325 326 0 324: 18(int) IAdd 323 322
Store 9(iv) 327 Store 229(ui) 324
328: 27(ivec2) Load 143(ic2D) 325: 6(int) Load 132(ic1D)
329: 229(int) Load 252(value) 327: 235(ptr) ImageTexelPointer 232(ii1D) 325 0
330: 254(ptr) ImageTexelPointer 249(ui2D) 328 0 328: 6(int) AtomicExchange 327 237 19 326
331: 229(int) AtomicXor 330 240 232 329 329: 20(ptr) AccessChain 9(iv) 19
332: 229(int) Load 231(ui) 330: 6(int) Load 329
333: 229(int) IAdd 332 331 331: 6(int) IAdd 330 328
Store 231(ui) 333 332: 20(ptr) AccessChain 9(iv) 19
334: 6(int) Load 133(ic1D) Store 332 331
336: 238(ptr) ImageTexelPointer 235(ii1D) 334 0 333: 29(ivec2) Load 142(ic2D)
337: 6(int) AtomicExchange 336 240 232 335 334: 18(int) Load 248(value)
338: 7(ivec3) Load 9(iv) 335: 250(ptr) ImageTexelPointer 245(ui2D) 333 0
339: 6(int) CompositeExtract 338 0 336: 18(int) AtomicExchange 335 237 19 334
340: 6(int) IAdd 339 337 337: 18(int) Load 229(ui)
341: 7(ivec3) Load 9(iv) 338: 18(int) IAdd 337 336
342: 7(ivec3) CompositeInsert 340 341 0 Store 229(ui) 338
Store 9(iv) 342 339: 6(int) Load 132(ic1D)
343: 27(ivec2) Load 143(ic2D) 342: 235(ptr) ImageTexelPointer 232(ii1D) 339 0
344: 229(int) Load 252(value) 343: 6(int) AtomicCompareExchange 342 237 19 19 341 340
345: 254(ptr) ImageTexelPointer 249(ui2D) 343 0 344: 20(ptr) AccessChain 9(iv) 19
346: 229(int) AtomicExchange 345 240 232 344 345: 6(int) Load 344
347: 229(int) Load 231(ui) 346: 6(int) IAdd 345 343
348: 229(int) IAdd 347 346 347: 20(ptr) AccessChain 9(iv) 19
Store 231(ui) 348 Store 347 346
349: 6(int) Load 133(ic1D) 348: 29(ivec2) Load 142(ic2D)
352: 238(ptr) ImageTexelPointer 235(ii1D) 349 0 350: 18(int) Load 248(value)
353: 6(int) AtomicCompareExchange 352 240 232 232 351 350 351: 250(ptr) ImageTexelPointer 245(ui2D) 348 0
354: 7(ivec3) Load 9(iv) 352: 18(int) AtomicCompareExchange 351 237 19 19 350 349
355: 6(int) CompositeExtract 354 0 353: 18(int) Load 229(ui)
356: 6(int) IAdd 355 353 354: 18(int) IAdd 353 352
357: 7(ivec3) Load 9(iv) Store 229(ui) 354
358: 7(ivec3) CompositeInsert 356 357 0 358: 18(int) Load 229(ui)
Store 9(iv) 358 359: 20(ptr) AccessChain 9(iv) 237
359: 27(ivec2) Load 143(ic2D) 360: 6(int) Load 359
361: 229(int) Load 252(value) 361: 18(int) Bitcast 360
362: 254(ptr) ImageTexelPointer 249(ui2D) 359 0 363: 362(bool) INotEqual 358 361
363: 229(int) AtomicCompareExchange 362 240 232 232 361 360 SelectionMerge 365 None
364: 229(int) Load 231(ui) BranchConditional 363 364 367
365: 229(int) IAdd 364 363 364: Label
Store 231(ui) 365 366: 125(fvec4) Load 127(v)
369: 229(int) Load 231(ui) Store 357 366
370: 7(ivec3) Load 9(iv) Branch 365
371: 6(int) CompositeExtract 370 1 367: Label
372: 229(int) Bitcast 371 Store 357 129
374: 373(bool) INotEqual 369 372 Branch 365
SelectionMerge 376 None 365: Label
BranchConditional 374 375 378 368: 125(fvec4) Load 357
375: Label Store 356(fragData) 368
377: 126(fvec4) Load 128(v)
Store 368 377
Branch 376
378: Label
Store 368 130
Branch 376
376: Label
379: 126(fvec4) Load 368
Store 367(fragData) 379
Return Return
FunctionEnd FunctionEnd

View File

@ -3,24 +3,21 @@ spv.length.frag
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 33 // Id's are bound by 33
Source GLSL 120
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 14
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 120
Name 4 "main" Name 4 "main"
Name 9 "t" Name 9 "t"
Name 14 "v" Name 14 "v"
Name 26 "gl_FragColor" Name 26 "gl_FragColor"
Name 32 "u" Name 32 "u"
Decorate 14(v) Smooth
Decorate 26(gl_FragColor) BuiltIn FragColor
Decorate 32(u) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32

View File

@ -6,16 +6,16 @@ WARNING: 0:5: varying deprecated in version 130; may be removed in future releas
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 134 // Id's are bound by 136
Source GLSL 130
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 40 96
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main" Name 4 "main"
Name 8 "s1" Name 8 "s1"
MemberName 8(s1) 0 "i" MemberName 8(s1) 0 "i"
@ -34,24 +34,18 @@ Linked fragment stage:
Name 15 "foo3" Name 15 "foo3"
Name 36 "localFArray" Name 36 "localFArray"
Name 40 "coord" Name 40 "coord"
Name 47 "localIArray" Name 49 "localIArray"
Name 66 "x" Name 68 "x"
Name 68 "localArray" Name 70 "localArray"
Name 73 "i" Name 75 "i"
Name 80 "a" Name 82 "a"
Name 86 "condition" Name 88 "condition"
Name 94 "color" Name 96 "color"
Name 104 "gl_FragColor" Name 106 "gl_FragColor"
Name 124 "sampler" Name 126 "samp2D"
Name 130 "foo" Name 132 "foo"
Name 131 "foo2" Name 133 "foo2"
Name 133 "uFloatArray" Name 135 "uFloatArray"
Decorate 40(coord) Smooth
Decorate 94(color) Smooth
Decorate 104(gl_FragColor) BuiltIn FragColor
Decorate 130(foo) NoStaticUse
Decorate 131(foo2) NoStaticUse
Decorate 133(uFloatArray) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1
@ -79,38 +73,42 @@ Linked fragment stage:
38: TypeVector 7(float) 2 38: TypeVector 7(float) 2
39: TypePointer Input 38(fvec2) 39: TypePointer Input 38(fvec2)
40(coord): 39(ptr) Variable Input 40(coord): 39(ptr) Variable Input
44: 32(int) Constant 8 41: 32(int) Constant 0
45: TypeArray 6(int) 44 42: TypePointer Input 7(float)
46: TypePointer Function 45 46: 32(int) Constant 8
50: TypePointer Function 6(int) 47: TypeArray 6(int) 46
67: 6(int) Constant 5 48: TypePointer Function 47
78: 6(int) Constant 16 52: TypePointer Function 6(int)
82: 7(float) Constant 0 69: 6(int) Constant 5
86(condition): 20(ptr) Variable UniformConstant 80: 6(int) Constant 16
92: 6(int) Constant 3 84: 7(float) Constant 0
93: TypePointer Input 9(fvec4) 88(condition): 20(ptr) Variable UniformConstant
94(color): 93(ptr) Variable Input 94: 6(int) Constant 3
96: TypePointer Function 9(fvec4) 95: TypePointer Input 9(fvec4)
103: TypePointer Output 9(fvec4) 96(color): 95(ptr) Variable Input
104(gl_FragColor): 103(ptr) Variable Output 98: TypePointer Function 9(fvec4)
121: TypeImage 7(float) 2D sampled format:Unknown 100: 32(int) Constant 1
122: TypeSampledImage 121 103: 32(int) Constant 2
123: TypePointer UniformConstant 122 105: TypePointer Output 9(fvec4)
124(sampler): 123(ptr) Variable UniformConstant 106(gl_FragColor): 105(ptr) Variable Output
129: TypePointer UniformConstant 8(s1) 123: TypeImage 7(float) 2D sampled format:Unknown
130(foo): 129(ptr) Variable UniformConstant 124: TypeSampledImage 123
131(foo2): 17(ptr) Variable UniformConstant 125: TypePointer UniformConstant 124
132: TypePointer UniformConstant 34 126(samp2D): 125(ptr) Variable UniformConstant
133(uFloatArray): 132(ptr) Variable UniformConstant 131: TypePointer UniformConstant 8(s1)
132(foo): 131(ptr) Variable UniformConstant
133(foo2): 17(ptr) Variable UniformConstant
134: TypePointer UniformConstant 34
135(uFloatArray): 134(ptr) Variable UniformConstant
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
12(locals2): 11(ptr) Variable Function 12(locals2): 11(ptr) Variable Function
36(localFArray): 35(ptr) Variable Function 36(localFArray): 35(ptr) Variable Function
47(localIArray): 46(ptr) Variable Function 49(localIArray): 48(ptr) Variable Function
66(x): 50(ptr) Variable Function 68(x): 52(ptr) Variable Function
68(localArray): 35(ptr) Variable Function 70(localArray): 35(ptr) Variable Function
73(i): 50(ptr) Variable Function 75(i): 52(ptr) Variable Function
80(a): 35(ptr) Variable Function 82(a): 35(ptr) Variable Function
18: 17(ptr) AccessChain 15(foo3) 16 18: 17(ptr) AccessChain 15(foo3) 16
19: 10(s2) Load 18 19: 10(s2) Load 18
Store 12(locals2) 19 Store 12(locals2) 19
@ -118,102 +116,100 @@ Linked fragment stage:
22: 6(int) Load 21 22: 6(int) Load 21
24: 23(bool) SGreaterThan 22 16 24: 23(bool) SGreaterThan 22 16
SelectionMerge 26 None SelectionMerge 26 None
BranchConditional 24 25 52 BranchConditional 24 25 54
25: Label 25: Label
31: 30(ptr) AccessChain 12(locals2) 27 28 31: 30(ptr) AccessChain 12(locals2) 27 28
Store 31 29 Store 31 29
41: 38(fvec2) Load 40(coord) 43: 42(ptr) AccessChain 40(coord) 41
42: 7(float) CompositeExtract 41 0 44: 7(float) Load 43
43: 30(ptr) AccessChain 36(localFArray) 37 45: 30(ptr) AccessChain 36(localFArray) 37
Store 43 42 Store 45 44
48: 20(ptr) AccessChain 15(foo3) 16 16 50: 20(ptr) AccessChain 15(foo3) 16 16
49: 6(int) Load 48 51: 6(int) Load 50
51: 50(ptr) AccessChain 47(localIArray) 27 53: 52(ptr) AccessChain 49(localIArray) 27
Store 51 49 Store 53 51
Branch 26 Branch 26
52: Label 54: Label
53: 38(fvec2) Load 40(coord) 55: 42(ptr) AccessChain 40(coord) 41
54: 7(float) CompositeExtract 53 0 56: 7(float) Load 55
55: 30(ptr) AccessChain 12(locals2) 27 28 57: 30(ptr) AccessChain 12(locals2) 27 28
Store 55 54 Store 57 56
56: 30(ptr) AccessChain 36(localFArray) 37 58: 30(ptr) AccessChain 36(localFArray) 37
Store 56 29 Store 58 29
57: 50(ptr) AccessChain 47(localIArray) 27 59: 52(ptr) AccessChain 49(localIArray) 27
Store 57 16 Store 59 16
Branch 26 Branch 26
26: Label 26: Label
58: 50(ptr) AccessChain 47(localIArray) 27 60: 52(ptr) AccessChain 49(localIArray) 27
59: 6(int) Load 58 61: 6(int) Load 60
60: 23(bool) IEqual 59 16 62: 23(bool) IEqual 61 16
SelectionMerge 62 None SelectionMerge 64 None
BranchConditional 60 61 62 BranchConditional 62 63 64
61: Label 63: Label
63: 30(ptr) AccessChain 36(localFArray) 37 65: 30(ptr) AccessChain 36(localFArray) 37
64: 7(float) Load 63 66: 7(float) Load 65
65: 7(float) FAdd 64 29 67: 7(float) FAdd 66 29
Store 63 65 Store 65 67
Branch 62 Branch 64
62: Label 64: Label
Store 66(x) 67 Store 68(x) 69
69: 6(int) Load 66(x) 71: 6(int) Load 68(x)
70: 38(fvec2) Load 40(coord) 72: 42(ptr) AccessChain 40(coord) 41
71: 7(float) CompositeExtract 70 0 73: 7(float) Load 72
72: 30(ptr) AccessChain 68(localArray) 69 74: 30(ptr) AccessChain 70(localArray) 71
Store 72 71 Store 74 73
Store 73(i) 16 Store 75(i) 16
Branch 74 Branch 76
74: Label 76: Label
77: 6(int) Load 73(i) 79: 6(int) Load 75(i)
79: 23(bool) SLessThan 77 78 81: 23(bool) SLessThan 79 80
LoopMerge 75 None LoopMerge 77 76 None
BranchConditional 79 76 75 BranchConditional 81 78 77
76: Label 78: Label
81: 6(int) Load 73(i) 83: 6(int) Load 75(i)
83: 30(ptr) AccessChain 80(a) 81 85: 30(ptr) AccessChain 82(a) 83
Store 83 82 Store 85 84
84: 6(int) Load 73(i) 86: 6(int) Load 75(i)
85: 6(int) IAdd 84 28 87: 6(int) IAdd 86 28
Store 73(i) 85 Store 75(i) 87
Branch 74 Branch 76
75: Label 77: Label
87: 6(int) Load 86(condition) 89: 6(int) Load 88(condition)
88: 23(bool) IEqual 87 28 90: 23(bool) IEqual 89 28
SelectionMerge 90 None SelectionMerge 92 None
BranchConditional 88 89 90 BranchConditional 90 91 92
89: Label 91: Label
91: 34 Load 68(localArray) 93: 34 Load 70(localArray)
Store 80(a) 91 Store 82(a) 93
Branch 90 Branch 92
90: Label 92: Label
95: 9(fvec4) Load 94(color) 97: 9(fvec4) Load 96(color)
97: 96(ptr) AccessChain 12(locals2) 92 99: 98(ptr) AccessChain 12(locals2) 94
Store 97 95 Store 99 97
98: 38(fvec2) Load 40(coord) 101: 42(ptr) AccessChain 40(coord) 100
99: 7(float) CompositeExtract 98 1 102: 7(float) Load 101
100: 96(ptr) AccessChain 12(locals2) 92 104: 30(ptr) AccessChain 12(locals2) 94 103
101: 9(fvec4) Load 100 Store 104 102
102: 9(fvec4) CompositeInsert 99 101 2 107: 98(ptr) AccessChain 12(locals2) 94
Store 100 102 108: 9(fvec4) Load 107
105: 96(ptr) AccessChain 12(locals2) 92 109: 30(ptr) AccessChain 36(localFArray) 37
106: 9(fvec4) Load 105
107: 30(ptr) AccessChain 36(localFArray) 37
108: 7(float) Load 107
109: 30(ptr) AccessChain 12(locals2) 27 28
110: 7(float) Load 109 110: 7(float) Load 109
111: 7(float) FAdd 108 110 111: 30(ptr) AccessChain 12(locals2) 27 28
112: 6(int) Load 66(x) 112: 7(float) Load 111
113: 30(ptr) AccessChain 68(localArray) 112 113: 7(float) FAdd 110 112
114: 7(float) Load 113 114: 6(int) Load 68(x)
115: 7(float) FAdd 111 114 115: 30(ptr) AccessChain 70(localArray) 114
116: 6(int) Load 66(x) 116: 7(float) Load 115
117: 30(ptr) AccessChain 80(a) 116 117: 7(float) FAdd 113 116
118: 7(float) Load 117 118: 6(int) Load 68(x)
119: 7(float) FAdd 115 118 119: 30(ptr) AccessChain 82(a) 118
120: 9(fvec4) VectorTimesScalar 106 119 120: 7(float) Load 119
125: 122 Load 124(sampler) 121: 7(float) FAdd 117 120
126: 38(fvec2) Load 40(coord) 122: 9(fvec4) VectorTimesScalar 108 121
127: 9(fvec4) ImageSampleImplicitLod 125 126 127: 124 Load 126(samp2D)
128: 9(fvec4) FMul 120 127 128: 38(fvec2) Load 40(coord)
Store 104(gl_FragColor) 128 129: 9(fvec4) ImageSampleImplicitLod 127 128
130: 9(fvec4) FMul 122 129
Store 106(gl_FragColor) 130
Return Return
FunctionEnd FunctionEnd

File diff suppressed because it is too large Load Diff

View File

@ -5,111 +5,66 @@ WARNING: 0:14: varying deprecated in version 130; may be removed in future relea
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 195 // Id's are bound by 191
Source GLSL 130
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 11
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main" Name 4 "main"
Name 9 "color" Name 9 "color"
Name 11 "BaseColor" Name 11 "BaseColor"
Name 24 "d4" Name 27 "d4"
Name 29 "bigColor4" Name 32 "bigColor4"
Name 83 "d13" Name 84 "d13"
Name 148 "gl_FragColor" Name 144 "gl_FragColor"
Name 150 "bigColor" Name 146 "bigColor"
Name 151 "bigColor1_1" Name 147 "bigColor1_1"
Name 152 "bigColor1_2" Name 148 "bigColor1_2"
Name 153 "bigColor1_3" Name 149 "bigColor1_3"
Name 154 "bigColor2" Name 150 "bigColor2"
Name 155 "bigColor3" Name 151 "bigColor3"
Name 156 "bigColor5" Name 152 "bigColor5"
Name 157 "bigColor6" Name 153 "bigColor6"
Name 158 "bigColor7" Name 154 "bigColor7"
Name 159 "bigColor8" Name 155 "bigColor8"
Name 160 "d" Name 156 "d"
Name 161 "d2" Name 157 "d2"
Name 162 "d3" Name 158 "d3"
Name 163 "d5" Name 159 "d5"
Name 164 "d6" Name 160 "d6"
Name 165 "d7" Name 161 "d7"
Name 166 "d8" Name 162 "d8"
Name 167 "d9" Name 163 "d9"
Name 168 "d10" Name 164 "d10"
Name 169 "d11" Name 165 "d11"
Name 170 "d12" Name 166 "d12"
Name 171 "d14" Name 167 "d14"
Name 172 "d15" Name 168 "d15"
Name 173 "d16" Name 169 "d16"
Name 174 "d17" Name 170 "d17"
Name 175 "d18" Name 171 "d18"
Name 176 "d19" Name 172 "d19"
Name 177 "d20" Name 173 "d20"
Name 178 "d21" Name 174 "d21"
Name 179 "d22" Name 175 "d22"
Name 180 "d23" Name 176 "d23"
Name 181 "d24" Name 177 "d24"
Name 182 "d25" Name 178 "d25"
Name 183 "d26" Name 179 "d26"
Name 184 "d27" Name 180 "d27"
Name 185 "d28" Name 181 "d28"
Name 186 "d29" Name 182 "d29"
Name 187 "d30" Name 183 "d30"
Name 188 "d31" Name 184 "d31"
Name 189 "d32" Name 185 "d32"
Name 190 "d33" Name 186 "d33"
Name 191 "d34" Name 187 "d34"
Name 194 "Count" Name 190 "Count"
Decorate 11(BaseColor) Smooth
Decorate 148(gl_FragColor) BuiltIn FragColor
Decorate 150(bigColor) NoStaticUse
Decorate 151(bigColor1_1) NoStaticUse
Decorate 152(bigColor1_2) NoStaticUse
Decorate 153(bigColor1_3) NoStaticUse
Decorate 154(bigColor2) NoStaticUse
Decorate 155(bigColor3) NoStaticUse
Decorate 156(bigColor5) NoStaticUse
Decorate 157(bigColor6) NoStaticUse
Decorate 158(bigColor7) NoStaticUse
Decorate 159(bigColor8) NoStaticUse
Decorate 160(d) NoStaticUse
Decorate 161(d2) NoStaticUse
Decorate 162(d3) NoStaticUse
Decorate 163(d5) NoStaticUse
Decorate 164(d6) NoStaticUse
Decorate 165(d7) NoStaticUse
Decorate 166(d8) NoStaticUse
Decorate 167(d9) NoStaticUse
Decorate 168(d10) NoStaticUse
Decorate 169(d11) NoStaticUse
Decorate 170(d12) NoStaticUse
Decorate 171(d14) NoStaticUse
Decorate 172(d15) NoStaticUse
Decorate 173(d16) NoStaticUse
Decorate 174(d17) NoStaticUse
Decorate 175(d18) NoStaticUse
Decorate 176(d19) NoStaticUse
Decorate 177(d20) NoStaticUse
Decorate 178(d21) NoStaticUse
Decorate 179(d22) NoStaticUse
Decorate 180(d23) NoStaticUse
Decorate 181(d24) NoStaticUse
Decorate 182(d25) NoStaticUse
Decorate 183(d26) NoStaticUse
Decorate 184(d27) NoStaticUse
Decorate 185(d28) NoStaticUse
Decorate 186(d29) NoStaticUse
Decorate 187(d30) NoStaticUse
Decorate 188(d31) NoStaticUse
Decorate 189(d32) NoStaticUse
Decorate 190(d33) NoStaticUse
Decorate 191(d34) NoStaticUse
Decorate 194(Count) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -119,61 +74,67 @@ Linked fragment stage:
11(BaseColor): 10(ptr) Variable Input 11(BaseColor): 10(ptr) Variable Input
17: TypeBool 17: TypeBool
18: 17(bool) ConstantTrue 18: 17(bool) ConstantTrue
23: TypePointer UniformConstant 6(float) 21: TypeInt 32 0
24(d4): 23(ptr) Variable UniformConstant 22: 21(int) Constant 2
28: TypePointer UniformConstant 7(fvec4) 23: TypePointer Function 6(float)
29(bigColor4): 28(ptr) Variable UniformConstant 26: TypePointer UniformConstant 6(float)
39: 6(float) Constant 1073741824 27(d4): 26(ptr) Variable UniformConstant
53: 6(float) Constant 1065353216 31: TypePointer UniformConstant 7(fvec4)
57: 17(bool) ConstantFalse 32(bigColor4): 31(ptr) Variable UniformConstant
83(d13): 23(ptr) Variable UniformConstant 36: 21(int) Constant 0
147: TypePointer Output 7(fvec4) 43: 6(float) Constant 1073741824
148(gl_FragColor): 147(ptr) Variable Output 56: 6(float) Constant 1065353216
150(bigColor): 28(ptr) Variable UniformConstant 58: 17(bool) ConstantFalse
151(bigColor1_1): 28(ptr) Variable UniformConstant 60: 21(int) Constant 1
152(bigColor1_2): 28(ptr) Variable UniformConstant 81: 21(int) Constant 3
153(bigColor1_3): 28(ptr) Variable UniformConstant 84(d13): 26(ptr) Variable UniformConstant
154(bigColor2): 28(ptr) Variable UniformConstant 143: TypePointer Output 7(fvec4)
155(bigColor3): 28(ptr) Variable UniformConstant 144(gl_FragColor): 143(ptr) Variable Output
156(bigColor5): 28(ptr) Variable UniformConstant 146(bigColor): 31(ptr) Variable UniformConstant
157(bigColor6): 28(ptr) Variable UniformConstant 147(bigColor1_1): 31(ptr) Variable UniformConstant
158(bigColor7): 28(ptr) Variable UniformConstant 148(bigColor1_2): 31(ptr) Variable UniformConstant
159(bigColor8): 28(ptr) Variable UniformConstant 149(bigColor1_3): 31(ptr) Variable UniformConstant
160(d): 23(ptr) Variable UniformConstant 150(bigColor2): 31(ptr) Variable UniformConstant
161(d2): 23(ptr) Variable UniformConstant 151(bigColor3): 31(ptr) Variable UniformConstant
162(d3): 23(ptr) Variable UniformConstant 152(bigColor5): 31(ptr) Variable UniformConstant
163(d5): 23(ptr) Variable UniformConstant 153(bigColor6): 31(ptr) Variable UniformConstant
164(d6): 23(ptr) Variable UniformConstant 154(bigColor7): 31(ptr) Variable UniformConstant
165(d7): 23(ptr) Variable UniformConstant 155(bigColor8): 31(ptr) Variable UniformConstant
166(d8): 23(ptr) Variable UniformConstant 156(d): 26(ptr) Variable UniformConstant
167(d9): 23(ptr) Variable UniformConstant 157(d2): 26(ptr) Variable UniformConstant
168(d10): 23(ptr) Variable UniformConstant 158(d3): 26(ptr) Variable UniformConstant
169(d11): 23(ptr) Variable UniformConstant 159(d5): 26(ptr) Variable UniformConstant
170(d12): 23(ptr) Variable UniformConstant 160(d6): 26(ptr) Variable UniformConstant
171(d14): 23(ptr) Variable UniformConstant 161(d7): 26(ptr) Variable UniformConstant
172(d15): 23(ptr) Variable UniformConstant 162(d8): 26(ptr) Variable UniformConstant
173(d16): 23(ptr) Variable UniformConstant 163(d9): 26(ptr) Variable UniformConstant
174(d17): 23(ptr) Variable UniformConstant 164(d10): 26(ptr) Variable UniformConstant
175(d18): 23(ptr) Variable UniformConstant 165(d11): 26(ptr) Variable UniformConstant
176(d19): 23(ptr) Variable UniformConstant 166(d12): 26(ptr) Variable UniformConstant
177(d20): 23(ptr) Variable UniformConstant 167(d14): 26(ptr) Variable UniformConstant
178(d21): 23(ptr) Variable UniformConstant 168(d15): 26(ptr) Variable UniformConstant
179(d22): 23(ptr) Variable UniformConstant 169(d16): 26(ptr) Variable UniformConstant
180(d23): 23(ptr) Variable UniformConstant 170(d17): 26(ptr) Variable UniformConstant
181(d24): 23(ptr) Variable UniformConstant 171(d18): 26(ptr) Variable UniformConstant
182(d25): 23(ptr) Variable UniformConstant 172(d19): 26(ptr) Variable UniformConstant
183(d26): 23(ptr) Variable UniformConstant 173(d20): 26(ptr) Variable UniformConstant
184(d27): 23(ptr) Variable UniformConstant 174(d21): 26(ptr) Variable UniformConstant
185(d28): 23(ptr) Variable UniformConstant 175(d22): 26(ptr) Variable UniformConstant
186(d29): 23(ptr) Variable UniformConstant 176(d23): 26(ptr) Variable UniformConstant
187(d30): 23(ptr) Variable UniformConstant 177(d24): 26(ptr) Variable UniformConstant
188(d31): 23(ptr) Variable UniformConstant 178(d25): 26(ptr) Variable UniformConstant
189(d32): 23(ptr) Variable UniformConstant 179(d26): 26(ptr) Variable UniformConstant
190(d33): 23(ptr) Variable UniformConstant 180(d27): 26(ptr) Variable UniformConstant
191(d34): 23(ptr) Variable UniformConstant 181(d28): 26(ptr) Variable UniformConstant
192: TypeInt 32 1 182(d29): 26(ptr) Variable UniformConstant
193: TypePointer UniformConstant 192(int) 183(d30): 26(ptr) Variable UniformConstant
194(Count): 193(ptr) Variable UniformConstant 184(d31): 26(ptr) Variable UniformConstant
185(d32): 26(ptr) Variable UniformConstant
186(d33): 26(ptr) Variable UniformConstant
187(d34): 26(ptr) Variable UniformConstant
188: TypeInt 32 1
189: TypePointer UniformConstant 188(int)
190(Count): 189(ptr) Variable UniformConstant
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
9(color): 8(ptr) Variable Function 9(color): 8(ptr) Variable Function
@ -181,177 +142,167 @@ Linked fragment stage:
Store 9(color) 12 Store 9(color) 12
Branch 13 Branch 13
13: Label 13: Label
16: 17(bool) Phi 18 5 57 49 57 64 16: 17(bool) Phi 18 5 58 52 58 66
LoopMerge 14 None LoopMerge 14 13 None
Branch 19 Branch 19
19: Label 19: Label
SelectionMerge 15 None SelectionMerge 15 None
BranchConditional 16 15 20 BranchConditional 16 15 20
20: Label 20: Label
21: 7(fvec4) Load 9(color) 24: 23(ptr) AccessChain 9(color) 22
22: 6(float) CompositeExtract 21 2 25: 6(float) Load 24
25: 6(float) Load 24(d4) 28: 6(float) Load 27(d4)
26: 17(bool) FOrdLessThan 22 25 29: 17(bool) FOrdLessThan 25 28
SelectionMerge 27 None SelectionMerge 30 None
BranchConditional 26 27 14 BranchConditional 29 30 14
27: Label 30: Label
Branch 15 Branch 15
15: Label 15: Label
30: 7(fvec4) Load 29(bigColor4) 33: 7(fvec4) Load 32(bigColor4)
31: 7(fvec4) Load 9(color) 34: 7(fvec4) Load 9(color)
32: 7(fvec4) FAdd 31 30 35: 7(fvec4) FAdd 34 33
Store 9(color) 32 Store 9(color) 35
33: 7(fvec4) Load 9(color) 37: 23(ptr) AccessChain 9(color) 36
34: 6(float) CompositeExtract 33 0 38: 6(float) Load 37
35: 6(float) Load 24(d4) 39: 6(float) Load 27(d4)
36: 17(bool) FOrdLessThan 34 35 40: 17(bool) FOrdLessThan 38 39
SelectionMerge 38 None SelectionMerge 42 None
BranchConditional 36 37 38 BranchConditional 40 41 42
37: Label 41: Label
40: 7(fvec4) Load 9(color) 44: 23(ptr) AccessChain 9(color) 22
41: 6(float) CompositeExtract 40 2 45: 6(float) Load 44
42: 6(float) FAdd 41 39 46: 6(float) FAdd 45 43
43: 7(fvec4) Load 9(color) 47: 23(ptr) AccessChain 9(color) 22
44: 7(fvec4) CompositeInsert 42 43 2 Store 47 46
Store 9(color) 44 48: 23(ptr) AccessChain 9(color) 22
45: 7(fvec4) Load 9(color) 49: 6(float) Load 48
46: 6(float) CompositeExtract 45 2 50: 6(float) Load 27(d4)
47: 6(float) Load 24(d4) 51: 17(bool) FOrdLessThan 49 50
48: 17(bool) FOrdLessThan 46 47 SelectionMerge 53 None
SelectionMerge 50 None BranchConditional 51 52 53
BranchConditional 48 49 50 52: Label
49: Label 54: 23(ptr) AccessChain 9(color) 36
51: 7(fvec4) Load 9(color) 55: 6(float) Load 54
52: 6(float) CompositeExtract 51 0 57: 6(float) FAdd 55 56
54: 6(float) FAdd 52 53 Store 54 57
55: 7(fvec4) Load 9(color)
56: 7(fvec4) CompositeInsert 54 55 0
Store 9(color) 56
Branch 13 Branch 13
50: Label 53: Label
Branch 38 Branch 42
38: Label 42: Label
59: 7(fvec4) Load 9(color) 61: 23(ptr) AccessChain 9(color) 60
60: 6(float) CompositeExtract 59 1 62: 6(float) Load 61
61: 6(float) Load 24(d4) 63: 6(float) Load 27(d4)
62: 17(bool) FOrdLessThan 60 61 64: 17(bool) FOrdLessThan 62 63
SelectionMerge 64 None SelectionMerge 66 None
BranchConditional 62 63 71 BranchConditional 64 65 72
63: Label 65: Label
65: 6(float) Load 24(d4) 67: 6(float) Load 27(d4)
66: 7(fvec4) Load 9(color) 68: 23(ptr) AccessChain 9(color) 60
67: 6(float) CompositeExtract 66 1 69: 6(float) Load 68
68: 6(float) FAdd 67 65 70: 6(float) FAdd 69 67
69: 7(fvec4) Load 9(color) 71: 23(ptr) AccessChain 9(color) 60
70: 7(fvec4) CompositeInsert 68 69 1 Store 71 70
Store 9(color) 70 Branch 66
Branch 64 72: Label
71: Label 73: 6(float) Load 27(d4)
72: 6(float) Load 24(d4) 74: 23(ptr) AccessChain 9(color) 36
73: 7(fvec4) Load 9(color) 75: 6(float) Load 74
74: 6(float) CompositeExtract 73 0 76: 6(float) FAdd 75 73
75: 6(float) FAdd 74 72 77: 23(ptr) AccessChain 9(color) 36
76: 7(fvec4) Load 9(color) Store 77 76
77: 7(fvec4) CompositeInsert 75 76 0 Branch 66
Store 9(color) 77 66: Label
Branch 64
64: Label
Branch 13 Branch 13
14: Label 14: Label
Branch 78 Branch 78
78: Label 78: Label
81: 7(fvec4) Load 9(color) 82: 23(ptr) AccessChain 9(color) 81
82: 6(float) CompositeExtract 81 3 83: 6(float) Load 82
84: 6(float) Load 83(d13) 85: 6(float) Load 84(d13)
85: 17(bool) FOrdLessThan 82 84 86: 17(bool) FOrdLessThan 83 85
LoopMerge 79 None LoopMerge 79 78 None
BranchConditional 85 80 79 BranchConditional 86 80 79
80: Label 80: Label
86: 7(fvec4) Load 9(color) 87: 23(ptr) AccessChain 9(color) 22
87: 6(float) CompositeExtract 86 2 88: 6(float) Load 87
88: 6(float) Load 83(d13) 89: 6(float) Load 84(d13)
89: 17(bool) FOrdLessThan 87 88 90: 17(bool) FOrdLessThan 88 89
SelectionMerge 91 None SelectionMerge 92 None
BranchConditional 89 90 95 BranchConditional 90 91 96
90: Label 91: Label
92: 7(fvec4) Load 9(color) 93: 7(fvec4) Load 9(color)
93: 7(fvec4) CompositeConstruct 53 53 53 53 94: 7(fvec4) CompositeConstruct 56 56 56 56
94: 7(fvec4) FAdd 92 93 95: 7(fvec4) FAdd 93 94
Store 9(color) 94 Store 9(color) 95
Branch 91 Branch 92
95: Label 96: Label
96: 7(fvec4) Load 9(color) 97: 7(fvec4) Load 9(color)
97: 7(fvec4) CompositeConstruct 53 53 53 53 98: 7(fvec4) CompositeConstruct 56 56 56 56
98: 7(fvec4) FSub 96 97 99: 7(fvec4) FSub 97 98
Store 9(color) 98 Store 9(color) 99
Branch 91 Branch 92
91: Label 92: Label
99: 7(fvec4) Load 29(bigColor4) 100: 7(fvec4) Load 32(bigColor4)
100: 7(fvec4) Load 9(color) 101: 7(fvec4) Load 9(color)
101: 7(fvec4) FAdd 100 99 102: 7(fvec4) FAdd 101 100
Store 9(color) 101 Store 9(color) 102
102: 7(fvec4) Load 9(color) 103: 23(ptr) AccessChain 9(color) 36
103: 6(float) CompositeExtract 102 0 104: 6(float) Load 103
104: 6(float) Load 24(d4) 105: 6(float) Load 27(d4)
105: 17(bool) FOrdLessThan 103 104 106: 17(bool) FOrdLessThan 104 105
SelectionMerge 107 None SelectionMerge 108 None
BranchConditional 105 106 107 BranchConditional 106 107 108
106: Label 107: Label
108: 7(fvec4) Load 9(color) 109: 23(ptr) AccessChain 9(color) 22
109: 6(float) CompositeExtract 108 2 110: 6(float) Load 109
110: 6(float) FAdd 109 39 111: 6(float) FAdd 110 43
111: 7(fvec4) Load 9(color) 112: 23(ptr) AccessChain 9(color) 22
112: 7(fvec4) CompositeInsert 110 111 2 Store 112 111
Store 9(color) 112 113: 23(ptr) AccessChain 9(color) 22
113: 7(fvec4) Load 9(color) 114: 6(float) Load 113
114: 6(float) CompositeExtract 113 2 115: 6(float) Load 27(d4)
115: 6(float) Load 24(d4)
116: 17(bool) FOrdLessThan 114 115 116: 17(bool) FOrdLessThan 114 115
SelectionMerge 118 None SelectionMerge 118 None
BranchConditional 116 117 118 BranchConditional 116 117 118
117: Label 117: Label
119: 7(fvec4) Load 9(color) 119: 23(ptr) AccessChain 9(color) 36
120: 6(float) CompositeExtract 119 0 120: 6(float) Load 119
121: 6(float) FAdd 120 53 121: 6(float) FAdd 120 56
122: 7(fvec4) Load 9(color) Store 119 121
123: 7(fvec4) CompositeInsert 121 122 0
Store 9(color) 123
Branch 78 Branch 78
118: Label 118: Label
Branch 107 Branch 108
107: Label 108: Label
125: 7(fvec4) Load 9(color) 123: 23(ptr) AccessChain 9(color) 60
126: 6(float) CompositeExtract 125 1 124: 6(float) Load 123
127: 6(float) Load 24(d4) 125: 6(float) Load 27(d4)
128: 17(bool) FOrdLessThan 126 127 126: 17(bool) FOrdLessThan 124 125
SelectionMerge 130 None SelectionMerge 128 None
BranchConditional 128 129 137 BranchConditional 126 127 134
129: Label 127: Label
131: 6(float) Load 24(d4) 129: 6(float) Load 27(d4)
132: 7(fvec4) Load 9(color) 130: 23(ptr) AccessChain 9(color) 60
133: 6(float) CompositeExtract 132 1 131: 6(float) Load 130
134: 6(float) FAdd 133 131 132: 6(float) FAdd 131 129
135: 7(fvec4) Load 9(color) 133: 23(ptr) AccessChain 9(color) 60
136: 7(fvec4) CompositeInsert 134 135 1 Store 133 132
Store 9(color) 136 Branch 128
Branch 130 134: Label
137: Label 135: 6(float) Load 27(d4)
138: 6(float) Load 24(d4) 136: 23(ptr) AccessChain 9(color) 36
139: 7(fvec4) Load 9(color) 137: 6(float) Load 136
140: 6(float) CompositeExtract 139 0 138: 6(float) FAdd 137 135
141: 6(float) FAdd 140 138 139: 23(ptr) AccessChain 9(color) 36
142: 7(fvec4) Load 9(color) Store 139 138
143: 7(fvec4) CompositeInsert 141 142 0 Branch 128
Store 9(color) 143 128: Label
Branch 130
130: Label
Branch 78 Branch 78
79: Label 79: Label
144: 7(fvec4) Load 9(color) 140: 7(fvec4) Load 9(color)
145: 7(fvec4) CompositeConstruct 53 53 53 53 141: 7(fvec4) CompositeConstruct 56 56 56 56
146: 7(fvec4) FAdd 144 145 142: 7(fvec4) FAdd 140 141
Store 9(color) 146 Store 9(color) 142
149: 7(fvec4) Load 9(color) 145: 7(fvec4) Load 9(color)
Store 148(gl_FragColor) 149 Store 144(gl_FragColor) 145
Return Return
FunctionEnd FunctionEnd

View File

@ -3,15 +3,15 @@ spv.matFun.vert
Linked vertex stage: Linked vertex stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 93 // Id's are bound by 93
Source GLSL 130
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" EntryPoint Vertex 4 "main" 73 92
Source GLSL 130
Name 4 "main" Name 4 "main"
Name 14 "xf(mf33;vf3;" Name 14 "xf(mf33;vf3;"
Name 12 "m" Name 12 "m"
@ -33,7 +33,6 @@ Linked vertex stage:
Name 92 "gl_VertexID" Name 92 "gl_VertexID"
Decorate 69(gl_Position) BuiltIn Position Decorate 69(gl_Position) BuiltIn Position
Decorate 92(gl_VertexID) BuiltIn VertexId Decorate 92(gl_VertexID) BuiltIn VertexId
Decorate 92(gl_VertexID) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32

480
Test/baseResults/spv.newTexture.frag.out Normal file → Executable file
View File

@ -5,16 +5,16 @@ Warning, version 430 is not yet complete; most version-specific features are pre
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 265 // Id's are bound by 265
Source GLSL 430
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 55 17 38 26 72 79 69 264 234
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 430
Name 4 "main" Name 4 "main"
Name 9 "v" Name 9 "v"
Name 13 "s2D" Name 13 "s2D"
@ -25,40 +25,30 @@ Linked fragment stage:
Name 38 "c3D" Name 38 "c3D"
Name 47 "s2DShadow" Name 47 "s2DShadow"
Name 55 "c1D" Name 55 "c1D"
Name 67 "ic3D" Name 69 "ic3D"
Name 70 "ic1D" Name 72 "ic1D"
Name 77 "ic2D" Name 79 "ic2D"
Name 86 "sr" Name 88 "sr"
Name 112 "sCube" Name 113 "sCube"
Name 123 "s2DArrayShadow" Name 124 "s2DArrayShadow"
Name 151 "iv" Name 152 "iv"
Name 155 "is2D" Name 156 "is2D"
Name 190 "is3D" Name 191 "is3D"
Name 202 "isCube" Name 203 "isCube"
Name 214 "is2DArray" Name 215 "is2DArray"
Name 224 "iv2" Name 225 "iv2"
Name 228 "sCubeShadow" Name 229 "sCubeShadow"
Name 233 "FragData" Name 234 "FragData"
Name 245 "is2Dms" Name 246 "is2Dms"
Name 250 "us2D" Name 250 "us2D"
Name 254 "us3D" Name 254 "us3D"
Name 258 "usCube" Name 258 "usCube"
Name 262 "us2DArray" Name 262 "us2DArray"
Name 264 "ic4D" Name 264 "ic4D"
Decorate 17(c2D) Smooth Decorate 69(ic3D) Flat
Decorate 26(c4D) Smooth Decorate 72(ic1D) Flat
Decorate 38(c3D) Smooth Decorate 79(ic2D) Flat
Decorate 55(c1D) Smooth
Decorate 67(ic3D) Flat
Decorate 70(ic1D) Flat
Decorate 77(ic2D) Flat
Decorate 245(is2Dms) NoStaticUse
Decorate 250(us2D) NoStaticUse
Decorate 254(us3D) NoStaticUse
Decorate 258(usCube) NoStaticUse
Decorate 262(us2DArray) NoStaticUse
Decorate 264(ic4D) Flat Decorate 264(ic4D) Flat
Decorate 264(ic4D) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -95,83 +85,86 @@ Linked fragment stage:
53: 51(ivec2) ConstantComposite 52 52 53: 51(ivec2) ConstantComposite 52 52
54: TypePointer Input 6(float) 54: TypePointer Input 6(float)
55(c1D): 54(ptr) Variable Input 55(c1D): 54(ptr) Variable Input
65: TypeVector 50(int) 3 59: TypeInt 32 0
66: TypePointer Input 65(ivec3) 60: 59(int) Constant 1
67(ic3D): 66(ptr) Variable Input 61: TypePointer Function 6(float)
69: TypePointer Input 50(int) 67: TypeVector 50(int) 3
70(ic1D): 69(ptr) Variable Input 68: TypePointer Input 67(ivec3)
76: TypePointer Input 51(ivec2) 69(ic3D): 68(ptr) Variable Input
77(ic2D): 76(ptr) Variable Input 71: TypePointer Input 50(int)
79: 50(int) Constant 4 72(ic1D): 71(ptr) Variable Input
83: TypeImage 6(float) Rect sampled format:Unknown 78: TypePointer Input 51(ivec2)
84: TypeSampledImage 83 79(ic2D): 78(ptr) Variable Input
85: TypePointer UniformConstant 84 81: 50(int) Constant 4
86(sr): 85(ptr) Variable UniformConstant 85: TypeImage 6(float) Rect sampled format:Unknown
89: 51(ivec2) ConstantComposite 79 79 86: TypeSampledImage 85
109: TypeImage 6(float) Cube sampled format:Unknown 87: TypePointer UniformConstant 86
110: TypeSampledImage 109 88(sr): 87(ptr) Variable UniformConstant
111: TypePointer UniformConstant 110 91: 51(ivec2) ConstantComposite 81 81
112(sCube): 111(ptr) Variable UniformConstant 110: TypeImage 6(float) Cube sampled format:Unknown
120: TypeImage 6(float) 2D depth array sampled format:Unknown 111: TypeSampledImage 110
121: TypeSampledImage 120 112: TypePointer UniformConstant 111
122: TypePointer UniformConstant 121 113(sCube): 112(ptr) Variable UniformConstant
123(s2DArrayShadow): 122(ptr) Variable UniformConstant 121: TypeImage 6(float) 2D depth array sampled format:Unknown
149: TypeVector 50(int) 4 122: TypeSampledImage 121
150: TypePointer Function 149(ivec4) 123: TypePointer UniformConstant 122
152: TypeImage 50(int) 2D sampled format:Unknown 124(s2DArrayShadow): 123(ptr) Variable UniformConstant
153: TypeSampledImage 152 131: 59(int) Constant 0
154: TypePointer UniformConstant 153 150: TypeVector 50(int) 4
155(is2D): 154(ptr) Variable UniformConstant 151: TypePointer Function 150(ivec4)
187: TypeImage 50(int) 3D sampled format:Unknown 153: TypeImage 50(int) 2D sampled format:Unknown
188: TypeSampledImage 187 154: TypeSampledImage 153
189: TypePointer UniformConstant 188 155: TypePointer UniformConstant 154
190(is3D): 189(ptr) Variable UniformConstant 156(is2D): 155(ptr) Variable UniformConstant
193: 6(float) Constant 1082549862 188: TypeImage 50(int) 3D sampled format:Unknown
199: TypeImage 50(int) Cube sampled format:Unknown 189: TypeSampledImage 188
200: TypeSampledImage 199 190: TypePointer UniformConstant 189
201: TypePointer UniformConstant 200 191(is3D): 190(ptr) Variable UniformConstant
202(isCube): 201(ptr) Variable UniformConstant 194: 6(float) Constant 1082549862
211: TypeImage 50(int) 2D array sampled format:Unknown 200: TypeImage 50(int) Cube sampled format:Unknown
212: TypeSampledImage 211 201: TypeSampledImage 200
213: TypePointer UniformConstant 212 202: TypePointer UniformConstant 201
214(is2DArray): 213(ptr) Variable UniformConstant 203(isCube): 202(ptr) Variable UniformConstant
223: TypePointer Function 51(ivec2) 212: TypeImage 50(int) 2D array sampled format:Unknown
225: TypeImage 6(float) Cube depth sampled format:Unknown 213: TypeSampledImage 212
226: TypeSampledImage 225 214: TypePointer UniformConstant 213
227: TypePointer UniformConstant 226 215(is2DArray): 214(ptr) Variable UniformConstant
228(sCubeShadow): 227(ptr) Variable UniformConstant 224: TypePointer Function 51(ivec2)
230: 50(int) Constant 2 226: TypeImage 6(float) Cube depth sampled format:Unknown
232: TypePointer Output 7(fvec4) 227: TypeSampledImage 226
233(FragData): 232(ptr) Variable Output 228: TypePointer UniformConstant 227
237: 6(float) Constant 0 229(sCubeShadow): 228(ptr) Variable UniformConstant
242: TypeImage 50(int) 2D multi-sampled sampled format:Unknown 231: 50(int) Constant 2
243: TypeSampledImage 242 233: TypePointer Output 7(fvec4)
244: TypePointer UniformConstant 243 234(FragData): 233(ptr) Variable Output
245(is2Dms): 244(ptr) Variable UniformConstant 238: 6(float) Constant 0
246: TypeInt 32 0 243: TypeImage 50(int) 2D multi-sampled sampled format:Unknown
247: TypeImage 246(int) 2D sampled format:Unknown 244: TypeSampledImage 243
245: TypePointer UniformConstant 244
246(is2Dms): 245(ptr) Variable UniformConstant
247: TypeImage 59(int) 2D sampled format:Unknown
248: TypeSampledImage 247 248: TypeSampledImage 247
249: TypePointer UniformConstant 248 249: TypePointer UniformConstant 248
250(us2D): 249(ptr) Variable UniformConstant 250(us2D): 249(ptr) Variable UniformConstant
251: TypeImage 246(int) 3D sampled format:Unknown 251: TypeImage 59(int) 3D sampled format:Unknown
252: TypeSampledImage 251 252: TypeSampledImage 251
253: TypePointer UniformConstant 252 253: TypePointer UniformConstant 252
254(us3D): 253(ptr) Variable UniformConstant 254(us3D): 253(ptr) Variable UniformConstant
255: TypeImage 246(int) Cube sampled format:Unknown 255: TypeImage 59(int) Cube sampled format:Unknown
256: TypeSampledImage 255 256: TypeSampledImage 255
257: TypePointer UniformConstant 256 257: TypePointer UniformConstant 256
258(usCube): 257(ptr) Variable UniformConstant 258(usCube): 257(ptr) Variable UniformConstant
259: TypeImage 246(int) 2D array sampled format:Unknown 259: TypeImage 59(int) 2D array sampled format:Unknown
260: TypeSampledImage 259 260: TypeSampledImage 259
261: TypePointer UniformConstant 260 261: TypePointer UniformConstant 260
262(us2DArray): 261(ptr) Variable UniformConstant 262(us2DArray): 261(ptr) Variable UniformConstant
263: TypePointer Input 149(ivec4) 263: TypePointer Input 150(ivec4)
264(ic4D): 263(ptr) Variable Input 264(ic4D): 263(ptr) Variable Input
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
9(v): 8(ptr) Variable Function 9(v): 8(ptr) Variable Function
151(iv): 150(ptr) Variable Function 152(iv): 151(ptr) Variable Function
224(iv2): 223(ptr) Variable Function 225(iv2): 224(ptr) Variable Function
14: 11 Load 13(s2D) 14: 11 Load 13(s2D)
18: 15(fvec2) Load 17(c2D) 18: 15(fvec2) Load 17(c2D)
19: 7(fvec4) ImageSampleImplicitLod 14 18 19: 7(fvec4) ImageSampleImplicitLod 14 18
@ -193,163 +186,160 @@ Linked fragment stage:
56: 6(float) Load 55(c1D) 56: 6(float) Load 55(c1D)
57: 6(float) CompositeExtract 49 2 57: 6(float) CompositeExtract 49 2
58: 6(float) ImageSampleDrefImplicitLod 48 49 57 Bias ConstOffset 56 53 58: 6(float) ImageSampleDrefImplicitLod 48 49 57 Bias ConstOffset 56 53
59: 7(fvec4) Load 9(v) 62: 61(ptr) AccessChain 9(v) 60
60: 6(float) CompositeExtract 59 1 63: 6(float) Load 62
61: 6(float) FAdd 60 58 64: 6(float) FAdd 63 58
62: 7(fvec4) Load 9(v) 65: 61(ptr) AccessChain 9(v) 60
63: 7(fvec4) CompositeInsert 61 62 1 Store 65 64
Store 9(v) 63 66: 21 Load 23(s3D)
64: 21 Load 23(s3D) 70: 67(ivec3) Load 69(ic3D)
68: 65(ivec3) Load 67(ic3D) 73: 50(int) Load 72(ic1D)
71: 50(int) Load 70(ic1D) 74: 7(fvec4) ImageFetch 66 70 Lod 73
72: 7(fvec4) ImageFetch 64 68 Lod 71 75: 7(fvec4) Load 9(v)
73: 7(fvec4) Load 9(v) 76: 7(fvec4) FAdd 75 74
74: 7(fvec4) FAdd 73 72 Store 9(v) 76
Store 9(v) 74 77: 11 Load 13(s2D)
75: 11 Load 13(s2D) 80: 51(ivec2) Load 79(ic2D)
78: 51(ivec2) Load 77(ic2D) 82: 7(fvec4) ImageFetch 77 80 Lod ConstOffset 81 53
80: 7(fvec4) ImageFetch 75 78 Lod ConstOffset 79 53 83: 7(fvec4) Load 9(v)
81: 7(fvec4) Load 9(v) 84: 7(fvec4) FAdd 83 82
82: 7(fvec4) FAdd 81 80 Store 9(v) 84
Store 9(v) 82 89: 86 Load 88(sr)
87: 84 Load 86(sr) 90: 51(ivec2) Load 79(ic2D)
88: 51(ivec2) Load 77(ic2D) 92: 7(fvec4) ImageFetch 89 90 ConstOffset 91
90: 7(fvec4) ImageFetch 87 88 ConstOffset 89 93: 7(fvec4) Load 9(v)
91: 7(fvec4) Load 9(v) 94: 7(fvec4) FAdd 93 92
92: 7(fvec4) FAdd 91 90 Store 9(v) 94
Store 9(v) 92 95: 45 Load 47(s2DShadow)
93: 45 Load 47(s2DShadow) 96: 36(fvec3) Load 38(c3D)
94: 36(fvec3) Load 38(c3D) 97: 6(float) Load 55(c1D)
95: 6(float) Load 55(c1D) 98: 6(float) CompositeExtract 96 2
96: 6(float) CompositeExtract 94 2 99: 6(float) ImageSampleDrefExplicitLod 95 96 98 Lod ConstOffset 97 53
97: 6(float) ImageSampleDrefExplicitLod 93 94 96 Lod ConstOffset 95 53 100: 61(ptr) AccessChain 9(v) 60
98: 7(fvec4) Load 9(v) 101: 6(float) Load 100
99: 6(float) CompositeExtract 98 1 102: 6(float) FAdd 101 99
100: 6(float) FAdd 99 97 103: 61(ptr) AccessChain 9(v) 60
101: 7(fvec4) Load 9(v) Store 103 102
102: 7(fvec4) CompositeInsert 100 101 1 104: 11 Load 13(s2D)
Store 9(v) 102 105: 36(fvec3) Load 38(c3D)
103: 11 Load 13(s2D) 106: 6(float) Load 55(c1D)
104: 36(fvec3) Load 38(c3D) 107: 7(fvec4) ImageSampleProjExplicitLod 104 105 Lod ConstOffset 106 53
105: 6(float) Load 55(c1D) 108: 7(fvec4) Load 9(v)
106: 7(fvec4) ImageSampleProjExplicitLod 103 104 Lod ConstOffset 105 53 109: 7(fvec4) FAdd 108 107
107: 7(fvec4) Load 9(v) Store 9(v) 109
108: 7(fvec4) FAdd 107 106 114: 111 Load 113(sCube)
Store 9(v) 108
113: 110 Load 112(sCube)
114: 36(fvec3) Load 38(c3D)
115: 36(fvec3) Load 38(c3D) 115: 36(fvec3) Load 38(c3D)
116: 36(fvec3) Load 38(c3D) 116: 36(fvec3) Load 38(c3D)
117: 7(fvec4) ImageSampleExplicitLod 113 114 Grad 115 116 117: 36(fvec3) Load 38(c3D)
118: 7(fvec4) Load 9(v) 118: 7(fvec4) ImageSampleExplicitLod 114 115 Grad 116 117
119: 7(fvec4) FAdd 118 117 119: 7(fvec4) Load 9(v)
Store 9(v) 119 120: 7(fvec4) FAdd 119 118
124: 121 Load 123(s2DArrayShadow) Store 9(v) 120
125: 7(fvec4) Load 26(c4D) 125: 122 Load 124(s2DArrayShadow)
126: 15(fvec2) Load 17(c2D) 126: 7(fvec4) Load 26(c4D)
127: 15(fvec2) Load 17(c2D) 127: 15(fvec2) Load 17(c2D)
128: 6(float) CompositeExtract 125 3 128: 15(fvec2) Load 17(c2D)
129: 6(float) ImageSampleDrefExplicitLod 124 125 128 Grad ConstOffset 126 127 53 129: 6(float) CompositeExtract 126 3
130: 7(fvec4) Load 9(v) 130: 6(float) ImageSampleDrefExplicitLod 125 126 129 Grad ConstOffset 127 128 53
131: 6(float) CompositeExtract 130 0 132: 61(ptr) AccessChain 9(v) 131
132: 6(float) FAdd 131 129 133: 6(float) Load 132
133: 7(fvec4) Load 9(v) 134: 6(float) FAdd 133 130
134: 7(fvec4) CompositeInsert 132 133 0 135: 61(ptr) AccessChain 9(v) 131
Store 9(v) 134 Store 135 134
135: 21 Load 23(s3D) 136: 21 Load 23(s3D)
136: 7(fvec4) Load 26(c4D) 137: 7(fvec4) Load 26(c4D)
137: 36(fvec3) Load 38(c3D)
138: 36(fvec3) Load 38(c3D) 138: 36(fvec3) Load 38(c3D)
139: 7(fvec4) ImageSampleProjExplicitLod 135 136 Grad 137 138 139: 36(fvec3) Load 38(c3D)
140: 7(fvec4) Load 9(v) 140: 7(fvec4) ImageSampleProjExplicitLod 136 137 Grad 138 139
141: 7(fvec4) FAdd 140 139 141: 7(fvec4) Load 9(v)
Store 9(v) 141 142: 7(fvec4) FAdd 141 140
142: 11 Load 13(s2D) Store 9(v) 142
143: 36(fvec3) Load 38(c3D) 143: 11 Load 13(s2D)
144: 15(fvec2) Load 17(c2D) 144: 36(fvec3) Load 38(c3D)
145: 15(fvec2) Load 17(c2D) 145: 15(fvec2) Load 17(c2D)
146: 7(fvec4) ImageSampleProjExplicitLod 142 143 Grad ConstOffset 144 145 53 146: 15(fvec2) Load 17(c2D)
147: 7(fvec4) Load 9(v) 147: 7(fvec4) ImageSampleProjExplicitLod 143 144 Grad ConstOffset 145 146 53
148: 7(fvec4) FAdd 147 146 148: 7(fvec4) Load 9(v)
Store 9(v) 148 149: 7(fvec4) FAdd 148 147
156: 153 Load 155(is2D) Store 9(v) 149
157: 15(fvec2) Load 17(c2D) 157: 154 Load 156(is2D)
158: 149(ivec4) ImageSampleImplicitLod 156 157 158: 15(fvec2) Load 17(c2D)
Store 151(iv) 158 159: 150(ivec4) ImageSampleImplicitLod 157 158
159: 149(ivec4) Load 151(iv) Store 152(iv) 159
160: 7(fvec4) ConvertSToF 159 160: 150(ivec4) Load 152(iv)
161: 7(fvec4) Load 9(v) 161: 7(fvec4) ConvertSToF 160
162: 7(fvec4) FAdd 161 160 162: 7(fvec4) Load 9(v)
Store 9(v) 162 163: 7(fvec4) FAdd 162 161
163: 153 Load 155(is2D) Store 9(v) 163
164: 7(fvec4) Load 26(c4D) 164: 154 Load 156(is2D)
165: 149(ivec4) ImageSampleProjImplicitLod 163 164 ConstOffset 53 165: 7(fvec4) Load 26(c4D)
Store 151(iv) 165 166: 150(ivec4) ImageSampleProjImplicitLod 164 165 ConstOffset 53
166: 149(ivec4) Load 151(iv) Store 152(iv) 166
167: 7(fvec4) ConvertSToF 166 167: 150(ivec4) Load 152(iv)
168: 7(fvec4) Load 9(v) 168: 7(fvec4) ConvertSToF 167
169: 7(fvec4) FAdd 168 167 169: 7(fvec4) Load 9(v)
Store 9(v) 169 170: 7(fvec4) FAdd 169 168
170: 153 Load 155(is2D) Store 9(v) 170
171: 36(fvec3) Load 38(c3D) 171: 154 Load 156(is2D)
172: 6(float) Load 55(c1D) 172: 36(fvec3) Load 38(c3D)
173: 149(ivec4) ImageSampleProjExplicitLod 170 171 Lod 172 173: 6(float) Load 55(c1D)
Store 151(iv) 173 174: 150(ivec4) ImageSampleProjExplicitLod 171 172 Lod 173
174: 149(ivec4) Load 151(iv) Store 152(iv) 174
175: 7(fvec4) ConvertSToF 174 175: 150(ivec4) Load 152(iv)
176: 7(fvec4) Load 9(v) 176: 7(fvec4) ConvertSToF 175
177: 7(fvec4) FAdd 176 175 177: 7(fvec4) Load 9(v)
Store 9(v) 177 178: 7(fvec4) FAdd 177 176
178: 153 Load 155(is2D) Store 9(v) 178
179: 36(fvec3) Load 38(c3D) 179: 154 Load 156(is2D)
180: 15(fvec2) Load 17(c2D) 180: 36(fvec3) Load 38(c3D)
181: 15(fvec2) Load 17(c2D) 181: 15(fvec2) Load 17(c2D)
182: 149(ivec4) ImageSampleProjExplicitLod 178 179 Grad 180 181 182: 15(fvec2) Load 17(c2D)
Store 151(iv) 182 183: 150(ivec4) ImageSampleProjExplicitLod 179 180 Grad 181 182
183: 149(ivec4) Load 151(iv) Store 152(iv) 183
184: 7(fvec4) ConvertSToF 183 184: 150(ivec4) Load 152(iv)
185: 7(fvec4) Load 9(v) 185: 7(fvec4) ConvertSToF 184
186: 7(fvec4) FAdd 185 184 186: 7(fvec4) Load 9(v)
Store 9(v) 186 187: 7(fvec4) FAdd 186 185
191: 188 Load 190(is3D) Store 9(v) 187
192: 36(fvec3) Load 38(c3D) 192: 189 Load 191(is3D)
194: 149(ivec4) ImageSampleImplicitLod 191 192 Bias 193 193: 36(fvec3) Load 38(c3D)
Store 151(iv) 194 195: 150(ivec4) ImageSampleImplicitLod 192 193 Bias 194
195: 149(ivec4) Load 151(iv) Store 152(iv) 195
196: 7(fvec4) ConvertSToF 195 196: 150(ivec4) Load 152(iv)
197: 7(fvec4) Load 9(v) 197: 7(fvec4) ConvertSToF 196
198: 7(fvec4) FAdd 197 196 198: 7(fvec4) Load 9(v)
Store 9(v) 198 199: 7(fvec4) FAdd 198 197
203: 200 Load 202(isCube) Store 9(v) 199
204: 36(fvec3) Load 38(c3D) 204: 201 Load 203(isCube)
205: 6(float) Load 55(c1D) 205: 36(fvec3) Load 38(c3D)
206: 149(ivec4) ImageSampleExplicitLod 203 204 Lod 205 206: 6(float) Load 55(c1D)
Store 151(iv) 206 207: 150(ivec4) ImageSampleExplicitLod 204 205 Lod 206
207: 149(ivec4) Load 151(iv) Store 152(iv) 207
208: 7(fvec4) ConvertSToF 207 208: 150(ivec4) Load 152(iv)
209: 7(fvec4) Load 9(v) 209: 7(fvec4) ConvertSToF 208
210: 7(fvec4) FAdd 209 208 210: 7(fvec4) Load 9(v)
Store 9(v) 210 211: 7(fvec4) FAdd 210 209
215: 212 Load 214(is2DArray) Store 9(v) 211
216: 65(ivec3) Load 67(ic3D) 216: 213 Load 215(is2DArray)
217: 50(int) Load 70(ic1D) 217: 67(ivec3) Load 69(ic3D)
218: 149(ivec4) ImageFetch 215 216 Lod 217 218: 50(int) Load 72(ic1D)
Store 151(iv) 218 219: 150(ivec4) ImageFetch 216 217 Lod 218
219: 149(ivec4) Load 151(iv) Store 152(iv) 219
220: 7(fvec4) ConvertSToF 219 220: 150(ivec4) Load 152(iv)
221: 7(fvec4) Load 9(v) 221: 7(fvec4) ConvertSToF 220
222: 7(fvec4) FAdd 221 220 222: 7(fvec4) Load 9(v)
Store 9(v) 222 223: 7(fvec4) FAdd 222 221
229: 226 Load 228(sCubeShadow) Store 9(v) 223
231: 51(ivec2) ImageQuerySizeLod 229 230 230: 227 Load 229(sCubeShadow)
Store 224(iv2) 231 232: 51(ivec2) ImageQuerySizeLod 230 231
234: 7(fvec4) Load 9(v) Store 225(iv2) 232
235: 51(ivec2) Load 224(iv2) 235: 7(fvec4) Load 9(v)
236: 15(fvec2) ConvertSToF 235 236: 51(ivec2) Load 225(iv2)
238: 6(float) CompositeExtract 236 0 237: 15(fvec2) ConvertSToF 236
239: 6(float) CompositeExtract 236 1 239: 6(float) CompositeExtract 237 0
240: 7(fvec4) CompositeConstruct 238 239 237 237 240: 6(float) CompositeExtract 237 1
241: 7(fvec4) FAdd 234 240 241: 7(fvec4) CompositeConstruct 239 240 238 238
Store 233(FragData) 241 242: 7(fvec4) FAdd 235 241
Store 234(FragData) 242
Return Return
FunctionEnd FunctionEnd

View File

@ -3,15 +3,15 @@ spv.nonSquare.vert
Linked vertex stage: Linked vertex stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 90 // Id's are bound by 90
Source GLSL 120
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" EntryPoint Vertex 4 "main" 12 55
Source GLSL 120
Name 4 "main" Name 4 "main"
Name 9 "a" Name 9 "a"
Name 12 "v3" Name 12 "v3"
@ -21,9 +21,6 @@ Linked vertex stage:
Name 28 "gl_Position" Name 28 "gl_Position"
Name 55 "v4" Name 55 "v4"
Decorate 28(gl_Position) BuiltIn Position Decorate 28(gl_Position) BuiltIn Position
Decorate 74 NoStaticUse
Decorate 78 NoStaticUse
Decorate 89 NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32

View File

@ -3,16 +3,16 @@ spv.precision.frag
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 110 // Id's are bound by 112
Source ESSL 300
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 57 59 23 71
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source ESSL 300
Name 4 "main" Name 4 "main"
Name 12 "foo(vf3;" Name 12 "foo(vf3;"
Name 11 "mv3" Name 11 "mv3"
@ -31,9 +31,8 @@ Linked fragment stage:
Name 63 "global_highp" Name 63 "global_highp"
Name 67 "local_highp" Name 67 "local_highp"
Name 71 "mediumfout" Name 71 "mediumfout"
Name 100 "ub2" Name 102 "ub2"
Name 101 "param" Name 103 "param"
Decorate 23(highfin) Smooth
Decorate 36(sum) RelaxedPrecision Decorate 36(sum) RelaxedPrecision
Decorate 38(uniform_medium) RelaxedPrecision Decorate 38(uniform_medium) RelaxedPrecision
Decorate 46(uniform_low) RelaxedPrecision Decorate 46(uniform_low) RelaxedPrecision
@ -41,9 +40,7 @@ Linked fragment stage:
Decorate 53(arg2) RelaxedPrecision Decorate 53(arg2) RelaxedPrecision
Decorate 55(d) RelaxedPrecision Decorate 55(d) RelaxedPrecision
Decorate 57(lowfin) RelaxedPrecision Decorate 57(lowfin) RelaxedPrecision
Decorate 57(lowfin) Smooth
Decorate 59(mediumfin) RelaxedPrecision Decorate 59(mediumfin) RelaxedPrecision
Decorate 59(mediumfin) Smooth
Decorate 71(mediumfout) RelaxedPrecision Decorate 71(mediumfout) RelaxedPrecision
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
@ -74,16 +71,18 @@ Linked fragment stage:
56: TypePointer Input 6(float) 56: TypePointer Input 6(float)
57(lowfin): 56(ptr) Variable Input 57(lowfin): 56(ptr) Variable Input
59(mediumfin): 56(ptr) Variable Input 59(mediumfin): 56(ptr) Variable Input
62: TypePointer PrivateGlobal 6(float) 62: TypePointer Private 6(float)
63(global_highp): 62(ptr) Variable PrivateGlobal 63(global_highp): 62(ptr) Variable Private
66: TypePointer Function 21(fvec4) 66: TypePointer Function 21(fvec4)
70: TypePointer Output 21(fvec4) 70: TypePointer Output 21(fvec4)
71(mediumfout): 70(ptr) Variable Output 71(mediumfout): 70(ptr) Variable Output
80: 34(int) Constant 4 80: 34(int) Constant 4
82: TypeVector 34(int) 2 82: TypeVector 34(int) 2
99: TypePointer UniformConstant 15(bvec2) 90: TypeInt 32 0
100(ub2): 99(ptr) Variable UniformConstant 91: 90(int) Constant 0
107: 6(float) Constant 1065353216 101: TypePointer UniformConstant 15(bvec2)
102(ub2): 101(ptr) Variable UniformConstant
109: 6(float) Constant 1065353216
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
36(sum): 35(ptr) Variable Function 36(sum): 35(ptr) Variable Function
@ -91,7 +90,7 @@ Linked fragment stage:
53(arg2): 50(ptr) Variable Function 53(arg2): 50(ptr) Variable Function
55(d): 50(ptr) Variable Function 55(d): 50(ptr) Variable Function
67(local_highp): 66(ptr) Variable Function 67(local_highp): 66(ptr) Variable Function
101(param): 16(ptr) Variable Function 103(param): 16(ptr) Variable Function
39: 34(int) Load 38(uniform_medium) 39: 34(int) Load 38(uniform_medium)
41: 34(int) Load 40(uniform_high) 41: 34(int) Load 40(uniform_high)
42: 34(int) IAdd 39 41 42: 34(int) IAdd 39 41
@ -108,10 +107,10 @@ Linked fragment stage:
Store 53(arg2) 54 Store 53(arg2) 54
58: 6(float) Load 57(lowfin) 58: 6(float) Load 57(lowfin)
60: 6(float) Load 59(mediumfin) 60: 6(float) Load 59(mediumfin)
61: 6(float) ExtInst 1(GLSL.std.450) 66(Distance) 58 60 61: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 58 60
Store 55(d) 61 Store 55(d) 61
64: 21(fvec4) Load 23(highfin) 64: 21(fvec4) Load 23(highfin)
65: 6(float) ExtInst 1(GLSL.std.450) 65(Length) 64 65: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 64
Store 63(global_highp) 65 Store 63(global_highp) 65
68: 6(float) Load 63(global_highp) 68: 6(float) Load 63(global_highp)
69: 21(fvec4) CompositeConstruct 68 68 68 68 69: 21(fvec4) CompositeConstruct 68 68 68 68
@ -133,29 +132,29 @@ Linked fragment stage:
87: 34(int) Load 40(uniform_high) 87: 34(int) Load 40(uniform_high)
88: 82(ivec2) CompositeConstruct 87 87 88: 82(ivec2) CompositeConstruct 87 87
89: 82(ivec2) IAdd 86 88 89: 82(ivec2) IAdd 86 88
90: 34(int) CompositeExtract 89 0 92: 34(int) CompositeExtract 89 0
91: 34(int) IAdd 80 90 93: 34(int) IAdd 80 92
92: 34(int) Load 36(sum)
93: 34(int) IAdd 92 91
Store 36(sum) 93
94: 34(int) Load 36(sum) 94: 34(int) Load 36(sum)
95: 6(float) ConvertSToF 94 95: 34(int) IAdd 94 93
96: 21(fvec4) CompositeConstruct 95 95 95 95 Store 36(sum) 95
97: 21(fvec4) Load 71(mediumfout) 96: 34(int) Load 36(sum)
98: 21(fvec4) FAdd 97 96 97: 6(float) ConvertSToF 96
Store 71(mediumfout) 98 98: 21(fvec4) CompositeConstruct 97 97 97 97
102: 15(bvec2) Load 100(ub2) 99: 21(fvec4) Load 71(mediumfout)
Store 101(param) 102 100: 21(fvec4) FAdd 99 98
103: 14(bool) FunctionCall 19(boolfun(vb2;) 101(param) Store 71(mediumfout) 100
SelectionMerge 105 None 104: 15(bvec2) Load 102(ub2)
BranchConditional 103 104 105 Store 103(param) 104
104: Label 105: 14(bool) FunctionCall 19(boolfun(vb2;) 103(param)
106: 21(fvec4) Load 71(mediumfout) SelectionMerge 107 None
108: 21(fvec4) CompositeConstruct 107 107 107 107 BranchConditional 105 106 107
109: 21(fvec4) FAdd 106 108 106: Label
Store 71(mediumfout) 109 108: 21(fvec4) Load 71(mediumfout)
Branch 105 110: 21(fvec4) CompositeConstruct 109 109 109 109
105: Label 111: 21(fvec4) FAdd 108 110
Store 71(mediumfout) 111
Branch 107
107: Label
Return Return
FunctionEnd FunctionEnd
12(foo(vf3;): 9(fvec2) Function None 10 12(foo(vf3;): 9(fvec2) Function None 10

View File

@ -3,16 +3,16 @@ spv.prepost.frag
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 96 // Id's are bound by 94
Source GLSL 140
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main"
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 140
Name 4 "main" Name 4 "main"
Name 8 "index" Name 8 "index"
Name 14 "s" Name 14 "s"
@ -23,8 +23,7 @@ Linked fragment stage:
Name 61 "y" Name 61 "y"
Name 66 "z" Name 66 "z"
Name 73 "v" Name 73 "v"
Name 92 "gl_FragColor" Name 90 "gl_FragColor"
Decorate 92(gl_FragColor) BuiltIn FragColor
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1
@ -47,8 +46,12 @@ Linked fragment stage:
74: 10(float) Constant 1077936128 74: 10(float) Constant 1077936128
75: 10(float) Constant 1082130432 75: 10(float) Constant 1082130432
76: 71(fvec4) ConstantComposite 28 19 74 75 76: 71(fvec4) ConstantComposite 28 19 74 75
91: TypePointer Output 71(fvec4) 77: 11(int) Constant 2
92(gl_FragColor): 91(ptr) Variable Output 81: 11(int) Constant 1
83: 11(int) Constant 3
87: 11(int) Constant 0
89: TypePointer Output 71(fvec4)
90(gl_FragColor): 89(ptr) Variable Output
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
8(index): 7(ptr) Variable Function 8(index): 7(ptr) Variable Function
@ -124,27 +127,21 @@ Linked fragment stage:
70: 10(float) FMul 67 68 70: 10(float) FMul 67 68
Store 66(z) 70 Store 66(z) 70
Store 73(v) 76 Store 73(v) 76
77: 71(fvec4) Load 73(v) 78: 20(ptr) AccessChain 73(v) 77
78: 10(float) CompositeExtract 77 2 79: 10(float) Load 78
79: 10(float) FSub 78 28 80: 10(float) FSub 79 28
80: 71(fvec4) Load 73(v) Store 78 80
81: 71(fvec4) CompositeInsert 79 80 2 82: 20(ptr) AccessChain 73(v) 81
Store 73(v) 81 Store 82 79
82: 71(fvec4) Load 73(v) 84: 20(ptr) AccessChain 73(v) 83
83: 71(fvec4) CompositeInsert 78 82 1 85: 10(float) Load 84
Store 73(v) 83
84: 71(fvec4) Load 73(v)
85: 10(float) CompositeExtract 84 3
86: 10(float) FSub 85 28 86: 10(float) FSub 85 28
87: 71(fvec4) Load 73(v) Store 84 86
88: 71(fvec4) CompositeInsert 86 87 3 88: 20(ptr) AccessChain 73(v) 87
Store 73(v) 88 Store 88 86
89: 71(fvec4) Load 73(v) 91: 10(float) Load 66(z)
90: 71(fvec4) CompositeInsert 86 89 0 92: 71(fvec4) Load 73(v)
Store 73(v) 90 93: 71(fvec4) VectorTimesScalar 92 91
93: 10(float) Load 66(z) Store 90(gl_FragColor) 93
94: 71(fvec4) Load 73(v)
95: 71(fvec4) VectorTimesScalar 94 93
Store 92(gl_FragColor) 95
Return Return
FunctionEnd FunctionEnd

View File

@ -5,15 +5,15 @@ Warning, version 430 is not yet complete; most version-specific features are pre
Linked vertex stage: Linked vertex stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 25 // Id's are bound by 25
Source GLSL 430
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" EntryPoint Vertex 4 "main" 11 9 13 15 17 19 23 24
Source GLSL 430
Name 4 "main" Name 4 "main"
Name 9 "outVc" Name 9 "outVc"
Name 11 "inV" Name 11 "inV"
@ -23,15 +23,11 @@ Linked vertex stage:
Name 19 "outVcn" Name 19 "outVcn"
Name 23 "gl_VertexID" Name 23 "gl_VertexID"
Name 24 "gl_InstanceID" Name 24 "gl_InstanceID"
Decorate 9(outVc) Smooth
Decorate 13(outVs) Smooth
Decorate 15(outVf) Flat Decorate 15(outVf) Flat
Decorate 17(outVn) Noperspective Decorate 17(outVn) NoPerspective
Decorate 19(outVcn) Noperspective Decorate 19(outVcn) NoPerspective
Decorate 23(gl_VertexID) BuiltIn VertexId Decorate 23(gl_VertexID) BuiltIn VertexId
Decorate 23(gl_VertexID) NoStaticUse
Decorate 24(gl_InstanceID) BuiltIn InstanceId Decorate 24(gl_InstanceID) BuiltIn InstanceId
Decorate 24(gl_InstanceID) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32

8
Test/baseResults/spv.queryL.frag.out Normal file → Executable file
View File

@ -5,16 +5,16 @@ Warning, version 430 is not yet complete; most version-specific features are pre
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 211 // Id's are bound by 211
Source GLSL 430
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main"
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 430
Name 4 "main" Name 4 "main"
Name 9 "lod" Name 9 "lod"
Name 13 "samp1D" Name 13 "samp1D"
@ -41,8 +41,6 @@ Linked fragment stage:
Name 176 "usampCubeA" Name 176 "usampCubeA"
Name 206 "sampBuf" Name 206 "sampBuf"
Name 210 "sampRect" Name 210 "sampRect"
Decorate 206(sampBuf) NoStaticUse
Decorate 210(sampRect) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32

View File

@ -5,35 +5,31 @@ Warning, version 450 is not yet complete; most version-specific features are pre
Linked vertex stage: Linked vertex stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 25 // Id's are bound by 25
Source GLSL 450
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" EntryPoint Vertex 4 "main" 9 23 24
Source GLSL 450
Name 4 "main" Name 4 "main"
Name 9 "color" Name 9 "color"
Name 10 "setBuf" Name 10 "setBuf"
MemberName 10(setBuf) 0 "color" MemberName 10(setBuf) 0 "color"
Name 12 "setBufInst" Name 12 "setBufInst"
Name 21 "sampler" Name 21 "samp2D"
Name 23 "gl_VertexID" Name 23 "gl_VertexID"
Name 24 "gl_InstanceID" Name 24 "gl_InstanceID"
Decorate 9(color) Smooth
Decorate 10(setBuf) GLSLShared Decorate 10(setBuf) GLSLShared
Decorate 10(setBuf) BufferBlock Decorate 10(setBuf) BufferBlock
Decorate 12(setBufInst) DescriptorSet 0 Decorate 12(setBufInst) DescriptorSet 0
Decorate 12(setBufInst) Binding 8 Decorate 12(setBufInst) Binding 8
Decorate 21(sampler) DescriptorSet 4 Decorate 21(samp2D) DescriptorSet 4
Decorate 21(sampler) Binding 7 Decorate 21(samp2D) Binding 7
Decorate 21(sampler) NoStaticUse
Decorate 23(gl_VertexID) BuiltIn VertexId Decorate 23(gl_VertexID) BuiltIn VertexId
Decorate 23(gl_VertexID) NoStaticUse
Decorate 24(gl_InstanceID) BuiltIn InstanceId Decorate 24(gl_InstanceID) BuiltIn InstanceId
Decorate 24(gl_InstanceID) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -49,7 +45,7 @@ Linked vertex stage:
18: TypeImage 6(float) 2D sampled format:Unknown 18: TypeImage 6(float) 2D sampled format:Unknown
19: TypeSampledImage 18 19: TypeSampledImage 18
20: TypePointer UniformConstant 19 20: TypePointer UniformConstant 19
21(sampler): 20(ptr) Variable UniformConstant 21(samp2D): 20(ptr) Variable UniformConstant
22: TypePointer Input 13(int) 22: TypePointer Input 13(int)
23(gl_VertexID): 22(ptr) Variable Input 23(gl_VertexID): 22(ptr) Variable Input
24(gl_InstanceID): 22(ptr) Variable Input 24(gl_InstanceID): 22(ptr) Variable Input

View File

@ -5,16 +5,16 @@ Warning, version 400 is not yet complete; most version-specific features are pre
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 143 // Id's are bound by 143
Source GLSL 400
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 12 23
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 400
Name 4 "main" Name 4 "main"
Name 8 "foo(" Name 8 "foo("
Name 12 "of1" Name 12 "of1"
@ -27,10 +27,6 @@ Linked fragment stage:
Name 138 "uv4" Name 138 "uv4"
Name 141 "ub41" Name 141 "ub41"
Name 142 "ub42" Name 142 "ub42"
Decorate 136(uiv4) NoStaticUse
Decorate 138(uv4) NoStaticUse
Decorate 141(ub41) NoStaticUse
Decorate 142(ub42) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeBool 6: TypeBool

View File

@ -5,26 +5,22 @@ WARNING: 0:4: varying deprecated in version 130; may be removed in future releas
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 22 // Id's are bound by 22
Source GLSL 150
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 12
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 150
Name 4 "main" Name 4 "main"
Name 9 "foo(" Name 9 "foo("
Name 12 "BaseColor" Name 12 "BaseColor"
Name 16 "gl_FragColor" Name 16 "gl_FragColor"
Name 19 "bigColor" Name 19 "bigColor"
Name 21 "d" Name 21 "d"
Decorate 12(BaseColor) Smooth
Decorate 16(gl_FragColor) BuiltIn FragColor
Decorate 19(bigColor) NoStaticUse
Decorate 21(d) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32

View File

@ -3,15 +3,15 @@ spv.simpleMat.vert
Linked vertex stage: Linked vertex stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 43 // Id's are bound by 42
Source GLSL 330
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" EntryPoint Vertex 4 "main" 15 23 34 19 9 40 41
Source GLSL 330
Name 4 "main" Name 4 "main"
Name 9 "glPos" Name 9 "glPos"
Name 12 "mvp" Name 12 "mvp"
@ -19,14 +19,10 @@ Linked vertex stage:
Name 19 "f" Name 19 "f"
Name 23 "am3" Name 23 "am3"
Name 34 "arraym" Name 34 "arraym"
Name 41 "gl_VertexID" Name 40 "gl_VertexID"
Name 42 "gl_InstanceID" Name 41 "gl_InstanceID"
Decorate 9(glPos) Smooth Decorate 40(gl_VertexID) BuiltIn VertexId
Decorate 19(f) Smooth Decorate 41(gl_InstanceID) BuiltIn InstanceId
Decorate 41(gl_VertexID) BuiltIn VertexId
Decorate 41(gl_VertexID) NoStaticUse
Decorate 42(gl_InstanceID) BuiltIn InstanceId
Decorate 42(gl_InstanceID) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -46,29 +42,28 @@ Linked vertex stage:
23(am3): 22(ptr) Variable Input 23(am3): 22(ptr) Variable Input
24: TypeInt 32 1 24: TypeInt 32 1
25: 24(int) Constant 2 25: 24(int) Constant 2
26: TypePointer Input 20(fvec3) 26: TypeInt 32 0
30: TypeInt 32 0 27: 26(int) Constant 1
31: 30(int) Constant 3 28: TypePointer Input 6(float)
31: 26(int) Constant 3
32: TypeArray 10 31 32: TypeArray 10 31
33: TypePointer Input 32 33: TypePointer Input 32
34(arraym): 33(ptr) Variable Input 34(arraym): 33(ptr) Variable Input
35: 24(int) Constant 1 35: 24(int) Constant 1
40: TypePointer Input 24(int) 39: TypePointer Input 24(int)
41(gl_VertexID): 40(ptr) Variable Input 40(gl_VertexID): 39(ptr) Variable Input
42(gl_InstanceID): 40(ptr) Variable Input 41(gl_InstanceID): 39(ptr) Variable Input
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
13: 10 Load 12(mvp) 13: 10 Load 12(mvp)
16: 7(fvec4) Load 15(v) 16: 7(fvec4) Load 15(v)
17: 7(fvec4) MatrixTimesVector 13 16 17: 7(fvec4) MatrixTimesVector 13 16
Store 9(glPos) 17 Store 9(glPos) 17
27: 26(ptr) AccessChain 23(am3) 25 29: 28(ptr) AccessChain 23(am3) 25 27
28: 20(fvec3) Load 27 30: 6(float) Load 29
29: 6(float) CompositeExtract 28 1 36: 28(ptr) AccessChain 34(arraym) 35 25 31
36: 14(ptr) AccessChain 34(arraym) 35 25 37: 6(float) Load 36
37: 7(fvec4) Load 36 38: 6(float) FAdd 30 37
38: 6(float) CompositeExtract 37 3 Store 19(f) 38
39: 6(float) FAdd 29 38
Store 19(f) 39
Return Return
FunctionEnd FunctionEnd

View File

@ -5,16 +5,16 @@ WARNING: 0:4: varying deprecated in version 130; may be removed in future releas
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 50 // Id's are bound by 50
Source GLSL 130
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 44
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main" Name 4 "main"
Name 8 "lunarStruct1" Name 8 "lunarStruct1"
MemberName 8(lunarStruct1) 0 "i" MemberName 8(lunarStruct1) 0 "i"
@ -32,12 +32,9 @@ Linked fragment stage:
Name 22 "locals2" Name 22 "locals2"
Name 27 "foo2" Name 27 "foo2"
Name 31 "gl_FragColor" Name 31 "gl_FragColor"
Name 40 "sampler" Name 40 "samp2D"
Name 44 "coord" Name 44 "coord"
Name 49 "foo" Name 49 "foo"
Decorate 31(gl_FragColor) BuiltIn FragColor
Decorate 44(coord) Smooth
Decorate 49(foo) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1
@ -62,7 +59,7 @@ Linked fragment stage:
37: TypeImage 7(float) 2D sampled format:Unknown 37: TypeImage 7(float) 2D sampled format:Unknown
38: TypeSampledImage 37 38: TypeSampledImage 37
39: TypePointer UniformConstant 38 39: TypePointer UniformConstant 38
40(sampler): 39(ptr) Variable UniformConstant 40(samp2D): 39(ptr) Variable UniformConstant
42: TypeVector 7(float) 2 42: TypeVector 7(float) 2
43: TypePointer Input 42(fvec2) 43: TypePointer Input 42(fvec2)
44(coord): 43(ptr) Variable Input 44(coord): 43(ptr) Variable Input
@ -88,7 +85,7 @@ Linked fragment stage:
20: Label 20: Label
35: 34(ptr) AccessChain 22(locals2) 32 33 35: 34(ptr) AccessChain 22(locals2) 32 33
36: 7(float) Load 35 36: 7(float) Load 35
41: 38 Load 40(sampler) 41: 38 Load 40(samp2D)
45: 42(fvec2) Load 44(coord) 45: 42(fvec2) Load 44(coord)
46: 29(fvec4) ImageSampleImplicitLod 41 45 46: 29(fvec4) ImageSampleImplicitLod 41 45
47: 29(fvec4) VectorTimesScalar 46 36 47: 29(fvec4) VectorTimesScalar 46 36

View File

@ -5,16 +5,16 @@ WARNING: 0:4: varying deprecated in version 130; may be removed in future releas
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 120 // Id's are bound by 123
Source GLSL 130
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 61
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main" Name 4 "main"
Name 8 "s0" Name 8 "s0"
MemberName 8(s0) 0 "i" MemberName 8(s0) 0 "i"
@ -41,14 +41,11 @@ Linked fragment stage:
MemberName 54(s00) 0 "s0_0" MemberName 54(s00) 0 "s0_0"
Name 56 "locals00" Name 56 "locals00"
Name 61 "coord" Name 61 "coord"
Name 68 "foo0" Name 71 "foo0"
Name 83 "foo00" Name 86 "foo00"
Name 96 "gl_FragColor" Name 99 "gl_FragColor"
Name 113 "sampler" Name 116 "samp2D"
Name 119 "foo2" Name 122 "foo2"
Decorate 61(coord) Smooth
Decorate 96(gl_FragColor) BuiltIn FragColor
Decorate 119(foo2) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1
@ -92,27 +89,30 @@ Linked fragment stage:
59: TypeVector 7(float) 2 59: TypeVector 7(float) 2
60: TypePointer Input 59(fvec2) 60: TypePointer Input 59(fvec2)
61(coord): 60(ptr) Variable Input 61(coord): 60(ptr) Variable Input
67: TypePointer UniformConstant 8(s0) 62: 11(int) Constant 0
68(foo0): 67(ptr) Variable UniformConstant 63: TypePointer Input 7(float)
72: 7(float) Constant 1073741824 67: 11(int) Constant 1
73: 7(float) Constant 1077936128 70: TypePointer UniformConstant 8(s0)
74: 7(float) Constant 1082130432 71(foo0): 70(ptr) Variable UniformConstant
75: 7(float) Constant 1084227584 75: 7(float) Constant 1073741824
76: 38 ConstantComposite 41 29 72 73 74 75 76: 7(float) Constant 1077936128
82: TypePointer UniformConstant 54(s00) 77: 7(float) Constant 1082130432
83(foo00): 82(ptr) Variable UniformConstant 78: 7(float) Constant 1084227584
85: TypePointer Function 6(int) 79: 38 ConstantComposite 41 29 75 76 77 78
88: 6(int) Constant 5 85: TypePointer UniformConstant 54(s00)
94: TypeVector 7(float) 4 86(foo00): 85(ptr) Variable UniformConstant
95: TypePointer Output 94(fvec4) 88: TypePointer Function 6(int)
96(gl_FragColor): 95(ptr) Variable Output 91: 6(int) Constant 5
103: 6(int) Constant 3 97: TypeVector 7(float) 4
110: TypeImage 7(float) 2D sampled format:Unknown 98: TypePointer Output 97(fvec4)
111: TypeSampledImage 110 99(gl_FragColor): 98(ptr) Variable Output
112: TypePointer UniformConstant 111 106: 6(int) Constant 3
113(sampler): 112(ptr) Variable UniformConstant 113: TypeImage 7(float) 2D sampled format:Unknown
118: TypePointer UniformConstant 10(s2) 114: TypeSampledImage 113
119(foo2): 118(ptr) Variable UniformConstant 115: TypePointer UniformConstant 114
116(samp2D): 115(ptr) Variable UniformConstant
121: TypePointer UniformConstant 10(s2)
122(foo2): 121(ptr) Variable UniformConstant
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
27(locals2): 26(ptr) Variable Function 27(locals2): 26(ptr) Variable Function
@ -138,55 +138,55 @@ Linked fragment stage:
Store 56(locals00) 57 Store 56(locals00) 57
Branch 25 Branch 25
58: Label 58: Label
62: 59(fvec2) Load 61(coord) 64: 63(ptr) AccessChain 61(coord) 62
63: 7(float) CompositeExtract 62 0 65: 7(float) Load 64
64: 30(ptr) AccessChain 27(locals2) 28 66: 30(ptr) AccessChain 27(locals2) 28
Store 64 63 Store 66 65
65: 59(fvec2) Load 61(coord) 68: 63(ptr) AccessChain 61(coord) 67
66: 7(float) CompositeExtract 65 1 69: 7(float) Load 68
69: 8(s0) Load 68(foo0) 72: 8(s0) Load 71(foo0)
70: 9(s1) CompositeConstruct 28 66 69 73: 9(s1) CompositeConstruct 28 69 72
71: 35(ptr) AccessChain 27(locals2) 32 74: 35(ptr) AccessChain 27(locals2) 32
Store 71 70 Store 74 73
Store 40(fArray) 76 Store 40(fArray) 79
77: 35(ptr) AccessChain 27(locals2) 32 80: 35(ptr) AccessChain 27(locals2) 32
78: 9(s1) Load 77 81: 9(s1) Load 80
79: 35(ptr) AccessChain 46(locals1Array) 47 82: 35(ptr) AccessChain 46(locals1Array) 47
Store 79 78 Store 82 81
80: 67(ptr) AccessChain 49(foo1) 32 83: 70(ptr) AccessChain 49(foo1) 32
81: 8(s0) Load 80 84: 8(s0) Load 83
Store 53(locals0) 81 Store 53(locals0) 84
84: 54(s00) Load 83(foo00) 87: 54(s00) Load 86(foo00)
Store 56(locals00) 84 Store 56(locals00) 87
Branch 25 Branch 25
25: Label 25: Label
86: 85(ptr) AccessChain 53(locals0) 17 89: 88(ptr) AccessChain 53(locals0) 17
87: 6(int) Load 86 90: 6(int) Load 89
89: 22(bool) SGreaterThan 87 88 92: 22(bool) SGreaterThan 90 91
SelectionMerge 91 None SelectionMerge 94 None
BranchConditional 89 90 91 BranchConditional 92 93 94
90: Label 93: Label
92: 52(ptr) AccessChain 56(locals00) 17 95: 52(ptr) AccessChain 56(locals00) 17
93: 8(s0) Load 92 96: 8(s0) Load 95
Store 53(locals0) 93 Store 53(locals0) 96
Branch 91 Branch 94
91: Label 94: Label
97: 85(ptr) AccessChain 53(locals0) 17 100: 88(ptr) AccessChain 53(locals0) 17
98: 6(int) Load 97 101: 6(int) Load 100
99: 7(float) ConvertSToF 98 102: 7(float) ConvertSToF 101
100: 30(ptr) AccessChain 46(locals1Array) 47 28 103: 30(ptr) AccessChain 46(locals1Array) 47 28
101: 7(float) Load 100 104: 7(float) Load 103
102: 7(float) FAdd 99 101 105: 7(float) FAdd 102 104
104: 30(ptr) AccessChain 40(fArray) 103 107: 30(ptr) AccessChain 40(fArray) 106
105: 7(float) Load 104
106: 7(float) FAdd 102 105
107: 30(ptr) AccessChain 27(locals2) 32 28
108: 7(float) Load 107 108: 7(float) Load 107
109: 7(float) FAdd 106 108 109: 7(float) FAdd 105 108
114: 111 Load 113(sampler) 110: 30(ptr) AccessChain 27(locals2) 32 28
115: 59(fvec2) Load 61(coord) 111: 7(float) Load 110
116: 94(fvec4) ImageSampleImplicitLod 114 115 112: 7(float) FAdd 109 111
117: 94(fvec4) VectorTimesScalar 116 109 117: 114 Load 116(samp2D)
Store 96(gl_FragColor) 117 118: 59(fvec2) Load 61(coord)
119: 97(fvec4) ImageSampleImplicitLod 117 118
120: 97(fvec4) VectorTimesScalar 119 112
Store 99(gl_FragColor) 120
Return Return
FunctionEnd FunctionEnd

View File

@ -5,16 +5,16 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 61 // Id's are bound by 60
Source GLSL 130
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 54
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main" Name 4 "main"
Name 8 "scale" Name 8 "scale"
Name 18 "lunarStruct1" Name 18 "lunarStruct1"
@ -26,13 +26,10 @@ Linked fragment stage:
MemberName 21(lunarStruct2) 1 "f" MemberName 21(lunarStruct2) 1 "f"
MemberName 21(lunarStruct2) 2 "s1_1" MemberName 21(lunarStruct2) 2 "s1_1"
Name 24 "foo2" Name 24 "foo2"
Name 46 "gl_FragColor" Name 45 "gl_FragColor"
Name 51 "sampler" Name 50 "samp2D"
Name 55 "coord" Name 54 "coord"
Name 60 "foo" Name 59 "foo"
Decorate 46(gl_FragColor) BuiltIn FragColor
Decorate 55(coord) Smooth
Decorate 60(foo) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -59,20 +56,20 @@ Linked fragment stage:
28: TypePointer UniformConstant 10(int) 28: TypePointer UniformConstant 10(int)
31: TypeBool 31: TypeBool
35: 10(int) Constant 2 35: 10(int) Constant 2
36: TypePointer UniformConstant 16(fvec4) 36: 11(int) Constant 0
37: TypePointer UniformConstant 6(float)
41: 10(int) Constant 1 41: 10(int) Constant 1
42: TypePointer UniformConstant 6(float) 44: TypePointer Output 16(fvec4)
45: TypePointer Output 16(fvec4) 45(gl_FragColor): 44(ptr) Variable Output
46(gl_FragColor): 45(ptr) Variable Output 47: TypeImage 6(float) 2D sampled format:Unknown
48: TypeImage 6(float) 2D sampled format:Unknown 48: TypeSampledImage 47
49: TypeSampledImage 48 49: TypePointer UniformConstant 48
50: TypePointer UniformConstant 49 50(samp2D): 49(ptr) Variable UniformConstant
51(sampler): 50(ptr) Variable UniformConstant 52: TypeVector 6(float) 2
53: TypeVector 6(float) 2 53: TypePointer Input 52(fvec2)
54: TypePointer Input 53(fvec2) 54(coord): 53(ptr) Variable Input
55(coord): 54(ptr) Variable Input 58: TypePointer UniformConstant 18(lunarStruct1)
59: TypePointer UniformConstant 18(lunarStruct1) 59(foo): 58(ptr) Variable UniformConstant
60(foo): 59(ptr) Variable UniformConstant
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
8(scale): 7(ptr) Variable Function 8(scale): 7(ptr) Variable Function
@ -83,22 +80,21 @@ Linked fragment stage:
SelectionMerge 34 None SelectionMerge 34 None
BranchConditional 32 33 40 BranchConditional 32 33 40
33: Label 33: Label
37: 36(ptr) AccessChain 24(foo2) 25 35 35 35 25 38: 37(ptr) AccessChain 24(foo2) 25 35 35 35 25 36
38: 16(fvec4) Load 37 39: 6(float) Load 38
39: 6(float) CompositeExtract 38 0
Store 8(scale) 39 Store 8(scale) 39
Branch 34 Branch 34
40: Label 40: Label
43: 42(ptr) AccessChain 24(foo2) 25 35 35 41 25 42: 37(ptr) AccessChain 24(foo2) 25 35 35 41 25
44: 6(float) Load 43 43: 6(float) Load 42
Store 8(scale) 44 Store 8(scale) 43
Branch 34 Branch 34
34: Label 34: Label
47: 6(float) Load 8(scale) 46: 6(float) Load 8(scale)
52: 49 Load 51(sampler) 51: 48 Load 50(samp2D)
56: 53(fvec2) Load 55(coord) 55: 52(fvec2) Load 54(coord)
57: 16(fvec4) ImageSampleImplicitLod 52 56 56: 16(fvec4) ImageSampleImplicitLod 51 55
58: 16(fvec4) VectorTimesScalar 57 47 57: 16(fvec4) VectorTimesScalar 56 46
Store 46(gl_FragColor) 58 Store 45(gl_FragColor) 57
Return Return
FunctionEnd FunctionEnd

View File

@ -8,16 +8,16 @@ WARNING: 0:139: 'switch' : last case/default label not followed by statements
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 260 // Id's are bound by 263
Source ESSL 310
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 73 221
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source ESSL 310
Name 4 "main" Name 4 "main"
Name 15 "foo1(vf4;vf4;i1;" Name 15 "foo1(vf4;vf4;i1;"
Name 12 "v1" Name 12 "v1"
@ -39,14 +39,13 @@ Linked fragment stage:
Name 228 "param" Name 228 "param"
Name 230 "param" Name 230 "param"
Name 232 "param" Name 232 "param"
Name 238 "param"
Name 240 "param" Name 240 "param"
Name 242 "param" Name 242 "param"
Name 244 "param"
Decorate 58(local) RelaxedPrecision Decorate 58(local) RelaxedPrecision
Decorate 60(c) RelaxedPrecision Decorate 60(c) RelaxedPrecision
Decorate 71(f) RelaxedPrecision Decorate 71(f) RelaxedPrecision
Decorate 73(x) RelaxedPrecision Decorate 73(x) RelaxedPrecision
Decorate 73(x) Smooth
Decorate 127(d) RelaxedPrecision Decorate 127(d) RelaxedPrecision
Decorate 153(i) RelaxedPrecision Decorate 153(i) RelaxedPrecision
Decorate 171(j) RelaxedPrecision Decorate 171(j) RelaxedPrecision
@ -82,6 +81,9 @@ Linked fragment stage:
221(color): 220(ptr) Variable Output 221(color): 220(ptr) Variable Output
226: TypePointer UniformConstant 7(fvec4) 226: TypePointer UniformConstant 7(fvec4)
227(v): 226(ptr) Variable UniformConstant 227(v): 226(ptr) Variable UniformConstant
235: TypeInt 32 0
236: 235(int) Constant 1
247: 235(int) Constant 2
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
58(local): 10(ptr) Variable Function 58(local): 10(ptr) Variable Function
@ -91,9 +93,9 @@ Linked fragment stage:
228(param): 8(ptr) Variable Function 228(param): 8(ptr) Variable Function
230(param): 8(ptr) Variable Function 230(param): 8(ptr) Variable Function
232(param): 10(ptr) Variable Function 232(param): 10(ptr) Variable Function
238(param): 8(ptr) Variable Function
240(param): 8(ptr) Variable Function 240(param): 8(ptr) Variable Function
242(param): 10(ptr) Variable Function 242(param): 8(ptr) Variable Function
244(param): 10(ptr) Variable Function
61: 9(int) Load 60(c) 61: 9(int) Load 60(c)
Store 58(local) 61 Store 58(local) 61
62: 9(int) Load 58(local) 62: 9(int) Load 58(local)
@ -218,7 +220,7 @@ Linked fragment stage:
155: Label 155: Label
158: 9(int) Load 153(i) 158: 9(int) Load 153(i)
161: 160(bool) SLessThan 158 159 161: 160(bool) SLessThan 158 159
LoopMerge 156 None LoopMerge 156 155 None
BranchConditional 161 157 156 BranchConditional 161 157 156
157: Label 157: Label
162: 9(int) Load 60(c) 162: 9(int) Load 60(c)
@ -237,7 +239,7 @@ Linked fragment stage:
173: Label 173: Label
176: 9(int) Load 171(j) 176: 9(int) Load 171(j)
178: 160(bool) SLessThan 176 177 178: 160(bool) SLessThan 176 177
LoopMerge 174 None LoopMerge 174 173 None
BranchConditional 178 175 174 BranchConditional 178 175 174
175: Label 175: Label
179: 6(float) Load 71(f) 179: 6(float) Load 71(f)
@ -310,36 +312,36 @@ Linked fragment stage:
233: 9(int) Load 60(c) 233: 9(int) Load 60(c)
Store 232(param) 233 Store 232(param) 233
234: 7(fvec4) FunctionCall 15(foo1(vf4;vf4;i1;) 228(param) 230(param) 232(param) 234: 7(fvec4) FunctionCall 15(foo1(vf4;vf4;i1;) 228(param) 230(param) 232(param)
235: 6(float) CompositeExtract 234 1 237: 6(float) CompositeExtract 234 1
236: 6(float) Load 221(color) 238: 6(float) Load 221(color)
237: 6(float) FAdd 236 235 239: 6(float) FAdd 238 237
Store 221(color) 237 Store 221(color) 239
239: 7(fvec4) Load 227(v)
Store 238(param) 239
241: 7(fvec4) Load 227(v) 241: 7(fvec4) Load 227(v)
Store 240(param) 241 Store 240(param) 241
243: 9(int) Load 60(c) 243: 7(fvec4) Load 227(v)
Store 242(param) 243 Store 242(param) 243
244: 7(fvec4) FunctionCall 20(foo2(vf4;vf4;i1;) 238(param) 240(param) 242(param) 245: 9(int) Load 60(c)
245: 6(float) CompositeExtract 244 2 Store 244(param) 245
246: 6(float) Load 221(color) 246: 7(fvec4) FunctionCall 20(foo2(vf4;vf4;i1;) 240(param) 242(param) 244(param)
247: 6(float) FAdd 246 245 248: 6(float) CompositeExtract 246 2
Store 221(color) 247 249: 6(float) Load 221(color)
248: 9(int) Load 60(c) 250: 6(float) FAdd 249 248
SelectionMerge 251 None Store 221(color) 250
Switch 248 250 251: 9(int) Load 60(c)
case 0: 249 SelectionMerge 254 None
249: Label Switch 251 253
Branch 251 case 0: 252
250: Label 252: Label
Branch 251 Branch 254
251: Label 253: Label
255: 9(int) Load 60(c) Branch 254
SelectionMerge 257 None 254: Label
Switch 255 256 258: 9(int) Load 60(c)
256: Label SelectionMerge 260 None
Branch 257 Switch 258 259
257: Label 259: Label
Branch 260
260: Label
Return Return
FunctionEnd FunctionEnd
15(foo1(vf4;vf4;i1;): 7(fvec4) Function None 11 15(foo1(vf4;vf4;i1;): 7(fvec4) Function None 11

View File

@ -3,16 +3,16 @@ spv.swizzle.frag
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 111 // Id's are bound by 109
Source GLSL 110
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 30
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 110
Name 4 "main" Name 4 "main"
Name 8 "blendscale" Name 8 "blendscale"
Name 12 "w" Name 12 "w"
@ -21,16 +21,13 @@ Linked fragment stage:
Name 18 "w_reorder" Name 18 "w_reorder"
Name 20 "w2" Name 20 "w2"
Name 22 "w_flow" Name 22 "w_flow"
Name 29 "t" Name 30 "t"
Name 48 "w_undef" Name 49 "w_undef"
Name 55 "p" Name 56 "p"
Name 69 "gl_FragColor" Name 69 "gl_FragColor"
Name 81 "c" Name 81 "c"
Name 83 "rep" Name 83 "rep"
Name 110 "blend" Name 108 "blend"
Decorate 29(t) Smooth
Decorate 69(gl_FragColor) BuiltIn FragColor
Decorate 110(blend) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -40,22 +37,27 @@ Linked fragment stage:
11: TypePointer Function 10(fvec4) 11: TypePointer Function 10(fvec4)
13: TypePointer UniformConstant 10(fvec4) 13: TypePointer UniformConstant 10(fvec4)
14(u): 13(ptr) Variable UniformConstant 14(u): 13(ptr) Variable UniformConstant
27: TypeVector 6(float) 2 25: TypeInt 32 0
28: TypePointer Input 27(fvec2) 26: 25(int) Constant 2
29(t): 28(ptr) Variable Input 28: TypeVector 6(float) 2
53: TypeBool 29: TypePointer Input 28(fvec2)
54: TypePointer UniformConstant 53(bool) 30(t): 29(ptr) Variable Input
55(p): 54(ptr) Variable UniformConstant 35: 25(int) Constant 0
40: 25(int) Constant 1
54: TypeBool
55: TypePointer UniformConstant 54(bool)
56(p): 55(ptr) Variable UniformConstant
60: TypePointer Input 6(float)
68: TypePointer Output 10(fvec4) 68: TypePointer Output 10(fvec4)
69(gl_FragColor): 68(ptr) Variable Output 69(gl_FragColor): 68(ptr) Variable Output
80: TypePointer Function 27(fvec2) 80: TypePointer Function 28(fvec2)
84: 6(float) Constant 0 84: 6(float) Constant 0
85: 6(float) Constant 1065353216 85: 6(float) Constant 1065353216
86: 10(fvec4) ConstantComposite 84 84 84 85 86: 10(fvec4) ConstantComposite 84 84 84 85
92: 6(float) Constant 3212836864 92: 6(float) Constant 3212836864
103: 6(float) Constant 1079613850 102: 6(float) Constant 1079613850
109: TypePointer UniformConstant 6(float) 107: TypePointer UniformConstant 6(float)
110(blend): 109(ptr) Variable UniformConstant 108(blend): 107(ptr) Variable UniformConstant
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
8(blendscale): 7(ptr) Variable Function 8(blendscale): 7(ptr) Variable Function
@ -64,7 +66,7 @@ Linked fragment stage:
18(w_reorder): 11(ptr) Variable Function 18(w_reorder): 11(ptr) Variable Function
20(w2): 11(ptr) Variable Function 20(w2): 11(ptr) Variable Function
22(w_flow): 11(ptr) Variable Function 22(w_flow): 11(ptr) Variable Function
48(w_undef): 11(ptr) Variable Function 49(w_undef): 11(ptr) Variable Function
81(c): 80(ptr) Variable Function 81(c): 80(ptr) Variable Function
83(rep): 11(ptr) Variable Function 83(rep): 11(ptr) Variable Function
Store 8(blendscale) 9 Store 8(blendscale) 9
@ -79,58 +81,53 @@ Linked fragment stage:
23: 10(fvec4) Load 14(u) 23: 10(fvec4) Load 14(u)
Store 22(w_flow) 23 Store 22(w_flow) 23
24: 6(float) Load 8(blendscale) 24: 6(float) Load 8(blendscale)
25: 10(fvec4) Load 18(w_reorder) 27: 7(ptr) AccessChain 18(w_reorder) 26
26: 10(fvec4) CompositeInsert 24 25 2 Store 27 24
Store 18(w_reorder) 26 31: 28(fvec2) Load 30(t)
30: 27(fvec2) Load 29(t) 32: 10(fvec4) Load 12(w)
31: 10(fvec4) Load 12(w) 33: 10(fvec4) VectorShuffle 32 31 0 5 2 4
32: 10(fvec4) VectorShuffle 31 30 0 5 2 4 Store 12(w) 33
Store 12(w) 32 34: 6(float) Load 8(blendscale)
33: 6(float) Load 8(blendscale) 36: 7(ptr) AccessChain 18(w_reorder) 35
34: 10(fvec4) Load 18(w_reorder) Store 36 34
35: 10(fvec4) CompositeInsert 33 34 0 37: 10(fvec4) Load 14(u)
Store 18(w_reorder) 35 38: 10(fvec4) VectorShuffle 37 37 2 3 0 1
36: 10(fvec4) Load 14(u) Store 20(w2) 38
37: 10(fvec4) VectorShuffle 36 36 2 3 0 1 39: 6(float) Load 8(blendscale)
Store 20(w2) 37 41: 7(ptr) AccessChain 18(w_reorder) 40
38: 6(float) Load 8(blendscale) Store 41 39
39: 10(fvec4) Load 18(w_reorder) 42: 10(fvec4) Load 20(w2)
40: 10(fvec4) CompositeInsert 38 39 1 43: 28(fvec2) VectorShuffle 42 42 0 2
Store 18(w_reorder) 40 44: 10(fvec4) Load 16(w_dep)
41: 10(fvec4) Load 20(w2) 45: 10(fvec4) VectorShuffle 44 43 4 5 2 3
42: 27(fvec2) VectorShuffle 41 41 0 2 Store 16(w_dep) 45
43: 10(fvec4) Load 16(w_dep) 46: 28(fvec2) Load 30(t)
44: 10(fvec4) VectorShuffle 43 42 4 5 2 3 47: 10(fvec4) Load 16(w_dep)
Store 16(w_dep) 44 48: 10(fvec4) VectorShuffle 47 46 0 1 4 5
45: 27(fvec2) Load 29(t) Store 16(w_dep) 48
46: 10(fvec4) Load 16(w_dep) 50: 10(fvec4) Load 14(u)
47: 10(fvec4) VectorShuffle 46 45 0 1 4 5 51: 28(fvec2) VectorShuffle 50 50 2 3
Store 16(w_dep) 47 52: 10(fvec4) Load 49(w_undef)
49: 10(fvec4) Load 14(u) 53: 10(fvec4) VectorShuffle 52 51 4 5 2 3
50: 27(fvec2) VectorShuffle 49 49 2 3 Store 49(w_undef) 53
51: 10(fvec4) Load 48(w_undef) 57: 54(bool) Load 56(p)
52: 10(fvec4) VectorShuffle 51 50 4 5 2 3 SelectionMerge 59 None
Store 48(w_undef) 52 BranchConditional 57 58 64
56: 53(bool) Load 55(p) 58: Label
SelectionMerge 58 None 61: 60(ptr) AccessChain 30(t) 35
BranchConditional 56 57 63 62: 6(float) Load 61
57: Label 63: 7(ptr) AccessChain 22(w_flow) 35
59: 27(fvec2) Load 29(t) Store 63 62
60: 6(float) CompositeExtract 59 0 Branch 59
61: 10(fvec4) Load 22(w_flow) 64: Label
62: 10(fvec4) CompositeInsert 60 61 0 65: 60(ptr) AccessChain 30(t) 40
Store 22(w_flow) 62 66: 6(float) Load 65
Branch 58 67: 7(ptr) AccessChain 22(w_flow) 35
63: Label Store 67 66
64: 27(fvec2) Load 29(t) Branch 59
65: 6(float) CompositeExtract 64 1 59: Label
66: 10(fvec4) Load 22(w_flow)
67: 10(fvec4) CompositeInsert 65 66 0
Store 22(w_flow) 67
Branch 58
58: Label
70: 10(fvec4) Load 18(w_reorder) 70: 10(fvec4) Load 18(w_reorder)
71: 10(fvec4) Load 48(w_undef) 71: 10(fvec4) Load 49(w_undef)
72: 10(fvec4) Load 12(w) 72: 10(fvec4) Load 12(w)
73: 10(fvec4) Load 20(w2) 73: 10(fvec4) Load 20(w2)
74: 10(fvec4) FMul 72 73 74: 10(fvec4) FMul 72 73
@ -138,39 +135,37 @@ Linked fragment stage:
76: 10(fvec4) FMul 74 75 76: 10(fvec4) FMul 74 75
77: 10(fvec4) Load 22(w_flow) 77: 10(fvec4) Load 22(w_flow)
78: 10(fvec4) FMul 76 77 78: 10(fvec4) FMul 76 77
79: 10(fvec4) ExtInst 1(GLSL.std.450) 46(Mix) 70 71 78 79: 10(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 70 71 78
Store 69(gl_FragColor) 79 Store 69(gl_FragColor) 79
82: 27(fvec2) Load 29(t) 82: 28(fvec2) Load 30(t)
Store 81(c) 82 Store 81(c) 82
Store 83(rep) 86 Store 83(rep) 86
87: 27(fvec2) Load 81(c) 87: 7(ptr) AccessChain 81(c) 35
88: 6(float) CompositeExtract 87 0 88: 6(float) Load 87
89: 53(bool) FOrdLessThan 88 84 89: 54(bool) FOrdLessThan 88 84
SelectionMerge 91 None SelectionMerge 91 None
BranchConditional 89 90 91 BranchConditional 89 90 91
90: Label 90: Label
93: 27(fvec2) Load 81(c) 93: 7(ptr) AccessChain 81(c) 35
94: 6(float) CompositeExtract 93 0 94: 6(float) Load 93
95: 6(float) FMul 94 92 95: 6(float) FMul 94 92
96: 27(fvec2) Load 81(c) 96: 7(ptr) AccessChain 81(c) 35
97: 27(fvec2) CompositeInsert 95 96 0 Store 96 95
Store 81(c) 97
Branch 91 Branch 91
91: Label 91: Label
98: 27(fvec2) Load 81(c) 97: 7(ptr) AccessChain 81(c) 35
99: 6(float) CompositeExtract 98 0 98: 6(float) Load 97
100: 53(bool) FOrdLessThanEqual 99 85 99: 54(bool) FOrdLessThanEqual 98 85
SelectionMerge 102 None SelectionMerge 101 None
BranchConditional 100 101 102 BranchConditional 99 100 101
101: Label 100: Label
104: 10(fvec4) Load 83(rep) 103: 7(ptr) AccessChain 83(rep) 35
105: 10(fvec4) CompositeInsert 103 104 0 Store 103 102
Store 83(rep) 105 Branch 101
Branch 102 101: Label
102: Label 104: 10(fvec4) Load 83(rep)
106: 10(fvec4) Load 83(rep) 105: 10(fvec4) Load 69(gl_FragColor)
107: 10(fvec4) Load 69(gl_FragColor) 106: 10(fvec4) FAdd 105 104
108: 10(fvec4) FAdd 107 106 Store 69(gl_FragColor) 106
Store 69(gl_FragColor) 108
Return Return
FunctionEnd FunctionEnd

View File

@ -1,18 +1,20 @@
spv.test.frag spv.test.frag
Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 55 // Id's are bound by 55
Source GLSL 110
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 20 38
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 400
Name 4 "main" Name 4 "main"
Name 8 "blendscale" Name 8 "blendscale"
Name 12 "v" Name 12 "v"
@ -25,9 +27,6 @@ Linked fragment stage:
Name 44 "gl_FragColor" Name 44 "gl_FragColor"
Name 47 "u" Name 47 "u"
Name 50 "blend" Name 50 "blend"
Decorate 20(t) Smooth
Decorate 38(coords) Smooth
Decorate 44(gl_FragColor) BuiltIn FragColor
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -83,7 +82,7 @@ Linked fragment stage:
51: 6(float) Load 50(blend) 51: 6(float) Load 50(blend)
52: 6(float) Load 8(blendscale) 52: 6(float) Load 8(blendscale)
53: 6(float) FMul 51 52 53: 6(float) FMul 51 52
54: 10(fvec4) ExtInst 1(GLSL.std.450) 46(Mix) 45 48 53 54: 10(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 45 48 53
Store 44(gl_FragColor) 54 Store 44(gl_FragColor) 54
Return Return
FunctionEnd FunctionEnd

10
Test/baseResults/spv.test.vert.out Normal file → Executable file
View File

@ -5,15 +5,15 @@ WARNING: 0:5: attribute deprecated in version 130; may be removed in future rele
Linked vertex stage: Linked vertex stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 27 // Id's are bound by 27
Source GLSL 130
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" EntryPoint Vertex 4 "main" 21 11 9 26
Source GLSL 130
Name 4 "main" Name 4 "main"
Name 9 "uv" Name 9 "uv"
Name 11 "uv_in" Name 11 "uv_in"
@ -21,10 +21,8 @@ Linked vertex stage:
Name 18 "transform" Name 18 "transform"
Name 21 "position" Name 21 "position"
Name 26 "gl_VertexID" Name 26 "gl_VertexID"
Decorate 9(uv) Smooth
Decorate 15(gl_Position) BuiltIn Position Decorate 15(gl_Position) BuiltIn Position
Decorate 26(gl_VertexID) BuiltIn VertexId Decorate 26(gl_VertexID) BuiltIn VertexId
Decorate 26(gl_VertexID) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32

63
Test/baseResults/spv.texture.frag.out Normal file → Executable file
View File

@ -6,16 +6,16 @@ WARNING: 0:15: varying deprecated in version 130; may be removed in future relea
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 290 // Id's are bound by 290
Source GLSL 130
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 289 47
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main" Name 4 "main"
Name 8 "blendscale" Name 8 "blendscale"
Name 10 "bias" Name 10 "bias"
@ -41,11 +41,6 @@ Linked fragment stage:
Name 282 "blend" Name 282 "blend"
Name 288 "scale" Name 288 "scale"
Name 289 "t" Name 289 "t"
Decorate 47(coords2D) Smooth
Decorate 276(gl_FragColor) BuiltIn FragColor
Decorate 288(scale) NoStaticUse
Decorate 289(t) Smooth
Decorate 289(t) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -241,69 +236,69 @@ Linked fragment stage:
141: 16(fvec3) Load 18(coords3D) 141: 16(fvec3) Load 18(coords3D)
142: 6(float) CompositeExtract 141 2 142: 6(float) CompositeExtract 141 2
143: 6(float) ImageSampleDrefImplicitLod 140 141 142 143: 6(float) ImageSampleDrefImplicitLod 140 141 142
144: 22(fvec4) CompositeConstruct 143 143 143 143 144: 22(fvec4) Load 26(color)
145: 22(fvec4) Load 26(color) 145: 22(fvec4) CompositeConstruct 143 143 143 143
146: 22(fvec4) FAdd 145 144 146: 22(fvec4) FAdd 144 145
Store 26(color) 146 Store 26(color) 146
147: 137 Load 139(shadowSampler1D) 147: 137 Load 139(shadowSampler1D)
148: 16(fvec3) Load 18(coords3D) 148: 16(fvec3) Load 18(coords3D)
149: 6(float) Load 10(bias) 149: 6(float) Load 10(bias)
150: 6(float) CompositeExtract 148 2 150: 6(float) CompositeExtract 148 2
151: 6(float) ImageSampleDrefImplicitLod 147 148 150 Bias 149 151: 6(float) ImageSampleDrefImplicitLod 147 148 150 Bias 149
152: 22(fvec4) CompositeConstruct 151 151 151 151 152: 22(fvec4) Load 26(color)
153: 22(fvec4) Load 26(color) 153: 22(fvec4) CompositeConstruct 151 151 151 151
154: 22(fvec4) FAdd 153 152 154: 22(fvec4) FAdd 152 153
Store 26(color) 154 Store 26(color) 154
159: 156 Load 158(shadowSampler2D) 159: 156 Load 158(shadowSampler2D)
160: 16(fvec3) Load 18(coords3D) 160: 16(fvec3) Load 18(coords3D)
161: 6(float) CompositeExtract 160 2 161: 6(float) CompositeExtract 160 2
162: 6(float) ImageSampleDrefImplicitLod 159 160 161 162: 6(float) ImageSampleDrefImplicitLod 159 160 161
163: 22(fvec4) CompositeConstruct 162 162 162 162 163: 22(fvec4) Load 26(color)
164: 22(fvec4) Load 26(color) 164: 22(fvec4) CompositeConstruct 162 162 162 162
165: 22(fvec4) FAdd 164 163 165: 22(fvec4) FAdd 163 164
Store 26(color) 165 Store 26(color) 165
166: 156 Load 158(shadowSampler2D) 166: 156 Load 158(shadowSampler2D)
167: 16(fvec3) Load 18(coords3D) 167: 16(fvec3) Load 18(coords3D)
168: 6(float) Load 10(bias) 168: 6(float) Load 10(bias)
169: 6(float) CompositeExtract 167 2 169: 6(float) CompositeExtract 167 2
170: 6(float) ImageSampleDrefImplicitLod 166 167 169 Bias 168 170: 6(float) ImageSampleDrefImplicitLod 166 167 169 Bias 168
171: 22(fvec4) CompositeConstruct 170 170 170 170 171: 22(fvec4) Load 26(color)
172: 22(fvec4) Load 26(color) 172: 22(fvec4) CompositeConstruct 170 170 170 170
173: 22(fvec4) FAdd 172 171 173: 22(fvec4) FAdd 171 172
Store 26(color) 173 Store 26(color) 173
174: 137 Load 139(shadowSampler1D) 174: 137 Load 139(shadowSampler1D)
175: 22(fvec4) Load 24(coords4D) 175: 22(fvec4) Load 24(coords4D)
176: 6(float) CompositeExtract 175 3 176: 6(float) CompositeExtract 175 3
177: 6(float) ImageSampleProjDrefImplicitLod 174 175 176 177: 6(float) ImageSampleProjDrefImplicitLod 174 175 176
178: 22(fvec4) CompositeConstruct 177 177 177 177 178: 22(fvec4) Load 26(color)
179: 22(fvec4) Load 26(color) 179: 22(fvec4) CompositeConstruct 177 177 177 177
180: 22(fvec4) FAdd 179 178 180: 22(fvec4) FAdd 178 179
Store 26(color) 180 Store 26(color) 180
181: 137 Load 139(shadowSampler1D) 181: 137 Load 139(shadowSampler1D)
182: 22(fvec4) Load 24(coords4D) 182: 22(fvec4) Load 24(coords4D)
183: 6(float) Load 10(bias) 183: 6(float) Load 10(bias)
184: 6(float) CompositeExtract 182 3 184: 6(float) CompositeExtract 182 3
185: 6(float) ImageSampleProjDrefImplicitLod 181 182 184 Bias 183 185: 6(float) ImageSampleProjDrefImplicitLod 181 182 184 Bias 183
186: 22(fvec4) CompositeConstruct 185 185 185 185 186: 22(fvec4) Load 26(color)
187: 22(fvec4) Load 26(color) 187: 22(fvec4) CompositeConstruct 185 185 185 185
188: 22(fvec4) FAdd 187 186 188: 22(fvec4) FAdd 186 187
Store 26(color) 188 Store 26(color) 188
189: 156 Load 158(shadowSampler2D) 189: 156 Load 158(shadowSampler2D)
190: 22(fvec4) Load 24(coords4D) 190: 22(fvec4) Load 24(coords4D)
191: 6(float) CompositeExtract 190 3 191: 6(float) CompositeExtract 190 3
192: 6(float) ImageSampleProjDrefImplicitLod 189 190 191 192: 6(float) ImageSampleProjDrefImplicitLod 189 190 191
193: 22(fvec4) CompositeConstruct 192 192 192 192 193: 22(fvec4) Load 26(color)
194: 22(fvec4) Load 26(color) 194: 22(fvec4) CompositeConstruct 192 192 192 192
195: 22(fvec4) FAdd 194 193 195: 22(fvec4) FAdd 193 194
Store 26(color) 195 Store 26(color) 195
196: 156 Load 158(shadowSampler2D) 196: 156 Load 158(shadowSampler2D)
197: 22(fvec4) Load 24(coords4D) 197: 22(fvec4) Load 24(coords4D)
198: 6(float) Load 10(bias) 198: 6(float) Load 10(bias)
199: 6(float) CompositeExtract 197 3 199: 6(float) CompositeExtract 197 3
200: 6(float) ImageSampleProjDrefImplicitLod 196 197 199 Bias 198 200: 6(float) ImageSampleProjDrefImplicitLod 196 197 199 Bias 198
201: 22(fvec4) CompositeConstruct 200 200 200 200 201: 22(fvec4) Load 26(color)
202: 22(fvec4) Load 26(color) 202: 22(fvec4) CompositeConstruct 200 200 200 200
203: 22(fvec4) FAdd 202 201 203: 22(fvec4) FAdd 201 202
Store 26(color) 203 Store 26(color) 203
Store 207(iCoords2D) 210 Store 207(iCoords2D) 210
Store 212(iLod) 213 Store 212(iLod) 213
@ -375,7 +370,7 @@ Linked fragment stage:
283: 6(float) Load 282(blend) 283: 6(float) Load 282(blend)
284: 6(float) Load 8(blendscale) 284: 6(float) Load 8(blendscale)
285: 6(float) FMul 283 284 285: 6(float) FMul 283 284
286: 22(fvec4) ExtInst 1(GLSL.std.450) 46(Mix) 277 280 285 286: 22(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 277 280 285
Store 276(gl_FragColor) 286 Store 276(gl_FragColor) 286
Return Return
FunctionEnd FunctionEnd

View File

@ -3,15 +3,15 @@ spv.texture.vert
Linked vertex stage: Linked vertex stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 145 // Id's are bound by 145
Source GLSL 130
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" EntryPoint Vertex 4 "main" 39 144
Source GLSL 130
Name 4 "main" Name 4 "main"
Name 8 "lod" Name 8 "lod"
Name 10 "coords1D" Name 10 "coords1D"
@ -29,7 +29,6 @@ Linked vertex stage:
Name 144 "gl_VertexID" Name 144 "gl_VertexID"
Decorate 140(gl_Position) BuiltIn Position Decorate 140(gl_Position) BuiltIn Position
Decorate 144(gl_VertexID) BuiltIn VertexId Decorate 144(gl_VertexID) BuiltIn VertexId
Decorate 144(gl_VertexID) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -159,36 +158,36 @@ Linked vertex stage:
105: 6(float) Load 8(lod) 105: 6(float) Load 8(lod)
106: 6(float) CompositeExtract 104 2 106: 6(float) CompositeExtract 104 2
107: 6(float) ImageSampleDrefExplicitLod 103 104 106 Lod 105 107: 6(float) ImageSampleDrefExplicitLod 103 104 106 Lod 105
108: 18(fvec4) CompositeConstruct 107 107 107 107 108: 18(fvec4) Load 23(color)
109: 18(fvec4) Load 23(color) 109: 18(fvec4) CompositeConstruct 107 107 107 107
110: 18(fvec4) FAdd 109 108 110: 18(fvec4) FAdd 108 109
Store 23(color) 110 Store 23(color) 110
115: 112 Load 114(shadowSampler2D) 115: 112 Load 114(shadowSampler2D)
116: 12(fvec3) Load 14(coords3D) 116: 12(fvec3) Load 14(coords3D)
117: 6(float) Load 8(lod) 117: 6(float) Load 8(lod)
118: 6(float) CompositeExtract 116 2 118: 6(float) CompositeExtract 116 2
119: 6(float) ImageSampleDrefExplicitLod 115 116 118 Lod 117 119: 6(float) ImageSampleDrefExplicitLod 115 116 118 Lod 117
120: 18(fvec4) CompositeConstruct 119 119 119 119 120: 18(fvec4) Load 23(color)
121: 18(fvec4) Load 23(color) 121: 18(fvec4) CompositeConstruct 119 119 119 119
122: 18(fvec4) FAdd 121 120 122: 18(fvec4) FAdd 120 121
Store 23(color) 122 Store 23(color) 122
123: 100 Load 102(shadowSampler1D) 123: 100 Load 102(shadowSampler1D)
124: 18(fvec4) Load 20(coords4D) 124: 18(fvec4) Load 20(coords4D)
125: 6(float) Load 8(lod) 125: 6(float) Load 8(lod)
126: 6(float) CompositeExtract 124 3 126: 6(float) CompositeExtract 124 3
127: 6(float) ImageSampleProjDrefExplicitLod 123 124 126 Lod 125 127: 6(float) ImageSampleProjDrefExplicitLod 123 124 126 Lod 125
128: 18(fvec4) CompositeConstruct 127 127 127 127 128: 18(fvec4) Load 23(color)
129: 18(fvec4) Load 23(color) 129: 18(fvec4) CompositeConstruct 127 127 127 127
130: 18(fvec4) FAdd 129 128 130: 18(fvec4) FAdd 128 129
Store 23(color) 130 Store 23(color) 130
131: 112 Load 114(shadowSampler2D) 131: 112 Load 114(shadowSampler2D)
132: 18(fvec4) Load 20(coords4D) 132: 18(fvec4) Load 20(coords4D)
133: 6(float) Load 8(lod) 133: 6(float) Load 8(lod)
134: 6(float) CompositeExtract 132 3 134: 6(float) CompositeExtract 132 3
135: 6(float) ImageSampleProjDrefExplicitLod 131 132 134 Lod 133 135: 6(float) ImageSampleProjDrefExplicitLod 131 132 134 Lod 133
136: 18(fvec4) CompositeConstruct 135 135 135 135 136: 18(fvec4) Load 23(color)
137: 18(fvec4) Load 23(color) 137: 18(fvec4) CompositeConstruct 135 135 135 135
138: 18(fvec4) FAdd 137 136 138: 18(fvec4) FAdd 136 137
Store 23(color) 138 Store 23(color) 138
141: 18(fvec4) Load 23(color) 141: 18(fvec4) Load 23(color)
Store 140(gl_Position) 141 Store 140(gl_Position) 141

View File

@ -3,16 +3,16 @@ spv.types.frag
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 263 // Id's are bound by 268
Source GLSL 130
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 94 104 114 124 134 144 154 164
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main" Name 4 "main"
Name 8 "b" Name 8 "b"
Name 10 "u_b" Name 10 "u_b"
@ -55,11 +55,6 @@ Linked fragment stage:
Decorate 104(i_i2) Flat Decorate 104(i_i2) Flat
Decorate 114(i_i3) Flat Decorate 114(i_i3) Flat
Decorate 124(i_i4) Flat Decorate 124(i_i4) Flat
Decorate 134(i_f) Smooth
Decorate 144(i_f2) Smooth
Decorate 154(i_f3) Smooth
Decorate 164(i_f4) Smooth
Decorate 168(gl_FragColor) BuiltIn FragColor
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeBool 6: TypeBool
@ -132,8 +127,13 @@ Linked fragment stage:
164(i_f4): 163(ptr) Variable Input 164(i_f4): 163(ptr) Variable Input
167: TypePointer Output 157(fvec4) 167: TypePointer Output 157(fvec4)
168(gl_FragColor): 167(ptr) Variable Output 168(gl_FragColor): 167(ptr) Variable Output
260: 127(float) Constant 1065353216 201: TypeInt 32 0
261: 157(fvec4) ConstantComposite 260 260 260 260 202: 201(int) Constant 0
206: 201(int) Constant 1
216: 201(int) Constant 2
229: 201(int) Constant 3
265: 127(float) Constant 1065353216
266: 157(fvec4) ConstantComposite 265 265 265 265
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
8(b): 7(ptr) Variable Function 8(b): 7(ptr) Variable Function
@ -271,74 +271,74 @@ Linked fragment stage:
196: 6(bool) CompositeExtract 195 3 196: 6(bool) CompositeExtract 195 3
197: 6(bool) LogicalOr 194 196 197: 6(bool) LogicalOr 194 196
SelectionMerge 199 None SelectionMerge 199 None
BranchConditional 197 198 259 BranchConditional 197 198 264
198: Label 198: Label
200: 87(int) Load 89(i) 200: 87(int) Load 89(i)
201: 97(ivec2) Load 99(i2) 203: 88(ptr) AccessChain 99(i2) 202
202: 87(int) CompositeExtract 201 0 204: 87(int) Load 203
203: 87(int) IAdd 200 202 205: 87(int) IAdd 200 204
204: 97(ivec2) Load 99(i2) 207: 88(ptr) AccessChain 99(i2) 206
205: 87(int) CompositeExtract 204 1 208: 87(int) Load 207
206: 87(int) IAdd 203 205 209: 87(int) IAdd 205 208
207: 107(ivec3) Load 109(i3) 210: 88(ptr) AccessChain 109(i3) 202
208: 87(int) CompositeExtract 207 0 211: 87(int) Load 210
209: 87(int) IAdd 206 208
210: 107(ivec3) Load 109(i3)
211: 87(int) CompositeExtract 210 1
212: 87(int) IAdd 209 211 212: 87(int) IAdd 209 211
213: 107(ivec3) Load 109(i3) 213: 88(ptr) AccessChain 109(i3) 206
214: 87(int) CompositeExtract 213 2 214: 87(int) Load 213
215: 87(int) IAdd 212 214 215: 87(int) IAdd 212 214
216: 117(ivec4) Load 119(i4) 217: 88(ptr) AccessChain 109(i3) 216
217: 87(int) CompositeExtract 216 0 218: 87(int) Load 217
218: 87(int) IAdd 215 217 219: 87(int) IAdd 215 218
219: 117(ivec4) Load 119(i4) 220: 88(ptr) AccessChain 119(i4) 202
220: 87(int) CompositeExtract 219 1 221: 87(int) Load 220
221: 87(int) IAdd 218 220 222: 87(int) IAdd 219 221
222: 117(ivec4) Load 119(i4) 223: 88(ptr) AccessChain 119(i4) 206
223: 87(int) CompositeExtract 222 2 224: 87(int) Load 223
224: 87(int) IAdd 221 223 225: 87(int) IAdd 222 224
225: 117(ivec4) Load 119(i4) 226: 88(ptr) AccessChain 119(i4) 216
226: 87(int) CompositeExtract 225 3 227: 87(int) Load 226
227: 87(int) IAdd 224 226 228: 87(int) IAdd 225 227
228: 127(float) ConvertSToF 227 230: 88(ptr) AccessChain 119(i4) 229
229: 127(float) Load 129(f) 231: 87(int) Load 230
230: 127(float) FAdd 228 229 232: 87(int) IAdd 228 231
231: 137(fvec2) Load 139(f2) 233: 127(float) ConvertSToF 232
232: 127(float) CompositeExtract 231 0 234: 127(float) Load 129(f)
233: 127(float) FAdd 230 232 235: 127(float) FAdd 233 234
234: 137(fvec2) Load 139(f2) 236: 128(ptr) AccessChain 139(f2) 202
235: 127(float) CompositeExtract 234 1 237: 127(float) Load 236
236: 127(float) FAdd 233 235 238: 127(float) FAdd 235 237
237: 147(fvec3) Load 149(f3) 239: 128(ptr) AccessChain 139(f2) 206
238: 127(float) CompositeExtract 237 0 240: 127(float) Load 239
239: 127(float) FAdd 236 238 241: 127(float) FAdd 238 240
240: 147(fvec3) Load 149(f3) 242: 128(ptr) AccessChain 149(f3) 202
241: 127(float) CompositeExtract 240 1 243: 127(float) Load 242
242: 127(float) FAdd 239 241 244: 127(float) FAdd 241 243
243: 147(fvec3) Load 149(f3) 245: 128(ptr) AccessChain 149(f3) 206
244: 127(float) CompositeExtract 243 2 246: 127(float) Load 245
245: 127(float) FAdd 242 244 247: 127(float) FAdd 244 246
246: 157(fvec4) Load 159(f4) 248: 128(ptr) AccessChain 149(f3) 216
247: 127(float) CompositeExtract 246 0 249: 127(float) Load 248
248: 127(float) FAdd 245 247 250: 127(float) FAdd 247 249
249: 157(fvec4) Load 159(f4) 251: 128(ptr) AccessChain 159(f4) 202
250: 127(float) CompositeExtract 249 1 252: 127(float) Load 251
251: 127(float) FAdd 248 250 253: 127(float) FAdd 250 252
252: 157(fvec4) Load 159(f4) 254: 128(ptr) AccessChain 159(f4) 206
253: 127(float) CompositeExtract 252 2 255: 127(float) Load 254
254: 127(float) FAdd 251 253 256: 127(float) FAdd 253 255
255: 157(fvec4) Load 159(f4) 257: 128(ptr) AccessChain 159(f4) 216
256: 127(float) CompositeExtract 255 3 258: 127(float) Load 257
257: 127(float) FAdd 254 256 259: 127(float) FAdd 256 258
258: 157(fvec4) CompositeConstruct 257 257 257 257 260: 128(ptr) AccessChain 159(f4) 229
Store 169 258 261: 127(float) Load 260
262: 127(float) FAdd 259 261
263: 157(fvec4) CompositeConstruct 262 262 262 262
Store 169 263
Branch 199 Branch 199
259: Label 264: Label
Store 169 261 Store 169 266
Branch 199 Branch 199
199: Label 199: Label
262: 157(fvec4) Load 169 267: 157(fvec4) Load 169
Store 168(gl_FragColor) 262 Store 168(gl_FragColor) 267
Return Return
FunctionEnd FunctionEnd

View File

@ -3,64 +3,58 @@ spv.uint.frag
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 206 // Id's are bound by 207
Source ESSL 300
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 15 200 77 68
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source ESSL 300
Name 4 "main" Name 4 "main"
Name 8 "count" Name 8 "count"
Name 12 "u" Name 12 "u"
Name 15 "t" Name 15 "t"
Name 53 "shiftedii" Name 55 "shiftedii"
Name 55 "shiftedui" Name 57 "shiftedui"
Name 57 "shiftediu" Name 59 "shiftediu"
Name 58 "shifteduu" Name 60 "shifteduu"
Name 66 "c" Name 68 "c"
Name 70 "usampler" Name 72 "usampler"
Name 75 "tc" Name 77 "tc"
Name 108 "af" Name 111 "af"
Name 112 "ab" Name 115 "ab"
Name 116 "ai" Name 118 "ai"
Name 151 "mask1" Name 152 "mask1"
Name 153 "mask2" Name 154 "mask2"
Name 155 "mask3" Name 156 "mask3"
Name 159 "mask4" Name 160 "mask4"
Name 199 "f" Name 200 "f"
Name 201 "v" Name 202 "v"
Name 203 "i" Name 204 "i"
Name 205 "b" Name 206 "b"
Decorate 8(count) RelaxedPrecision Decorate 8(count) RelaxedPrecision
Decorate 12(u) RelaxedPrecision Decorate 12(u) RelaxedPrecision
Decorate 15(t) RelaxedPrecision Decorate 15(t) RelaxedPrecision
Decorate 15(t) Flat Decorate 15(t) Flat
Decorate 53(shiftedii) RelaxedPrecision Decorate 55(shiftedii) RelaxedPrecision
Decorate 55(shiftedui) RelaxedPrecision Decorate 57(shiftedui) RelaxedPrecision
Decorate 57(shiftediu) RelaxedPrecision Decorate 59(shiftediu) RelaxedPrecision
Decorate 58(shifteduu) RelaxedPrecision Decorate 60(shifteduu) RelaxedPrecision
Decorate 66(c) RelaxedPrecision Decorate 68(c) RelaxedPrecision
Decorate 70(usampler) RelaxedPrecision Decorate 72(usampler) RelaxedPrecision
Decorate 75(tc) RelaxedPrecision Decorate 77(tc) RelaxedPrecision
Decorate 75(tc) Smooth Decorate 111(af) RelaxedPrecision
Decorate 108(af) RelaxedPrecision Decorate 118(ai) RelaxedPrecision
Decorate 116(ai) RelaxedPrecision Decorate 152(mask1) RelaxedPrecision
Decorate 151(mask1) RelaxedPrecision Decorate 154(mask2) RelaxedPrecision
Decorate 153(mask2) RelaxedPrecision Decorate 156(mask3) RelaxedPrecision
Decorate 155(mask3) RelaxedPrecision Decorate 160(mask4) RelaxedPrecision
Decorate 159(mask4) RelaxedPrecision Decorate 200(f) RelaxedPrecision
Decorate 199(f) RelaxedPrecision Decorate 202(v) RelaxedPrecision
Decorate 199(f) Smooth Decorate 204(i) RelaxedPrecision
Decorate 199(f) NoStaticUse
Decorate 201(v) RelaxedPrecision
Decorate 201(v) NoStaticUse
Decorate 203(i) RelaxedPrecision
Decorate 203(i) NoStaticUse
Decorate 205(b) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1
@ -71,285 +65,286 @@ Linked fragment stage:
13: TypeVector 10(int) 2 13: TypeVector 10(int) 2
14: TypePointer Input 13(ivec2) 14: TypePointer Input 13(ivec2)
15(t): 14(ptr) Variable Input 15(t): 14(ptr) Variable Input
18: 10(int) Constant 3 16: 10(int) Constant 1
20: TypeBool 17: TypePointer Input 10(int)
21: 20(bool) ConstantTrue 20: 10(int) Constant 3
24: 6(int) Constant 2 22: TypeBool
29: 6(int) Constant 3 23: 22(bool) ConstantTrue
32: 20(bool) ConstantFalse 26: 6(int) Constant 2
35: 6(int) Constant 5 31: 6(int) Constant 3
40: 6(int) Constant 7 34: 22(bool) ConstantFalse
45: 6(int) Constant 11 37: 6(int) Constant 5
50: 6(int) Constant 13 42: 6(int) Constant 7
54: 6(int) Constant 4294967295 47: 6(int) Constant 11
56: 10(int) Constant 4194303 52: 6(int) Constant 13
64: TypeVector 10(int) 4 56: 6(int) Constant 4294967295
65: TypePointer Output 64(ivec4) 58: 10(int) Constant 4194303
66(c): 65(ptr) Variable Output 66: TypeVector 10(int) 4
67: TypeImage 10(int) 2D sampled format:Unknown 67: TypePointer Output 66(ivec4)
68: TypeSampledImage 67 68(c): 67(ptr) Variable Output
69: TypePointer UniformConstant 68 69: TypeImage 10(int) 2D sampled format:Unknown
70(usampler): 69(ptr) Variable UniformConstant 70: TypeSampledImage 69
72: TypeFloat 32 71: TypePointer UniformConstant 70
73: TypeVector 72(float) 2 72(usampler): 71(ptr) Variable UniformConstant
74: TypePointer Input 73(fvec2) 74: TypeFloat 32
75(tc): 74(ptr) Variable Input 75: TypeVector 74(float) 2
85: 72(float) Constant 1065353216 76: TypePointer Input 75(fvec2)
97: 72(float) Constant 1073741824 77(tc): 76(ptr) Variable Input
98: 73(fvec2) ConstantComposite 97 97 87: 74(float) Constant 1065353216
103: 10(int) Constant 4 99: 74(float) Constant 1073741824
107: TypePointer Function 72(float) 100: 75(fvec2) ConstantComposite 99 99
111: TypePointer Function 20(bool) 103: 10(int) Constant 0
114: 10(int) Constant 0 106: 10(int) Constant 4
122: 10(int) Constant 1 110: TypePointer Function 74(float)
133: 6(int) Constant 17 114: TypePointer Function 22(bool)
138: 6(int) Constant 19 134: 6(int) Constant 17
143: 6(int) Constant 23 139: 6(int) Constant 19
148: 6(int) Constant 27 144: 6(int) Constant 23
152: 10(int) Constant 161 149: 6(int) Constant 27
154: 10(int) Constant 2576 153: 10(int) Constant 161
157: 6(int) Constant 4 155: 10(int) Constant 2576
160: 10(int) Constant 2737 158: 6(int) Constant 4
198: TypePointer Input 72(float) 161: 10(int) Constant 2737
199(f): 198(ptr) Variable Input 199: TypePointer Input 74(float)
200: TypePointer UniformConstant 64(ivec4) 200(f): 199(ptr) Variable Input
201(v): 200(ptr) Variable UniformConstant 201: TypePointer UniformConstant 66(ivec4)
202: TypePointer UniformConstant 6(int) 202(v): 201(ptr) Variable UniformConstant
203(i): 202(ptr) Variable UniformConstant 203: TypePointer UniformConstant 6(int)
204: TypePointer UniformConstant 20(bool) 204(i): 203(ptr) Variable UniformConstant
205(b): 204(ptr) Variable UniformConstant 205: TypePointer UniformConstant 22(bool)
206(b): 205(ptr) Variable UniformConstant
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
8(count): 7(ptr) Variable Function 8(count): 7(ptr) Variable Function
12(u): 11(ptr) Variable Function 12(u): 11(ptr) Variable Function
53(shiftedii): 7(ptr) Variable Function 55(shiftedii): 7(ptr) Variable Function
55(shiftedui): 11(ptr) Variable Function 57(shiftedui): 11(ptr) Variable Function
57(shiftediu): 7(ptr) Variable Function 59(shiftediu): 7(ptr) Variable Function
58(shifteduu): 11(ptr) Variable Function 60(shifteduu): 11(ptr) Variable Function
108(af): 107(ptr) Variable Function 111(af): 110(ptr) Variable Function
112(ab): 111(ptr) Variable Function 115(ab): 114(ptr) Variable Function
116(ai): 7(ptr) Variable Function 118(ai): 7(ptr) Variable Function
151(mask1): 11(ptr) Variable Function 152(mask1): 11(ptr) Variable Function
153(mask2): 11(ptr) Variable Function 154(mask2): 11(ptr) Variable Function
155(mask3): 11(ptr) Variable Function 156(mask3): 11(ptr) Variable Function
159(mask4): 11(ptr) Variable Function 160(mask4): 11(ptr) Variable Function
Store 8(count) 9 Store 8(count) 9
16: 13(ivec2) Load 15(t) 18: 17(ptr) AccessChain 15(t) 16
17: 10(int) CompositeExtract 16 1 19: 10(int) Load 18
19: 10(int) IAdd 17 18 21: 10(int) IAdd 19 20
Store 12(u) 19 Store 12(u) 21
SelectionMerge 23 None SelectionMerge 25 None
BranchConditional 21 22 23 BranchConditional 23 24 25
22: Label 24: Label
25: 6(int) Load 8(count) 27: 6(int) Load 8(count)
26: 6(int) IMul 25 24 28: 6(int) IMul 27 26
Store 8(count) 26 Store 8(count) 28
Branch 23 Branch 25
23: Label 25: Label
SelectionMerge 28 None SelectionMerge 30 None
BranchConditional 21 27 28 BranchConditional 23 29 30
27: Label 29: Label
30: 6(int) Load 8(count) 32: 6(int) Load 8(count)
31: 6(int) IMul 30 29 33: 6(int) IMul 32 31
Store 8(count) 31 Store 8(count) 33
Branch 28 Branch 30
28: Label 30: Label
SelectionMerge 34 None SelectionMerge 36 None
BranchConditional 32 33 34 BranchConditional 34 35 36
33: Label 35: Label
36: 6(int) Load 8(count) 38: 6(int) Load 8(count)
37: 6(int) IMul 36 35 39: 6(int) IMul 38 37
Store 8(count) 37 Store 8(count) 39
Branch 34 Branch 36
34: Label 36: Label
SelectionMerge 39 None SelectionMerge 41 None
BranchConditional 21 38 39 BranchConditional 23 40 41
38: Label 40: Label
41: 6(int) Load 8(count) 43: 6(int) Load 8(count)
42: 6(int) IMul 41 40 44: 6(int) IMul 43 42
Store 8(count) 42 Store 8(count) 44
Branch 39 Branch 41
39: Label 41: Label
SelectionMerge 44 None SelectionMerge 46 None
BranchConditional 21 43 44 BranchConditional 23 45 46
43: Label 45: Label
46: 6(int) Load 8(count) 48: 6(int) Load 8(count)
47: 6(int) IMul 46 45 49: 6(int) IMul 48 47
Store 8(count) 47 Store 8(count) 49
Branch 44 Branch 46
44: Label 46: Label
SelectionMerge 49 None SelectionMerge 51 None
BranchConditional 32 48 49 BranchConditional 34 50 51
48: Label 50: Label
51: 6(int) Load 8(count) 53: 6(int) Load 8(count)
52: 6(int) IMul 51 50 54: 6(int) IMul 53 52
Store 8(count) 52 Store 8(count) 54
Branch 49 Branch 51
49: Label 51: Label
Store 53(shiftedii) 54 Store 55(shiftedii) 56
Store 55(shiftedui) 56 Store 57(shiftedui) 58
Store 57(shiftediu) 54 Store 59(shiftediu) 56
Store 58(shifteduu) 56 Store 60(shifteduu) 58
59: 6(int) Load 53(shiftedii) 61: 6(int) Load 55(shiftedii)
60: 6(int) Load 57(shiftediu) 62: 6(int) Load 59(shiftediu)
61: 20(bool) IEqual 59 60 63: 22(bool) IEqual 61 62
SelectionMerge 63 None SelectionMerge 65 None
BranchConditional 61 62 63 BranchConditional 63 64 65
62: Label 64: Label
71: 68 Load 70(usampler) 73: 70 Load 72(usampler)
76: 73(fvec2) Load 75(tc) 78: 75(fvec2) Load 77(tc)
77: 64(ivec4) ImageSampleImplicitLod 71 76 79: 66(ivec4) ImageSampleImplicitLod 73 78
Store 66(c) 77 Store 68(c) 79
Branch 63 Branch 65
63: Label 65: Label
78: 10(int) Load 55(shiftedui) 80: 10(int) Load 57(shiftedui)
79: 10(int) Load 58(shifteduu) 81: 10(int) Load 60(shifteduu)
80: 20(bool) IEqual 78 79 82: 22(bool) IEqual 80 81
SelectionMerge 82 None SelectionMerge 84 None
BranchConditional 80 81 82 BranchConditional 82 83 84
81: Label 83: Label
83: 68 Load 70(usampler) 85: 70 Load 72(usampler)
84: 73(fvec2) Load 75(tc) 86: 75(fvec2) Load 77(tc)
86: 73(fvec2) CompositeConstruct 85 85 88: 75(fvec2) CompositeConstruct 87 87
87: 73(fvec2) FAdd 84 86 89: 75(fvec2) FAdd 86 88
88: 64(ivec4) ImageSampleImplicitLod 83 87 90: 66(ivec4) ImageSampleImplicitLod 85 89
Store 66(c) 88 Store 68(c) 90
Branch 82 Branch 84
82: Label 84: Label
89: 6(int) Load 53(shiftedii) 91: 6(int) Load 55(shiftedii)
90: 10(int) Load 55(shiftedui) 92: 10(int) Load 57(shiftedui)
91: 6(int) Bitcast 90 93: 6(int) Bitcast 92
92: 20(bool) IEqual 89 91 94: 22(bool) IEqual 91 93
SelectionMerge 94 None SelectionMerge 96 None
BranchConditional 92 93 94 BranchConditional 94 95 96
93: Label 95: Label
95: 68 Load 70(usampler) 97: 70 Load 72(usampler)
96: 73(fvec2) Load 75(tc) 98: 75(fvec2) Load 77(tc)
99: 73(fvec2) FSub 96 98 101: 75(fvec2) FSub 98 100
100: 64(ivec4) ImageSampleImplicitLod 95 99 102: 66(ivec4) ImageSampleImplicitLod 97 101
Store 66(c) 100 Store 68(c) 102
Branch 94 Branch 96
94: Label 96: Label
101: 13(ivec2) Load 15(t) 104: 17(ptr) AccessChain 15(t) 103
102: 10(int) CompositeExtract 101 0 105: 10(int) Load 104
104: 20(bool) UGreaterThan 102 103 107: 22(bool) UGreaterThan 105 106
SelectionMerge 106 None SelectionMerge 109 None
BranchConditional 104 105 106 BranchConditional 107 108 109
105: Label 108: Label
109: 10(int) Load 12(u) 112: 10(int) Load 12(u)
110: 72(float) ConvertUToF 109 113: 74(float) ConvertUToF 112
Store 108(af) 110 Store 111(af) 113
113: 10(int) Load 12(u) 116: 10(int) Load 12(u)
115: 20(bool) INotEqual 113 114 117: 22(bool) INotEqual 116 103
Store 112(ab) 115 Store 115(ab) 117
117: 10(int) Load 12(u) 119: 10(int) Load 12(u)
118: 6(int) Bitcast 117 120: 6(int) Bitcast 119
Store 116(ai) 118 Store 118(ai) 120
119: 72(float) Load 108(af) 121: 74(float) Load 111(af)
120: 10(int) ConvertFToU 119 122: 10(int) ConvertFToU 121
121: 20(bool) Load 112(ab) 123: 22(bool) Load 115(ab)
123: 10(int) Select 121 122 114 124: 10(int) Select 123 16 103
124: 6(int) Load 116(ai) 125: 6(int) Load 118(ai)
125: 10(int) Bitcast 124 126: 10(int) Bitcast 125
126: 6(int) Load 8(count) 127: 6(int) Load 8(count)
127: 10(int) Bitcast 126 128: 10(int) Bitcast 127
128: 64(ivec4) CompositeConstruct 120 123 125 127 129: 66(ivec4) CompositeConstruct 122 124 126 128
129: 64(ivec4) Load 66(c) 130: 66(ivec4) Load 68(c)
130: 64(ivec4) IAdd 129 128 131: 66(ivec4) IAdd 130 129
Store 66(c) 130 Store 68(c) 131
Branch 106 Branch 109
106: Label 109: Label
SelectionMerge 132 None SelectionMerge 133 None
BranchConditional 21 131 132 BranchConditional 23 132 133
131: Label 132: Label
134: 6(int) Load 8(count) 135: 6(int) Load 8(count)
135: 6(int) IMul 134 133 136: 6(int) IMul 135 134
Store 8(count) 135 Store 8(count) 136
Branch 132 Branch 133
132: Label 133: Label
SelectionMerge 137 None SelectionMerge 138 None
BranchConditional 32 136 137 BranchConditional 34 137 138
136: Label 137: Label
139: 6(int) Load 8(count) 140: 6(int) Load 8(count)
140: 6(int) IMul 139 138 141: 6(int) IMul 140 139
Store 8(count) 140 Store 8(count) 141
Branch 137 Branch 138
137: Label 138: Label
SelectionMerge 142 None SelectionMerge 143 None
BranchConditional 21 141 142 BranchConditional 23 142 143
141: Label 142: Label
144: 6(int) Load 8(count) 145: 6(int) Load 8(count)
145: 6(int) IMul 144 143 146: 6(int) IMul 145 144
Store 8(count) 145 Store 8(count) 146
Branch 142 Branch 143
142: Label 143: Label
SelectionMerge 147 None SelectionMerge 148 None
BranchConditional 21 146 147 BranchConditional 23 147 148
146: Label 147: Label
149: 6(int) Load 8(count) 150: 6(int) Load 8(count)
150: 6(int) IMul 149 148 151: 6(int) IMul 150 149
Store 8(count) 150 Store 8(count) 151
Branch 147 Branch 148
147: Label 148: Label
Store 151(mask1) 152 Store 152(mask1) 153
Store 153(mask2) 154 Store 154(mask2) 155
156: 10(int) Load 151(mask1) 157: 10(int) Load 152(mask1)
158: 10(int) ShiftLeftLogical 156 157 159: 10(int) ShiftLeftLogical 157 158
Store 155(mask3) 158 Store 156(mask3) 159
Store 159(mask4) 160 Store 160(mask4) 161
161: 10(int) Load 155(mask3) 162: 10(int) Load 156(mask3)
162: 10(int) Load 153(mask2) 163: 10(int) Load 154(mask2)
163: 20(bool) IEqual 161 162 164: 22(bool) IEqual 162 163
SelectionMerge 165 None SelectionMerge 166 None
BranchConditional 163 164 165 BranchConditional 164 165 166
164: Label 165: Label
166: 6(int) Load 8(count) 167: 6(int) Load 8(count)
167: 6(int) IMul 166 24 168: 6(int) IMul 167 26
Store 8(count) 167 Store 8(count) 168
Branch 165 Branch 166
165: Label 166: Label
168: 10(int) Load 155(mask3) 169: 10(int) Load 156(mask3)
169: 10(int) Load 151(mask1) 170: 10(int) Load 152(mask1)
170: 10(int) BitwiseAnd 168 169 171: 10(int) BitwiseAnd 169 170
171: 20(bool) INotEqual 170 114 172: 22(bool) INotEqual 171 103
SelectionMerge 173 None SelectionMerge 174 None
BranchConditional 171 172 173 BranchConditional 172 173 174
172: Label 173: Label
174: 6(int) Load 8(count) 175: 6(int) Load 8(count)
175: 6(int) IMul 174 29 176: 6(int) IMul 175 31
Store 8(count) 175 Store 8(count) 176
Branch 173 Branch 174
173: Label 174: Label
176: 10(int) Load 151(mask1) 177: 10(int) Load 152(mask1)
177: 10(int) Load 155(mask3) 178: 10(int) Load 156(mask3)
178: 10(int) BitwiseOr 176 177 179: 10(int) BitwiseOr 177 178
179: 10(int) Load 159(mask4) 180: 10(int) Load 160(mask4)
180: 20(bool) IEqual 178 179 181: 22(bool) IEqual 179 180
SelectionMerge 182 None SelectionMerge 183 None
BranchConditional 180 181 182 BranchConditional 181 182 183
181: Label 182: Label
183: 6(int) Load 8(count) 184: 6(int) Load 8(count)
184: 6(int) IMul 183 35 185: 6(int) IMul 184 37
Store 8(count) 184 Store 8(count) 185
Branch 182 Branch 183
182: Label 183: Label
185: 10(int) Load 151(mask1) 186: 10(int) Load 152(mask1)
186: 10(int) Load 159(mask4) 187: 10(int) Load 160(mask4)
187: 10(int) BitwiseXor 185 186 188: 10(int) BitwiseXor 186 187
188: 20(bool) IEqual 187 154 189: 22(bool) IEqual 188 155
SelectionMerge 190 None SelectionMerge 191 None
BranchConditional 188 189 190 BranchConditional 189 190 191
189: Label 190: Label
191: 6(int) Load 8(count) 192: 6(int) Load 8(count)
192: 6(int) IMul 191 40 193: 6(int) IMul 192 42
Store 8(count) 192 Store 8(count) 193
Branch 190 Branch 191
190: Label 191: Label
193: 6(int) Load 8(count) 194: 6(int) Load 8(count)
194: 10(int) Bitcast 193 195: 10(int) Bitcast 194
195: 64(ivec4) CompositeConstruct 194 194 194 194 196: 66(ivec4) CompositeConstruct 195 195 195 195
196: 64(ivec4) Load 66(c) 197: 66(ivec4) Load 68(c)
197: 64(ivec4) IAdd 196 195 198: 66(ivec4) IAdd 197 196
Store 66(c) 197 Store 68(c) 198
Return Return
FunctionEnd FunctionEnd

View File

@ -3,25 +3,23 @@ spv.uniformArray.frag
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 52 // Id's are bound by 53
Source GLSL 130
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main"
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main" Name 4 "main"
Name 9 "texColor" Name 9 "texColor"
Name 14 "color" Name 14 "color"
Name 25 "inColor" Name 25 "inColor"
Name 35 "alpha" Name 35 "alpha"
Name 46 "gl_FragColor" Name 47 "gl_FragColor"
Name 51 "texSampler2D" Name 52 "texSampler2D"
Decorate 46(gl_FragColor) BuiltIn FragColor
Decorate 51(texSampler2D) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -44,12 +42,14 @@ Linked fragment stage:
35(alpha): 34(ptr) Variable UniformConstant 35(alpha): 34(ptr) Variable UniformConstant
36: 15(int) Constant 12 36: 15(int) Constant 12
37: TypePointer UniformConstant 6(float) 37: TypePointer UniformConstant 6(float)
45: TypePointer Output 7(fvec4) 40: 10(int) Constant 3
46(gl_FragColor): 45(ptr) Variable Output 41: TypePointer Function 6(float)
48: TypeImage 6(float) 2D sampled format:Unknown 46: TypePointer Output 7(fvec4)
49: TypeSampledImage 48 47(gl_FragColor): 46(ptr) Variable Output
50: TypePointer UniformConstant 49 49: TypeImage 6(float) 2D sampled format:Unknown
51(texSampler2D): 50(ptr) Variable UniformConstant 50: TypeSampledImage 49
51: TypePointer UniformConstant 50
52(texSampler2D): 51(ptr) Variable UniformConstant
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
9(texColor): 8(ptr) Variable Function 9(texColor): 8(ptr) Variable Function
@ -68,13 +68,12 @@ Linked fragment stage:
Store 9(texColor) 31 Store 9(texColor) 31
38: 37(ptr) AccessChain 35(alpha) 36 38: 37(ptr) AccessChain 35(alpha) 36
39: 6(float) Load 38 39: 6(float) Load 38
40: 7(fvec4) Load 9(texColor) 42: 41(ptr) AccessChain 9(texColor) 40
41: 6(float) CompositeExtract 40 3 43: 6(float) Load 42
42: 6(float) FAdd 41 39 44: 6(float) FAdd 43 39
43: 7(fvec4) Load 9(texColor) 45: 41(ptr) AccessChain 9(texColor) 40
44: 7(fvec4) CompositeInsert 42 43 3 Store 45 44
Store 9(texColor) 44 48: 7(fvec4) Load 9(texColor)
47: 7(fvec4) Load 9(texColor) Store 47(gl_FragColor) 48
Store 46(gl_FragColor) 47
Return Return
FunctionEnd FunctionEnd

View File

@ -5,16 +5,16 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 93 // Id's are bound by 93
Source GLSL 130
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 63
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main" Name 4 "main"
Name 8 "iLocal" Name 8 "iLocal"
Name 10 "Count" Name 10 "Count"
@ -35,11 +35,9 @@ Linked fragment stage:
Name 34 "foo2" Name 34 "foo2"
Name 36 "foo" Name 36 "foo"
Name 54 "gl_FragColor" Name 54 "gl_FragColor"
Name 59 "sampler" Name 59 "samp2D"
Name 63 "coord" Name 63 "coord"
Name 69 "constructed" Name 69 "constructed"
Decorate 54(gl_FragColor) BuiltIn FragColor
Decorate 63(coord) Smooth
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1
@ -73,7 +71,7 @@ Linked fragment stage:
56: TypeImage 12(float) 2D sampled format:Unknown 56: TypeImage 12(float) 2D sampled format:Unknown
57: TypeSampledImage 56 57: TypeSampledImage 56
58: TypePointer UniformConstant 57 58: TypePointer UniformConstant 57
59(sampler): 58(ptr) Variable UniformConstant 59(samp2D): 58(ptr) Variable UniformConstant
61: TypeVector 12(float) 2 61: TypeVector 12(float) 2
62: TypePointer Input 61(fvec2) 62: TypePointer Input 61(fvec2)
63(coord): 62(ptr) Variable Input 63(coord): 62(ptr) Variable Input
@ -116,7 +114,7 @@ Linked fragment stage:
Branch 28 Branch 28
28: Label 28: Label
55: 12(float) Load 30(scale) 55: 12(float) Load 30(scale)
60: 57 Load 59(sampler) 60: 57 Load 59(samp2D)
64: 61(fvec2) Load 63(coord) 64: 61(fvec2) Load 63(coord)
65: 52(fvec4) ImageSampleImplicitLod 60 64 65: 52(fvec4) ImageSampleImplicitLod 60 64
66: 52(fvec4) VectorTimesScalar 65 55 66: 52(fvec4) VectorTimesScalar 65 55

View File

@ -8,29 +8,24 @@ WARNING: 0:8: varying deprecated in version 130; may be removed in future releas
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 61 // Id's are bound by 61
Source GLSL 130
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 34 39 19 19 48
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main" Name 4 "main"
Name 9 "texColor" Name 9 "texColor"
Name 13 "texSampler2D" Name 13 "texSampler2D"
Name 19 "gl_TexCoord" Name 19 "gl_TexCoord"
Name 34 "color" Name 34 "color"
Name 39 "alpha" Name 39 "alpha"
Name 44 "gl_FragColor" Name 45 "gl_FragColor"
Name 48 "foo" Name 48 "foo"
Decorate 19(gl_TexCoord) Smooth
Decorate 34(color) Smooth
Decorate 39(alpha) Smooth
Decorate 44(gl_FragColor) BuiltIn FragColor
Decorate 48(foo) Smooth
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -53,10 +48,11 @@ Linked fragment stage:
34(color): 22(ptr) Variable Input 34(color): 22(ptr) Variable Input
38: TypePointer Input 6(float) 38: TypePointer Input 6(float)
39(alpha): 38(ptr) Variable Input 39(alpha): 38(ptr) Variable Input
43: TypePointer Output 7(fvec4) 41: 15(int) Constant 3
44(gl_FragColor): 43(ptr) Variable Output 42: TypePointer Function 6(float)
45: 15(int) Constant 3 44: TypePointer Output 7(fvec4)
46: TypeArray 7(fvec4) 45 45(gl_FragColor): 44(ptr) Variable Output
46: TypeArray 7(fvec4) 41
47: TypePointer Input 46 47: TypePointer Input 46
48(foo): 47(ptr) Variable Input 48(foo): 47(ptr) Variable Input
49: 20(int) Constant 1 49: 20(int) Constant 1
@ -80,9 +76,8 @@ Linked fragment stage:
37: 7(fvec4) FAdd 36 35 37: 7(fvec4) FAdd 36 35
Store 9(texColor) 37 Store 9(texColor) 37
40: 6(float) Load 39(alpha) 40: 6(float) Load 39(alpha)
41: 7(fvec4) Load 9(texColor) 43: 42(ptr) AccessChain 9(texColor) 41
42: 7(fvec4) CompositeInsert 40 41 3 Store 43 40
Store 9(texColor) 42
50: 22(ptr) AccessChain 48(foo) 49 50: 22(ptr) AccessChain 48(foo) 49
51: 7(fvec4) Load 50 51: 7(fvec4) Load 50
53: 22(ptr) AccessChain 19(gl_TexCoord) 52 53: 22(ptr) AccessChain 19(gl_TexCoord) 52
@ -93,6 +88,6 @@ Linked fragment stage:
58: 7(fvec4) FAdd 55 57 58: 7(fvec4) FAdd 55 57
59: 7(fvec4) Load 9(texColor) 59: 7(fvec4) Load 9(texColor)
60: 7(fvec4) FAdd 58 59 60: 7(fvec4) FAdd 58 59
Store 44(gl_FragColor) 60 Store 45(gl_FragColor) 60
Return Return
FunctionEnd FunctionEnd

View File

@ -8,16 +8,16 @@ WARNING: 0:8: varying deprecated in version 130; may be removed in future releas
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 69 // Id's are bound by 70
Source GLSL 130
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 45 50 30 30 19
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main" Name 4 "main"
Name 9 "texColor" Name 9 "texColor"
Name 13 "texSampler2D" Name 13 "texSampler2D"
@ -27,12 +27,7 @@ Linked fragment stage:
Name 31 "a" Name 31 "a"
Name 45 "color" Name 45 "color"
Name 50 "alpha" Name 50 "alpha"
Name 55 "gl_FragColor" Name 56 "gl_FragColor"
Decorate 19(userIn) Smooth
Decorate 30(gl_TexCoord) Smooth
Decorate 45(color) Smooth
Decorate 50(alpha) Smooth
Decorate 55(gl_FragColor) BuiltIn FragColor
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -61,9 +56,11 @@ Linked fragment stage:
45(color): 24(ptr) Variable Input 45(color): 24(ptr) Variable Input
49: TypePointer Input 6(float) 49: TypePointer Input 6(float)
50(alpha): 49(ptr) Variable Input 50(alpha): 49(ptr) Variable Input
54: TypePointer Output 7(fvec4) 52: 15(int) Constant 3
55(gl_FragColor): 54(ptr) Variable Output 53: TypePointer Function 6(float)
56: 20(int) Constant 0 55: TypePointer Output 7(fvec4)
56(gl_FragColor): 55(ptr) Variable Output
57: 20(int) Constant 0
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
9(texColor): 8(ptr) Variable Function 9(texColor): 8(ptr) Variable Function
@ -88,21 +85,20 @@ Linked fragment stage:
48: 7(fvec4) FAdd 47 46 48: 7(fvec4) FAdd 47 46
Store 9(texColor) 48 Store 9(texColor) 48
51: 6(float) Load 50(alpha) 51: 6(float) Load 50(alpha)
52: 7(fvec4) Load 9(texColor) 54: 53(ptr) AccessChain 9(texColor) 52
53: 7(fvec4) CompositeInsert 51 52 3 Store 54 51
Store 9(texColor) 53 58: 24(ptr) AccessChain 30(gl_TexCoord) 57
57: 24(ptr) AccessChain 30(gl_TexCoord) 56 59: 7(fvec4) Load 58
58: 7(fvec4) Load 57 60: 20(int) Load 22(b)
59: 20(int) Load 22(b) 61: 24(ptr) AccessChain 30(gl_TexCoord) 60
60: 24(ptr) AccessChain 30(gl_TexCoord) 59 62: 7(fvec4) Load 61
61: 7(fvec4) Load 60 63: 7(fvec4) FAdd 59 62
62: 7(fvec4) FAdd 58 61 64: 7(fvec4) Load 9(texColor)
63: 7(fvec4) Load 9(texColor) 65: 7(fvec4) FAdd 63 64
64: 7(fvec4) FAdd 62 63 66: 20(int) Load 31(a)
65: 20(int) Load 31(a) 67: 24(ptr) AccessChain 19(userIn) 66
66: 24(ptr) AccessChain 19(userIn) 65 68: 7(fvec4) Load 67
67: 7(fvec4) Load 66 69: 7(fvec4) FAdd 65 68
68: 7(fvec4) FAdd 64 67 Store 56(gl_FragColor) 69
Store 55(gl_FragColor) 68
Return Return
FunctionEnd FunctionEnd

View File

@ -3,46 +3,45 @@ spv.voidFunction.frag
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 42 // Id's are bound by 44
Source GLSL 120
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 41
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 120
Name 4 "main" Name 4 "main"
Name 6 "foo(" Name 6 "foo("
Name 8 "foo2(" Name 8 "foo2("
Name 12 "bar" Name 12 "bar"
Name 22 "outColor" Name 22 "outColor"
Name 24 "bigColor" Name 24 "bigColor"
Name 35 "gl_FragColor" Name 37 "gl_FragColor"
Name 39 "BaseColor" Name 41 "BaseColor"
Name 41 "d" Name 43 "d"
Decorate 35(gl_FragColor) BuiltIn FragColor
Decorate 39(BaseColor) Smooth
Decorate 39(BaseColor) NoStaticUse
Decorate 41(d) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
10: TypeFloat 32 10: TypeFloat 32
11: TypePointer PrivateGlobal 10(float) 11: TypePointer Private 10(float)
12(bar): 11(ptr) Variable PrivateGlobal 12(bar): 11(ptr) Variable Private
13: 10(float) Constant 1073741824 13: 10(float) Constant 1073741824
15: 10(float) Constant 1065353216 15: 10(float) Constant 1065353216
20: TypeVector 10(float) 4 20: TypeVector 10(float) 4
21: TypePointer Function 20(fvec4) 21: TypePointer Function 20(fvec4)
23: TypePointer UniformConstant 20(fvec4) 23: TypePointer UniformConstant 20(fvec4)
24(bigColor): 23(ptr) Variable UniformConstant 24(bigColor): 23(ptr) Variable UniformConstant
34: TypePointer Output 20(fvec4) 29: TypeInt 32 0
35(gl_FragColor): 34(ptr) Variable Output 30: 29(int) Constant 0
38: TypePointer Input 20(fvec4) 31: TypePointer Function 10(float)
39(BaseColor): 38(ptr) Variable Input 36: TypePointer Output 20(fvec4)
40: TypePointer UniformConstant 10(float) 37(gl_FragColor): 36(ptr) Variable Output
41(d): 40(ptr) Variable UniformConstant 40: TypePointer Input 20(fvec4)
41(BaseColor): 40(ptr) Variable Input
42: TypePointer UniformConstant 10(float)
43(d): 42(ptr) Variable UniformConstant
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
22(outColor): 21(ptr) Variable Function 22(outColor): 21(ptr) Variable Function
@ -52,14 +51,13 @@ Linked fragment stage:
26: 2 FunctionCall 6(foo() 26: 2 FunctionCall 6(foo()
27: 2 FunctionCall 8(foo2() 27: 2 FunctionCall 8(foo2()
28: 10(float) Load 12(bar) 28: 10(float) Load 12(bar)
29: 20(fvec4) Load 22(outColor) 32: 31(ptr) AccessChain 22(outColor) 30
30: 10(float) CompositeExtract 29 0 33: 10(float) Load 32
31: 10(float) FAdd 30 28 34: 10(float) FAdd 33 28
32: 20(fvec4) Load 22(outColor) 35: 31(ptr) AccessChain 22(outColor) 30
33: 20(fvec4) CompositeInsert 31 32 0 Store 35 34
Store 22(outColor) 33 38: 20(fvec4) Load 22(outColor)
36: 20(fvec4) Load 22(outColor) Store 37(gl_FragColor) 38
Store 35(gl_FragColor) 36
Return Return
FunctionEnd FunctionEnd
6(foo(): 2 Function None 3 6(foo(): 2 Function None 3

View File

@ -3,15 +3,15 @@ spv.while-continue-break.vert
Linked vertex stage: Linked vertex stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 42 // Id's are bound by 42
Source ESSL 300
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" EntryPoint Vertex 4 "main" 40 41
Source ESSL 300
Name 4 "main" Name 4 "main"
Name 8 "i" Name 8 "i"
Name 17 "A" Name 17 "A"
@ -21,9 +21,7 @@ Linked vertex stage:
Name 40 "gl_VertexID" Name 40 "gl_VertexID"
Name 41 "gl_InstanceID" Name 41 "gl_InstanceID"
Decorate 40(gl_VertexID) BuiltIn VertexId Decorate 40(gl_VertexID) BuiltIn VertexId
Decorate 40(gl_VertexID) NoStaticUse
Decorate 41(gl_InstanceID) BuiltIn InstanceId Decorate 41(gl_InstanceID) BuiltIn InstanceId
Decorate 41(gl_InstanceID) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1
@ -50,7 +48,7 @@ Linked vertex stage:
10: Label 10: Label
13: 6(int) Load 8(i) 13: 6(int) Load 8(i)
16: 15(bool) SLessThan 13 14 16: 15(bool) SLessThan 13 14
LoopMerge 11 None LoopMerge 11 10 None
BranchConditional 16 12 11 BranchConditional 16 12 11
12: Label 12: Label
Store 17(A) 18 Store 17(A) 18

View File

@ -3,23 +3,21 @@ spv.while-simple.vert
Linked vertex stage: Linked vertex stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 23 // Id's are bound by 23
Source ESSL 300
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" EntryPoint Vertex 4 "main" 21 22
Source ESSL 300
Name 4 "main" Name 4 "main"
Name 8 "i" Name 8 "i"
Name 21 "gl_VertexID" Name 21 "gl_VertexID"
Name 22 "gl_InstanceID" Name 22 "gl_InstanceID"
Decorate 21(gl_VertexID) BuiltIn VertexId Decorate 21(gl_VertexID) BuiltIn VertexId
Decorate 21(gl_VertexID) NoStaticUse
Decorate 22(gl_InstanceID) BuiltIn InstanceId Decorate 22(gl_InstanceID) BuiltIn InstanceId
Decorate 22(gl_InstanceID) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 1 6: TypeInt 32 1
@ -39,7 +37,7 @@ Linked vertex stage:
10: Label 10: Label
13: 6(int) Load 8(i) 13: 6(int) Load 8(i)
16: 15(bool) SLessThan 13 14 16: 15(bool) SLessThan 13 14
LoopMerge 11 None LoopMerge 11 10 None
BranchConditional 16 12 11 BranchConditional 16 12 11
12: Label 12: Label
17: 6(int) Load 8(i) 17: 6(int) Load 8(i)

View File

@ -3,24 +3,22 @@ spv.whileLoop.frag
Linked fragment stage: Linked fragment stage:
// Module Version 99 // Module Version 10000
// Generated by (magic number): 51a00bb // Generated by (magic number): 80001
// Id's are bound by 31 // Id's are bound by 34
Source GLSL 110
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main" 11
ExecutionMode 4 OriginLowerLeft ExecutionMode 4 OriginLowerLeft
Source GLSL 110
Name 4 "main" Name 4 "main"
Name 9 "color" Name 9 "color"
Name 11 "BaseColor" Name 11 "BaseColor"
Name 19 "d" Name 22 "d"
Name 24 "bigColor" Name 27 "bigColor"
Name 29 "gl_FragColor" Name 32 "gl_FragColor"
Decorate 11(BaseColor) Smooth
Decorate 29(gl_FragColor) BuiltIn FragColor
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -28,13 +26,16 @@ Linked fragment stage:
8: TypePointer Function 7(fvec4) 8: TypePointer Function 7(fvec4)
10: TypePointer Input 7(fvec4) 10: TypePointer Input 7(fvec4)
11(BaseColor): 10(ptr) Variable Input 11(BaseColor): 10(ptr) Variable Input
18: TypePointer UniformConstant 6(float) 16: TypeInt 32 0
19(d): 18(ptr) Variable UniformConstant 17: 16(int) Constant 0
21: TypeBool 18: TypePointer Function 6(float)
23: TypePointer UniformConstant 7(fvec4) 21: TypePointer UniformConstant 6(float)
24(bigColor): 23(ptr) Variable UniformConstant 22(d): 21(ptr) Variable UniformConstant
28: TypePointer Output 7(fvec4) 24: TypeBool
29(gl_FragColor): 28(ptr) Variable Output 26: TypePointer UniformConstant 7(fvec4)
27(bigColor): 26(ptr) Variable UniformConstant
31: TypePointer Output 7(fvec4)
32(gl_FragColor): 31(ptr) Variable Output
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
9(color): 8(ptr) Variable Function 9(color): 8(ptr) Variable Function
@ -42,20 +43,20 @@ Linked fragment stage:
Store 9(color) 12 Store 9(color) 12
Branch 13 Branch 13
13: Label 13: Label
16: 7(fvec4) Load 9(color) 19: 18(ptr) AccessChain 9(color) 17
17: 6(float) CompositeExtract 16 0 20: 6(float) Load 19
20: 6(float) Load 19(d) 23: 6(float) Load 22(d)
22: 21(bool) FOrdLessThan 17 20 25: 24(bool) FOrdLessThan 20 23
LoopMerge 14 None LoopMerge 14 13 None
BranchConditional 22 15 14 BranchConditional 25 15 14
15: Label 15: Label
25: 7(fvec4) Load 24(bigColor) 28: 7(fvec4) Load 27(bigColor)
26: 7(fvec4) Load 9(color) 29: 7(fvec4) Load 9(color)
27: 7(fvec4) FAdd 26 25 30: 7(fvec4) FAdd 29 28
Store 9(color) 27 Store 9(color) 30
Branch 13 Branch 13
14: Label 14: Label
30: 7(fvec4) Load 9(color) 33: 7(fvec4) Load 9(color)
Store 29(gl_FragColor) 30 Store 32(gl_FragColor) 33
Return Return
FunctionEnd FunctionEnd

View File

@ -90,23 +90,6 @@ uniform vec2 v2;
uniform vec3 v3; uniform vec3 v3;
uniform vec4 v4; uniform vec4 v4;
void bar7()
{
vec4 v;
o += texture2DRect(s2DR, v2);
o += texture2DRectProj(s2DR, v3);
o += texture2DRectProj(s2DR, v4);
o += shadow2DRect(s2DRS, v3);
o += shadow2DRectProj(s2DRS, v4);
o += texture1DGradARB(s1D, f, f, f);
o += texture2DProjGradARB(s2D, v, v2, v2);
o += shadow2DProjGradARB(s2DS, v, v2, v2);
o += shadow2DRectProjGradARB(s2DRS, v, v2, v2);
}
void main() void main()
{ {
o = textureGather(sampC, vec3(0.2)); o = textureGather(sampC, vec3(0.2));
@ -115,5 +98,4 @@ void main()
bar4(); bar4();
bar5(); bar5();
bar6(); bar6();
bar7();
} }

View File

@ -39,3 +39,8 @@ float foo()
{ {
return i1 + i2; return i1 + i2;
} }
// test arrayed block
layout(std140) uniform bi {
vec3 v[2];
} bname[4];

View File

@ -1,6 +1,6 @@
#version 130 #version 130
uniform sampler2D sampler; uniform sampler2D samp2D;
varying mediump vec2 coord; varying mediump vec2 coord;
varying vec4 u, w; varying vec4 u, w;
@ -28,9 +28,9 @@ void main()
b = s1[3](s1(17, 17.0), s1(int(w.x), w.y), s1(int(w.z), w.w)); b = s1[3](s1(17, 17.0), s1(int(w.x), w.y), s1(int(w.z), w.w));
if (foo2a == foo2b) if (foo2a == foo2b)
v = texture2D(sampler, coord); v = texture(samp2D, coord);
else else
v = texture2D(sampler, 2.0*coord); v = texture(samp2D, 2.0*coord);
if (u == v) if (u == v)
v *= 3.0; v *= 3.0;

View File

@ -25,6 +25,12 @@ void main()
shared int atomi; shared int atomi;
shared uint atomu; shared uint atomu;
layout (std140, binding = 0) restrict buffer dataSSB
{
float f;
ivec4 n_frames_rendered;
} result;
void atoms() void atoms()
{ {
int origi = atomicAdd(atomi, 3); int origi = atomicAdd(atomi, 3);
@ -35,4 +41,5 @@ void atoms()
origi = atomicMax(atomi, 7); origi = atomicMax(atomi, 7);
origi = atomicExchange(atomi, origi); origi = atomicExchange(atomi, origi);
origu = atomicCompSwap(atomu, 10u, value); origu = atomicCompSwap(atomu, 10u, value);
atomicAdd(result.n_frames_rendered.z, 1);
} }

View File

@ -1,11 +1,11 @@
#version 110 #version 400
uniform sampler2D tex; uniform sampler2D tex;
varying vec2 coord; in vec2 coord;
void main (void) void main (void)
{ {
vec4 v = texture2D(tex, coord); vec4 v = texture(tex, coord);
if (v == vec4(0.1,0.2,0.3,0.4)) if (v == vec4(0.1,0.2,0.3,0.4))
discard; discard;

View File

@ -1,6 +1,6 @@
#version 120 #version 330
uniform sampler2D sampler; uniform sampler2D samp2D;
vec4 v1 = vec4(2.0, 3.0, 5.0, 7.0); vec4 v1 = vec4(2.0, 3.0, 5.0, 7.0);
vec4 v2 = vec4(11.0, 13.0, 17.0, 19.0); vec4 v2 = vec4(11.0, 13.0, 17.0, 19.0);
@ -25,7 +25,7 @@ void main()
float h = str(1, vec2[3](vec2(2.0, 3.0), vec2(4.0, 5.0), vec2(6.0, 7.0)), true).b[1][1]; // should be 5.0 float h = str(1, vec2[3](vec2(2.0, 3.0), vec2(4.0, 5.0), vec2(6.0, 7.0)), true).b[1][1]; // should be 5.0
float i = texture2D(sampler, vec2(0.5,0.5)).y; float i = texture(samp2D, vec2(0.5,0.5)).y;
i += (i > 0.1 ? v1 : v2)[3]; i += (i > 0.1 ? v1 : v2)[3];

View File

@ -3,10 +3,9 @@
in vec4 Color; in vec4 Color;
in float Depth; in float Depth;
layout(depth_any) out float gl_FragDepth; layout(depth_greater) out float gl_FragDepth;
void main() void main()
{ {
gl_FragDepth = Depth; gl_FragDepth = Depth;
gl_FragColor = Color;
} }

View File

@ -1,6 +1,6 @@
#version 130 #version 130
uniform sampler2D sampler; uniform sampler2D samp2D;
varying vec2 coord; varying vec2 coord;
varying vec4 color; varying vec4 color;
@ -68,5 +68,5 @@ void main()
locals2.bleh = color; locals2.bleh = color;
locals2.bleh.z = coord.y; locals2.bleh.z = coord.y;
gl_FragColor = locals2.bleh * (localFArray[4] + locals2.s1_1.f + localArray[x] + a[x]) * texture2D(sampler, coord); gl_FragColor = locals2.bleh * (localFArray[4] + locals2.s1_1.f + localArray[x] + a[x]) * texture(samp2D, coord);
} }

View File

@ -1,6 +1,6 @@
#version 450 #version 450
layout(set = 4, binding = 7) uniform sampler2D sampler; layout(set = 4, binding = 7) uniform sampler2D samp2D;
layout(set = 0, binding = 8) buffer setBuf { layout(set = 0, binding = 8) buffer setBuf {
vec4 color; vec4 color;

View File

@ -1,6 +1,6 @@
#version 130 #version 130
uniform sampler2D sampler; uniform sampler2D samp2D;
varying mediump vec2 coord; varying mediump vec2 coord;
struct lunarStruct1 { struct lunarStruct1 {
@ -35,5 +35,5 @@ void main()
else else
locals2 = foo2; locals2 = foo2;
gl_FragColor = locals2.s1_1.f * texture2D(sampler, coord); gl_FragColor = locals2.s1_1.f * texture(samp2D, coord);
} }

View File

@ -1,6 +1,6 @@
#version 130 #version 130
uniform sampler2D sampler; uniform sampler2D samp2D;
varying vec2 coord; varying vec2 coord;
struct s0 { struct s0 {
@ -67,5 +67,5 @@ void main()
if (locals0.i > 5) if (locals0.i > 5)
locals0 = locals00.s0_0; locals0 = locals00.s0_0;
gl_FragColor = (float(locals0.i) + locals1Array[6].f + fArray[3] + locals2.s1_1.f) * texture2D(sampler, coord); gl_FragColor = (float(locals0.i) + locals1Array[6].f + fArray[3] + locals2.s1_1.f) * texture(samp2D, coord);
} }

View File

@ -1,5 +1,5 @@
#version 130 #version 130
uniform sampler2D sampler; uniform sampler2D samp2D;
varying vec2 coord; varying vec2 coord;
struct lunarStruct1 { struct lunarStruct1 {
@ -26,6 +26,6 @@ void main()
else else
scale = foo2[3].s1_1[2].f[3]; scale = foo2[3].s1_1[2].f[3];
gl_FragColor = scale * texture2D(sampler, coord); gl_FragColor = scale * texture(samp2D, coord);
} }

View File

@ -1,4 +1,4 @@
#version 110 #version 400
uniform sampler2D texSampler2D; uniform sampler2D texSampler2D;
uniform sampler3D texSampler3D; uniform sampler3D texSampler3D;
@ -7,16 +7,16 @@ uniform float blend;
uniform vec2 scale; uniform vec2 scale;
uniform vec4 u; uniform vec4 u;
varying vec2 t; in vec2 t;
varying vec3 coords; in vec3 coords;
void main() void main()
{ {
float blendscale = 1.789; float blendscale = 1.789;
vec4 v = texture2D(texSampler2D, (t + scale) / scale ).wzyx; vec4 v = texture(texSampler2D, (t + scale) / scale ).wzyx;
vec4 w = texture3D(texSampler3D, coords) + v; vec4 w = texture(texSampler3D, coords) + v;
gl_FragColor = mix(w, u, blend * blendscale); gl_FragColor = mix(w, u, blend * blendscale);
} }

View File

@ -25,34 +25,34 @@ void main()
vec4 coords4D = vec4(1.789, 2.718, 3.453, 2.0); vec4 coords4D = vec4(1.789, 2.718, 3.453, 2.0);
vec4 color = vec4(0.0, 0.0, 0.0, 0.0); vec4 color = vec4(0.0, 0.0, 0.0, 0.0);
color += texture1D (texSampler1D, coords1D); color += texture (texSampler1D, coords1D);
color += texture1D (texSampler1D, coords1D, bias); color += texture (texSampler1D, coords1D, bias);
color += texture1DProj(texSampler1D, coords2D); color += textureProj(texSampler1D, coords2D);
color += texture1DProj(texSampler1D, coords4D); color += textureProj(texSampler1D, coords4D);
color += texture1DProj(texSampler1D, coords2D, bias); color += textureProj(texSampler1D, coords2D, bias);
color += texture1DProj(texSampler1D, coords4D, bias); color += textureProj(texSampler1D, coords4D, bias);
color += texture2D (texSampler2D, coords2D); color += texture (texSampler2D, coords2D);
color += texture2D (texSampler2D, coords2D, bias); color += texture (texSampler2D, coords2D, bias);
color += texture2DProj (texSampler2D, coords3D); color += textureProj (texSampler2D, coords3D);
color += texture2DProj (texSampler2D, coords4D, bias); color += textureProj (texSampler2D, coords4D, bias);
color += texture3D (texSampler3D, coords3D); color += texture (texSampler3D, coords3D);
color += texture3D (texSampler3D, coords3D, bias); color += texture (texSampler3D, coords3D, bias);
color += texture3DProj (texSampler3D, coords4D); color += textureProj (texSampler3D, coords4D);
color += texture3DProj (texSampler3D, coords4D, bias); color += textureProj (texSampler3D, coords4D, bias);
color += textureCube (texSamplerCube, coords3D); color += texture (texSamplerCube, coords3D);
color += textureCube (texSamplerCube, coords3D, bias); color += texture (texSamplerCube, coords3D, bias);
color += shadow1D (shadowSampler1D, coords3D); color += texture (shadowSampler1D, coords3D);
color += shadow1D (shadowSampler1D, coords3D, bias); color += texture (shadowSampler1D, coords3D, bias);
color += shadow2D (shadowSampler2D, coords3D); color += texture (shadowSampler2D, coords3D);
color += shadow2D (shadowSampler2D, coords3D, bias); color += texture (shadowSampler2D, coords3D, bias);
color += shadow1DProj (shadowSampler1D, coords4D); color += textureProj (shadowSampler1D, coords4D);
color += shadow1DProj (shadowSampler1D, coords4D, bias); color += textureProj (shadowSampler1D, coords4D, bias);
color += shadow2DProj (shadowSampler2D, coords4D); color += textureProj (shadowSampler2D, coords4D);
color += shadow2DProj (shadowSampler2D, coords4D, bias); color += textureProj (shadowSampler2D, coords4D, bias);
ivec2 iCoords2D = ivec2(0, 5); ivec2 iCoords2D = ivec2(0, 5);
int iLod = 1; int iLod = 1;

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