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

View File

@ -60,7 +60,10 @@ namespace spv {
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.
@ -113,13 +116,16 @@ protected:
spv::Id createNoArgOperation(glslang::TOperator op);
spv::Id getSymbolId(const glslang::TIntermSymbol* node);
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);
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 isTrivial(const glslang::TIntermTyped* node);
spv::Id createShortCircuit(glslang::TOperator, glslang::TIntermTyped& left, glslang::TIntermTyped& right);
spv::Function* shaderEntry;
spv::Instruction* entryPoint;
int sequenceDepth;
// 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 EShLangCompute: return spv::ExecutionModelGLCompute;
default:
spv::MissingFunctionality("GLSL stage");
assert(0);
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?
} else {
switch (type.getQualifier().storage) {
case glslang::EvqShared: return spv::StorageClassWorkgroupLocal; break;
case glslang::EvqGlobal: return spv::StorageClassPrivateGlobal;
case glslang::EvqShared: return spv::StorageClassWorkgroup; break;
case glslang::EvqGlobal: return spv::StorageClassPrivate;
case glslang::EvqConstReadOnly: return spv::StorageClassFunction;
case glslang::EvqTemporary: return spv::StorageClassFunction;
default:
spv::MissingFunctionality("unknown glslang storage class");
assert(0);
return spv::StorageClassFunction;
}
}
@ -206,14 +212,14 @@ spv::StorageClass TranslateStorageClass(const glslang::TType& type)
spv::Dim TranslateDimensionality(const glslang::TSampler& sampler)
{
switch (sampler.dim) {
case glslang::Esd1D: return spv::Dim1D;
case glslang::Esd2D: return spv::Dim2D;
case glslang::Esd3D: return spv::Dim3D;
case glslang::EsdCube: return spv::DimCube;
case glslang::EsdRect: return spv::DimRect;
case glslang::EsdBuffer: return spv::DimBuffer;
case glslang::Esd1D: return spv::Dim1D;
case glslang::Esd2D: return spv::Dim2D;
case glslang::Esd3D: return spv::Dim3D;
case glslang::EsdCube: return spv::DimCube;
case glslang::EsdRect: return spv::DimRect;
case glslang::EsdBuffer: return spv::DimBuffer;
default:
spv::MissingFunctionality("unknown sampler dimension");
assert(0);
return spv::Dim2D;
}
}
@ -240,7 +246,7 @@ spv::Decoration TranslateBlockDecoration(const glslang::TType& type)
case glslang::EvqVaryingIn: return spv::DecorationBlock;
case glslang::EvqVaryingOut: return spv::DecorationBlock;
default:
spv::MissingFunctionality("kind of block");
assert(0);
break;
}
}
@ -275,11 +281,10 @@ spv::Decoration TranslateLayoutDecoration(const glslang::TType& type)
}
case glslang::EvqVaryingIn:
case glslang::EvqVaryingOut:
if (type.getQualifier().layoutPacking != glslang::ElpNone)
spv::MissingFunctionality("in/out block layout");
assert(type.getQualifier().layoutPacking == glslang::ElpNone);
return (spv::Decoration)spv::BadValue;
default:
spv::MissingFunctionality("block storage qualification");
assert(0);
return (spv::Decoration)spv::BadValue;
}
}
@ -287,12 +292,16 @@ spv::Decoration TranslateLayoutDecoration(const glslang::TType& type)
}
// 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)
{
if (type.getQualifier().smooth)
return spv::DecorationSmooth;
if (type.getQualifier().smooth) {
// Smooth decoration doesn't exist in SPIR-V 1.0
return (spv::Decoration)spv::BadValue;
}
if (type.getQualifier().nopersp)
return spv::DecorationNoperspective;
return spv::DecorationNoPerspective;
else if (type.getQualifier().patch)
return spv::DecorationPatch;
else if (type.getQualifier().flat)
@ -344,8 +353,6 @@ spv::BuiltIn TranslateBuiltInDecoration(glslang::TBuiltInVariable builtIn)
case glslang::EbvSampleId: return spv::BuiltInSampleId;
case glslang::EbvSamplePosition: return spv::BuiltInSamplePosition;
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::EbvHelperInvocation: return spv::BuiltInHelperInvocation;
case glslang::EbvNumWorkGroups: return spv::BuiltInNumWorkgroups;
@ -414,7 +421,7 @@ spv::ImageFormat TranslateImageFormat(const glslang::TType& type)
TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* glslangIntermediate)
: TIntermTraverser(true, false, true), shaderEntry(0), sequenceDepth(0),
builder(GlslangMagic),
builder((glslang::GetKhronosToolId() << 16) | GeneratorVersion),
inMain(false), mainTerminated(false), linkageOnly(false),
glslangIntermediate(glslangIntermediate)
{
@ -425,7 +432,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* gls
stdBuiltins = builder.import("GLSL.std.450");
builder.setMemoryModel(spv::AddressingModelLogical, spv::MemoryModelGLSL450);
shaderEntry = builder.makeMain();
builder.addEntryPoint(executionModel, shaderEntry, "main");
entryPoint = builder.addEntryPoint(executionModel, shaderEntry, "main");
// Add the source extensions
const auto& sourceExtensions = glslangIntermediate->getRequestedExtensions();
@ -451,9 +458,9 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* gls
case EShLangTessEvaluation:
builder.addCapability(spv::CapabilityTessellation);
switch (glslangIntermediate->getInputPrimitive()) {
case glslang::ElgTriangles: mode = spv::ExecutionModeInputTriangles; break;
case glslang::ElgQuads: mode = spv::ExecutionModeInputQuads; break;
case glslang::ElgIsolines: mode = spv::ExecutionModeInputIsolines; break;
case glslang::ElgTriangles: mode = spv::ExecutionModeTriangles; break;
case glslang::ElgQuads: mode = spv::ExecutionModeQuads; break;
case glslang::ElgIsolines: mode = spv::ExecutionModeIsolines; break;
default: mode = spv::BadValue; break;
}
if (mode != spv::BadValue)
@ -486,7 +493,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* gls
case glslang::ElgPoints: mode = spv::ExecutionModeInputPoints; break;
case glslang::ElgLines: mode = spv::ExecutionModeInputLines; 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;
default: mode = spv::BadValue; break;
}
@ -520,7 +527,6 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* gls
builder.addExecutionMode(shaderEntry, spv::ExecutionModeEarlyFragmentTests);
switch(glslangIntermediate->getDepth()) {
case glslang::EldAny: mode = spv::ExecutionModeDepthAny; break;
case glslang::EldGreater: mode = spv::ExecutionModeDepthGreater; break;
case glslang::EldLess: mode = spv::ExecutionModeDepthLess; break;
default: mode = spv::BadValue; break;
@ -591,6 +597,11 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
builder.setAccessChainRValue(id);
else
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());
// these all need their counterparts in createBinaryOperation()
if (rValue == 0)
spv::MissingFunctionality("createBinaryOperation");
assert(rValue != spv::NoResult);
}
// store the result
@ -660,20 +670,13 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
// Add the next element in the chain
int index = 0;
if (node->getRight()->getAsConstantUnion() == 0)
spv::MissingFunctionality("direct index without a constant node");
else
index = node->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst();
int index = node->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst();
if (node->getLeft()->getBasicType() == glslang::EbtBlock && node->getOp() == glslang::EOpIndexDirectStruct) {
// This may be, e.g., an anonymous block-member selection, which generally need
// index remapping due to hidden members in anonymous blocks.
std::vector<int>& remapper = memberRemapper[node->getLeft()->getType().getStruct()];
if (remapper.size() == 0)
spv::MissingFunctionality("block without member remapping");
else
index = remapper[index];
assert(remapper.size() > 0);
index = remapper[index];
}
if (! node->getLeft()->getType().isArray() &&
@ -766,7 +769,7 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
node->getLeft()->getType().getBasicType());
if (! result) {
spv::MissingFunctionality("glslang binary operation");
spv::MissingFunctionality("unknown glslang binary operation");
} else {
builder.clearAccessChain();
builder.setAccessChainRValue(result);
@ -832,7 +835,7 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
// if not, then possibly an operation
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) {
builder.clearAccessChain();
@ -862,8 +865,7 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
spv::Id result = createBinaryOperation(op, TranslatePrecisionDecoration(node->getType()),
convertGlslangToSpvType(node->getType()), operand, one,
node->getType().getBasicType());
if (result == 0)
spv::MissingFunctionality("createBinaryOperation for unary");
assert(result != spv::NoResult);
// The result of operation is always stored, but conditionally the
// consumed result. The consumed result is always an r-value.
@ -886,7 +888,7 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
return false;
default:
spv::MissingFunctionality("glslang unary");
spv::MissingFunctionality("unknown glslang unary");
break;
}
@ -990,13 +992,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
{
if (node->isUserDefined())
result = handleUserFunctionCall(node);
if (! result) {
spv::MissingFunctionality("glslang function call");
glslang::TConstUnionArray emptyConsts;
int nextConst = 0;
result = createSpvConstant(node->getType(), emptyConsts, nextConst);
}
assert(result);
builder.clearAccessChain();
builder.setAccessChainRValue(result);
@ -1053,12 +1049,10 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
for (int c = 0; c < (int)arguments.size(); ++c)
constituents.push_back(arguments[c]);
constructed = builder.createCompositeConstruct(resultTypeId, constituents);
} else {
if (isMatrix)
constructed = builder.createMatrixConstructor(precision, arguments, resultTypeId);
else
constructed = builder.createConstructor(precision, arguments, resultTypeId);
}
} else if (isMatrix)
constructed = builder.createMatrixConstructor(precision, arguments, resultTypeId);
else
constructed = builder.createConstructor(precision, arguments, resultTypeId);
builder.clearAccessChain();
builder.setAccessChainRValue(constructed);
@ -1131,21 +1125,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
atomic = true;
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:
break;
}
@ -1171,9 +1150,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
left->getType().getBasicType(), reduceComparison);
// code above should only make binOp that exists in createBinaryOperation
if (result == 0)
spv::MissingFunctionality("createBinaryOperation for aggregate");
assert(result != spv::NoResult);
builder.clearAccessChain();
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
bool lvalue = false;
switch (node->getOp()) {
//case glslang::EOpFrexp:
case glslang::EOpFrexp:
case glslang::EOpModf:
if (arg == 1)
lvalue = true;
@ -1208,9 +1185,16 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
if (arg == 0)
lvalue = true;
break;
//case glslang::EOpUAddCarry:
//case glslang::EOpUSubBorrow:
//case glslang::EOpUMulExtended:
case glslang::EOpAddCarry:
case glslang::EOpSubBorrow:
if (arg == 2)
lvalue = true;
break;
case glslang::EOpUMulExtended:
case glslang::EOpIMulExtended:
if (arg >= 2)
lvalue = true;
break;
default:
break;
}
@ -1230,7 +1214,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
result = createNoArgOperation(node->getOp());
break;
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;
default:
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;
if (! result) {
spv::MissingFunctionality("glslang aggregate");
spv::MissingFunctionality("unknown glslang aggregate");
return true;
} else {
builder.clearAccessChain();
@ -1350,7 +1334,7 @@ bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::T
void TGlslangToSpvTraverser::visitConstantUnion(glslang::TIntermConstantUnion* node)
{
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.setAccessChainRValue(constant);
@ -1418,7 +1402,7 @@ bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::T
break;
default:
spv::MissingFunctionality("branch type");
assert(0);
break;
}
@ -1429,9 +1413,9 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol*
{
// First, steer off constants, which are not SPIR-V variables, but
// can still have a mapping to a SPIR-V Id.
// This includes specialization constants.
if (node->getQualifier().storage == glslang::EvqConst) {
int nextConst = 0;
return createSpvConstant(node->getType(), node->getConstArray(), nextConst);
return createSpvSpecConstant(*node);
}
// 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::EbtUint: return builder.makeUintType(32);
default:
spv::MissingFunctionality("sampled type");
assert(0);
return builder.makeFloatType(32);
}
}
@ -1474,8 +1458,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
switch (type.getBasicType()) {
case glslang::EbtVoid:
spvType = builder.makeVoidType();
if (type.isArray())
spv::MissingFunctionality("array of void");
assert (! type.isArray());
break;
case glslang::EbtFloat:
spvType = builder.makeFloatType(32);
@ -1499,12 +1482,13 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
case glslang::EbtSampler:
{
const glslang::TSampler& sampler = type.getSampler();
spvType = builder.makeImageType(getSampledType(sampler), TranslateDimensionality(sampler), sampler.shadow, sampler.arrayed, sampler.ms,
sampler.image ? 2 : 1, TranslateImageFormat(type));
// OpenGL "textures" need to be combined with a sampler
if (! sampler.image)
spvType = builder.makeSampledImageType(spvType);
}
// an image is present, make its type
spvType = builder.makeImageType(getSampledType(sampler), TranslateDimensionality(sampler), sampler.shadow, sampler.arrayed, sampler.ms,
sampler.image ? 2 : 1, TranslateImageFormat(type));
if (! sampler.image) {
spvType = builder.makeSampledImageType(spvType);
}
}
break;
case glslang::EbtStruct:
case glslang::EbtBlock:
@ -1593,7 +1577,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
}
break;
default:
spv::MissingFunctionality("basic type");
assert(0);
break;
}
@ -1620,10 +1604,14 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
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
// 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));
}
@ -1883,8 +1871,11 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
operands.push_back(*(opIt++));
if (node->getOp() == glslang::EOpImageStore)
operands.push_back(*(opIt++));
// TODO: add 'sample' operand
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);
} else if (node->getOp() == glslang::EOpImageStore) {
builder.createNoResultOp(spv::OpImageWrite, operands);
@ -1909,8 +1900,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
}
// Check for texture functions other than queries
if (cracked.gather)
spv::MissingFunctionality("texture gather");
// check for bias argument
bool bias = false;
@ -1925,14 +1914,18 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
bias = true;
}
bool cubeCompare = sampler.dim == glslang::EsdCube && sampler.arrayed && sampler.shadow;
// set the rest of the arguments
params.coords = arguments[1];
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];
else if (sampler.shadow) {
else if (sampler.shadow && cracked.gather) {
params.Dref = arguments[2];
++extraArgs;
} else if (sampler.shadow) {
std::vector<spv::Id> indexes;
int comp;
if (cracked.proj)
@ -1954,20 +1947,28 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
params.gradY = arguments[3 + extraArgs];
extraArgs += 2;
}
//if (gather && compare) {
// params.compare = arguments[2 + extraArgs];
// ++extraArgs;
//}
if (cracked.offset || cracked.offsets) {
if (cracked.offset) {
params.offset = arguments[2 + extraArgs];
++extraArgs;
} else if (cracked.offsets) {
params.offsets = arguments[2 + extraArgs];
++extraArgs;
}
if (bias) {
params.bias = arguments[2 + 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)
@ -2308,6 +2309,7 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv:
{
spv::Op unaryOp = spv::OpNop;
int libCall = -1;
bool isUnsigned = typeProxy == glslang::EbtUint;
bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble;
switch (op) {
@ -2538,11 +2540,13 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv:
unaryOp = spv::OpBitCount;
break;
case glslang::EOpFindLSB:
libCall = spv::GLSLstd450FindILSB;
libCall = spv::GLSLstd450FindILsb;
break;
case glslang::EOpFindMSB:
spv::MissingFunctionality("signed vs. unsigned FindMSB");
libCall = spv::GLSLstd450FindSMSB;
if (isUnsigned)
libCall = spv::GLSLstd450FindUMsb;
else
libCall = spv::GLSLstd450FindSMsb;
break;
default:
@ -2717,7 +2721,7 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
opCode = spv::OpAtomicLoad;
break;
default:
spv::MissingFunctionality("missing nested atomic");
assert(0);
break;
}
@ -2754,6 +2758,11 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
spv::Op opCode = spv::OpNop;
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) {
case glslang::EOpMin:
@ -2794,7 +2803,10 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
libCall = spv::GLSLstd450SClamp;
break;
case glslang::EOpMix:
libCall = spv::GLSLstd450Mix;
if (isFloat)
libCall = spv::GLSLstd450FMix;
else
libCall = spv::GLSLstd450IMix;
break;
case glslang::EOpStep:
libCall = spv::GLSLstd450Step;
@ -2819,6 +2831,52 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
libCall = spv::GLSLstd450Refract;
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:
return 0;
}
@ -2827,7 +2885,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
if (libCall >= 0)
id = builder.createBuiltinCall(precision, typeId, stdBuiltins, libCall, operands);
else {
switch (operands.size()) {
switch (consumedOperands) {
case 0:
// should all be handled by visitAggregate and createNoArgOperation
assert(0);
@ -2839,16 +2897,34 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
case 2:
id = builder.createBinOp(opCode, typeId, operands[0], operands[1]);
break;
case 3:
id = builder.createTriOp(opCode, typeId, operands[0], operands[1], operands[2]);
break;
default:
// These do not exist yet
assert(0 && "operation with more than 3 operands");
// anything 3 or over doesn't have l-value operands, so all should be consumed
assert(consumedOperands == operands.size());
id = builder.createOp(opCode, typeId, operands);
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);
return id;
@ -2883,13 +2959,13 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op)
builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsImageMemoryMask);
return 0;
case glslang::EOpMemoryBarrierShared:
builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsWorkgroupLocalMemoryMask);
builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsWorkgroupMemoryMask);
return 0;
case glslang::EOpGroupMemoryBarrier:
builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsWorkgroupGlobalMemoryMask);
builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsCrossWorkgroupMemoryMask);
return 0;
default:
spv::MissingFunctionality("operation with no arguments");
spv::MissingFunctionality("unknown operation with no arguments");
return 0;
}
}
@ -2945,31 +3021,57 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
if (builtIn != spv::BadValue)
builder.addDecoration(id, spv::DecorationBuiltIn, (int)builtIn);
if (linkageOnly)
builder.addDecoration(id, spv::DecorationNoStaticUse);
return id;
}
// If 'dec' is valid, add no-operand decoration to an object
void TGlslangToSpvTraverser::addDecoration(spv::Id id, spv::Decoration dec)
{
if (dec != spv::BadValue)
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)
{
if (dec != spv::BadValue)
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
// build the aggregate SPIR-V constant.
//
// 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.
//
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
std::vector<spv::Id> spvConsts;
@ -2980,15 +3082,15 @@ spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TType& glslangT
if (glslangType.isArray()) {
glslang::TType elementType(glslangType, 0);
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()) {
glslang::TType vectorType(glslangType, 0);
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()) {
glslang::TVector<glslang::TTypeLoc>::const_iterator 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()) {
for (unsigned int i = 0; i < (unsigned int)glslangType.getVectorSize(); ++i) {
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()));
break;
default:
spv::MissingFunctionality("constant vector type");
assert(0);
break;
}
++nextConst;
@ -3020,22 +3122,22 @@ spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TType& glslangT
spv::Id scalar = 0;
switch (glslangType.getBasicType()) {
case glslang::EbtInt:
scalar = builder.makeIntConstant(zero ? 0 : consts[nextConst].getIConst());
scalar = builder.makeIntConstant(zero ? 0 : consts[nextConst].getIConst(), specConstant);
break;
case glslang::EbtUint:
scalar = builder.makeUintConstant(zero ? 0 : consts[nextConst].getUConst());
scalar = builder.makeUintConstant(zero ? 0 : consts[nextConst].getUConst(), specConstant);
break;
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;
case glslang::EbtDouble:
scalar = builder.makeDoubleConstant(zero ? 0.0 : consts[nextConst].getDConst());
scalar = builder.makeDoubleConstant(zero ? 0.0 : consts[nextConst].getDConst(), specConstant);
break;
case glslang::EbtBool:
scalar = builder.makeBoolConstant(zero ? false : consts[nextConst].getBConst());
scalar = builder.makeBoolConstant(zero ? false : consts[nextConst].getBConst(), specConstant);
break;
default:
spv::MissingFunctionality("constant scalar type");
assert(0);
break;
}
++nextConst;
@ -3180,7 +3282,7 @@ void GetSpirvVersion(std::string& version)
{
const int bufSize = 100;
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;
}

View File

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

View File

@ -55,14 +55,12 @@
namespace spv {
const int SpvBuilderMagic = 0xBB;
Builder::Builder(unsigned int userNumber) :
Builder::Builder(unsigned int magicNumber) :
source(SourceLanguageUnknown),
sourceVersion(0),
addressModel(AddressingModelLogical),
memoryModel(MemoryModelGLSL450),
builderNumber(userNumber << 16 | SpvBuilderMagic),
builderNumber(magicNumber),
buildPoint(0),
uniqueId(0),
mainFunction(0)
@ -112,6 +110,20 @@ Id Builder::makeBoolType()
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)
{
// try to find it
@ -176,8 +188,15 @@ Id Builder::makeFloatType(int width)
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)
{
// Don't look for previous one, because in the general case,
// structs can be duplicated except for decorations.
// not found, make it
Instruction* type = new Instruction(getUniqueId(), NoType, OpTypeStruct);
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();
}
// 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)
{
// try to find it
@ -387,7 +430,7 @@ Op Builder::getMostBasicTypeClass(Id typeId) const
case OpTypePointer:
return getMostBasicTypeClass(instr->getIdOperand(1));
default:
MissingFunctionality("getMostBasicTypeClass");
assert(0);
return OpTypeFloat;
}
}
@ -406,7 +449,7 @@ int Builder::getNumTypeComponents(Id typeId) const
case OpTypeMatrix:
return instr->getImmediateOperand(1);
default:
MissingFunctionality("getNumTypeComponents on non bool/int/float/vector/matrix");
assert(0);
return 1;
}
}
@ -434,7 +477,7 @@ Id Builder::getScalarTypeId(Id typeId) const
case OpTypePointer:
return getScalarTypeId(getContainedTypeId(typeId));
default:
MissingFunctionality("getScalarTypeId");
assert(0);
return NoResult;
}
}
@ -457,7 +500,7 @@ Id Builder::getContainedTypeId(Id typeId, int member) const
case OpTypeStruct:
return instr->getIdOperand(member);
default:
MissingFunctionality("getContainedTypeId");
assert(0);
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
// 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;
for (int i = 0; i < (int)groupedConstants[typeClass].size(); ++i) {
constant = groupedConstants[typeClass][i];
if (constant->getNumOperands() == 1 &&
if (constant->getOpCode() == opcode &&
constant->getTypeId() == typeId &&
constant->getImmediateOperand(0) == value)
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').
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;
for (int i = 0; i < (int)groupedConstants[typeClass].size(); ++i) {
constant = groupedConstants[typeClass][i];
if (constant->getNumOperands() == 2 &&
if (constant->getOpCode() == opcode &&
constant->getTypeId() == typeId &&
constant->getImmediateOperand(0) == v1 &&
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();
Instruction* constant;
Op opcode = specConstant ? (b ? OpSpecConstantTrue : OpSpecConstantFalse) : (b ? OpConstantTrue : OpConstantFalse);
// See if we already made it
Id existing = 0;
for (int i = 0; i < (int)groupedConstants[OpTypeBool].size(); ++i) {
constant = groupedConstants[OpTypeBool][i];
if (constant->getTypeId() == typeId &&
(b ? (constant->getOpCode() == OpConstantTrue) :
(constant->getOpCode() == OpConstantFalse)))
if (constant->getTypeId() == typeId && constant->getOpCode() == opcode)
existing = constant->getResultId();
}
@ -543,7 +585,7 @@ Id Builder::makeBoolConstant(bool b)
return existing;
// Make it
Instruction* c = new Instruction(getUniqueId(), typeId, b ? OpConstantTrue : OpConstantFalse);
Instruction* c = new Instruction(getUniqueId(), typeId, opcode);
constantsTypesGlobals.push_back(c);
groupedConstants[OpTypeBool].push_back(c);
module.mapInstruction(c);
@ -551,13 +593,14 @@ Id Builder::makeBoolConstant(bool b)
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)
return existing;
Instruction* c = new Instruction(getUniqueId(), typeId, OpConstant);
Instruction* c = new Instruction(getUniqueId(), typeId, opcode);
c->addImmediateOperand(value);
constantsTypesGlobals.push_back(c);
groupedConstants[OpTypeInt].push_back(c);
@ -566,15 +609,16 @@ Id Builder::makeIntConstant(Id typeId, unsigned value)
return c->getResultId();
}
Id Builder::makeFloatConstant(float f)
Id Builder::makeFloatConstant(float f, bool specConstant)
{
Op opcode = specConstant ? OpSpecConstant : OpConstant;
Id typeId = makeFloatType(32);
unsigned value = *(unsigned int*)&f;
Id existing = findScalarConstant(OpTypeFloat, typeId, value);
Id existing = findScalarConstant(OpTypeFloat, opcode, typeId, value);
if (existing)
return existing;
Instruction* c = new Instruction(getUniqueId(), typeId, OpConstant);
Instruction* c = new Instruction(getUniqueId(), typeId, opcode);
c->addImmediateOperand(value);
constantsTypesGlobals.push_back(c);
groupedConstants[OpTypeFloat].push_back(c);
@ -583,17 +627,18 @@ Id Builder::makeFloatConstant(float f)
return c->getResultId();
}
Id Builder::makeDoubleConstant(double d)
Id Builder::makeDoubleConstant(double d, bool specConstant)
{
Op opcode = specConstant ? OpSpecConstant : OpConstant;
Id typeId = makeFloatType(64);
unsigned long long value = *(unsigned long long*)&d;
unsigned op1 = value & 0xFFFFFFFF;
unsigned op2 = value >> 32;
Id existing = findScalarConstant(OpTypeFloat, typeId, op1, op2);
Id existing = findScalarConstant(OpTypeFloat, opcode, typeId, op1, op2);
if (existing)
return existing;
Instruction* c = new Instruction(getUniqueId(), typeId, OpConstant);
Instruction* c = new Instruction(getUniqueId(), typeId, opcode);
c->addImmediateOperand(op1);
c->addImmediateOperand(op2);
constantsTypesGlobals.push_back(c);
@ -644,7 +689,7 @@ Id Builder::makeCompositeConstant(Id typeId, std::vector<Id>& members)
case OpTypeMatrix:
break;
default:
MissingFunctionality("Constant composite type in Builder");
assert(0);
return makeFloatConstant(0.0);
}
@ -662,7 +707,7 @@ Id Builder::makeCompositeConstant(Id typeId, std::vector<Id>& members)
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);
entryPoint->addImmediateOperand(model);
@ -670,6 +715,8 @@ void Builder::addEntryPoint(ExecutionModel model, Function* function, const char
entryPoint->addStringOperand(name);
entryPoints.push_back(entryPoint);
return entryPoint;
}
// 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)
{
if (decoration == (spv::Decoration)spv::BadValue)
return;
Instruction* dec = new Instruction(OpDecorate);
dec->addIdOperand(id);
dec->addImmediateOperand(decoration);
@ -833,25 +882,14 @@ Id Builder::createVariable(StorageClass storageClass, Id type, const char* name)
inst->addImmediateOperand(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:
// Validation rules require the declaration in the entry block
buildPoint->getParent().addLocalVariable(inst);
break;
default:
MissingFunctionality("storage class in createVariable");
constantsTypesGlobals.push_back(inst);
module.mapInstruction(inst);
break;
}
@ -1175,7 +1213,7 @@ Id Builder::createBuiltinCall(Decoration /*precision*/, Id resultType, Id builti
// Accept all parameters needed to create a texture instruction.
// 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;
Id texArgs[maxTextureArgs] = {};
@ -1189,6 +1227,8 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool fetch, b
texArgs[numArgs++] = parameters.coords;
if (parameters.Dref)
texArgs[numArgs++] = parameters.Dref;
if (parameters.comp)
texArgs[numArgs++] = parameters.comp;
//
// Set up the optional arguments
@ -1238,6 +1278,11 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool fetch, b
opCode = OpImageSampleImplicitLod;
if (fetch) {
opCode = OpImageFetch;
} else if (gather) {
if (parameters.Dref)
opCode = OpImageDrefGather;
else
opCode = OpImageGather;
} else if (xplicit) {
if (parameters.Dref) {
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);
for (int op = 0; op < optArgNum; ++op)
textureInst->addIdOperand(texArgs[op]);
@ -1324,8 +1370,12 @@ Id Builder::createTextureQueryCall(Op opCode, const TextureParameters& parameter
case Dim3D:
numComponents = 3;
break;
case DimSubpassData:
MissingFunctionality("input-attachment dim");
break;
default:
MissingFunctionality("texture query dimensionality");
assert(0);
break;
}
if (isArrayedImageType(getImageType(parameters.sampler)))
@ -1345,7 +1395,8 @@ Id Builder::createTextureQueryCall(Op opCode, const TextureParameters& parameter
resultType = makeIntType(32);
break;
default:
MissingFunctionality("Texture query op code");
assert(0);
break;
}
Instruction* query = new Instruction(getUniqueId(), resultType, opCode);
@ -1359,57 +1410,6 @@ Id Builder::createTextureQueryCall(Op opCode, const TextureParameters& parameter
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
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;
}
// 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
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);
std::vector<Id> constituents; // accumulate the arguments for OpCompositeConstruct
for (unsigned int i = 0; i < sources.size(); ++i) {
if (isAggregate(sources[i]))
MissingFunctionality("aggregate in vector constructor");
assert(! isAggregate(sources[i]));
unsigned int sourceSize = getNumComponents(sources[i]);
unsigned int sourcesToUse = sourceSize;
if (sourcesToUse + targetComponent > numTargetComponents)
sourcesToUse = numTargetComponents - targetComponent;
@ -1790,7 +1678,7 @@ void Builder::If::makeEndIf()
// Go back to the headerBlock and make the flow control split
builder.setBuildPoint(headerBlock);
builder.createMerge(OpSelectionMerge, mergeBlock, SelectionControlMaskNone);
builder.createSelectionMerge(mergeBlock, SelectionControlMaskNone);
if (elseBlock)
builder.createConditionalBranch(condition, thenBlock, elseBlock);
else
@ -1814,7 +1702,7 @@ void Builder::makeSwitch(Id selector, int numSegments, std::vector<int>& caseVal
Block* mergeBlock = new Block(getUniqueId(), function);
// make and insert the switch's selection-merge instruction
createMerge(OpSelectionMerge, mergeBlock, SelectionControlMaskNone);
createSelectionMerge(mergeBlock, SelectionControlMaskNone);
// make the switch instruction
Instruction* switchInst = new Instruction(NoResult, NoType, OpSwitch);
@ -1898,7 +1786,7 @@ void Builder::makeNewLoop(bool loopTestFirst)
getBuildPoint()->addInstruction(loop.isFirstIteration);
// 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.
// 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.
// However, the loop test has a "break branch" out of this selection
// 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);
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
// has already been generated and this is a conditional merge.
if (loop.testFirst) {
createMerge(OpLoopMerge, loop.merge, LoopControlMaskNone);
createLoopMerge(loop.merge, loop.header, LoopControlMaskNone);
// Branching to the "body" block will keep control inside
// the loop.
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
// than one merge instruction, we need to make an intermediate block.
Block* stayInLoopBlock = new Block(getUniqueId(), *loop.function);
createMerge(OpSelectionMerge, stayInLoopBlock, SelectionControlMaskNone);
createSelectionMerge(stayInLoopBlock, SelectionControlMaskNone);
// This is the loop test.
createConditionalBranch(condition, stayInLoopBlock, loop.merge);
@ -2047,12 +1935,13 @@ void Builder::accessChainStore(Id rvalue)
{
assert(accessChain.isRValue == false);
transferAccessChainSwizzle(true);
Id base = collapseAccessChain();
if (accessChain.swizzle.size() && accessChain.component != NoResult)
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.
Id source = NoResult;
if (accessChain.swizzle.size()) {
@ -2078,8 +1967,9 @@ Id Builder::accessChainLoad(Id resultType)
Id id;
if (accessChain.isRValue) {
// transfer access chain, but keep it static, so we can stay in registers
transferAccessChainSwizzle(false);
if (accessChain.indexChain.size() > 0) {
mergeAccessChainSwizzle(); // TODO: optimization: look at applying this optimization more widely
Id swizzleBase = accessChain.preSwizzleBaseType != NoType ? accessChain.preSwizzleBaseType : resultType;
// if all the accesses are constants, we can use OpCompositeExtract
@ -2113,6 +2003,7 @@ Id Builder::accessChainLoad(Id resultType)
} else
id = accessChain.base;
} else {
transferAccessChainSwizzle(true);
// load through the access chain
id = createLoad(collapseAccessChain());
}
@ -2142,6 +2033,7 @@ Id Builder::accessChainGetLValue()
{
assert(accessChain.isRValue == false);
transferAccessChainSwizzle(true);
Id lvalue = collapseAccessChain();
// 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(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) {
Instruction sourceInst(0, 0, OpSource);
sourceInst.addImmediateOperand(source);
@ -2174,28 +2085,12 @@ void Builder::dump(std::vector<unsigned int>& out) const
extInst.addStringOperand(extensions[e]);
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, lines);
// Annotation instructions
dumpInstructions(out, decorations);
dumpInstructions(out, constantsTypesGlobals);
dumpInstructions(out, externals);
@ -2207,10 +2102,13 @@ void Builder::dump(std::vector<unsigned int>& out) const
// 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()
{
// 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);
if (accessChain.indexChain.size() > 0) {
@ -2222,9 +2120,12 @@ Id Builder::collapseAccessChain()
return accessChain.instr;
} else
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()
{
// 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;
}
// clear out swizzle if it can become part of the indexes
void Builder::mergeAccessChainSwizzle()
// To the extent any swizzling can become part of the chain
// 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
if ((accessChain.swizzle.size() > 1) ||
(accessChain.swizzle.size() == 0 && accessChain.component == NoResult))
// too complex?
if (accessChain.swizzle.size() > 1)
return;
// TODO: optimization: remove this, but for now confine this to non-dynamic accesses
// (the above test is correct when this is removed.)
if (accessChain.component != NoResult)
// non existent?
if (accessChain.swizzle.size() == 0 && accessChain.component == NoResult)
return;
// move the swizzle over to the indexes
if (accessChain.swizzle.size() == 1)
// single component...
// 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()));
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);
// now there is no need to track this swizzle
accessChain.component = NoResult;
accessChain.preSwizzleBaseType = NoType;
accessChain.swizzle.clear();
accessChain.preSwizzleBaseType = NoType;
accessChain.component = NoResult;
}
}
// 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);
}
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->addImmediateOperand(control);
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)
{
Instruction* branch = new Instruction(OpBranchConditional);

View File

@ -99,12 +99,14 @@ public:
Id makeUintType(int width) { return makeIntegerType(width, false); }
Id makeFloatType(int width);
Id makeStructType(std::vector<Id>& members, const char*);
Id makeStructResultType(Id type0, Id type1);
Id makeVectorType(Id component, int size);
Id makeMatrixType(Id component, int cols, int rows);
Id makeArrayType(Id element, unsigned size);
Id makeRuntimeArray(Id element);
Id makeFunctionType(Id returnType, std::vector<Id>& paramTypes);
Id makeImageType(Id sampledType, Dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format);
Id makeSamplerType();
Id makeSampledImageType(Id imageType);
// For querying about types.
@ -118,12 +120,14 @@ public:
Id getScalarTypeId(Id typeId) const;
Id getContainedTypeId(Id typeId) 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 isScalar(Id resultId) const { return isScalarType(getTypeId(resultId)); }
bool isVector(Id resultId) const { return isVectorType(getTypeId(resultId)); }
bool isMatrix(Id resultId) const { return isMatrixType(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 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 isConstantScalar(Id resultId) const { return getOpCode(resultId) == OpConstant; }
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
{
@ -172,18 +177,17 @@ public:
}
// For making new constants (will return old constant if the requested one was already made).
Id makeBoolConstant(bool b);
Id makeIntConstant(Id typeId, unsigned value);
Id makeIntConstant(int i) { return makeIntConstant(makeIntType(32), (unsigned)i); }
Id makeUintConstant(unsigned u) { return makeIntConstant(makeUintType(32), u); }
Id makeFloatConstant(float f);
Id makeDoubleConstant(double d);
Id makeBoolConstant(bool b, bool specConstant = false);
Id makeIntConstant(int i, bool specConstant = false) { return makeIntConstant(makeIntType(32), (unsigned)i, specConstant); }
Id makeUintConstant(unsigned u, bool specConstant = false) { return makeIntConstant(makeUintType(32), u, specConstant); }
Id makeFloatConstant(float f, bool specConstant = false);
Id makeDoubleConstant(double d, bool specConstant = false);
// Turn the array of constants into a proper spv constant of the requested type.
Id makeCompositeConstant(Id type, std::vector<Id>& comps);
// 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 addName(Id, const char* name);
void addMemberName(Id, int member, const char* name);
@ -296,10 +300,11 @@ public:
Id gradX;
Id gradY;
Id sample;
Id comp;
};
// 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.
// Figure out the right return value and type, and return it.
@ -426,13 +431,13 @@ public:
//
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;
Id instr; // the instruction that generates this access chain
std::vector<unsigned> swizzle;
Id component; // a dynamic component index, can coexist with a swizzle, done after the swizzle
Id preSwizzleBaseType; // dereferenced type, before swizzle or component is applied; NoType unless a swizzle or component is present
bool isRValue;
Id instr; // cache the instruction that generates this access chain
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, NoResult if not present
Id preSwizzleBaseType; // dereferenced type, before swizzle or component is applied; NoType unless a swizzle or component is present
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;
protected:
Id findScalarConstant(Op typeClass, Id typeId, unsigned value) const;
Id findScalarConstant(Op typeClass, Id typeId, unsigned v1, unsigned v2) const;
Id makeIntConstant(Id typeId, unsigned value, bool specConstant);
Id findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned value) const;
Id findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned v1, unsigned v2) const;
Id findCompositeConstant(Op typeClass, std::vector<Id>& comps) const;
Id collapseAccessChain();
void transferAccessChainSwizzle(bool dynamic);
void simplifyAccessChainSwizzle();
void mergeAccessChainSwizzle();
void createAndSetNoPredecessorBlock(const char*);
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 dumpInstructions(std::vector<unsigned int>&, const std::vector<Instruction*>&) const;

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

@ -74,18 +74,14 @@ const MemorySemanticsMask MemorySemanticsAllMemory = (MemorySemanticsMask)0x3FF;
class Instruction {
public:
Instruction(Id resultId, Id typeId, Op opCode) : resultId(resultId), typeId(typeId), opCode(opCode), string(0) { }
explicit Instruction(Op opCode) : resultId(NoResult), typeId(NoType), opCode(opCode), string(0) { }
virtual ~Instruction()
{
delete string;
}
Instruction(Id resultId, Id typeId, Op opCode) : resultId(resultId), typeId(typeId), opCode(opCode) { }
explicit Instruction(Op opCode) : resultId(NoResult), typeId(NoType), opCode(opCode) { }
virtual ~Instruction() {}
void addIdOperand(Id id) { operands.push_back(id); }
void addImmediateOperand(unsigned int immediate) { operands.push_back(immediate); }
void addStringOperand(const char* str)
{
originalString = str;
string = new std::vector<unsigned int>;
unsigned int word;
char* wordString = (char*)&word;
char* wordPtr = wordString;
@ -96,7 +92,7 @@ public:
*(wordPtr++) = c;
++charCount;
if (charCount == 4) {
string->push_back(word);
addImmediateOperand(word);
wordPtr = wordString;
charCount = 0;
}
@ -107,7 +103,7 @@ public:
// pad with 0s
for (; charCount < 4; ++charCount)
*(wordPtr++) = 0;
string->push_back(word);
addImmediateOperand(word);
}
}
Op getOpCode() const { return opCode; }
@ -128,8 +124,6 @@ public:
if (resultId)
++wordCount;
wordCount += (unsigned int)operands.size();
if (string)
wordCount += (unsigned int)string->size();
// Write out the beginning of the instruction
out.push_back(((wordCount) << WordCountShift) | opCode);
@ -141,9 +135,6 @@ public:
// Write out the operands
for (int op = 0; op < (int)operands.size(); ++op)
out.push_back(operands[op]);
if (string)
for (int op = 0; op < (int)string->size(); ++op)
out.push_back((*string)[op]);
}
protected:
@ -152,7 +143,6 @@ protected:
Id typeId;
Op opCode;
std::vector<Id> operands;
std::vector<unsigned int>* string; // usually non-existent
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);
printf("SPIR-V Version %s\n", spirvVersion.c_str());
printf("GLSL.std.450 Version %d, Revision %d\n", GLSLstd450Version, GLSLstd450Revision);
printf("Khronos Tool ID %d\n", glslang::GetKhronosToolId());
if (Worklist.empty())
return ESuccess;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,15 +3,15 @@ spv.300layoutp.vert
Linked vertex stage:
// Module Version 99
// Generated by (magic number): 51a00bb
// Id's are bound by 114
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 117
Source ESSL 300
Capability Shader
1: ExtInstImport "GLSL.std.450"
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 9 "pos"
Name 11 "p"
@ -36,13 +36,12 @@ Linked vertex stage:
Name 61 "iout"
Name 67 "uiuin"
Name 73 "aiv2"
Name 77 "S"
MemberName 77(S) 0 "c"
MemberName 77(S) 1 "f"
Name 79 "s"
Name 112 "gl_VertexID"
Name 113 "gl_InstanceID"
Decorate 9(pos) Smooth
Name 79 "S"
MemberName 79(S) 0 "c"
MemberName 79(S) 1 "f"
Name 81 "s"
Name 115 "gl_VertexID"
Name 116 "gl_InstanceID"
Decorate 11(p) Location 3
MemberDecorate 17(Transform) 0 RowMajor
MemberDecorate 17(Transform) 0 Offset 0
@ -63,14 +62,11 @@ Linked vertex stage:
MemberDecorate 43(T2) 1 RowMajor
Decorate 43(T2) GLSLShared
Decorate 43(T2) Block
Decorate 51(color) Smooth
Decorate 53(c) Location 7
Decorate 61(iout) Flat
Decorate 73(aiv2) Location 9
Decorate 112(gl_VertexID) BuiltIn VertexId
Decorate 112(gl_VertexID) NoStaticUse
Decorate 113(gl_InstanceID) BuiltIn InstanceId
Decorate 113(gl_InstanceID) NoStaticUse
Decorate 115(gl_VertexID) BuiltIn VertexId
Decorate 116(gl_InstanceID) BuiltIn InstanceId
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -116,20 +112,23 @@ Linked vertex stage:
71: TypeVector 16(int) 2
72: TypePointer Input 71(ivec2)
73(aiv2): 72(ptr) Variable Input
77(S): TypeStruct 14(fvec3) 6(float)
78: TypePointer Output 77(S)
79(s): 78(ptr) Variable Output
84: TypePointer Output 6(float)
86: TypePointer Uniform 14(fvec3)
89: 6(float) Constant 1065353216
90: 14(fvec3) ConstantComposite 89 89 89
91: TypeVector 42(bool) 3
97: TypePointer Uniform 30(ivec3)
100: 29(int) Constant 5
101: 30(ivec3) ConstantComposite 100 100 100
111: TypePointer Input 16(int)
112(gl_VertexID): 111(ptr) Variable Input
113(gl_InstanceID): 111(ptr) Variable Input
74: 29(int) Constant 1
75: TypePointer Input 16(int)
79(S): TypeStruct 14(fvec3) 6(float)
80: TypePointer Output 79(S)
81(s): 80(ptr) Variable Output
84: 29(int) Constant 0
85: TypePointer Input 6(float)
88: TypePointer Output 6(float)
90: TypePointer Uniform 14(fvec3)
93: 6(float) Constant 1065353216
94: 14(fvec3) ConstantComposite 93 93 93
95: TypeVector 42(bool) 3
101: TypePointer Uniform 30(ivec3)
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
5: Label
12: 7(fvec4) Load 11(p)
@ -159,41 +158,41 @@ Linked vertex stage:
68: 29(int) Load 67(uiuin)
69: 16(int) Bitcast 68
70: 16(int) IAdd 65 69
74: 71(ivec2) Load 73(aiv2)
75: 16(int) CompositeExtract 74 1
76: 16(int) IAdd 70 75
Store 61(iout) 76
80: 14(fvec3) Load 53(c)
81: 50(ptr) AccessChain 79(s) 20
Store 81 80
82: 7(fvec4) Load 11(p)
83: 6(float) CompositeExtract 82 0
85: 84(ptr) AccessChain 79(s) 24
Store 85 83
87: 86(ptr) AccessChain 35 55 24
88: 14(fvec3) Load 87
92: 91(bvec3) FOrdNotEqual 88 90
93: 42(bool) Any 92
94: 42(bool) LogicalNot 93
SelectionMerge 96 None
BranchConditional 94 95 96
95: Label
98: 97(ptr) AccessChain 35 62 55
99: 30(ivec3) Load 98
102: 91(bvec3) INotEqual 99 101
103: 42(bool) Any 102
Branch 96
96: Label
104: 42(bool) Phi 93 5 103 95
SelectionMerge 106 None
BranchConditional 104 105 106
105: Label
107: 50(ptr) AccessChain 79(s) 20
108: 14(fvec3) Load 107
109: 14(fvec3) CompositeConstruct 89 89 89
110: 14(fvec3) FAdd 108 109
Store 107 110
Branch 106
106: Label
76: 75(ptr) AccessChain 73(aiv2) 74
77: 16(int) Load 76
78: 16(int) IAdd 70 77
Store 61(iout) 78
82: 14(fvec3) Load 53(c)
83: 50(ptr) AccessChain 81(s) 20
Store 83 82
86: 85(ptr) AccessChain 11(p) 84
87: 6(float) Load 86
89: 88(ptr) AccessChain 81(s) 24
Store 89 87
91: 90(ptr) AccessChain 35 55 24
92: 14(fvec3) Load 91
96: 95(bvec3) FOrdNotEqual 92 94
97: 42(bool) Any 96
98: 42(bool) LogicalNot 97
SelectionMerge 100 None
BranchConditional 98 99 100
99: Label
102: 101(ptr) AccessChain 35 62 55
103: 30(ivec3) Load 102
106: 95(bvec3) INotEqual 103 105
107: 42(bool) Any 106
Branch 100
100: Label
108: 42(bool) Phi 97 5 107 99
SelectionMerge 110 None
BranchConditional 108 109 110
109: Label
111: 50(ptr) AccessChain 81(s) 20
112: 14(fvec3) Load 111
113: 14(fvec3) CompositeConstruct 93 93 93
114: 14(fvec3) FAdd 112 113
Store 111 114
Branch 110
110: Label
Return
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:
// Module Version 99
// Generated by (magic number): 51a00bb
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 67
Source ESSL 310
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main"
ExecutionMode 4 LocalSize 16 32 4
Source ESSL 310
Name 4 "main"
Name 13 "outb"
MemberName 13(outb) 0 "f"
@ -27,21 +27,20 @@ Linked compute stage:
MemberName 24(outbna) 0 "k"
MemberName 24(outbna) 1 "na"
Name 26 "outbnamena"
Name 43 "i"
Name 49 "outs"
MemberName 49(outs) 0 "s"
MemberName 49(outs) 1 "va"
Name 51 "outnames"
Name 54 "gl_LocalInvocationID"
Name 42 "i"
Name 48 "outs"
MemberName 48(outs) 0 "s"
MemberName 48(outs) 1 "va"
Name 50 "outnames"
Name 53 "gl_LocalInvocationID"
Decorate 13(outb) GLSLShared
Decorate 13(outb) BufferBlock
Decorate 24(outbna) GLSLShared
Decorate 24(outbna) BufferBlock
Decorate 49(outs) GLSLShared
Decorate 49(outs) BufferBlock
Decorate 54(gl_LocalInvocationID) BuiltIn LocalInvocationId
Decorate 48(outs) GLSLShared
Decorate 48(outs) BufferBlock
Decorate 53(gl_LocalInvocationID) BuiltIn LocalInvocationId
Decorate 66 BuiltIn WorkgroupSize
Decorate 66 NoStaticUse
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
@ -56,8 +55,8 @@ Linked compute stage:
15(outbname): 14(ptr) Variable Uniform
16: TypeInt 32 1
17: 16(int) Constant 0
18: TypePointer WorkgroupLocal 10(float)
19(s): 18(ptr) Variable WorkgroupLocal
18: TypePointer Workgroup 10(float)
19(s): 18(ptr) Variable Workgroup
21: TypePointer Uniform 10(float)
23: TypeVector 10(float) 4
24(outbna): TypeStruct 16(int) 23(fvec4)
@ -67,24 +66,25 @@ Linked compute stage:
30: TypePointer Uniform 23(fvec4)
32: 16(int) Constant 3
33: 16(int) Constant 18
34: TypePointer Uniform 11(fvec3)
38: 16(int) Constant 17
39: 10(float) Constant 1077936128
40: 11(fvec3) ConstantComposite 39 39 39
42: TypePointer WorkgroupLocal 16(int)
43(i): 42(ptr) Variable WorkgroupLocal
48: TypeRuntimeArray 23(fvec4)
49(outs): TypeStruct 16(int) 48
50: TypePointer Uniform 49(outs)
51(outnames): 50(ptr) Variable Uniform
52: TypeVector 6(int) 3
53: TypePointer Input 52(ivec3)
54(gl_LocalInvocationID): 53(ptr) Variable Input
36: 16(int) Constant 17
37: 10(float) Constant 1077936128
38: 11(fvec3) ConstantComposite 37 37 37
39: TypePointer Uniform 11(fvec3)
41: TypePointer Workgroup 16(int)
42(i): 41(ptr) Variable Workgroup
47: TypeRuntimeArray 23(fvec4)
48(outs): TypeStruct 16(int) 47
49: TypePointer Uniform 48(outs)
50(outnames): 49(ptr) Variable Uniform
51: TypeVector 6(int) 3
52: TypePointer Input 51(ivec3)
53(gl_LocalInvocationID): 52(ptr) Variable Input
54: TypePointer Input 6(int)
61: TypePointer Uniform 16(int)
63: 6(int) Constant 16
64: 6(int) Constant 32
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
5: Label
MemoryBarrier 7 8
@ -96,25 +96,24 @@ Linked compute stage:
29: 23(fvec4) CompositeConstruct 28 28 28 28
31: 30(ptr) AccessChain 26(outbnamena) 27
Store 31 29
35: 34(ptr) AccessChain 15(outbname) 32 33
36: 11(fvec3) Load 35
37: 10(float) CompositeExtract 36 0
Store 19(s) 37
41: 34(ptr) AccessChain 15(outbname) 32 38
Store 41 40
44: 16(int) Load 43(i)
45: 10(float) Load 19(s)
46: 11(fvec3) CompositeConstruct 45 45 45
47: 34(ptr) AccessChain 15(outbname) 32 44
Store 47 46
55: 52(ivec3) Load 54(gl_LocalInvocationID)
56: 6(int) CompositeExtract 55 0
34: 21(ptr) AccessChain 15(outbname) 32 33 9
35: 10(float) Load 34
Store 19(s) 35
40: 39(ptr) AccessChain 15(outbname) 32 36
Store 40 38
43: 16(int) Load 42(i)
44: 10(float) Load 19(s)
45: 11(fvec3) CompositeConstruct 44 44 44
46: 39(ptr) AccessChain 15(outbname) 32 43
Store 46 45
55: 54(ptr) AccessChain 53(gl_LocalInvocationID) 9
56: 6(int) Load 55
57: 10(float) Load 19(s)
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
60: 16(int) ArrayLength 15(outbname) 3
62: 61(ptr) AccessChain 51(outnames) 17
62: 61(ptr) AccessChain 50(outnames) 17
Store 62 60
Return
FunctionEnd

View File

@ -3,20 +3,20 @@ spv.330.geom
Linked geometry stage:
// Module Version 99
// Generated by (magic number): 51a00bb
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 32
Source GLSL 330
SourceExtension "GL_ARB_separate_shader_objects"
Capability Geometry
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Geometry 4 "main"
ExecutionMode 4 InputTriangles
EntryPoint Geometry 4 "main" 20 13
ExecutionMode 4 Triangles
ExecutionMode 4 Invocations 0
ExecutionMode 4 OutputTriangleStrip
ExecutionMode 4 OutputVertices 3
Source GLSL 330
SourceExtension "GL_ARB_separate_shader_objects"
Name 4 "main"
Name 11 "gl_PerVertex"
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:
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:
// Module Version 99
// Generated by (magic number): 51a00bb
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 90
Source GLSL 400
SourceExtension "GL_ARB_separate_shader_objects"
Capability Tessellation
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint TessellationControl 4 "main"
EntryPoint TessellationControl 4 "main" 52 76 80 81 84 85 88 89
ExecutionMode 4 OutputVertices 4
Source GLSL 400
SourceExtension "GL_ARB_separate_shader_objects"
Name 4 "main"
Name 12 "a"
Name 17 "p"
@ -62,19 +62,11 @@ Linked tessellation control stage:
Decorate 63(gl_TessLevelOuter) BuiltIn TessLevelOuter
Decorate 70(gl_TessLevelInner) Patch
Decorate 70(gl_TessLevelInner) BuiltIn TessLevelInner
Decorate 75(outa) NoStaticUse
Decorate 76(patchOut) Patch
Decorate 76(patchOut) NoStaticUse
Decorate 80(inb) NoStaticUse
Decorate 81(ind) NoStaticUse
Decorate 84(ivla) Location 3
Decorate 84(ivla) NoStaticUse
Decorate 85(ivlb) Location 4
Decorate 85(ivlb) NoStaticUse
Decorate 88(ovla) Location 3
Decorate 88(ovla) NoStaticUse
Decorate 89(ovlb) Location 4
Decorate 89(ovlb) NoStaticUse
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
@ -121,8 +113,8 @@ Linked tessellation control stage:
70(gl_TessLevelInner): 69(ptr) Variable Output
71: 14(float) Constant 1067869798
73: TypeArray 10(int) 49
74: TypePointer PrivateGlobal 73
75(outa): 74(ptr) Variable PrivateGlobal
74: TypePointer Private 73
75(outa): 74(ptr) Variable Private
76(patchOut): 54(ptr) Variable Output
77: TypeVector 14(float) 2
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:
// Module Version 99
// Generated by (magic number): 51a00bb
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 98
Source GLSL 400
SourceExtension "GL_ARB_separate_shader_objects"
Capability Tessellation
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint TessellationEvaluation 4 "main"
ExecutionMode 4 InputTriangles
EntryPoint TessellationEvaluation 4 "main" 77 68 81 82 86 90 93 94 97
ExecutionMode 4 Triangles
ExecutionMode 4 SpacingFractionalOdd
ExecutionMode 4 VertexOrderCcw
ExecutionMode 4 PointMode
Source GLSL 400
SourceExtension "GL_ARB_separate_shader_objects"
Name 4 "main"
Name 8 "a"
Name 13 "p"
@ -72,19 +72,11 @@ Linked tessellation evaluation stage:
MemberDecorate 66(gl_PerVertex) 2 BuiltIn ClipDistance
Decorate 66(gl_PerVertex) Block
Decorate 77(patchIn) Patch
Decorate 77(patchIn) NoStaticUse
Decorate 81(inb) NoStaticUse
Decorate 82(ind) NoStaticUse
Decorate 83(testblb) Block
Decorate 86(blb) NoStaticUse
Decorate 87(testbld) Block
Decorate 90(bld) NoStaticUse
Decorate 93(ivla) Location 23
Decorate 93(ivla) NoStaticUse
Decorate 94(ivlb) Location 24
Decorate 94(ivlb) NoStaticUse
Decorate 97(ovla) Location 23
Decorate 97(ovla) NoStaticUse
2: TypeVoid
3: TypeFunction 2
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:
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:
// Module Version 99
// Generated by (magic number): 51a00bb
// Id's are bound by 62
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 63
Source GLSL 430
Capability Shader
1: ExtInstImport "GLSL.std.450"
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 10 "gl_PerVertex"
MemberName 10(gl_PerVertex) 0 "gl_ClipDistance"
Name 12 ""
Name 23 "bad"
Name 34 "badorder3"
Name 38 "f"
Name 42 "uv4"
Name 43 "badorder"
Name 44 "badorder2"
Name 45 "boundblock"
MemberName 45(boundblock) 0 "aoeu"
Name 47 "boundInst"
Name 48 "anonblock"
MemberName 48(anonblock) 0 "aoeu"
Name 50 ""
Name 54 "sampb1"
Name 57 "sampb2"
Name 58 "sampb4"
Name 60 "gl_VertexID"
Name 61 "gl_InstanceID"
Name 39 "f"
Name 43 "uv4"
Name 44 "badorder"
Name 45 "badorder2"
Name 46 "boundblock"
MemberName 46(boundblock) 0 "aoeu"
Name 48 "boundInst"
Name 49 "anonblock"
MemberName 49(anonblock) 0 "aoeu"
Name 51 ""
Name 55 "sampb1"
Name 58 "sampb2"
Name 59 "sampb4"
Name 61 "gl_VertexID"
Name 62 "gl_InstanceID"
MemberDecorate 10(gl_PerVertex) 0 BuiltIn ClipDistance
Decorate 10(gl_PerVertex) Block
Decorate 34(badorder3) Flat
Decorate 42(uv4) Location 4
Decorate 42(uv4) NoStaticUse
Decorate 28 NoStaticUse
Decorate 28 NoStaticUse
Decorate 43(badorder) NoStaticUse
Decorate 44(badorder2) Smooth
Decorate 44(badorder2) Invariant
Decorate 44(badorder2) NoStaticUse
Decorate 45(boundblock) GLSLShared
Decorate 45(boundblock) Block
Decorate 47(boundInst) Binding 3
Decorate 47(boundInst) NoStaticUse
Decorate 48(anonblock) GLSLShared
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
Decorate 43(uv4) Location 4
Decorate 45(badorder2) Invariant
Decorate 46(boundblock) GLSLShared
Decorate 46(boundblock) Block
Decorate 48(boundInst) Binding 3
Decorate 49(anonblock) GLSLShared
Decorate 49(anonblock) Block
Decorate 51 Binding 7
Decorate 55(sampb1) Binding 4
Decorate 58(sampb2) Binding 5
Decorate 59(sampb4) Binding 31
Decorate 61(gl_VertexID) BuiltIn VertexId
Decorate 62(gl_InstanceID) BuiltIn InstanceId
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -83,52 +70,53 @@ Linked vertex stage:
21: TypeArray 19(fvec4) 20
22: TypePointer Input 21
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
29: TypeBool
33: TypePointer Output 19(fvec4)
34(badorder3): 33(ptr) Variable Output
37: TypePointer UniformConstant 6(float)
38(f): 37(ptr) Variable UniformConstant
41: TypePointer UniformConstant 19(fvec4)
42(uv4): 41(ptr) Variable UniformConstant
43(badorder): 24(ptr) Variable Input
44(badorder2): 33(ptr) Variable Output
45(boundblock): TypeStruct 13(int)
46: TypePointer Uniform 45(boundblock)
47(boundInst): 46(ptr) Variable Uniform
48(anonblock): TypeStruct 13(int)
49: TypePointer Uniform 48(anonblock)
50: 49(ptr) Variable Uniform
51: TypeImage 6(float) 2D sampled format:Unknown
52: TypeSampledImage 51
53: TypePointer UniformConstant 52
54(sampb1): 53(ptr) Variable UniformConstant
55: TypeArray 52 20
56: TypePointer UniformConstant 55
57(sampb2): 56(ptr) Variable UniformConstant
58(sampb4): 53(ptr) Variable UniformConstant
59: TypePointer Input 13(int)
60(gl_VertexID): 59(ptr) Variable Input
61(gl_InstanceID): 59(ptr) Variable Input
35: TypePointer Input 19(fvec4)
38: TypePointer UniformConstant 6(float)
39(f): 38(ptr) Variable UniformConstant
42: TypePointer UniformConstant 19(fvec4)
43(uv4): 42(ptr) Variable UniformConstant
44(badorder): 35(ptr) Variable Input
45(badorder2): 33(ptr) Variable Output
46(boundblock): TypeStruct 13(int)
47: TypePointer Uniform 46(boundblock)
48(boundInst): 47(ptr) Variable Uniform
49(anonblock): TypeStruct 13(int)
50: TypePointer Uniform 49(anonblock)
51: 50(ptr) Variable Uniform
52: TypeImage 6(float) 2D sampled format:Unknown
53: TypeSampledImage 52
54: TypePointer UniformConstant 53
55(sampb1): 54(ptr) Variable UniformConstant
56: TypeArray 53 20
57: TypePointer UniformConstant 56
58(sampb2): 57(ptr) Variable UniformConstant
59(sampb4): 54(ptr) Variable UniformConstant
60: TypePointer Input 13(int)
61(gl_VertexID): 60(ptr) Variable Input
62(gl_InstanceID): 60(ptr) Variable Input
4(main): 2 Function None 3
5: Label
18: 17(ptr) AccessChain 12 14 15
Store 18 16
25: 24(ptr) AccessChain 23(bad) 14
26: 19(fvec4) Load 25
27: 6(float) CompositeExtract 26 0
26: 25(ptr) AccessChain 23(bad) 14 24
27: 6(float) Load 26
30: 29(bool) FOrdEqual 27 28
SelectionMerge 32 None
BranchConditional 30 31 32
31: Label
35: 24(ptr) AccessChain 23(bad) 14
36: 19(fvec4) Load 35
Store 34(badorder3) 36
36: 35(ptr) AccessChain 23(bad) 14
37: 19(fvec4) Load 36
Store 34(badorder3) 37
Branch 32
32: Label
39: 6(float) Load 38(f)
40: 17(ptr) AccessChain 12 14 14
Store 40 39
40: 6(float) Load 39(f)
41: 17(ptr) AccessChain 12 14 14
Store 41 40
Return
FunctionEnd

View File

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

View File

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

View File

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

View File

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

View File

@ -3,26 +3,24 @@ spv.always-discard2.frag
Linked fragment stage:
// Module Version 99
// Generated by (magic number): 51a00bb
// Id's are bound by 36
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 40
Source GLSL 110
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
EntryPoint Fragment 4 "main" 21
ExecutionMode 4 OriginLowerLeft
Source GLSL 110
Name 4 "main"
Name 9 "white"
Name 12 "black"
Name 15 "color"
Name 18 "x"
Name 21 "tex_coord"
Name 27 "y"
Name 34 "gl_FragColor"
Decorate 21(tex_coord) Smooth
Decorate 34(gl_FragColor) BuiltIn FragColor
Name 30 "y"
Name 38 "gl_FragColor"
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -36,29 +34,33 @@ Linked fragment stage:
19: TypeVector 6(float) 2
20: TypePointer Input 19(fvec2)
21(tex_coord): 20(ptr) Variable Input
24: 6(float) Constant 1073741824
33: TypePointer Output 7(fvec4)
34(gl_FragColor): 33(ptr) Variable Output
22: TypeInt 32 0
23: 22(int) Constant 0
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
5: Label
9(white): 8(ptr) Variable Function
12(black): 8(ptr) Variable Function
15(color): 8(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 12(black) 14
16: 7(fvec4) Load 9(white)
Store 15(color) 16
22: 19(fvec2) Load 21(tex_coord)
23: 6(float) CompositeExtract 22 0
25: 6(float) FMul 23 24
26: 6(float) FSub 25 10
Store 18(x) 26
28: 19(fvec2) Load 21(tex_coord)
29: 6(float) CompositeExtract 28 1
30: 6(float) FMul 29 24
31: 6(float) FSub 30 10
Store 27(y) 31
25: 24(ptr) AccessChain 21(tex_coord) 23
26: 6(float) Load 25
28: 6(float) FMul 26 27
29: 6(float) FSub 28 10
Store 18(x) 29
32: 24(ptr) AccessChain 21(tex_coord) 31
33: 6(float) Load 32
34: 6(float) FMul 33 27
35: 6(float) FSub 34 10
Store 30(y) 35
Kill
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?
// Module Version 99
// Generated by (magic number): 51a00bb
// Id's are bound by 64
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 74
Source ESSL 310
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main"
ExecutionMode 4 LocalSize 1 1 1
Source ESSL 310
Name 4 "main"
Name 10 "func(au1;"
Name 9 "c"
@ -29,14 +29,19 @@ TBD functionality: Is atomic_uint an opaque handle in the uniform storage class,
Name 40 "origu"
Name 42 "atomu"
Name 44 "value"
Name 61 "arrX"
Name 62 "arrY"
Name 63 "arrZ"
Name 61 "dataSSB"
MemberName 61(dataSSB) 0 "f"
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 28(countArr) Binding 0
Decorate 61(arrX) NoStaticUse
Decorate 62(arrY) NoStaticUse
Decorate 63(arrZ) NoStaticUse
MemberDecorate 61(dataSSB) 0 Offset 0
MemberDecorate 61(dataSSB) 1 Offset 16
Decorate 61(dataSSB) BufferBlock
Decorate 63(result) Binding 0
2: TypeVoid
3: TypeFunction 2
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)
14: 6(int) Constant 1
15: 6(int) Constant 0
18: 6(int) Constant 256
18: 6(int) Constant 1024
19: TypePointer AtomicCounter 6(int)
20(counter): 19(ptr) Variable AtomicCounter
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
30: 29(int) Constant 2
34: TypePointer Function 29(int)
36: TypePointer WorkgroupLocal 29(int)
37(atomi): 36(ptr) Variable WorkgroupLocal
36: TypePointer Workgroup 29(int)
37(atomi): 36(ptr) Variable Workgroup
38: 29(int) Constant 3
41: TypePointer WorkgroupLocal 6(int)
42(atomu): 41(ptr) Variable WorkgroupLocal
41: TypePointer Workgroup 6(int)
42(atomu): 41(ptr) Variable Workgroup
43: TypePointer UniformConstant 6(int)
44(value): 43(ptr) Variable UniformConstant
47: 6(int) Constant 7
52: 29(int) Constant 7
56: 6(int) Constant 10
59: TypeArray 29(int) 14
60: TypePointer PrivateGlobal 59
61(arrX): 60(ptr) Variable PrivateGlobal
62(arrY): 60(ptr) Variable PrivateGlobal
63(arrZ): 60(ptr) Variable PrivateGlobal
59: TypeFloat 32
60: TypeVector 29(int) 4
61(dataSSB): TypeStruct 59(float) 60(ivec4)
62: TypePointer Uniform 61(dataSSB)
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
5: Label
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)
58: 6(int) AtomicCompareExchange 42(atomu) 14 15 15 57 56
Store 40(origu) 58
67: 66(ptr) AccessChain 63(result) 64 65
68: 29(int) AtomicIAdd 67 14 15 64
Return
FunctionEnd

View File

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

View File

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

View File

@ -5,21 +5,19 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas
Linked fragment stage:
// Module Version 99
// Generated by (magic number): 51a00bb
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 20
Source GLSL 130
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
EntryPoint Fragment 4 "main" 16
ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main"
Name 12 "gl_FragData"
Name 16 "Color"
Decorate 12(gl_FragData) BuiltIn FragColor
Decorate 16(Color) Smooth
2: TypeVoid
3: TypeFunction 2
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:
// Module Version 99
// Generated by (magic number): 51a00bb
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 22
Source GLSL 130
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
EntryPoint Fragment 4 "main" 18
ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main"
Name 12 "gl_FragData"
Name 15 "i"
Name 18 "Color"
Decorate 12(gl_FragData) BuiltIn FragColor
Decorate 18(Color) Smooth
2: TypeVoid
3: TypeFunction 2
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:
// Module Version 99
// Generated by (magic number): 51a00bb
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 38
Source GLSL 130
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main"
EntryPoint Vertex 4 "main" 26 23 37
Source GLSL 130
Name 4 "main"
Name 8 "i"
Name 23 "colorOut"
Name 26 "color"
Name 32 "gl_Position"
Name 37 "gl_VertexID"
Decorate 23(colorOut) Smooth
Decorate 32(gl_Position) BuiltIn Position
Decorate 37(gl_VertexID) BuiltIn VertexId
Decorate 37(gl_VertexID) NoStaticUse
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
@ -54,7 +52,7 @@ Linked vertex stage:
10: Label
13: 6(int) Load 8(i)
16: 15(bool) SLessThan 13 14
LoopMerge 11 None
LoopMerge 11 10 None
BranchConditional 16 12 11
12: Label
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:
// Module Version 99
// Generated by (magic number): 51a00bb
// Id's are bound by 18
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 15
Source GLSL 450
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
EntryPoint Fragment 4 "main" 14 10 8 8
ExecutionMode 4 OriginLowerLeft
ExecutionMode 4 DepthAny
ExecutionMode 4 DepthGreater
ExecutionMode 4 DepthReplacing
Source GLSL 450
Name 4 "main"
Name 8 "gl_FragDepth"
Name 10 "Depth"
Name 14 "gl_FragColor"
Name 16 "Color"
Name 14 "Color"
Decorate 8(gl_FragDepth) BuiltIn FragDepth
Decorate 10(Depth) Smooth
Decorate 14(gl_FragColor) BuiltIn FragColor
Decorate 16(Color) Smooth
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -34,15 +30,11 @@ Linked fragment stage:
9: TypePointer Input 6(float)
10(Depth): 9(ptr) Variable Input
12: TypeVector 6(float) 4
13: TypePointer Output 12(fvec4)
14(gl_FragColor): 13(ptr) Variable Output
15: TypePointer Input 12(fvec4)
16(Color): 15(ptr) Variable Input
13: TypePointer Input 12(fvec4)
14(Color): 13(ptr) Variable Input
4(main): 2 Function None 3
5: Label
11: 6(float) Load 10(Depth)
Store 8(gl_FragDepth) 11
17: 12(fvec4) Load 16(Color)
Store 14(gl_FragColor) 17
Return
FunctionEnd

View File

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

View File

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

View File

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

View File

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

View File

@ -5,16 +5,16 @@ Warning, version 430 is not yet complete; most version-specific features are pre
Linked compute stage:
// Module Version 99
// Generated by (magic number): 51a00bb
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 62
Source GLSL 430
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main"
ExecutionMode 4 LocalSize 1 1 1
Source GLSL 430
Name 4 "main"
Name 8 "bufName"
MemberName 8(bufName) 0 "f"
@ -32,12 +32,6 @@ Linked compute stage:
Decorate 8(bufName) BufferBlock
Decorate 26(gl_GlobalInvocationID) BuiltIn GlobalInvocationId
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
3: TypeFunction 2
6: TypeFloat 32
@ -99,7 +93,7 @@ Linked compute stage:
41: 40(fvec2) ConvertSToF 39
43: 40(fvec2) CompositeConstruct 42 42
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
Store 32(localCoef) 46
Store 49(aa) 53

View File

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

View File

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

View File

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

View File

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

View File

@ -3,16 +3,16 @@ spv.forLoop.frag
Linked fragment stage:
// Module Version 99
// Generated by (magic number): 51a00bb
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 122
Source GLSL 130
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
EntryPoint Fragment 4 "main" 11 97
ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main"
Name 9 "color"
Name 11 "BaseColor"
@ -23,15 +23,12 @@ Linked fragment stage:
Name 38 "sum"
Name 40 "i"
Name 50 "v4"
Name 59 "i"
Name 65 "tv4"
Name 60 "i"
Name 66 "tv4"
Name 83 "r"
Name 89 "i"
Name 97 "f"
Name 110 "i"
Decorate 11(BaseColor) Smooth
Decorate 35(gl_FragColor) BuiltIn FragColor
Decorate 97(f) Smooth
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -57,10 +54,12 @@ Linked fragment stage:
48: TypeVector 47(int) 4
49: TypePointer UniformConstant 48(ivec4)
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
96: TypePointer Input 6(float)
97(f): 96(ptr) Variable Input
99: 47(int) Constant 3
115: 13(int) Constant 16
4(main): 2 Function None 3
5: Label
@ -68,8 +67,8 @@ Linked fragment stage:
15(i): 14(ptr) Variable Function
38(sum): 37(ptr) Variable Function
40(i): 14(ptr) Variable Function
59(i): 14(ptr) Variable Function
65(tv4): 8(ptr) Variable Function
60(i): 14(ptr) Variable Function
66(tv4): 8(ptr) Variable Function
83(r): 8(ptr) Variable Function
89(i): 14(ptr) Variable Function
110(i): 14(ptr) Variable Function
@ -81,7 +80,7 @@ Linked fragment stage:
20: 13(int) Load 15(i)
23: 13(int) Load 22(Count)
25: 24(bool) SLessThan 20 23
LoopMerge 18 None
LoopMerge 18 17 None
BranchConditional 25 19 18
19: Label
28: 7(fvec4) Load 27(bigColor)
@ -101,46 +100,45 @@ Linked fragment stage:
41: Label
44: 13(int) Load 40(i)
46: 24(bool) SLessThan 44 45
LoopMerge 42 None
LoopMerge 42 41 None
BranchConditional 46 43 42
43: Label
51: 13(int) Load 40(i)
52: 48(ivec4) Load 50(v4)
53: 47(int) VectorExtractDynamic 52 51
54: 6(float) ConvertUToF 53
55: 6(float) Load 38(sum)
56: 6(float) FAdd 55 54
Store 38(sum) 56
57: 13(int) Load 40(i)
58: 13(int) IAdd 57 32
Store 40(i) 58
53: 52(ptr) AccessChain 50(v4) 51
54: 47(int) Load 53
55: 6(float) ConvertUToF 54
56: 6(float) Load 38(sum)
57: 6(float) FAdd 56 55
Store 38(sum) 57
58: 13(int) Load 40(i)
59: 13(int) IAdd 58 32
Store 40(i) 59
Branch 41
42: Label
Store 59(i) 16
Branch 60
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
Store 60(i) 16
Branch 61
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)
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
81: 7(fvec4) Load 35(gl_FragColor)
82: 7(fvec4) FAdd 81 80
@ -156,13 +154,12 @@ Linked fragment stage:
93: 13(int) Load 89(i)
94: 13(int) Load 22(Count)
95: 24(bool) SLessThan 93 94
LoopMerge 91 None
LoopMerge 91 90 None
BranchConditional 95 92 91
92: Label
98: 6(float) Load 97(f)
99: 7(fvec4) Load 83(r)
100: 7(fvec4) CompositeInsert 98 99 3
Store 83(r) 100
100: 37(ptr) AccessChain 83(r) 99
Store 100 98
101: 13(int) Load 89(i)
102: 13(int) IAdd 101 32
Store 89(i) 102
@ -181,7 +178,7 @@ Linked fragment stage:
111: Label
114: 13(int) Load 110(i)
116: 24(bool) SLessThan 114 115
LoopMerge 112 None
LoopMerge 112 111 None
BranchConditional 116 113 112
113: Label
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:
// Module Version 99
// Generated by (magic number): 51a00bb
// Id's are bound by 57
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 60
Source ESSL 100
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
EntryPoint Fragment 4 "main" 20
ExecutionMode 4 OriginLowerLeft
Source ESSL 100
Name 4 "main"
Name 6 "bar("
Name 10 "unreachableReturn("
@ -24,16 +24,13 @@ Linked fragment stage:
Name 27 "f"
Name 30 "gl_FragColor"
Name 36 "d"
Name 56 "bigColor"
Name 59 "bigColor"
Decorate 18(color) RelaxedPrecision
Decorate 20(BaseColor) RelaxedPrecision
Decorate 20(BaseColor) Smooth
Decorate 27(f) RelaxedPrecision
Decorate 30(gl_FragColor) RelaxedPrecision
Decorate 30(gl_FragColor) BuiltIn FragColor
Decorate 36(d) RelaxedPrecision
Decorate 56(bigColor) RelaxedPrecision
Decorate 56(bigColor) NoStaticUse
Decorate 59(bigColor) RelaxedPrecision
2: TypeVoid
3: TypeFunction 2
8: TypeFloat 32
@ -52,8 +49,11 @@ Linked fragment stage:
39: TypeBool
43: 8(float) Constant 1067030938
46: 8(float) Constant 1083179008
55: TypePointer UniformConstant 12(fvec4)
56(bigColor): 55(ptr) Variable UniformConstant
49: TypeInt 32 0
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
5: Label
18(color): 13(ptr) Variable Function
@ -95,10 +95,10 @@ Linked fragment stage:
16(foo(vf4;): 8(float) Function None 14
15(bar): 13(ptr) FunctionParameter
17: Label
49: 12(fvec4) Load 15(bar)
50: 8(float) CompositeExtract 49 0
51: 12(fvec4) Load 15(bar)
52: 8(float) CompositeExtract 51 1
53: 8(float) FAdd 50 52
ReturnValue 53
51: 26(ptr) AccessChain 15(bar) 50
52: 8(float) Load 51
54: 26(ptr) AccessChain 15(bar) 53
55: 8(float) Load 54
56: 8(float) FAdd 52 55
ReturnValue 56
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:
// Module Version 99
// Generated by (magic number): 51a00bb
// Id's are bound by 73
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 76
Source GLSL 130
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
EntryPoint Fragment 4 "main" 57
ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main"
Name 11 "foo(vf4;"
Name 10 "bar"
@ -22,17 +22,14 @@ Linked fragment stage:
Name 16 "unreachableReturn("
Name 18 "missingReturn("
Name 21 "h"
Name 30 "d"
Name 51 "color"
Name 53 "BaseColor"
Name 54 "param"
Name 60 "f"
Name 62 "g"
Name 65 "gl_FragColor"
Name 72 "bigColor"
Decorate 53(BaseColor) Smooth
Decorate 65(gl_FragColor) BuiltIn FragColor
Decorate 72(bigColor) NoStaticUse
Name 34 "d"
Name 55 "color"
Name 57 "BaseColor"
Name 58 "param"
Name 63 "f"
Name 65 "g"
Name 68 "gl_FragColor"
Name 75 "bigColor"
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -40,57 +37,60 @@ Linked fragment stage:
8: TypePointer Function 7(fvec4)
9: TypeFunction 6(float) 8(ptr)
15: TypeFunction 6(float)
20: TypePointer PrivateGlobal 6(float)
21(h): 20(ptr) Variable PrivateGlobal
20: TypePointer Private 6(float)
21(h): 20(ptr) Variable Private
22: 6(float) Constant 0
29: TypePointer UniformConstant 6(float)
30(d): 29(ptr) Variable UniformConstant
32: 6(float) Constant 1082549862
33: TypeBool
37: 6(float) Constant 1067030938
40: 6(float) Constant 1083179008
48: 6(float) Constant 1081711002
52: TypePointer Input 7(fvec4)
53(BaseColor): 52(ptr) Variable Input
59: TypePointer Function 6(float)
64: TypePointer Output 7(fvec4)
65(gl_FragColor): 64(ptr) Variable Output
71: TypePointer UniformConstant 7(fvec4)
72(bigColor): 71(ptr) Variable UniformConstant
23: TypeInt 32 0
24: 23(int) Constant 0
25: TypePointer Function 6(float)
28: 23(int) Constant 1
33: TypePointer UniformConstant 6(float)
34(d): 33(ptr) Variable UniformConstant
36: 6(float) Constant 1082549862
37: TypeBool
41: 6(float) Constant 1067030938
44: 6(float) Constant 1083179008
52: 6(float) Constant 1081711002
56: TypePointer Input 7(fvec4)
57(BaseColor): 56(ptr) Variable Input
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
5: Label
51(color): 8(ptr) Variable Function
54(param): 8(ptr) Variable Function
60(f): 59(ptr) Variable Function
62(g): 59(ptr) Variable Function
55(color): 8(ptr) Variable Function
58(param): 8(ptr) Variable Function
63(f): 25(ptr) Variable Function
65(g): 25(ptr) Variable Function
Store 21(h) 22
55: 7(fvec4) Load 53(BaseColor)
Store 54(param) 55
56: 6(float) FunctionCall 11(foo(vf4;) 54(param)
57: 7(fvec4) CompositeConstruct 56 56 56 56
Store 51(color) 57
58: 2 FunctionCall 13(bar()
61: 6(float) FunctionCall 16(unreachableReturn()
Store 60(f) 61
63: 6(float) FunctionCall 18(missingReturn()
Store 62(g) 63
66: 7(fvec4) Load 51(color)
67: 6(float) Load 60(f)
68: 7(fvec4) VectorTimesScalar 66 67
69: 6(float) Load 21(h)
70: 7(fvec4) VectorTimesScalar 68 69
Store 65(gl_FragColor) 70
59: 7(fvec4) Load 57(BaseColor)
Store 58(param) 59
60: 6(float) FunctionCall 11(foo(vf4;) 58(param)
61: 7(fvec4) CompositeConstruct 60 60 60 60
Store 55(color) 61
62: 2 FunctionCall 13(bar()
64: 6(float) FunctionCall 16(unreachableReturn()
Store 63(f) 64
66: 6(float) FunctionCall 18(missingReturn()
Store 65(g) 66
69: 7(fvec4) Load 55(color)
70: 6(float) Load 63(f)
71: 7(fvec4) VectorTimesScalar 69 70
72: 6(float) Load 21(h)
73: 7(fvec4) VectorTimesScalar 71 72
Store 68(gl_FragColor) 73
Return
FunctionEnd
11(foo(vf4;): 6(float) Function None 9
10(bar): 8(ptr) FunctionParameter
12: Label
23: 7(fvec4) Load 10(bar)
24: 6(float) CompositeExtract 23 0
25: 7(fvec4) Load 10(bar)
26: 6(float) CompositeExtract 25 1
27: 6(float) FAdd 24 26
ReturnValue 27
26: 25(ptr) AccessChain 10(bar) 24
27: 6(float) Load 26
29: 25(ptr) AccessChain 10(bar) 28
30: 6(float) Load 29
31: 6(float) FAdd 27 30
ReturnValue 31
FunctionEnd
13(bar(): 2 Function None 3
14: Label
@ -98,29 +98,29 @@ Linked fragment stage:
FunctionEnd
16(unreachableReturn(): 6(float) Function None 15
17: Label
31: 6(float) Load 30(d)
34: 33(bool) FOrdLessThan 31 32
SelectionMerge 36 None
BranchConditional 34 35 39
35: Label
ReturnValue 37
35: 6(float) Load 34(d)
38: 37(bool) FOrdLessThan 35 36
SelectionMerge 40 None
BranchConditional 38 39 43
39: Label
ReturnValue 40
36: Label
42: 6(float) Undef
ReturnValue 42
ReturnValue 41
43: Label
ReturnValue 44
40: Label
46: 6(float) Undef
ReturnValue 46
FunctionEnd
18(missingReturn(): 6(float) Function None 15
19: Label
43: 6(float) Load 30(d)
44: 33(bool) FOrdLessThan 43 40
SelectionMerge 46 None
BranchConditional 44 45 46
45: Label
47: 6(float) Load 30(d)
Store 21(h) 47
ReturnValue 48
46: Label
50: 6(float) Undef
ReturnValue 50
47: 6(float) Load 34(d)
48: 37(bool) FOrdLessThan 47 44
SelectionMerge 50 None
BranchConditional 48 49 50
49: Label
51: 6(float) Load 34(d)
Store 21(h) 51
ReturnValue 52
50: Label
54: 6(float) Undef
ReturnValue 54
FunctionEnd

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -5,15 +5,15 @@ Warning, version 430 is not yet complete; most version-specific features are pre
Linked vertex stage:
// Module Version 99
// Generated by (magic number): 51a00bb
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 25
Source GLSL 430
Capability Shader
1: ExtInstImport "GLSL.std.450"
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 9 "outVc"
Name 11 "inV"
@ -23,15 +23,11 @@ Linked vertex stage:
Name 19 "outVcn"
Name 23 "gl_VertexID"
Name 24 "gl_InstanceID"
Decorate 9(outVc) Smooth
Decorate 13(outVs) Smooth
Decorate 15(outVf) Flat
Decorate 17(outVn) Noperspective
Decorate 19(outVcn) Noperspective
Decorate 17(outVn) NoPerspective
Decorate 19(outVcn) NoPerspective
Decorate 23(gl_VertexID) BuiltIn VertexId
Decorate 23(gl_VertexID) NoStaticUse
Decorate 24(gl_InstanceID) BuiltIn InstanceId
Decorate 24(gl_InstanceID) NoStaticUse
2: TypeVoid
3: TypeFunction 2
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:
// Module Version 99
// Generated by (magic number): 51a00bb
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 211
Source GLSL 430
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
ExecutionMode 4 OriginLowerLeft
Source GLSL 430
Name 4 "main"
Name 9 "lod"
Name 13 "samp1D"
@ -41,8 +41,6 @@ Linked fragment stage:
Name 176 "usampCubeA"
Name 206 "sampBuf"
Name 210 "sampRect"
Decorate 206(sampBuf) NoStaticUse
Decorate 210(sampRect) NoStaticUse
2: TypeVoid
3: TypeFunction 2
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:
// Module Version 99
// Generated by (magic number): 51a00bb
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 25
Source GLSL 450
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main"
EntryPoint Vertex 4 "main" 9 23 24
Source GLSL 450
Name 4 "main"
Name 9 "color"
Name 10 "setBuf"
MemberName 10(setBuf) 0 "color"
Name 12 "setBufInst"
Name 21 "sampler"
Name 21 "samp2D"
Name 23 "gl_VertexID"
Name 24 "gl_InstanceID"
Decorate 9(color) Smooth
Decorate 10(setBuf) GLSLShared
Decorate 10(setBuf) BufferBlock
Decorate 12(setBufInst) DescriptorSet 0
Decorate 12(setBufInst) Binding 8
Decorate 21(sampler) DescriptorSet 4
Decorate 21(sampler) Binding 7
Decorate 21(sampler) NoStaticUse
Decorate 21(samp2D) DescriptorSet 4
Decorate 21(samp2D) Binding 7
Decorate 23(gl_VertexID) BuiltIn VertexId
Decorate 23(gl_VertexID) NoStaticUse
Decorate 24(gl_InstanceID) BuiltIn InstanceId
Decorate 24(gl_InstanceID) NoStaticUse
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -49,7 +45,7 @@ Linked vertex stage:
18: TypeImage 6(float) 2D sampled format:Unknown
19: TypeSampledImage 18
20: TypePointer UniformConstant 19
21(sampler): 20(ptr) Variable UniformConstant
21(samp2D): 20(ptr) Variable UniformConstant
22: TypePointer Input 13(int)
23(gl_VertexID): 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:
// Module Version 99
// Generated by (magic number): 51a00bb
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 143
Source GLSL 400
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
EntryPoint Fragment 4 "main" 12 23
ExecutionMode 4 OriginLowerLeft
Source GLSL 400
Name 4 "main"
Name 8 "foo("
Name 12 "of1"
@ -27,10 +27,6 @@ Linked fragment stage:
Name 138 "uv4"
Name 141 "ub41"
Name 142 "ub42"
Decorate 136(uiv4) NoStaticUse
Decorate 138(uv4) NoStaticUse
Decorate 141(ub41) NoStaticUse
Decorate 142(ub42) NoStaticUse
2: TypeVoid
3: TypeFunction 2
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:
// Module Version 99
// Generated by (magic number): 51a00bb
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 22
Source GLSL 150
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
EntryPoint Fragment 4 "main" 12
ExecutionMode 4 OriginLowerLeft
Source GLSL 150
Name 4 "main"
Name 9 "foo("
Name 12 "BaseColor"
Name 16 "gl_FragColor"
Name 19 "bigColor"
Name 21 "d"
Decorate 12(BaseColor) Smooth
Decorate 16(gl_FragColor) BuiltIn FragColor
Decorate 19(bigColor) NoStaticUse
Decorate 21(d) NoStaticUse
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,18 +1,20 @@
spv.test.frag
Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
Linked fragment stage:
// Module Version 99
// Generated by (magic number): 51a00bb
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 55
Source GLSL 110
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
EntryPoint Fragment 4 "main" 20 38
ExecutionMode 4 OriginLowerLeft
Source GLSL 400
Name 4 "main"
Name 8 "blendscale"
Name 12 "v"
@ -25,9 +27,6 @@ Linked fragment stage:
Name 44 "gl_FragColor"
Name 47 "u"
Name 50 "blend"
Decorate 20(t) Smooth
Decorate 38(coords) Smooth
Decorate 44(gl_FragColor) BuiltIn FragColor
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -83,7 +82,7 @@ Linked fragment stage:
51: 6(float) Load 50(blend)
52: 6(float) Load 8(blendscale)
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
Return
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:
// Module Version 99
// Generated by (magic number): 51a00bb
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 27
Source GLSL 130
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main"
EntryPoint Vertex 4 "main" 21 11 9 26
Source GLSL 130
Name 4 "main"
Name 9 "uv"
Name 11 "uv_in"
@ -21,10 +21,8 @@ Linked vertex stage:
Name 18 "transform"
Name 21 "position"
Name 26 "gl_VertexID"
Decorate 9(uv) Smooth
Decorate 15(gl_Position) BuiltIn Position
Decorate 26(gl_VertexID) BuiltIn VertexId
Decorate 26(gl_VertexID) NoStaticUse
2: TypeVoid
3: TypeFunction 2
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:
// Module Version 99
// Generated by (magic number): 51a00bb
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 290
Source GLSL 130
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
EntryPoint Fragment 4 "main" 289 47
ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main"
Name 8 "blendscale"
Name 10 "bias"
@ -41,11 +41,6 @@ Linked fragment stage:
Name 282 "blend"
Name 288 "scale"
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
3: TypeFunction 2
6: TypeFloat 32
@ -241,69 +236,69 @@ Linked fragment stage:
141: 16(fvec3) Load 18(coords3D)
142: 6(float) CompositeExtract 141 2
143: 6(float) ImageSampleDrefImplicitLod 140 141 142
144: 22(fvec4) CompositeConstruct 143 143 143 143
145: 22(fvec4) Load 26(color)
146: 22(fvec4) FAdd 145 144
144: 22(fvec4) Load 26(color)
145: 22(fvec4) CompositeConstruct 143 143 143 143
146: 22(fvec4) FAdd 144 145
Store 26(color) 146
147: 137 Load 139(shadowSampler1D)
148: 16(fvec3) Load 18(coords3D)
149: 6(float) Load 10(bias)
150: 6(float) CompositeExtract 148 2
151: 6(float) ImageSampleDrefImplicitLod 147 148 150 Bias 149
152: 22(fvec4) CompositeConstruct 151 151 151 151
153: 22(fvec4) Load 26(color)
154: 22(fvec4) FAdd 153 152
152: 22(fvec4) Load 26(color)
153: 22(fvec4) CompositeConstruct 151 151 151 151
154: 22(fvec4) FAdd 152 153
Store 26(color) 154
159: 156 Load 158(shadowSampler2D)
160: 16(fvec3) Load 18(coords3D)
161: 6(float) CompositeExtract 160 2
162: 6(float) ImageSampleDrefImplicitLod 159 160 161
163: 22(fvec4) CompositeConstruct 162 162 162 162
164: 22(fvec4) Load 26(color)
165: 22(fvec4) FAdd 164 163
163: 22(fvec4) Load 26(color)
164: 22(fvec4) CompositeConstruct 162 162 162 162
165: 22(fvec4) FAdd 163 164
Store 26(color) 165
166: 156 Load 158(shadowSampler2D)
167: 16(fvec3) Load 18(coords3D)
168: 6(float) Load 10(bias)
169: 6(float) CompositeExtract 167 2
170: 6(float) ImageSampleDrefImplicitLod 166 167 169 Bias 168
171: 22(fvec4) CompositeConstruct 170 170 170 170
172: 22(fvec4) Load 26(color)
173: 22(fvec4) FAdd 172 171
171: 22(fvec4) Load 26(color)
172: 22(fvec4) CompositeConstruct 170 170 170 170
173: 22(fvec4) FAdd 171 172
Store 26(color) 173
174: 137 Load 139(shadowSampler1D)
175: 22(fvec4) Load 24(coords4D)
176: 6(float) CompositeExtract 175 3
177: 6(float) ImageSampleProjDrefImplicitLod 174 175 176
178: 22(fvec4) CompositeConstruct 177 177 177 177
179: 22(fvec4) Load 26(color)
180: 22(fvec4) FAdd 179 178
178: 22(fvec4) Load 26(color)
179: 22(fvec4) CompositeConstruct 177 177 177 177
180: 22(fvec4) FAdd 178 179
Store 26(color) 180
181: 137 Load 139(shadowSampler1D)
182: 22(fvec4) Load 24(coords4D)
183: 6(float) Load 10(bias)
184: 6(float) CompositeExtract 182 3
185: 6(float) ImageSampleProjDrefImplicitLod 181 182 184 Bias 183
186: 22(fvec4) CompositeConstruct 185 185 185 185
187: 22(fvec4) Load 26(color)
188: 22(fvec4) FAdd 187 186
186: 22(fvec4) Load 26(color)
187: 22(fvec4) CompositeConstruct 185 185 185 185
188: 22(fvec4) FAdd 186 187
Store 26(color) 188
189: 156 Load 158(shadowSampler2D)
190: 22(fvec4) Load 24(coords4D)
191: 6(float) CompositeExtract 190 3
192: 6(float) ImageSampleProjDrefImplicitLod 189 190 191
193: 22(fvec4) CompositeConstruct 192 192 192 192
194: 22(fvec4) Load 26(color)
195: 22(fvec4) FAdd 194 193
193: 22(fvec4) Load 26(color)
194: 22(fvec4) CompositeConstruct 192 192 192 192
195: 22(fvec4) FAdd 193 194
Store 26(color) 195
196: 156 Load 158(shadowSampler2D)
197: 22(fvec4) Load 24(coords4D)
198: 6(float) Load 10(bias)
199: 6(float) CompositeExtract 197 3
200: 6(float) ImageSampleProjDrefImplicitLod 196 197 199 Bias 198
201: 22(fvec4) CompositeConstruct 200 200 200 200
202: 22(fvec4) Load 26(color)
203: 22(fvec4) FAdd 202 201
201: 22(fvec4) Load 26(color)
202: 22(fvec4) CompositeConstruct 200 200 200 200
203: 22(fvec4) FAdd 201 202
Store 26(color) 203
Store 207(iCoords2D) 210
Store 212(iLod) 213
@ -375,7 +370,7 @@ Linked fragment stage:
283: 6(float) Load 282(blend)
284: 6(float) Load 8(blendscale)
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
Return
FunctionEnd

View File

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

View File

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

View File

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

View File

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

View File

@ -5,16 +5,16 @@ WARNING: 0:3: varying deprecated in version 130; may be removed in future releas
Linked fragment stage:
// Module Version 99
// Generated by (magic number): 51a00bb
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 93
Source GLSL 130
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
EntryPoint Fragment 4 "main" 63
ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main"
Name 8 "iLocal"
Name 10 "Count"
@ -35,11 +35,9 @@ Linked fragment stage:
Name 34 "foo2"
Name 36 "foo"
Name 54 "gl_FragColor"
Name 59 "sampler"
Name 59 "samp2D"
Name 63 "coord"
Name 69 "constructed"
Decorate 54(gl_FragColor) BuiltIn FragColor
Decorate 63(coord) Smooth
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
@ -73,7 +71,7 @@ Linked fragment stage:
56: TypeImage 12(float) 2D sampled format:Unknown
57: TypeSampledImage 56
58: TypePointer UniformConstant 57
59(sampler): 58(ptr) Variable UniformConstant
59(samp2D): 58(ptr) Variable UniformConstant
61: TypeVector 12(float) 2
62: TypePointer Input 61(fvec2)
63(coord): 62(ptr) Variable Input
@ -116,7 +114,7 @@ Linked fragment stage:
Branch 28
28: Label
55: 12(float) Load 30(scale)
60: 57 Load 59(sampler)
60: 57 Load 59(samp2D)
64: 61(fvec2) Load 63(coord)
65: 52(fvec4) ImageSampleImplicitLod 60 64
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:
// Module Version 99
// Generated by (magic number): 51a00bb
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 61
Source GLSL 130
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
EntryPoint Fragment 4 "main" 34 39 19 19 48
ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main"
Name 9 "texColor"
Name 13 "texSampler2D"
Name 19 "gl_TexCoord"
Name 34 "color"
Name 39 "alpha"
Name 44 "gl_FragColor"
Name 45 "gl_FragColor"
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
3: TypeFunction 2
6: TypeFloat 32
@ -53,10 +48,11 @@ Linked fragment stage:
34(color): 22(ptr) Variable Input
38: TypePointer Input 6(float)
39(alpha): 38(ptr) Variable Input
43: TypePointer Output 7(fvec4)
44(gl_FragColor): 43(ptr) Variable Output
45: 15(int) Constant 3
46: TypeArray 7(fvec4) 45
41: 15(int) Constant 3
42: TypePointer Function 6(float)
44: TypePointer Output 7(fvec4)
45(gl_FragColor): 44(ptr) Variable Output
46: TypeArray 7(fvec4) 41
47: TypePointer Input 46
48(foo): 47(ptr) Variable Input
49: 20(int) Constant 1
@ -80,9 +76,8 @@ Linked fragment stage:
37: 7(fvec4) FAdd 36 35
Store 9(texColor) 37
40: 6(float) Load 39(alpha)
41: 7(fvec4) Load 9(texColor)
42: 7(fvec4) CompositeInsert 40 41 3
Store 9(texColor) 42
43: 42(ptr) AccessChain 9(texColor) 41
Store 43 40
50: 22(ptr) AccessChain 48(foo) 49
51: 7(fvec4) Load 50
53: 22(ptr) AccessChain 19(gl_TexCoord) 52
@ -93,6 +88,6 @@ Linked fragment stage:
58: 7(fvec4) FAdd 55 57
59: 7(fvec4) Load 9(texColor)
60: 7(fvec4) FAdd 58 59
Store 44(gl_FragColor) 60
Store 45(gl_FragColor) 60
Return
FunctionEnd

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -90,23 +90,6 @@ uniform vec2 v2;
uniform vec3 v3;
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()
{
o = textureGather(sampC, vec3(0.2));
@ -115,5 +98,4 @@ void main()
bar4();
bar5();
bar6();
bar7();
}

View File

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

View File

@ -1,6 +1,6 @@
#version 130
uniform sampler2D sampler;
uniform sampler2D samp2D;
varying mediump vec2 coord;
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));
if (foo2a == foo2b)
v = texture2D(sampler, coord);
v = texture(samp2D, coord);
else
v = texture2D(sampler, 2.0*coord);
v = texture(samp2D, 2.0*coord);
if (u == v)
v *= 3.0;

View File

@ -25,6 +25,12 @@ void main()
shared int atomi;
shared uint atomu;
layout (std140, binding = 0) restrict buffer dataSSB
{
float f;
ivec4 n_frames_rendered;
} result;
void atoms()
{
int origi = atomicAdd(atomi, 3);
@ -35,4 +41,5 @@ void atoms()
origi = atomicMax(atomi, 7);
origi = atomicExchange(atomi, origi);
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;
varying vec2 coord;
in vec2 coord;
void main (void)
{
vec4 v = texture2D(tex, coord);
vec4 v = texture(tex, coord);
if (v == vec4(0.1,0.2,0.3,0.4))
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 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 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];

View File

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

View File

@ -1,6 +1,6 @@
#version 130
uniform sampler2D sampler;
uniform sampler2D samp2D;
varying vec2 coord;
varying vec4 color;
@ -68,5 +68,5 @@ void main()
locals2.bleh = color;
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
layout(set = 4, binding = 7) uniform sampler2D sampler;
layout(set = 4, binding = 7) uniform sampler2D samp2D;
layout(set = 0, binding = 8) buffer setBuf {
vec4 color;

View File

@ -1,6 +1,6 @@
#version 130
uniform sampler2D sampler;
uniform sampler2D samp2D;
varying mediump vec2 coord;
struct lunarStruct1 {
@ -35,5 +35,5 @@ void main()
else
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
uniform sampler2D sampler;
uniform sampler2D samp2D;
varying vec2 coord;
struct s0 {
@ -67,5 +67,5 @@ void main()
if (locals0.i > 5)
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
uniform sampler2D sampler;
uniform sampler2D samp2D;
varying vec2 coord;
struct lunarStruct1 {
@ -26,6 +26,6 @@ void main()
else
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 sampler3D texSampler3D;
@ -7,16 +7,16 @@ uniform float blend;
uniform vec2 scale;
uniform vec4 u;
varying vec2 t;
varying vec3 coords;
in vec2 t;
in vec3 coords;
void main()
{
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);
}

View File

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

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