Move to revision 31 of SPIR-V.
diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt
old mode 100644
new mode 100755
index 6bb140b..a255aca
--- a/SPIRV/CMakeLists.txt
+++ b/SPIRV/CMakeLists.txt
@@ -10,7 +10,8 @@
disassemble.cpp)
set(HEADERS
- spirv.h
+ spirv.hpp
+ GLSL.std.450.h
GlslangToSpv.h
SpvBuilder.h
SPVRemapper.h
diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp
old mode 100644
new mode 100755
index ce4a520..1d1dcaf
--- a/SPIRV/GlslangToSpv.cpp
+++ b/SPIRV/GlslangToSpv.cpp
@@ -39,14 +39,17 @@
// translate them to SPIR-V.
//
-#include "spirv.h"
+#include "spirv.hpp"
#include "GlslangToSpv.h"
#include "SpvBuilder.h"
-#include "GLSL450Lib.h"
+namespace spv {
+ #include "GLSL.std.450.h"
+}
// Glslang includes
#include "../glslang/MachineIndependent/localintermediate.h"
#include "../glslang/MachineIndependent/SymbolTable.h"
+#include "../glslang/Include/Common.h"
#include <string>
#include <map>
@@ -85,6 +88,7 @@
spv::Id createSpvVariable(const glslang::TIntermSymbol*);
spv::Id getSampledType(const glslang::TSampler&);
spv::Id convertGlslangToSpvType(const glslang::TType& type);
+ void updateMemberOffset(const glslang::TType& structType, const glslang::TType& memberType, int& currentOffset, int& nextOffset);
bool isShaderEntrypoint(const glslang::TIntermAggregate* node);
void makeFunctions(const glslang::TIntermSequence&);
@@ -93,6 +97,7 @@
void handleFunctionEntry(const glslang::TIntermAggregate* node);
void translateArguments(const glslang::TIntermSequence& glslangArguments, std::vector<spv::Id>& arguments);
spv::Id handleBuiltInFunctionCall(const glslang::TIntermAggregate*);
+ spv::Id handleTextureCall(spv::Decoration precision, glslang::TOperator, spv::Id typeId, glslang::TSampler, std::vector<spv::Id>& idArguments);
spv::Id handleUserFunctionCall(const glslang::TIntermAggregate*);
spv::Id createBinaryOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, spv::Id left, spv::Id right, glslang::TBasicType typeProxy, bool reduceComparison = true);
@@ -100,7 +105,7 @@
spv::Id createConversion(glslang::TOperator op, spv::Decoration precision, spv::Id destTypeId, spv::Id operand);
spv::Id makeSmearedConstant(spv::Id constant, int vectorSize);
spv::Id createAtomicOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector<spv::Id>& operands);
- spv::Id createMiscOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector<spv::Id>& operands);
+ spv::Id createMiscOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy);
spv::Id createNoArgOperation(glslang::TOperator op);
spv::Id getSymbolId(const glslang::TIntermSymbol* node);
void addDecoration(spv::Id id, spv::Decoration dec);
@@ -208,9 +213,9 @@
spv::Decoration TranslatePrecisionDecoration(const glslang::TType& type)
{
switch (type.getQualifier().precision) {
- case glslang::EpqLow: return spv::DecorationPrecisionLow;
- case glslang::EpqMedium: return spv::DecorationPrecisionMedium;
- case glslang::EpqHigh: return spv::DecorationPrecisionHigh;
+ case glslang::EpqLow: return spv::DecorationRelaxedPrecision; // TODO: Map instead to 16-bit types?
+ case glslang::EpqMedium: return spv::DecorationRelaxedPrecision;
+ case glslang::EpqHigh: return spv::NoPrecision;
default:
return spv::NoPrecision;
}
@@ -255,12 +260,9 @@
case glslang::EvqBuffer:
switch (type.getQualifier().layoutPacking) {
case glslang::ElpShared: return spv::DecorationGLSLShared;
- case glslang::ElpStd140: return spv::DecorationGLSLStd140;
- case glslang::ElpStd430: return spv::DecorationGLSLStd430;
case glslang::ElpPacked: return spv::DecorationGLSLPacked;
default:
- spv::MissingFunctionality("uniform block layout");
- return spv::DecorationGLSLShared;
+ return (spv::Decoration)spv::BadValue;
}
case glslang::EvqVaryingIn:
case glslang::EvqVaryingOut:
@@ -309,7 +311,6 @@
switch (builtIn) {
case glslang::EbvPosition: return spv::BuiltInPosition;
case glslang::EbvPointSize: return spv::BuiltInPointSize;
- case glslang::EbvClipVertex: return spv::BuiltInClipVertex;
case glslang::EbvClipDistance: return spv::BuiltInClipDistance;
case glslang::EbvCullDistance: return spv::BuiltInCullDistance;
case glslang::EbvVertexId: return spv::BuiltInVertexId;
@@ -359,7 +360,7 @@
stdBuiltins = builder.import("GLSL.std.450");
builder.setMemoryModel(spv::AddressingModelLogical, spv::MemoryModelGLSL450);
shaderEntry = builder.makeMain();
- builder.addEntryPoint(executionModel, shaderEntry);
+ builder.addEntryPoint(executionModel, shaderEntry, "main");
// Add the source extensions
const auto& sourceExtensions = glslangIntermediate->getRequestedExtensions();
@@ -374,13 +375,16 @@
unsigned int mode;
switch (glslangIntermediate->getStage()) {
case EShLangVertex:
+ builder.addCapability(spv::CapabilityShader);
break;
case EShLangTessControl:
+ builder.addCapability(spv::CapabilityTessellation);
builder.addExecutionMode(shaderEntry, spv::ExecutionModeOutputVertices, glslangIntermediate->getVertices());
break;
case EShLangTessEvaluation:
+ builder.addCapability(spv::CapabilityTessellation);
switch (glslangIntermediate->getInputPrimitive()) {
case glslang::ElgTriangles: mode = spv::ExecutionModeInputTriangles; break;
case glslang::ElgQuads: mode = spv::ExecutionModeInputQuads; break;
@@ -397,6 +401,7 @@
break;
case EShLangGeometry:
+ builder.addCapability(spv::CapabilityGeometry);
switch (glslangIntermediate->getInputPrimitive()) {
case glslang::ElgPoints: mode = spv::ExecutionModeInputPoints; break;
case glslang::ElgLines: mode = spv::ExecutionModeInputLines; break;
@@ -421,13 +426,17 @@
break;
case EShLangFragment:
+ builder.addCapability(spv::CapabilityShader);
if (glslangIntermediate->getPixelCenterInteger())
builder.addExecutionMode(shaderEntry, spv::ExecutionModePixelCenterInteger);
if (glslangIntermediate->getOriginUpperLeft())
builder.addExecutionMode(shaderEntry, spv::ExecutionModeOriginUpperLeft);
+ else
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModeOriginLowerLeft);
break;
case EShLangCompute:
+ builder.addCapability(spv::CapabilityShader);
break;
default:
@@ -1051,7 +1060,7 @@
result = createUnaryOperation(node->getOp(), precision, convertGlslangToSpvType(node->getType()), operands.front(), node->getType().getBasicType() == glslang::EbtFloat || node->getType().getBasicType() == glslang::EbtDouble);
break;
default:
- result = createMiscOperation(node->getOp(), precision, convertGlslangToSpvType(node->getType()), operands);
+ result = createMiscOperation(node->getOp(), precision, convertGlslangToSpvType(node->getType()), operands, node->getBasicType());
break;
}
}
@@ -1311,9 +1320,11 @@
case glslang::EbtSampler:
{
const glslang::TSampler& sampler = type.getSampler();
- spvType = builder.makeSampler(getSampledType(sampler), TranslateDimensionality(sampler),
- sampler.image ? spv::Builder::samplerContentImage : spv::Builder::samplerContentTextureFilter,
- sampler.arrayed, sampler.shadow, sampler.ms);
+ spvType = builder.makeImageType(getSampledType(sampler), TranslateDimensionality(sampler), sampler.shadow, sampler.arrayed, sampler.ms,
+ sampler.image ? 2 : 1, spv::ImageFormatUnknown); // TODO: translate format, needed for GLSL image ops
+ // OpenGL "textures" need to be combined with a sampler
+ if (! sampler.image)
+ spvType = builder.makeSampledImageType(spvType);
}
break;
case glslang::EbtStruct:
@@ -1350,6 +1361,7 @@
structMap[glslangStruct] = spvType;
// Name and decorate the non-hidden members
+ int offset = -1;
for (int i = 0; i < (int)glslangStruct->size(); i++) {
glslang::TType& glslangType = *(*glslangStruct)[i].type;
int member = i;
@@ -1368,6 +1380,14 @@
builder.addMemberDecoration(spvType, member, spv::DecorationComponent, glslangType.getQualifier().layoutComponent);
if (glslangType.getQualifier().hasXfbOffset())
builder.addMemberDecoration(spvType, member, spv::DecorationOffset, glslangType.getQualifier().layoutXfbOffset);
+ else {
+ // figure out what to do with offset, which is accumulating
+ int nextOffset;
+ updateMemberOffset(type, glslangType, offset, nextOffset);
+ if (offset >= 0)
+ builder.addMemberDecoration(spvType, member, spv::DecorationOffset, glslangType.getQualifier().layoutOffset);
+ offset = nextOffset;
+ }
// built-in variable decorations
spv::BuiltIn builtIn = TranslateBuiltInDecoration(glslangType.getQualifier().builtIn);
@@ -1383,7 +1403,7 @@
builder.addDecoration(spvType, spv::DecorationStream, type.getQualifier().layoutStream);
if (glslangIntermediate->getXfbMode()) {
if (type.getQualifier().hasXfbStride())
- builder.addDecoration(spvType, spv::DecorationStride, type.getQualifier().layoutXfbStride);
+ builder.addDecoration(spvType, spv::DecorationXfbStride, type.getQualifier().layoutXfbStride);
if (type.getQualifier().hasXfbBuffer())
builder.addDecoration(spvType, spv::DecorationXfbBuffer, type.getQualifier().layoutXfbBuffer);
}
@@ -1415,6 +1435,49 @@
return spvType;
}
+// Given a member type of a struct, realign the current offset for it, and compute
+// the next (not yet aligned) offset for the next member, which will get aligned
+// on the next call.
+// 'currentOffset' should be passed in already initialized, ready to modify, and reflecting
+// the migration of data from nextOffset -> currentOffset. It should be -1 on the first call.
+// -1 means a non-forced member offset (no decoration needed).
+void TGlslangToSpvTraverser::updateMemberOffset(const glslang::TType& structType, const glslang::TType& memberType, int& currentOffset, int& nextOffset)
+{
+ // this will get a positive value when deemed necessary
+ nextOffset = -1;
+
+ bool forceOffset = structType.getQualifier().layoutPacking == glslang::ElpStd140 ||
+ structType.getQualifier().layoutPacking == glslang::ElpStd430;
+
+ // override anything in currentOffset with user-set offset
+ if (memberType.getQualifier().hasOffset())
+ currentOffset = memberType.getQualifier().layoutOffset;
+
+ // It could be that current linker usage in glslang updated all the layoutOffset,
+ // in which case the following code does not matter. But, that's not quite right
+ // once cross-compilation unit GLSL validation is done, as the original user
+ // settings are needed in layoutOffset, and then the following will come into play.
+
+ if (! forceOffset) {
+ if (! memberType.getQualifier().hasOffset())
+ currentOffset = -1;
+
+ return;
+ }
+
+ // Getting this far means we are forcing offsets
+ if (currentOffset < 0)
+ currentOffset = 0;
+
+ // Now, currentOffset is valid (either 0, or from a previous nextOffset),
+ // but possibly not yet correctly aligned.
+
+ int memberSize;
+ int memberAlignment = glslangIntermediate->getBaseAlignment(memberType, memberSize, memberType.getQualifier().layoutPacking == glslang::ElpStd140);
+ glslang::RoundToPow2(currentOffset, memberAlignment);
+ nextOffset = currentOffset + memberSize;
+}
+
bool TGlslangToSpvTraverser::isShaderEntrypoint(const glslang::TIntermAggregate* node)
{
return node->getName() == "main(";
@@ -1519,11 +1582,6 @@
{
std::vector<spv::Id> arguments;
translateArguments(node->getSequence(), arguments);
-
- std::vector<spv::Id> argTypes;
- for (int a = 0; a < (int)arguments.size(); ++a)
- argTypes.push_back(builder.getTypeId(arguments[a]));
-
spv::Decoration precision = TranslatePrecisionDecoration(node->getType());
if (node->getName() == "ftransform(") {
@@ -1544,22 +1602,22 @@
if (node->getName().find("textureSize", 0) != std::string::npos) {
if (arguments.size() > 1) {
params.lod = arguments[1];
- return builder.createTextureQueryCall(spv::OpTextureQuerySizeLod, params);
+ return builder.createTextureQueryCall(spv::OpImageQuerySizeLod, params);
} else
- return builder.createTextureQueryCall(spv::OpTextureQuerySize, params);
+ return builder.createTextureQueryCall(spv::OpImageQuerySize, params);
}
// special case the number of samples query
if (node->getName().find("textureSamples", 0) != std::string::npos)
- return builder.createTextureQueryCall(spv::OpTextureQuerySamples, params);
+ return builder.createTextureQueryCall(spv::OpImageQuerySamples, params);
// special case the other queries
if (node->getName().find("Query", 0) != std::string::npos) {
if (node->getName().find("Levels", 0) != std::string::npos)
- return builder.createTextureQueryCall(spv::OpTextureQueryLevels, params);
+ return builder.createTextureQueryCall(spv::OpImageQueryLevels, params);
else if (node->getName().find("Lod", 0) != std::string::npos) {
params.coords = arguments[1];
- return builder.createTextureQueryCall(spv::OpTextureQueryLod, params);
+ return builder.createTextureQueryCall(spv::OpImageQueryLod, params);
} else
spv::MissingFunctionality("glslang texture query");
}
@@ -1599,6 +1657,16 @@
int extraArgs = 0;
if (cubeCompare)
params.Dref = arguments[2];
+ else if (sampler.shadow) {
+ std::vector<spv::Id> indexes;
+ int comp;
+ if (proj)
+ comp = 3;
+ else
+ comp = builder.getNumComponents(params.coords) - 1;
+ indexes.push_back(comp);
+ params.Dref = builder.createCompositeExtract(params.coords, builder.getScalarTypeId(builder.getTypeId(params.coords)), indexes);
+ }
if (lod) {
params.lod = arguments[2];
++extraArgs;
@@ -1835,7 +1903,7 @@
break;
case glslang::EOpLogicalXor:
needMatchingVectors = false;
- binOp = spv::OpLogicalXor;
+ binOp = spv::OpLogicalNotEqual;
break;
case glslang::EOpLessThan:
@@ -1974,107 +2042,109 @@
case glslang::EOpLogicalNot:
case glslang::EOpVectorLogicalNot:
+ unaryOp = spv::OpLogicalNot;
+ break;
case glslang::EOpBitwiseNot:
unaryOp = spv::OpNot;
break;
-
+
case glslang::EOpDeterminant:
- libCall = GLSL_STD_450::Determinant;
+ libCall = spv::GLSLstd450Determinant;
break;
case glslang::EOpMatrixInverse:
- libCall = GLSL_STD_450::MatrixInverse;
+ libCall = spv::GLSLstd450MatrixInverse;
break;
case glslang::EOpTranspose:
unaryOp = spv::OpTranspose;
break;
case glslang::EOpRadians:
- libCall = GLSL_STD_450::Radians;
+ libCall = spv::GLSLstd450Radians;
break;
case glslang::EOpDegrees:
- libCall = GLSL_STD_450::Degrees;
+ libCall = spv::GLSLstd450Degrees;
break;
case glslang::EOpSin:
- libCall = GLSL_STD_450::Sin;
+ libCall = spv::GLSLstd450Sin;
break;
case glslang::EOpCos:
- libCall = GLSL_STD_450::Cos;
+ libCall = spv::GLSLstd450Cos;
break;
case glslang::EOpTan:
- libCall = GLSL_STD_450::Tan;
+ libCall = spv::GLSLstd450Tan;
break;
case glslang::EOpAcos:
- libCall = GLSL_STD_450::Acos;
+ libCall = spv::GLSLstd450Acos;
break;
case glslang::EOpAsin:
- libCall = GLSL_STD_450::Asin;
+ libCall = spv::GLSLstd450Asin;
break;
case glslang::EOpAtan:
- libCall = GLSL_STD_450::Atan;
+ libCall = spv::GLSLstd450Atan;
break;
case glslang::EOpAcosh:
- libCall = GLSL_STD_450::Acosh;
+ libCall = spv::GLSLstd450Acosh;
break;
case glslang::EOpAsinh:
- libCall = GLSL_STD_450::Asinh;
+ libCall = spv::GLSLstd450Asinh;
break;
case glslang::EOpAtanh:
- libCall = GLSL_STD_450::Atanh;
+ libCall = spv::GLSLstd450Atanh;
break;
case glslang::EOpTanh:
- libCall = GLSL_STD_450::Tanh;
+ libCall = spv::GLSLstd450Tanh;
break;
case glslang::EOpCosh:
- libCall = GLSL_STD_450::Cosh;
+ libCall = spv::GLSLstd450Cosh;
break;
case glslang::EOpSinh:
- libCall = GLSL_STD_450::Sinh;
+ libCall = spv::GLSLstd450Sinh;
break;
case glslang::EOpLength:
- libCall = GLSL_STD_450::Length;
+ libCall = spv::GLSLstd450Length;
break;
case glslang::EOpNormalize:
- libCall = GLSL_STD_450::Normalize;
+ libCall = spv::GLSLstd450Normalize;
break;
case glslang::EOpExp:
- libCall = GLSL_STD_450::Exp;
+ libCall = spv::GLSLstd450Exp;
break;
case glslang::EOpLog:
- libCall = GLSL_STD_450::Log;
+ libCall = spv::GLSLstd450Log;
break;
case glslang::EOpExp2:
- libCall = GLSL_STD_450::Exp2;
+ libCall = spv::GLSLstd450Exp2;
break;
case glslang::EOpLog2:
- libCall = GLSL_STD_450::Log2;
+ libCall = spv::GLSLstd450Log2;
break;
case glslang::EOpSqrt:
- libCall = GLSL_STD_450::Sqrt;
+ libCall = spv::GLSLstd450Sqrt;
break;
case glslang::EOpInverseSqrt:
- libCall = GLSL_STD_450::InverseSqrt;
+ libCall = spv::GLSLstd450InverseSqrt;
break;
case glslang::EOpFloor:
- libCall = GLSL_STD_450::Floor;
+ libCall = spv::GLSLstd450Floor;
break;
case glslang::EOpTrunc:
- libCall = GLSL_STD_450::Trunc;
+ libCall = spv::GLSLstd450Trunc;
break;
case glslang::EOpRound:
- libCall = GLSL_STD_450::Round;
+ libCall = spv::GLSLstd450Round;
break;
case glslang::EOpRoundEven:
- libCall = GLSL_STD_450::RoundEven;
+ libCall = spv::GLSLstd450RoundEven;
break;
case glslang::EOpCeil:
- libCall = GLSL_STD_450::Ceil;
+ libCall = spv::GLSLstd450Ceil;
break;
case glslang::EOpFract:
- libCall = GLSL_STD_450::Fract;
+ libCall = spv::GLSLstd450Fract;
break;
case glslang::EOpIsNan:
@@ -2084,35 +2154,23 @@
unaryOp = spv::OpIsInf;
break;
- case glslang::EOpFloatBitsToInt:
- libCall = GLSL_STD_450::FloatBitsToInt;
- break;
- case glslang::EOpFloatBitsToUint:
- libCall = GLSL_STD_450::FloatBitsToUint;
- break;
- case glslang::EOpIntBitsToFloat:
- libCall = GLSL_STD_450::IntBitsToFloat;
- break;
- case glslang::EOpUintBitsToFloat:
- libCall = GLSL_STD_450::UintBitsToFloat;
- break;
case glslang::EOpPackSnorm2x16:
- libCall = GLSL_STD_450::PackSnorm2x16;
+ libCall = spv::GLSLstd450PackSnorm2x16;
break;
case glslang::EOpUnpackSnorm2x16:
- libCall = GLSL_STD_450::UnpackSnorm2x16;
+ libCall = spv::GLSLstd450UnpackSnorm2x16;
break;
case glslang::EOpPackUnorm2x16:
- libCall = GLSL_STD_450::PackUnorm2x16;
+ libCall = spv::GLSLstd450PackUnorm2x16;
break;
case glslang::EOpUnpackUnorm2x16:
- libCall = GLSL_STD_450::UnpackUnorm2x16;
+ libCall = spv::GLSLstd450UnpackUnorm2x16;
break;
case glslang::EOpPackHalf2x16:
- libCall = GLSL_STD_450::PackHalf2x16;
+ libCall = spv::GLSLstd450PackHalf2x16;
break;
case glslang::EOpUnpackHalf2x16:
- libCall = GLSL_STD_450::UnpackHalf2x16;
+ libCall = spv::GLSLstd450UnpackHalf2x16;
break;
case glslang::EOpDPdx:
@@ -2151,10 +2209,16 @@
break;
case glslang::EOpAbs:
- libCall = GLSL_STD_450::Abs;
+ if (isFloat)
+ libCall = spv::GLSLstd450FAbs;
+ else
+ libCall = spv::GLSLstd450SAbs;
break;
case glslang::EOpSign:
- libCall = GLSL_STD_450::Sign;
+ if (isFloat)
+ libCall = spv::GLSLstd450FSign;
+ else
+ libCall = spv::GLSLstd450SSign;
break;
default:
@@ -2291,10 +2355,10 @@
opCode = spv::OpAtomicIAdd;
break;
case glslang::EOpAtomicMin:
- opCode = spv::OpAtomicIMin;
+ opCode = spv::OpAtomicSMin;
break;
case glslang::EOpAtomicMax:
- opCode = spv::OpAtomicIMax;
+ opCode = spv::OpAtomicSMax;
break;
case glslang::EOpAtomicAnd:
opCode = spv::OpAtomicAnd;
@@ -2331,8 +2395,8 @@
std::vector<spv::Id> spvAtomicOperands; // hold the spv operands
auto opIt = operands.begin(); // walk the glslang operands
spvAtomicOperands.push_back(*(opIt++));
- spvAtomicOperands.push_back(spv::ExecutionScopeDevice); // TBD: what is the correct scope?
- spvAtomicOperands.push_back( spv::MemorySemanticsMaskNone); // TBD: what are the correct memory semantics?
+ spvAtomicOperands.push_back(builder.makeUintConstant(spv::ScopeDevice)); // TBD: what is the correct scope?
+ spvAtomicOperands.push_back(builder.makeUintConstant(spv::MemorySemanticsMaskNone)); // TBD: what are the correct memory semantics?
// Add the rest of the operands, skipping the first one, which was dealt with above.
// For some ops, there are none, for some 1, for compare-exchange, 2.
@@ -2342,58 +2406,76 @@
return builder.createOp(opCode, typeId, spvAtomicOperands);
}
-spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector<spv::Id>& operands)
+spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector<spv::Id>& operands, glslang::TBasicType typeProxy)
{
+ bool isUnsigned = typeProxy == glslang::EbtUint;
+ bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble;
+
spv::Op opCode = spv::OpNop;
int libCall = -1;
switch (op) {
case glslang::EOpMin:
- libCall = GLSL_STD_450::Min;
+ if (isFloat)
+ libCall = spv::GLSLstd450FMin;
+ else if (isUnsigned)
+ libCall = spv::GLSLstd450UMin;
+ else
+ libCall = spv::GLSLstd450SMin;
break;
case glslang::EOpModf:
- libCall = GLSL_STD_450::Modf;
+ libCall = spv::GLSLstd450Modf;
break;
case glslang::EOpMax:
- libCall = GLSL_STD_450::Max;
+ if (isFloat)
+ libCall = spv::GLSLstd450FMax;
+ else if (isUnsigned)
+ libCall = spv::GLSLstd450UMax;
+ else
+ libCall = spv::GLSLstd450SMax;
break;
case glslang::EOpPow:
- libCall = GLSL_STD_450::Pow;
+ libCall = spv::GLSLstd450Pow;
break;
case glslang::EOpDot:
opCode = spv::OpDot;
break;
case glslang::EOpAtan:
- libCall = GLSL_STD_450::Atan2;
+ libCall = spv::GLSLstd450Atan2;
break;
case glslang::EOpClamp:
- libCall = GLSL_STD_450::Clamp;
+ if (isFloat)
+ libCall = spv::GLSLstd450FClamp;
+ else if (isUnsigned)
+ libCall = spv::GLSLstd450UClamp;
+ else
+ libCall = spv::GLSLstd450SClamp;
break;
case glslang::EOpMix:
- libCall = GLSL_STD_450::Mix;
+ libCall = spv::GLSLstd450Mix;
break;
case glslang::EOpStep:
- libCall = GLSL_STD_450::Step;
+ libCall = spv::GLSLstd450Step;
break;
case glslang::EOpSmoothStep:
- libCall = GLSL_STD_450::SmoothStep;
+ libCall = spv::GLSLstd450SmoothStep;
break;
case glslang::EOpDistance:
- libCall = GLSL_STD_450::Distance;
+ libCall = spv::GLSLstd450Distance;
break;
case glslang::EOpCross:
- libCall = GLSL_STD_450::Cross;
+ libCall = spv::GLSLstd450Cross;
break;
case glslang::EOpFaceForward:
- libCall = GLSL_STD_450::FaceForward;
+ libCall = spv::GLSLstd450FaceForward;
break;
case glslang::EOpReflect:
- libCall = GLSL_STD_450::Reflect;
+ libCall = spv::GLSLstd450Reflect;
break;
case glslang::EOpRefract:
- libCall = GLSL_STD_450::Refract;
+ libCall = spv::GLSLstd450Refract;
break;
default:
@@ -2444,26 +2526,26 @@
builder.createNoResultOp(spv::OpEndPrimitive);
return 0;
case glslang::EOpBarrier:
- builder.createMemoryBarrier(spv::ExecutionScopeDevice, spv::MemorySemanticsAllMemory);
- builder.createControlBarrier(spv::ExecutionScopeDevice);
+ builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsAllMemory);
+ builder.createControlBarrier(spv::ScopeDevice, spv::ScopeDevice, spv::MemorySemanticsMaskNone);
return 0;
case glslang::EOpMemoryBarrier:
- builder.createMemoryBarrier(spv::ExecutionScopeDevice, spv::MemorySemanticsAllMemory);
+ builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsAllMemory);
return 0;
case glslang::EOpMemoryBarrierAtomicCounter:
- builder.createMemoryBarrier(spv::ExecutionScopeDevice, spv::MemorySemanticsAtomicCounterMemoryMask);
+ builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsAtomicCounterMemoryMask);
return 0;
case glslang::EOpMemoryBarrierBuffer:
- builder.createMemoryBarrier(spv::ExecutionScopeDevice, spv::MemorySemanticsUniformMemoryMask);
+ builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsUniformMemoryMask);
return 0;
case glslang::EOpMemoryBarrierImage:
- builder.createMemoryBarrier(spv::ExecutionScopeDevice, spv::MemorySemanticsImageMemoryMask);
+ builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsImageMemoryMask);
return 0;
case glslang::EOpMemoryBarrierShared:
- builder.createMemoryBarrier(spv::ExecutionScopeDevice, spv::MemorySemanticsWorkgroupLocalMemoryMask);
+ builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsWorkgroupLocalMemoryMask);
return 0;
case glslang::EOpGroupMemoryBarrier:
- builder.createMemoryBarrier(spv::ExecutionScopeDevice, spv::MemorySemanticsWorkgroupGlobalMemoryMask);
+ builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsWorkgroupGlobalMemoryMask);
return 0;
default:
spv::MissingFunctionality("operation with no arguments");
@@ -2495,7 +2577,7 @@
builder.addDecoration(id, spv::DecorationComponent, symbol->getQualifier().layoutComponent);
if (glslangIntermediate->getXfbMode()) {
if (symbol->getQualifier().hasXfbStride())
- builder.addDecoration(id, spv::DecorationStride, symbol->getQualifier().layoutXfbStride);
+ builder.addDecoration(id, spv::DecorationXfbStride, symbol->getQualifier().layoutXfbStride);
if (symbol->getQualifier().hasXfbBuffer())
builder.addDecoration(id, spv::DecorationXfbBuffer, symbol->getQualifier().layoutXfbBuffer);
if (symbol->getQualifier().hasXfbOffset())
@@ -2512,14 +2594,14 @@
builder.addDecoration(id, spv::DecorationBinding, symbol->getQualifier().layoutBinding);
if (glslangIntermediate->getXfbMode()) {
if (symbol->getQualifier().hasXfbStride())
- builder.addDecoration(id, spv::DecorationStride, symbol->getQualifier().layoutXfbStride);
+ builder.addDecoration(id, spv::DecorationXfbStride, symbol->getQualifier().layoutXfbStride);
if (symbol->getQualifier().hasXfbBuffer())
builder.addDecoration(id, spv::DecorationXfbBuffer, symbol->getQualifier().layoutXfbBuffer);
}
// built-in variable decorations
spv::BuiltIn builtIn = TranslateBuiltInDecoration(symbol->getQualifier().builtIn);
- if ((unsigned int)builtIn != spv::BadValue)
+ if (builtIn != spv::BadValue)
builder.addDecoration(id, spv::DecorationBuiltIn, (int)builtIn);
if (linkageOnly)
diff --git a/SPIRV/SPVRemapper.cpp b/SPIRV/SPVRemapper.cpp
old mode 100644
new mode 100755
index 3cec0e5..7349c16
--- a/SPIRV/SPVRemapper.cpp
+++ b/SPIRV/SPVRemapper.cpp
@@ -82,6 +82,8 @@
case spv::OpTypeFloat: // fall through...
case spv::OpTypePointer: return range_t(2, 3);
case spv::OpTypeInt: return range_t(2, 4);
+ // TODO: case spv::OpTypeImage:
+ // TODO: case spv::OpTypeSampledImage:
case spv::OpTypeSampler: return range_t(3, 8);
case spv::OpTypeVector: // fall through
case spv::OpTypeMatrix: // ...
@@ -164,8 +166,8 @@
case spv::OpTypeFloat:
case spv::OpTypeVector:
case spv::OpTypeMatrix:
+ case spv::OpTypeImage:
case spv::OpTypeSampler:
- case spv::OpTypeFilter:
case spv::OpTypeArray:
case spv::OpTypeRuntimeArray:
case spv::OpTypeStruct:
@@ -184,12 +186,11 @@
bool spirvbin_t::isConstOp(spv::Op opCode) const
{
switch (opCode) {
- case spv::OpConstantNullObject: error("unimplemented constant type");
+ case spv::OpConstantNull: error("unimplemented constant type");
case spv::OpConstantSampler: error("unimplemented constant type");
case spv::OpConstantTrue:
case spv::OpConstantFalse:
- case spv::OpConstantNullPointer:
case spv::OpConstantComposite:
case spv::OpConstant: return true;
default: return false;
@@ -486,7 +487,7 @@
case spv::OperandFunction:
case spv::OperandMemorySemantics:
case spv::OperandMemoryAccess:
- case spv::OperandExecutionScope:
+ case spv::OperandScope:
case spv::OperandGroupOperation:
case spv::OperandKernelEnqueueFlags:
case spv::OperandKernelProfilingInfo:
@@ -610,19 +611,14 @@
fnId = asId(start + 2);
break;
- case spv::OpTextureSample:
- case spv::OpTextureSampleDref:
- case spv::OpTextureSampleLod:
- case spv::OpTextureSampleProj:
- case spv::OpTextureSampleGrad:
- case spv::OpTextureSampleOffset:
- case spv::OpTextureSampleProjLod:
- case spv::OpTextureSampleProjGrad:
- case spv::OpTextureSampleLodOffset:
- case spv::OpTextureSampleProjOffset:
- case spv::OpTextureSampleGradOffset:
- case spv::OpTextureSampleProjLodOffset:
- case spv::OpTextureSampleProjGradOffset:
+ case spv::OpImageSampleImplicitLod:
+ case spv::OpImageSampleExplicitLod:
+ case spv::OpImageSampleDrefImplicitLod:
+ case spv::OpImageSampleDrefExplicitLod:
+ case spv::OpImageSampleProjImplicitLod:
+ case spv::OpImageSampleProjExplicitLod:
+ case spv::OpImageSampleProjDrefImplicitLod:
+ case spv::OpImageSampleProjDrefExplicitLod:
case spv::OpDot:
case spv::OpCompositeExtract:
case spv::OpCompositeInsert:
@@ -668,7 +664,7 @@
process(
[&](spv::Op opCode, unsigned start) {
// Add inputs and uniforms to the map
- if (((opCode == spv::OpVariable && asWordCount(start) == 4) || (opCode == spv::OpVariableArray)) &&
+ if ((opCode == spv::OpVariable && asWordCount(start) == 4) &&
(spv[start+3] == spv::StorageClassUniform ||
spv[start+3] == spv::StorageClassUniformConstant ||
spv[start+3] == spv::StorageClassInput))
@@ -695,7 +691,7 @@
process(
[&](spv::Op opCode, unsigned start) {
// Add inputs and uniforms to the map
- if (((opCode == spv::OpVariable && asWordCount(start) == 4) || (opCode == spv::OpVariableArray)) &&
+ if ((opCode == spv::OpVariable && asWordCount(start) == 4) &&
(spv[start+3] == spv::StorageClassOutput))
fnLocalVars.insert(asId(start+2));
@@ -729,8 +725,7 @@
const int wordCount = asWordCount(start);
// Add local variables to the map
- if ((opCode == spv::OpVariable && spv[start+3] == spv::StorageClassFunction && asWordCount(start) == 4) ||
- (opCode == spv::OpVariableArray && spv[start+3] == spv::StorageClassFunction))
+ if ((opCode == spv::OpVariable && spv[start+3] == spv::StorageClassFunction && asWordCount(start) == 4))
fnLocalVars.insert(asId(start+2));
// Ignore process vars referenced via access chain
@@ -1008,14 +1003,14 @@
return 6 + hashType(typePos(spv[typeStart+2])) * (spv[typeStart+3] - 1);
case spv::OpTypeMatrix:
return 30 + hashType(typePos(spv[typeStart+2])) * (spv[typeStart+3] - 1);
- case spv::OpTypeSampler:
+ case spv::OpTypeImage:
return 120 + hashType(typePos(spv[typeStart+2])) +
spv[typeStart+3] + // dimensionality
- spv[typeStart+4] * 8 * 16 + // content
+ spv[typeStart+4] * 8 * 16 + // depth
spv[typeStart+5] * 4 * 16 + // arrayed
- spv[typeStart+6] * 2 * 16 + // compare
- spv[typeStart+7] * 1 * 16; // multisampled
- case spv::OpTypeFilter:
+ spv[typeStart+6] * 2 * 16 + // multisampled
+ spv[typeStart+7] * 1 * 16; // format
+ case spv::OpTypeSampler:
return 500;
case spv::OpTypeArray:
return 501 + hashType(typePos(spv[typeStart+2])) * spv[typeStart+3];
@@ -1045,12 +1040,11 @@
case spv::OpTypeQueue: return 300003;
case spv::OpTypePipe: return 300004;
- case spv::OpConstantNullObject: return 300005;
+ case spv::OpConstantNull: return 300005;
case spv::OpConstantSampler: return 300006;
case spv::OpConstantTrue: return 300007;
case spv::OpConstantFalse: return 300008;
- case spv::OpConstantNullPointer: return 300009;
case spv::OpConstantComposite:
{
std::uint32_t hash = 300011 + hashType(typePos(spv[typeStart+1]));
diff --git a/SPIRV/SPVRemapper.h b/SPIRV/SPVRemapper.h
old mode 100644
new mode 100755
index 0dd8538..37f995b
--- a/SPIRV/SPVRemapper.h
+++ b/SPIRV/SPVRemapper.h
@@ -101,7 +101,7 @@
#include <set>
#include <cassert>
-#include "spirv.h"
+#include "spirv.hpp"
#include "spvIR.h"
namespace spv {
diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp
old mode 100644
new mode 100755
index 8d6b4e8..8401fcf
--- a/SPIRV/SpvBuilder.cpp
+++ b/SPIRV/SpvBuilder.cpp
@@ -295,31 +295,54 @@
return type->getResultId();
}
-Id Builder::makeSampler(Id sampledType, Dim dim, samplerContent content, bool arrayed, bool shadow, bool ms)
+Id Builder::makeImageType(Id sampledType, Dim dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format)
{
// try to find it
Instruction* type;
- for (int t = 0; t < (int)groupedTypes[OpTypeSampler].size(); ++t) {
- type = groupedTypes[OpTypeSampler][t];
+ for (int t = 0; t < (int)groupedTypes[OpTypeImage].size(); ++t) {
+ type = groupedTypes[OpTypeImage][t];
if (type->getIdOperand(0) == sampledType &&
type->getImmediateOperand(1) == (unsigned int)dim &&
- type->getImmediateOperand(2) == (unsigned int)content &&
+ type->getImmediateOperand(2) == ( depth ? 1u : 0u) &&
type->getImmediateOperand(3) == (arrayed ? 1u : 0u) &&
- type->getImmediateOperand(4) == ( shadow ? 1u : 0u) &&
- type->getImmediateOperand(5) == ( ms ? 1u : 0u))
+ type->getImmediateOperand(4) == ( ms ? 1u : 0u) &&
+ type->getImmediateOperand(5) == sampled &&
+ type->getImmediateOperand(6) == (unsigned int)format)
return type->getResultId();
}
// not found, make it
- type = new Instruction(getUniqueId(), NoType, OpTypeSampler);
+ type = new Instruction(getUniqueId(), NoType, OpTypeImage);
type->addIdOperand(sampledType);
type->addImmediateOperand( dim);
- type->addImmediateOperand(content);
+ type->addImmediateOperand( depth ? 1 : 0);
type->addImmediateOperand(arrayed ? 1 : 0);
- type->addImmediateOperand( shadow ? 1 : 0);
type->addImmediateOperand( ms ? 1 : 0);
+ type->addImmediateOperand(sampled);
+ type->addImmediateOperand((unsigned int)format);
- groupedTypes[OpTypeSampler].push_back(type);
+ groupedTypes[OpTypeImage].push_back(type);
+ constantsTypesGlobals.push_back(type);
+ module.mapInstruction(type);
+
+ return type->getResultId();
+}
+
+Id Builder::makeSampledImageType(Id imageType)
+{
+ // try to find it
+ Instruction* type;
+ for (int t = 0; t < (int)groupedTypes[OpTypeSampledImage].size(); ++t) {
+ type = groupedTypes[OpTypeSampledImage][t];
+ if (type->getIdOperand(0) == imageType)
+ return type->getResultId();
+ }
+
+ // not found, make it
+ type = new Instruction(getUniqueId(), NoType, OpTypeSampledImage);
+ type->addIdOperand(imageType);
+
+ groupedTypes[OpTypeSampledImage].push_back(type);
constantsTypesGlobals.push_back(type);
module.mapInstruction(type);
@@ -606,11 +629,12 @@
return c->getResultId();
}
-void Builder::addEntryPoint(ExecutionModel model, Function* function)
+void Builder::addEntryPoint(ExecutionModel model, Function* function, const char* name)
{
Instruction* entryPoint = new Instruction(OpEntryPoint);
entryPoint->addImmediateOperand(model);
entryPoint->addIdOperand(function->getId());
+ entryPoint->addStringOperand(name);
entryPoints.push_back(entryPoint);
}
@@ -945,18 +969,20 @@
buildPoint->addInstruction(op);
}
-void Builder::createControlBarrier(unsigned executionScope)
+void Builder::createControlBarrier(Scope execution, Scope memory, MemorySemanticsMask semantics)
{
Instruction* op = new Instruction(OpControlBarrier);
- op->addImmediateOperand(executionScope);
+ op->addImmediateOperand(makeUintConstant(execution));
+ op->addImmediateOperand(makeUintConstant(memory));
+ op->addImmediateOperand(makeUintConstant(semantics));
buildPoint->addInstruction(op);
}
void Builder::createMemoryBarrier(unsigned executionScope, unsigned memorySemantics)
{
Instruction* op = new Instruction(OpMemoryBarrier);
- op->addImmediateOperand(executionScope);
- op->addImmediateOperand(memorySemantics);
+ op->addImmediateOperand(makeUintConstant(executionScope));
+ op->addImmediateOperand(makeUintConstant(memorySemantics));
buildPoint->addInstruction(op);
}
@@ -991,7 +1017,7 @@
return op->getResultId();
}
-Id Builder::createOp(Op opCode, Id typeId, std::vector<Id>& operands)
+Id Builder::createOp(Op opCode, Id typeId, const std::vector<Id>& operands)
{
Instruction* op = new Instruction(getUniqueId(), typeId, opCode);
for (auto operand : operands)
@@ -1107,64 +1133,95 @@
// Create the correct instruction based on the inputs, and make the call.
Id Builder::createTextureCall(Decoration precision, Id resultType, bool proj, const TextureParameters& parameters)
{
- static const int maxTextureArgs = 5;
+ static const int maxTextureArgs = 10;
Id texArgs[maxTextureArgs] = {};
//
- // Set up the arguments
+ // Set up the fixed arguments
//
-
int numArgs = 0;
+ bool xplicit = false;
texArgs[numArgs++] = parameters.sampler;
texArgs[numArgs++] = parameters.coords;
-
- if (parameters.gradX) {
- texArgs[numArgs++] = parameters.gradX;
- texArgs[numArgs++] = parameters.gradY;
- }
- if (parameters.lod)
- texArgs[numArgs++] = parameters.lod;
- if (parameters.offset)
- texArgs[numArgs++] = parameters.offset;
- if (parameters.bias)
- texArgs[numArgs++] = parameters.bias;
if (parameters.Dref)
texArgs[numArgs++] = parameters.Dref;
//
+ // Set up the optional arguments
+ //
+ int optArgNum = numArgs; // track which operand, if it exists, is the mask of optional arguments
+ ++numArgs; // speculatively make room for the mask operand
+ ImageOperandsMask mask = ImageOperandsMaskNone; // the mask operand
+ if (parameters.bias) {
+ mask = (ImageOperandsMask)(mask | ImageOperandsBiasMask);
+ texArgs[numArgs++] = parameters.bias;
+ }
+ if (parameters.lod) {
+ mask = (ImageOperandsMask)(mask | ImageOperandsLodMask);
+ texArgs[numArgs++] = parameters.lod;
+ xplicit = true;
+ }
+ if (parameters.gradX) {
+ mask = (ImageOperandsMask)(mask | ImageOperandsGradMask);
+ texArgs[numArgs++] = parameters.gradX;
+ texArgs[numArgs++] = parameters.gradY;
+ xplicit = true;
+ }
+ if (parameters.offset) {
+ mask = (ImageOperandsMask)(mask | ImageOperandsOffsetMask);
+ texArgs[numArgs++] = parameters.offset;
+ }
+ // TBD: if Offset is constant, use ImageOperandsConstOffsetMask
+ if (parameters.offsets) {
+ mask = (ImageOperandsMask)(mask | ImageOperandsConstOffsetsMask);
+ texArgs[numArgs++] = parameters.offsets;
+ }
+ if (parameters.sample) {
+ mask = (ImageOperandsMask)(mask | ImageOperandsSampleMask);
+ texArgs[numArgs++] = parameters.sample;
+ }
+ if (mask == ImageOperandsMaskNone)
+ --numArgs; // undo speculative reservation for the mask argument
+ else
+ texArgs[optArgNum] = mask;
+
+ //
// Set up the instruction
//
-
Op opCode;
- if (proj && parameters.gradX && parameters.offset)
- opCode = OpTextureSampleProjGradOffset;
- else if (proj && parameters.lod && parameters.offset)
- opCode = OpTextureSampleProjLodOffset;
- else if (parameters.gradX && parameters.offset)
- opCode = OpTextureSampleGradOffset;
- else if (proj && parameters.offset)
- opCode = OpTextureSampleProjOffset;
- else if (parameters.lod && parameters.offset)
- opCode = OpTextureSampleLodOffset;
- else if (proj && parameters.gradX)
- opCode = OpTextureSampleProjGrad;
- else if (proj && parameters.lod)
- opCode = OpTextureSampleProjLod;
- else if (parameters.offset)
- opCode = OpTextureSampleOffset;
- else if (parameters.gradX)
- opCode = OpTextureSampleGrad;
- else if (proj)
- opCode = OpTextureSampleProj;
- else if (parameters.lod)
- opCode = OpTextureSampleLod;
- else if (parameters.Dref)
- opCode = OpTextureSampleDref;
- else
- opCode = OpTextureSample;
+ opCode = OpImageSampleImplicitLod;
+ if (xplicit) {
+ if (parameters.Dref) {
+ if (proj)
+ opCode = OpImageSampleProjDrefExplicitLod;
+ else
+ opCode = OpImageSampleDrefExplicitLod;
+ } else {
+ if (proj)
+ opCode = OpImageSampleProjExplicitLod;
+ else
+ opCode = OpImageSampleExplicitLod;
+ }
+ } else {
+ if (parameters.Dref) {
+ if (proj)
+ opCode = OpImageSampleProjDrefImplicitLod;
+ else
+ opCode = OpImageSampleDrefImplicitLod;
+ } else {
+ if (proj)
+ opCode = OpImageSampleProjImplicitLod;
+ else
+ opCode = OpImageSampleImplicitLod;
+ }
+ }
Instruction* textureInst = new Instruction(getUniqueId(), resultType, opCode);
- for (int op = 0; op < numArgs; ++op)
+ for (int op = 0; op < optArgNum; ++op)
+ textureInst->addIdOperand(texArgs[op]);
+ if (optArgNum < numArgs)
+ textureInst->addImmediateOperand(texArgs[optArgNum]);
+ for (int op = optArgNum + 1; op < numArgs; ++op)
textureInst->addIdOperand(texArgs[op]);
setPrecision(textureInst->getResultId(), precision);
buildPoint->addInstruction(textureInst);
@@ -1176,13 +1233,13 @@
Id Builder::createTextureQueryCall(Op opCode, const TextureParameters& parameters)
{
// Figure out the result type
- Id resultType = NoType;
+ Id resultType = 0;
switch (opCode) {
- case OpTextureQuerySize:
- case OpTextureQuerySizeLod:
+ case OpImageQuerySize:
+ case OpImageQuerySizeLod:
{
int numComponents;
- switch (getDimensionality(parameters.sampler)) {
+ switch (getTypeDimensionality(getImageType(parameters.sampler))) {
case Dim1D:
case DimBuffer:
numComponents = 1;
@@ -1199,7 +1256,7 @@
MissingFunctionality("texture query dimensionality");
break;
}
- if (isArrayedSampler(parameters.sampler))
+ if (isArrayedImageType(getImageType(parameters.sampler)))
++numComponents;
if (numComponents == 1)
resultType = makeIntType(32);
@@ -1208,11 +1265,11 @@
break;
}
- case OpTextureQueryLod:
+ case OpImageQueryLod:
resultType = makeVectorType(makeFloatType(32), 2);
break;
- case OpTextureQueryLevels:
- case OpTextureQuerySamples:
+ case OpImageQueryLevels:
+ case OpImageQuerySamples:
resultType = makeIntType(32);
break;
default:
@@ -2040,7 +2097,16 @@
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);
diff --git a/SPIRV/SpvBuilder.h b/SPIRV/SpvBuilder.h
old mode 100644
new mode 100755
index e8711e3..1451581
--- a/SPIRV/SpvBuilder.h
+++ b/SPIRV/SpvBuilder.h
@@ -48,7 +48,7 @@
#ifndef SpvBuilder_H
#define SpvBuilder_H
-#include "spirv.h"
+#include "spirv.hpp"
#include "spvIR.h"
#include <algorithm>
@@ -77,6 +77,8 @@
memoryModel = mem;
}
+ void addCapability(spv::Capability cap) { capabilities.push_back(cap); }
+
// To get a new <id> for anything needing a new one.
Id getUniqueId() { return ++uniqueId; }
@@ -101,12 +103,8 @@
Id makeMatrixType(Id component, int cols, int rows);
Id makeArrayType(Id element, unsigned size);
Id makeFunctionType(Id returnType, std::vector<Id>& paramTypes);
- enum samplerContent {
- samplerContentTexture,
- samplerContentImage,
- samplerContentTextureFilter
- };
- Id makeSampler(Id sampledType, Dim, samplerContent, bool arrayed, bool shadow, bool ms);
+ Id makeImageType(Id sampledType, Dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format);
+ Id makeSampledImageType(Id imageType);
// For querying about types.
Id getTypeId(Id resultId) const { return module.getTypeId(resultId); }
@@ -133,7 +131,9 @@
bool isStructType(Id typeId) const { return getTypeClass(typeId) == OpTypeStruct; }
bool isArrayType(Id typeId) const { return getTypeClass(typeId) == OpTypeArray; }
bool isAggregateType(Id typeId) const { return isArrayType(typeId) || isStructType(typeId); }
+ bool isImageType(Id typeId) const { return getTypeClass(typeId) == OpTypeImage; }
bool isSamplerType(Id typeId) const { return getTypeClass(typeId) == OpTypeSampler; }
+ bool isSampledImageType(Id typeId) const { return getTypeClass(typeId) == OpTypeSampledImage; }
bool isConstantScalar(Id resultId) const { return getOpCode(resultId) == OpConstant; }
unsigned int getConstantScalar(Id resultId) const { return module.getInstruction(resultId)->getImmediateOperand(0); }
@@ -151,15 +151,20 @@
}
int getNumRows(Id resultId) const { return getTypeNumRows(getTypeId(resultId)); }
- Dim getDimensionality(Id resultId) const
+ Dim getTypeDimensionality(Id typeId) const
{
- assert(isSamplerType(getTypeId(resultId)));
- return (Dim)module.getInstruction(getTypeId(resultId))->getImmediateOperand(1);
+ assert(isImageType(typeId));
+ return (Dim)module.getInstruction(typeId)->getImmediateOperand(1);
}
- bool isArrayedSampler(Id resultId) const
+ Id getImageType(Id resultId) const
{
- assert(isSamplerType(getTypeId(resultId)));
- return module.getInstruction(getTypeId(resultId))->getImmediateOperand(3) != 0;
+ assert(isSampledImageType(getTypeId(resultId)));
+ return module.getInstruction(getTypeId(resultId))->getIdOperand(0);
+ }
+ bool isArrayedImageType(Id typeId) const
+ {
+ assert(isImageType(typeId));
+ return module.getInstruction(typeId)->getImmediateOperand(3) != 0;
}
// For making new constants (will return old constant if the requested one was already made).
@@ -174,7 +179,7 @@
Id makeCompositeConstant(Id type, std::vector<Id>& comps);
// Methods for adding information outside the CFG.
- void addEntryPoint(ExecutionModel, Function*);
+ void addEntryPoint(ExecutionModel, Function*, const char* name);
void addExecutionMode(Function*, ExecutionMode mode, int value = -1);
void addName(Id, const char* name);
void addMemberName(Id, int member, const char* name);
@@ -233,12 +238,12 @@
void createNoResultOp(Op);
void createNoResultOp(Op, Id operand);
- void createControlBarrier(unsigned executionScope);
+ void createControlBarrier(Scope execution, Scope memory, MemorySemanticsMask);
void createMemoryBarrier(unsigned executionScope, unsigned memorySemantics);
Id createUnaryOp(Op, Id typeId, Id operand);
Id createBinOp(Op, Id typeId, Id operand1, Id operand2);
Id createTriOp(Op, Id typeId, Id operand1, Id operand2, Id operand3);
- Id createOp(Op, Id typeId, std::vector<Id>& operands);
+ Id createOp(Op, Id typeId, const std::vector<Id>& operands);
Id createFunctionCall(spv::Function*, std::vector<spv::Id>&);
// Take an rvalue (source) and a set of channels to extract from it to
@@ -283,8 +288,10 @@
Id lod;
Id Dref;
Id offset;
+ Id offsets;
Id gradX;
Id gradY;
+ Id sample;
};
// Select the correct texture operation based on all inputs, and emit the correct instruction
@@ -497,6 +504,7 @@
std::vector<const char*> extensions;
AddressingModel addressModel;
MemoryModel memoryModel;
+ std::vector<spv::Capability> capabilities;
int builderNumber;
Module module;
Block* buildPoint;
diff --git a/SPIRV/disassemble.cpp b/SPIRV/disassemble.cpp
old mode 100644
new mode 100755
index adbe1ac..eeadfc9
--- a/SPIRV/disassemble.cpp
+++ b/SPIRV/disassemble.cpp
@@ -1,5 +1,5 @@
//
-//Copyright (C) 2014 LunarG, Inc.
+//Copyright (C) 2014-2015 LunarG, Inc.
//
//All rights reserved.
//
@@ -21,16 +21,16 @@
//
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTAstreamITY AND FITNESS
+//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-//CAUSED AND ON ANY THEORY OF LIAstreamITY, WHETHER IN CONTRACT, STRICT
-//LIAstreamITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-//POSSIstreamITY OF SUCH DAMAGE.
+//POSSIBILITY OF SUCH DAMAGE.
//
// Author: John Kessenich, LunarG
@@ -41,25 +41,34 @@
//
#include <stdlib.h>
+#include <string.h>
#include <assert.h>
#include <iomanip>
#include <stack>
#include <sstream>
-
-#include "GLSL450Lib.h"
-extern const char* GlslStd450DebugNames[GLSL_STD_450::Count];
+#include <cstring>
#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;
exit(1);
}
+// used to identify the extended instruction library imported when printing
+enum ExtInstSet {
+ GLSL450Inst,
+ OpenCLExtInst,
+};
+
// Container class for a single instance of a SPIR-V stream, with methods for disassembly.
class SpirvStream {
public:
@@ -70,9 +79,8 @@
void processInstructions();
protected:
- SpirvStream(SpirvStream&);
- SpirvStream& operator=(SpirvStream&);
-
+ SpirvStream(const SpirvStream&);
+ SpirvStream& operator=(const SpirvStream&);
Op getOpCode(int id) const { return idInstruction[id] ? (Op)(stream[idInstruction[id]] & OpCodeMask) : OpNop; }
// Output methods
@@ -81,6 +89,7 @@
void outputResultId(Id id);
void outputTypeId(Id id);
void outputId(Id id);
+ void outputMask(OperandClass operandClass, unsigned mask);
void disassembleImmediates(int numOperands);
void disassembleIds(int numOperands);
void disassembleString();
@@ -241,6 +250,18 @@
out << "(" << idDescriptor[id] << ")";
}
+void SpirvStream::outputMask(OperandClass operandClass, unsigned mask)
+{
+ if (mask == 0)
+ out << "None";
+ else {
+ for (int m = 0; m < OperandClassParams[operandClass].ceiling; ++m) {
+ if (mask & (1 << m))
+ out << OperandClassParams[operandClass].getName(m) << " ";
+ }
+ }
+}
+
void SpirvStream::disassembleImmediates(int numOperands)
{
for (int i = 0; i < numOperands; ++i) {
@@ -294,8 +315,9 @@
nestedControl.push(nextNestedControl);
nextNestedControl = 0;
}
- } else if (opCode == OpExtInstImport)
+ } else if (opCode == OpExtInstImport) {
idDescriptor[resultId] = (char*)(&stream[word]);
+ }
else {
if (idDescriptor[resultId].size() == 0) {
switch (opCode) {
@@ -337,27 +359,35 @@
// Process the operands. Note, a new context-dependent set could be
// swapped in mid-traversal.
- // Handle textures specially, so can put out helpful strings.
- if (opCode == OpTypeSampler) {
+ // Handle images specially, so can put out helpful strings.
+ if (opCode == OpTypeImage) {
+ out << " ";
disassembleIds(1);
out << " " << DimensionString((Dim)stream[word++]);
- switch (stream[word++]) {
- case 0: out << " texture"; break;
- case 1: out << " image"; break;
- case 2: out << " filter+texture"; break;
- }
- out << (stream[word++] != 0 ? " array" : "");
out << (stream[word++] != 0 ? " depth" : "");
+ out << (stream[word++] != 0 ? " array" : "");
out << (stream[word++] != 0 ? " multi-sampled" : "");
+ switch (stream[word++]) {
+ case 0: out << " runtime"; break;
+ case 1: out << " sampled"; break;
+ case 2: out << " nonsampled"; break;
+ }
+ out << " format:" << ImageFormatString((ImageFormat)stream[word++]);
+
+ if (numOperands == 8) {
+ out << " " << AccessQualifierString(stream[word++]);
+ }
return;
}
// Handle all the parameterized operands
- for (int op = 0; op < InstructionDesc[opCode].operands.getNum(); ++op) {
+ for (int op = 0; op < InstructionDesc[opCode].operands.getNum() && numOperands > 0; ++op) {
out << " ";
OperandClass operandClass = InstructionDesc[opCode].operands.getClass(op);
switch (operandClass) {
case OperandId:
+ case OperandScope:
+ case OperandMemorySemantics:
disassembleIds(1);
// Get names for printing "(XXX)" for readability, *after* this id
if (opCode == OpName)
@@ -367,15 +397,34 @@
case OperandVariableIds:
disassembleIds(numOperands);
return;
+ case OperandOptionalImage:
+ outputMask(operandClass, stream[word++]);
+ --numOperands;
+ disassembleIds(numOperands);
+ return;
+ case OperandOptionalLiteral:
case OperandVariableLiterals:
- if ((opCode == OpDecorate && stream[word - 1] == DecorationBuiltIn) ||
- (opCode == OpMemberDecorate && stream[word - 1] == DecorationBuiltIn)) {
+ if (opCode == OpDecorate && stream[word - 1] == DecorationBuiltIn ||
+ opCode == OpMemberDecorate && stream[word - 1] == DecorationBuiltIn) {
out << BuiltInString(stream[word++]);
--numOperands;
++op;
}
disassembleImmediates(numOperands);
return;
+ case OperandVariableIdLiteral:
+ while (numOperands > 0) {
+ out << std::endl;
+ outputResultId(0);
+ outputTypeId(0);
+ outputIndent();
+ out << " Type ";
+ disassembleIds(1);
+ out << ", member ";
+ disassembleImmediates(1);
+ numOperands -= 2;
+ }
+ return;
case OperandVariableLiteralId:
while (numOperands > 0) {
out << std::endl;
@@ -392,9 +441,16 @@
case OperandLiteralNumber:
disassembleImmediates(1);
if (opCode == OpExtInst) {
+ ExtInstSet extInstSet = GLSL450Inst;
+ if (0 == memcmp("OpenCL", (char*)(idDescriptor[stream[word-2]].c_str()), 6)) {
+ extInstSet = OpenCLExtInst;
+ }
unsigned entrypoint = stream[word - 1];
- if (entrypoint < GLSL_STD_450::Count)
- out << "(" << GlslStd450DebugNames[entrypoint] << ")";
+ if (extInstSet == GLSL450Inst) {
+ if (entrypoint < spv::GLSLstd450Count) {
+ out << "(" << GlslStd450DebugNames[entrypoint] << ")";
+ }
+ }
}
break;
case OperandLiteralString:
@@ -403,18 +459,9 @@
default:
assert(operandClass >= OperandSource && operandClass < OperandOpcode);
- if (OperandClassParams[operandClass].bitmask) {
- unsigned int mask = stream[word++];
- if (mask == 0)
- out << "None";
- else {
- for (int m = 0; m < OperandClassParams[operandClass].ceiling; ++m) {
- if (mask & (1 << m))
- out << OperandClassParams[operandClass].getName(m) << " ";
- }
- }
- break;
- } else
+ if (OperandClassParams[operandClass].bitmask)
+ outputMask(operandClass, stream[word++]);
+ else
out << OperandClassParams[operandClass].getName(stream[word++]);
break;
@@ -425,9 +472,97 @@
return;
}
+void GLSLstd450GetDebugNames(const char** names)
+{
+ for (int i = 0; i < GLSLstd450Count; ++i)
+ names[i] = "Unknown";
+
+ names[GLSLstd450Round] = "Round";
+ names[GLSLstd450RoundEven] = "RoundEven";
+ names[GLSLstd450Trunc] = "Trunc";
+ names[GLSLstd450FAbs] = "FAbs";
+ names[GLSLstd450SAbs] = "SAbs";
+ names[GLSLstd450FSign] = "FSign";
+ names[GLSLstd450SSign] = "SSign";
+ names[GLSLstd450Floor] = "Floor";
+ names[GLSLstd450Ceil] = "Ceil";
+ names[GLSLstd450Fract] = "Fract";
+ names[GLSLstd450Radians] = "Radians";
+ names[GLSLstd450Degrees] = "Degrees";
+ names[GLSLstd450Sin] = "Sin";
+ names[GLSLstd450Cos] = "Cos";
+ names[GLSLstd450Tan] = "Tan";
+ names[GLSLstd450Asin] = "Asin";
+ names[GLSLstd450Acos] = "Acos";
+ names[GLSLstd450Atan] = "Atan";
+ names[GLSLstd450Sinh] = "Sinh";
+ names[GLSLstd450Cosh] = "Cosh";
+ names[GLSLstd450Tanh] = "Tanh";
+ names[GLSLstd450Asinh] = "Asinh";
+ names[GLSLstd450Acosh] = "Acosh";
+ names[GLSLstd450Atanh] = "Atanh";
+ names[GLSLstd450Atan2] = "Atan2";
+ names[GLSLstd450Pow] = "Pow";
+ names[GLSLstd450Exp] = "Exp";
+ names[GLSLstd450Log] = "Log";
+ names[GLSLstd450Exp2] = "Exp2";
+ names[GLSLstd450Log2] = "Log2";
+ names[GLSLstd450Sqrt] = "Sqrt";
+ names[GLSLstd450InverseSqrt] = "Inversesqrt";
+ names[GLSLstd450Determinant] = "Determinant";
+ names[GLSLstd450MatrixInverse] = "Inverse";
+ names[GLSLstd450Modf] = "Modf";
+ names[GLSLstd450ModfStruct] = "ModfStruct";
+ names[GLSLstd450FMin] = "FMin";
+ names[GLSLstd450SMin] = "SMin";
+ names[GLSLstd450UMin] = "UMin";
+ names[GLSLstd450FMax] = "FMax";
+ names[GLSLstd450SMax] = "SMax";
+ names[GLSLstd450UMax] = "UMax";
+ names[GLSLstd450FClamp] = "FClamp";
+ names[GLSLstd450SClamp] = "SClamp";
+ names[GLSLstd450UClamp] = "UClamp";
+ names[GLSLstd450Mix] = "Mix";
+ names[GLSLstd450Step] = "Step";
+ names[GLSLstd450SmoothStep] = "Smoothstep";
+ names[GLSLstd450Fma] = "Fma";
+ names[GLSLstd450Frexp] = "Frexp";
+ names[GLSLstd450FrexpStruct] = "FrexpStruct";
+ names[GLSLstd450Ldexp] = "Ldexp";
+ names[GLSLstd450PackSnorm4x8] = "PackSnorm4x8";
+ names[GLSLstd450PackUnorm4x8] = "PackUnorm4x8";
+ names[GLSLstd450PackSnorm2x16] = "PackSnorm2x16";
+ names[GLSLstd450PackUnorm2x16] = "PackUnorm2x16";
+ names[GLSLstd450PackHalf2x16] = "PackHalf2x16";
+ names[GLSLstd450PackDouble2x32] = "PackDouble2x32";
+ names[GLSLstd450UnpackSnorm2x16] = "UnpackSnorm2x16";
+ names[GLSLstd450UnpackUnorm2x16] = "UnpackUnorm2x16";
+ names[GLSLstd450UnpackHalf2x16] = "UnpackHalf2x16";
+ names[GLSLstd450UnpackSnorm4x8] = "UnpackSnorm4x8";
+ names[GLSLstd450UnpackUnorm4x8] = "UnpackUnorm4x8";
+ names[GLSLstd450UnpackDouble2x32] = "UnpackDouble2x32";
+ names[GLSLstd450Length] = "Length";
+ names[GLSLstd450Distance] = "Distance";
+ names[GLSLstd450Cross] = "Cross";
+ names[GLSLstd450Normalize] = "Normalize";
+ 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[GLSLstd450InterpolateAtCentroid] = "InterpolateAtCentroid";
+ names[GLSLstd450InterpolateAtSample] = "InterpolateAtSample";
+ names[GLSLstd450InterpolateAtOffset] = "InterpolateAtOffset";
+}
+
void Disassemble(std::ostream& out, const std::vector<unsigned int>& stream)
{
SpirvStream SpirvStream(out, stream);
+ GLSLstd450GetDebugNames(GlslStd450DebugNames);
SpirvStream.validate();
SpirvStream.processInstructions();
}
diff --git a/SPIRV/disassemble.h b/SPIRV/disassemble.h
old mode 100644
new mode 100755
index bcb05ef..be537a3
--- a/SPIRV/disassemble.h
+++ b/SPIRV/disassemble.h
@@ -1,5 +1,5 @@
//
-//Copyright (C) 2014 LunarG, Inc.
+//Copyright (C) 2014-2015 LunarG, Inc.
//
//All rights reserved.
//
diff --git a/SPIRV/doc.cpp b/SPIRV/doc.cpp
old mode 100644
new mode 100755
index a98ab4d..ff0d780
--- a/SPIRV/doc.cpp
+++ b/SPIRV/doc.cpp
@@ -1,5 +1,5 @@
//
-//Copyright (C) 2014 LunarG, Inc.
+//Copyright (C) 2014-2015 LunarG, Inc.
//
//All rights reserved.
//
@@ -54,7 +54,7 @@
//
// Whole set of functions that translate enumerants to their text strings for
// the specification (or their sanitized versions for auto-generating the
-// spirv.h header.
+// spirv headers.
//
// Also, the ceilings are declared next to these, to help keep them in sync.
// Ceilings should be
@@ -111,23 +111,21 @@
}
}
-const int MemoryModelCeiling = 5;
+const int MemoryModelCeiling = 3;
const char* MemoryString(int mem)
{
switch (mem) {
case 0: return "Simple";
case 1: return "GLSL450";
- case 2: return "OpenCL1.2";
- case 3: return "OpenCL2.0";
- case 4: return "OpenCL2.1";
+ case 2: return "OpenCL";
case MemoryModelCeiling:
default: return "Bad";
}
}
-const int ExecutionModeCeiling = 31;
+const int ExecutionModeCeiling = 32;
const char* ExecutionModeString(int mode)
{
@@ -140,36 +138,37 @@
case 5: return "VertexOrderCcw";
case 6: return "PixelCenterInteger";
case 7: return "OriginUpperLeft";
- case 8: return "EarlyFragmentTests";
- case 9: return "PointMode";
- case 10: return "Xfb";
- case 11: return "DepthReplacing";
- case 12: return "DepthAny";
- case 13: return "DepthGreater";
- case 14: return "DepthLess";
- case 15: return "DepthUnchanged";
- case 16: return "LocalSize";
- case 17: return "LocalSizeHint";
- case 18: return "InputPoints";
- case 19: return "InputLines";
- case 20: return "InputLinesAdjacency";
- case 21: return "InputTriangles";
- case 22: return "InputTrianglesAdjacency";
- case 23: return "InputQuads";
- case 24: return "InputIsolines";
- case 25: return "OutputVertices";
- case 26: return "OutputPoints";
- case 27: return "OutputLineStrip";
- case 28: return "OutputTriangleStrip";
- case 29: return "VecTypeHint";
- case 30: return "ContractionOff";
+ case 8: return "OriginLowerLeft";
+ case 9: return "EarlyFragmentTests";
+ case 10: return "PointMode";
+ case 11: return "Xfb";
+ case 12: return "DepthReplacing";
+ case 13: return "DepthAny";
+ case 14: return "DepthGreater";
+ case 15: return "DepthLess";
+ case 16: return "DepthUnchanged";
+ case 17: return "LocalSize";
+ case 18: return "LocalSizeHint";
+ case 19: return "InputPoints";
+ case 20: return "InputLines";
+ case 21: return "InputLinesAdjacency";
+ case 22: return "InputTriangles";
+ case 23: return "InputTrianglesAdjacency";
+ case 24: return "InputQuads";
+ case 25: return "InputIsolines";
+ case 26: return "OutputVertices";
+ case 27: return "OutputPoints";
+ case 28: return "OutputLineStrip";
+ case 29: return "OutputTriangleStrip";
+ case 30: return "VecTypeHint";
+ case 31: return "ContractionOff";
case ExecutionModeCeiling:
default: return "Bad";
}
}
-const int StorageClassCeiling = 11;
+const int StorageClassCeiling = 12;
const char* StorageClassString(int StorageClass)
{
@@ -183,47 +182,48 @@
case 6: return "PrivateGlobal";
case 7: return "Function";
case 8: return "Generic";
- case 9: return "Private";
+ case 9: return "Bad";
case 10: return "AtomicCounter";
+ case 11: return "Image";
case StorageClassCeiling:
default: return "Bad";
}
}
-const int DecorationCeiling = 45;
+const int DecorationCeiling = 42;
const char* DecorationString(int decoration)
{
switch (decoration) {
- case 0: return "PrecisionLow";
- case 1: return "PrecisionMedium";
- case 2: return "PrecisionHigh";
- case 3: return "Block";
- case 4: return "BufferBlock";
- case 5: return "RowMajor";
- case 6: return "ColMajor";
- case 7: return "GLSLShared";
- case 8: return "GLSLStd140";
- case 9: return "GLSLStd430";
- case 10: return "GLSLPacked";
- case 11: return "Smooth";
- case 12: return "Noperspective";
- case 13: return "Flat";
- case 14: return "Patch";
- case 15: return "Centroid";
- case 16: return "Sample";
- case 17: return "Invariant";
- case 18: return "Restrict";
- case 19: return "Aliased";
- case 20: return "Volatile";
- case 21: return "Constant";
- case 22: return "Coherent";
- case 23: return "Nonwritable";
- case 24: return "Nonreadable";
- case 25: return "Uniform";
- case 26: return "NoStaticUse";
- case 27: return "CPacked";
+ case 0: return "RelaxedPrecision";
+ case 1: return "SpecId";
+ case 2: return "Block";
+ case 3: return "BufferBlock";
+ case 4: return "RowMajor";
+ case 5: return "ColMajor";
+ case 6: return "ArrayStride";
+ case 7: return "MatrixStride";
+ case 8: return "GLSLShared";
+ case 9: return "GLSLPacked";
+ case 10: return "CPacked";
+ case 11: return "BuiltIn";
+ case 12: return "Smooth";
+ case 13: return "Noperspective";
+ case 14: return "Flat";
+ case 15: return "Patch";
+ case 16: return "Centroid";
+ case 17: return "Sample";
+ case 18: return "Invariant";
+ case 19: return "Restrict";
+ case 20: return "Aliased";
+ case 21: return "Volatile";
+ case 22: return "Constant";
+ case 23: return "Coherent";
+ case 24: return "Nonwritable";
+ case 25: return "Nonreadable";
+ case 26: return "Uniform";
+ case 27: return "NoStaticUse";
case 28: return "SaturatedConversion";
case 29: return "Stream";
case 30: return "Location";
@@ -232,15 +232,12 @@
case 33: return "Binding";
case 34: return "DescriptorSet";
case 35: return "Offset";
- case 36: return "Alignment";
- case 37: return "XfbBuffer";
- case 38: return "Stride";
- case 39: return "BuiltIn";
- case 40: return "FuncParamAttr";
- case 41: return "FP Rounding Mode";
- case 42: return "FP Fast Math Mode";
- case 43: return "Linkage Attributes";
- case 44: return "SpecId";
+ case 36: return "XfbBuffer";
+ case 37: return "XfbStride";
+ case 38: return "FuncParamAttr";
+ case 39: return "FP Rounding Mode";
+ case 40: return "FP Fast Math Mode";
+ case 41: return "Linkage Attributes";
case DecorationCeiling:
default: return "Bad";
@@ -254,7 +251,7 @@
switch (builtIn) {
case 0: return "Position";
case 1: return "PointSize";
- case 2: return "ClipVertex";
+ case 2: return "Bad";
case 3: return "ClipDistance";
case 4: return "CullDistance";
case 5: return "VertexId";
@@ -346,6 +343,149 @@
}
}
+const int ImageFormatCeiling = 40;
+
+const char* ImageFormatString(int format)
+{
+ switch (format) {
+ case 0: return "Unknown";
+
+ // ES/Desktop float
+ case 1: return "Rgba32f";
+ case 2: return "Rgba16f";
+ case 3: return "R32f";
+ case 4: return "Rgba8";
+ case 5: return "Rgba8Snorm";
+
+ // Desktop float
+ case 6: return "Rg32f";
+ case 7: return "Rg16f";
+ case 8: return "R11fG11fB10f";
+ case 9: return "R16f";
+ case 10: return "Rgba16";
+ case 11: return "Rgb10A2";
+ case 12: return "Rg16";
+ case 13: return "Rg8";
+ case 14: return "R16";
+ case 15: return "R8";
+ case 16: return "Rgba16Snorm";
+ case 17: return "Rg16Snorm";
+ case 18: return "Rg8Snorm";
+ case 19: return "R16Snorm";
+ case 20: return "R8Snorm";
+
+ // ES/Desktop int
+ case 21: return "Rgba32i";
+ case 22: return "Rgba16i";
+ case 23: return "Rgba8i";
+ case 24: return "R32i";
+
+ // Desktop int
+ case 25: return "Rg32i";
+ case 26: return "Rg16i";
+ case 27: return "Rg8i";
+ case 28: return "R16i";
+ case 29: return "R8i";
+
+ // ES/Desktop uint
+ case 30: return "Rgba32ui";
+ case 31: return "Rgba16ui";
+ case 32: return "Rgba8ui";
+ case 33: return "R32ui";
+
+ // Desktop uint
+ case 34: return "Rgb10a2ui";
+ case 35: return "Rg32ui";
+ case 36: return "Rg16ui";
+ case 37: return "Rg8ui";
+ case 38: return "R16ui";
+ case 39: return "R8ui";
+
+ case ImageFormatCeiling:
+ default:
+ return "Bad";
+ }
+}
+
+const int ImageChannelOrderCeiling = 19;
+
+const char* ImageChannelOrderString(int format)
+{
+ switch (format) {
+ case 0: return "R";
+ case 1: return "A";
+ case 2: return "RG";
+ case 3: return "RA";
+ case 4: return "RGB";
+ case 5: return "RGBA";
+ case 6: return "BGRA";
+ case 7: return "ARGB";
+ case 8: return "Intensity";
+ case 9: return "Luminance";
+ case 10: return "Rx";
+ case 11: return "RGx";
+ case 12: return "RGBx";
+ case 13: return "Depth";
+ case 14: return "DepthStencil";
+ case 15: return "sRGB";
+ case 16: return "sRGBx";
+ case 17: return "sRGBA";
+ case 18: return "sBGRA";
+
+ case ImageChannelOrderCeiling:
+ default:
+ return "Bad";
+ }
+}
+
+const int ImageChannelDataTypeCeiling = 16;
+
+const char* ImageChannelDataTypeString(int type)
+{
+ switch (type)
+ {
+ case 0: return "SnormInt8";
+ case 1: return "SnormInt16";
+ case 2: return "UnormInt8";
+ case 3: return "UnormInt16";
+ case 4: return "UnormShort565";
+ case 5: return "UnormShort555";
+ case 6: return "UnormInt101010";
+ case 7: return "SignedInt8";
+ case 8: return "SignedInt16";
+ case 9: return "SignedInt32";
+ case 10: return "UnsignedInt8";
+ case 11: return "UnsignedInt16";
+ case 12: return "UnsignedInt32";
+ case 13: return "HalfFloat";
+ case 14: return "Float";
+ case 15: return "UnormInt24";
+
+ case ImageChannelDataTypeCeiling:
+ default:
+ return "Bad";
+ }
+}
+
+const int ImageOperandsCeiling = 7;
+
+const char* ImageOperandsString(int format)
+{
+ switch (format) {
+ case 0: return "Bias";
+ case 1: return "Lod";
+ case 2: return "Grad";
+ case 3: return "ConstOffset";
+ case 4: return "Offset";
+ case 5: return "ConstOffsets";
+ case 6: return "Sample";
+
+ case ImageOperandsCeiling:
+ default:
+ return "Bad";
+ }
+}
+
const int FPFastMathCeiling = 5;
const char* FPFastMathString(int mode)
@@ -390,7 +530,7 @@
}
}
-const int FuncParamAttrCeiling = 9;
+const int FuncParamAttrCeiling = 8;
const char* FuncParamAttrString(int attr)
{
@@ -401,9 +541,8 @@
case 3: return "Sret";
case 4: return "NoAlias";
case 5: return "NoCapture";
- case 6: return "SVM";
- case 7: return "NoWrite";
- case 8: return "NoReadWrite";
+ case 6: return "NoWrite";
+ case 7: return "NoReadWrite";
case FuncParamAttrCeiling:
default: return "Bad";
@@ -433,7 +572,7 @@
case 1: return "DontFlatten";
case SelectControlCeiling:
- default: return "Bad";
+ default: return "Bad";
}
}
@@ -442,11 +581,11 @@
const char* LoopControlString(int cont)
{
switch (cont) {
- case 0: return "Unroll";
- case 1: return "DontUnroll";
+ case 0: return "Unroll";
+ case 1: return "DontUnroll";
case LoopControlCeiling:
- default: return "Bad";
+ default: return "Bad";
}
}
@@ -500,17 +639,18 @@
}
}
-const int ExecutionScopeCeiling = 4;
+const int ScopeCeiling = 5;
-const char* ExecutionScopeString(int mem)
+const char* ScopeString(int mem)
{
switch (mem) {
case 0: return "CrossDevice";
case 1: return "Device";
case 2: return "Workgroup";
case 3: return "Subgroup";
+ case 4: return "Invocation";
- case ExecutionScopeCeiling:
+ case ScopeCeiling:
default: return "Bad";
}
}
@@ -559,276 +699,362 @@
}
}
+const int CapabilityCeiling = 36;
+
+const char* CapabilityString(int info)
+{
+ switch (info)
+ {
+ case 0: return "Matrix";
+ case 1: return "Shader";
+ case 2: return "Geometry";
+ case 3: return "Tessellation";
+ case 4: return "Addresses";
+ case 5: return "Linkage";
+ case 6: return "Kernel";
+ case 7: return "Vector16";
+ case 8: return "Float16Buffer";
+ case 9: return "Float16";
+ case 10: return "Float64";
+ case 11: return "Int64";
+ case 12: return "Int64Atomics";
+ case 13: return "ImageBasic";
+ case 14: return "ImageReadWrite";
+ case 15: return "ImageMipmap";
+ case 16: return "ImageSRGBWrite";
+ case 17: return "Pipes";
+ case 18: return "Groups";
+ case 19: return "DeviceEnqueue";
+ case 20: return "LiteralSampler";
+ case 21: return "AtomicStorage";
+ case 22: return "Int16";
+ case 23: return "TessellationPointSize";
+ case 24: return "GeometryPointSize";
+ case 25: return "ImageGatherExtended";
+ case 26: return "StorageImageExtendedFormats";
+ case 27: return "StorageImageMultisample";
+ case 28: return "UniformBufferArrayDynamicIndexing";
+ case 29: return "SampledImageArrayDynamicIndexing";
+ case 30: return "StorageBufferArrayDynamicIndexing";
+ case 31: return "StorageImageArrayDynamicIndexing";
+ case 32: return "ClipDistance";
+ case 33: return "CullDistance";
+ case 34: return "ImageCubeArray";
+ case 35: return "SampleRateShading";
+
+ case CapabilityCeiling:
+ default: return "Bad";
+ }
+}
+
const char* OpcodeString(int op)
{
switch (op) {
case 0: return "OpNop";
- case 1: return "OpSource";
- case 2: return "OpSourceExtension";
- case 3: return "OpExtension";
- case 4: return "OpExtInstImport";
- case 5: return "OpMemoryModel";
- case 6: return "OpEntryPoint";
- case 7: return "OpExecutionMode";
- case 8: return "OpTypeVoid";
- case 9: return "OpTypeBool";
- case 10: return "OpTypeInt";
- case 11: return "OpTypeFloat";
- case 12: return "OpTypeVector";
- case 13: return "OpTypeMatrix";
- case 14: return "OpTypeSampler";
- case 15: return "OpTypeFilter";
- case 16: return "OpTypeArray";
- case 17: return "OpTypeRuntimeArray";
- case 18: return "OpTypeStruct";
- case 19: return "OpTypeOpaque";
- case 20: return "OpTypePointer";
- case 21: return "OpTypeFunction";
- case 22: return "OpTypeEvent";
- case 23: return "OpTypeDeviceEvent";
- case 24: return "OpTypeReserveId";
- case 25: return "OpTypeQueue";
- case 26: return "OpTypePipe";
- case 27: return "OpConstantTrue";
- case 28: return "OpConstantFalse";
- case 29: return "OpConstant";
- case 30: return "OpConstantComposite";
- case 31: return "OpConstantSampler";
- case 32: return "OpConstantNullPointer";
- case 33: return "OpConstantNullObject";
- case 34: return "OpSpecConstantTrue";
- case 35: return "OpSpecConstantFalse";
- case 36: return "OpSpecConstant";
- case 37: return "OpSpecConstantComposite";
- case 38: return "OpVariable";
- case 39: return "OpVariableArray";
- case 40: return "OpFunction";
- case 41: return "OpFunctionParameter";
- case 42: return "OpFunctionEnd";
- case 43: return "OpFunctionCall";
- case 44: return "OpExtInst";
- case 45: return "OpUndef";
- case 46: return "OpLoad";
- case 47: return "OpStore";
- case 48: return "OpPhi";
- case 49: return "OpDecorationGroup";
- case 50: return "OpDecorate";
- case 51: return "OpMemberDecorate";
- case 52: return "OpGroupDecorate";
- case 53: return "OpGroupMemberDecorate";
- case 54: return "OpName";
- case 55: return "OpMemberName";
- case 56: return "OpString";
- case 57: return "OpLine";
- case 58: return "OpVectorExtractDynamic";
- case 59: return "OpVectorInsertDynamic";
- case 60: return "OpVectorShuffle";
- case 61: return "OpCompositeConstruct";
- case 62: return "OpCompositeExtract";
- case 63: return "OpCompositeInsert";
- case 64: return "OpCopyObject";
- case 65: return "OpCopyMemory";
- case 66: return "OpCopyMemorySized";
- case 67: return "OpSampler";
- case 68: return "OpTextureSample";
- case 69: return "OpTextureSampleDref";
- case 70: return "OpTextureSampleLod";
- case 71: return "OpTextureSampleProj";
- case 72: return "OpTextureSampleGrad";
- case 73: return "OpTextureSampleOffset";
- case 74: return "OpTextureSampleProjLod";
- case 75: return "OpTextureSampleProjGrad";
- case 76: return "OpTextureSampleLodOffset";
- case 77: return "OpTextureSampleProjOffset";
- case 78: return "OpTextureSampleGradOffset";
- case 79: return "OpTextureSampleProjLodOffset";
- case 80: return "OpTextureSampleProjGradOffset";
- case 81: return "OpTextureFetchTexelLod";
- case 82: return "OpTextureFetchTexelOffset";
- case 83: return "OpTextureFetchSample";
- case 84: return "OpTextureFetchTexel";
- case 85: return "OpTextureGather";
- case 86: return "OpTextureGatherOffset";
- case 87: return "OpTextureGatherOffsets";
- case 88: return "OpTextureQuerySizeLod";
- case 89: return "OpTextureQuerySize";
- case 90: return "OpTextureQueryLod";
- case 91: return "OpTextureQueryLevels";
- case 92: return "OpTextureQuerySamples";
- case 93: return "OpAccessChain";
- case 94: return "OpInBoundsAccessChain";
- case 95: return "OpSNegate";
- case 96: return "OpFNegate";
- case 97: return "OpNot";
- case 98: return "OpAny";
- case 99: return "OpAll";
- case 100: return "OpConvertFToU";
- case 101: return "OpConvertFToS";
- case 102: return "OpConvertSToF";
- case 103: return "OpConvertUToF";
- case 104: return "OpUConvert";
- case 105: return "OpSConvert";
- case 106: return "OpFConvert";
- case 107: return "OpConvertPtrToU";
- case 108: return "OpConvertUToPtr";
- case 109: return "OpPtrCastToGeneric";
- case 110: return "OpGenericCastToPtr";
- case 111: return "OpBitcast";
- case 112: return "OpTranspose";
- case 113: return "OpIsNan";
- case 114: return "OpIsInf";
- case 115: return "OpIsFinite";
- case 116: return "OpIsNormal";
- case 117: return "OpSignBitSet";
- case 118: return "OpLessOrGreater";
- case 119: return "OpOrdered";
- case 120: return "OpUnordered";
- case 121: return "OpArrayLength";
- case 122: return "OpIAdd";
- case 123: return "OpFAdd";
- case 124: return "OpISub";
- case 125: return "OpFSub";
- case 126: return "OpIMul";
- case 127: return "OpFMul";
- case 128: return "OpUDiv";
- case 129: return "OpSDiv";
- case 130: return "OpFDiv";
- case 131: return "OpUMod";
- case 132: return "OpSRem";
- case 133: return "OpSMod";
- case 134: return "OpFRem";
- case 135: return "OpFMod";
- case 136: return "OpVectorTimesScalar";
- case 137: return "OpMatrixTimesScalar";
- case 138: return "OpVectorTimesMatrix";
- case 139: return "OpMatrixTimesVector";
- case 140: return "OpMatrixTimesMatrix";
- case 141: return "OpOuterProduct";
- case 142: return "OpDot";
- case 143: return "OpShiftRightLogical";
- case 144: return "OpShiftRightArithmetic";
- case 145: return "OpShiftLeftLogical";
- case 146: return "OpLogicalOr";
- case 147: return "OpLogicalXor";
- case 148: return "OpLogicalAnd";
- case 149: return "OpBitwiseOr";
- case 150: return "OpBitwiseXor";
- case 151: return "OpBitwiseAnd";
- case 152: return "OpSelect";
- case 153: return "OpIEqual";
- case 154: return "OpFOrdEqual";
- case 155: return "OpFUnordEqual";
- case 156: return "OpINotEqual";
- case 157: return "OpFOrdNotEqual";
- case 158: return "OpFUnordNotEqual";
- case 159: return "OpULessThan";
- case 160: return "OpSLessThan";
- case 161: return "OpFOrdLessThan";
- case 162: return "OpFUnordLessThan";
- case 163: return "OpUGreaterThan";
- case 164: return "OpSGreaterThan";
- case 165: return "OpFOrdGreaterThan";
- case 166: return "OpFUnordGreaterThan";
- case 167: return "OpULessThanEqual";
- case 168: return "OpSLessThanEqual";
- case 169: return "OpFOrdLessThanEqual";
- case 170: return "OpFUnordLessThanEqual";
- case 171: return "OpUGreaterThanEqual";
- case 172: return "OpSGreaterThanEqual";
- case 173: return "OpFOrdGreaterThanEqual";
- case 174: return "OpFUnordGreaterThanEqual";
- case 175: return "OpDPdx";
- case 176: return "OpDPdy";
- case 177: return "OpFwidth";
- case 178: return "OpDPdxFine";
- case 179: return "OpDPdyFine";
- case 180: return "OpFwidthFine";
- case 181: return "OpDPdxCoarse";
- case 182: return "OpDPdyCoarse";
- case 183: return "OpFwidthCoarse";
- case 184: return "OpEmitVertex";
- case 185: return "OpEndPrimitive";
- case 186: return "OpEmitStreamVertex";
- case 187: return "OpEndStreamPrimitive";
- case 188: return "OpControlBarrier";
- case 189: return "OpMemoryBarrier";
- case 190: return "OpImagePointer";
- case 191: return "OpAtomicInit";
- case 192: return "OpAtomicLoad";
- case 193: return "OpAtomicStore";
- case 194: return "OpAtomicExchange";
- case 195: return "OpAtomicCompareExchange";
- case 196: return "OpAtomicCompareExchangeWeak";
- case 197: return "OpAtomicIIncrement";
- case 198: return "OpAtomicIDecrement";
- case 199: return "OpAtomicIAdd";
- case 200: return "OpAtomicISub";
- case 201: return "OpAtomicUMin";
- case 202: return "OpAtomicUMax";
- case 203: return "OpAtomicAnd";
- case 204: return "OpAtomicOr";
- case 205: return "OpAtomicXor";
- case 206: return "OpLoopMerge";
- case 207: return "OpSelectionMerge";
- case 208: return "OpLabel";
- case 209: return "OpBranch";
- case 210: return "OpBranchConditional";
- case 211: return "OpSwitch";
- case 212: return "OpKill";
- case 213: return "OpReturn";
- case 214: return "OpReturnValue";
- case 215: return "OpUnreachable";
- case 216: return "OpLifetimeStart";
- case 217: return "OpLifetimeStop";
- case 218: return "OpCompileFlag";
- case 219: return "OpAsyncGroupCopy";
- case 220: return "OpWaitGroupEvents";
- case 221: return "OpGroupAll";
- case 222: return "OpGroupAny";
- case 223: return "OpGroupBroadcast";
- case 224: return "OpGroupIAdd";
- case 225: return "OpGroupFAdd";
- case 226: return "OpGroupFMin";
- case 227: return "OpGroupUMin";
- case 228: return "OpGroupSMin";
- case 229: return "OpGroupFMax";
- case 230: return "OpGroupUMax";
- case 231: return "OpGroupSMax";
- case 232: return "OpGenericCastToPtrExplicit";
- case 233: return "OpGenericPtrMemSemantics";
- case 234: return "OpReadPipe";
- case 235: return "OpWritePipe";
- case 236: return "OpReservedReadPipe";
- case 237: return "OpReservedWritePipe";
- case 238: return "OpReserveReadPipePackets";
- case 239: return "OpReserveWritePipePackets";
- case 240: return "OpCommitReadPipe";
- case 241: return "OpCommitWritePipe";
- case 242: return "OpIsValidReserveId";
- case 243: return "OpGetNumPipePackets";
- case 244: return "OpGetMaxPipePackets";
- case 245: return "OpGroupReserveReadPipePackets";
- case 246: return "OpGroupReserveWritePipePackets";
- case 247: return "OpGroupCommitReadPipe";
- case 248: return "OpGroupCommitWritePipe";
- case 249: return "OpEnqueueMarker";
- case 250: return "OpEnqueueKernel";
- case 251: return "OpGetKernelNDrangeSubGroupCount";
- case 252: return "OpGetKernelNDrangeMaxSubGroupSize";
- case 253: return "OpGetKernelWorkGroupSize";
- case 254: return "OpGetKernelPreferredWorkGroupSizeMultiple";
- case 255: return "OpRetainEvent";
- case 256: return "OpReleaseEvent";
- case 257: return "OpCreateUserEvent";
- case 258: return "OpIsValidEvent";
- case 259: return "OpSetUserEventStatus";
- case 260: return "OpCaptureEventProfilingInfo";
- case 261: return "OpGetDefaultQueue";
- case 262: return "OpBuildNDRange";
- case 263: return "OpSatConvertSToU";
- case 264: return "OpSatConvertUToS";
- case 265: return "OpAtomicIMin";
- case 266: return "OpAtomicIMax";
+ case 1: return "OpUndef";
+ case 2: return "Bad";
+ case 3: return "OpSource";
+ case 4: return "OpSourceExtension";
+ case 5: return "OpName";
+ case 6: return "OpMemberName";
+ case 7: return "OpString";
+ case 8: return "OpLine";
+ case 9: return "Bad";
+ case 10: return "OpExtension";
+ case 11: return "OpExtInstImport";
+ case 12: return "OpExtInst";
+ case 13: return "Bad";
+ case 14: return "OpMemoryModel";
+ case 15: return "OpEntryPoint";
+ case 16: return "OpExecutionMode";
+ case 17: return "OpCapability";
+ case 18: return "Bad";
+ case 19: return "OpTypeVoid";
+ case 20: return "OpTypeBool";
+ case 21: return "OpTypeInt";
+ case 22: return "OpTypeFloat";
+ case 23: return "OpTypeVector";
+ case 24: return "OpTypeMatrix";
+ case 25: return "OpTypeImage";
+ case 26: return "OpTypeSampler";
+ case 27: return "OpTypeSampledImage";
+ case 28: return "OpTypeArray";
+ case 29: return "OpTypeRuntimeArray";
+ case 30: return "OpTypeStruct";
+ case 31: return "OpTypeOpaque";
+ case 32: return "OpTypePointer";
+ case 33: return "OpTypeFunction";
+ case 34: return "OpTypeEvent";
+ case 35: return "OpTypeDeviceEvent";
+ case 36: return "OpTypeReserveId";
+ case 37: return "OpTypeQueue";
+ case 38: return "OpTypePipe";
+ case 39: return "Bad";
+ case 40: return "Bad";
+ case 41: return "OpConstantTrue";
+ case 42: return "OpConstantFalse";
+ case 43: return "OpConstant";
+ case 44: return "OpConstantComposite";
+ case 45: return "OpConstantSampler";
+ case 46: return "OpConstantNull";
+ case 47: return "Bad";
+ case 48: return "OpSpecConstantTrue";
+ case 49: return "OpSpecConstantFalse";
+ case 50: return "OpSpecConstant";
+ case 51: return "OpSpecConstantComposite";
+ case 52: return "OpSpecConstantOp";
+ case 53: return "Bad";
+ case 54: return "OpFunction";
+ case 55: return "OpFunctionParameter";
+ case 56: return "OpFunctionEnd";
+ case 57: return "OpFunctionCall";
+ case 58: return "Bad";
+ case 59: return "OpVariable";
+ case 60: return "OpImageTexelPointer";
+ case 61: return "OpLoad";
+ case 62: return "OpStore";
+ case 63: return "OpCopyMemory";
+ case 64: return "OpCopyMemorySized";
+ case 65: return "OpAccessChain";
+ case 66: return "OpInBoundsAccessChain";
+ case 67: return "OpPtrAccessChain";
+ case 68: return "OpArrayLength";
+ case 69: return "OpGenericPtrMemSemantics";
+ case 70: return "Bad";
+ case 71: return "OpDecorate";
+ case 72: return "OpMemberDecorate";
+ case 73: return "OpDecorationGroup";
+ case 74: return "OpGroupDecorate";
+ case 75: return "OpGroupMemberDecorate";
+ case 76: return "Bad";
+ case 77: return "OpVectorExtractDynamic";
+ case 78: return "OpVectorInsertDynamic";
+ case 79: return "OpVectorShuffle";
+ case 80: return "OpCompositeConstruct";
+ case 81: return "OpCompositeExtract";
+ case 82: return "OpCompositeInsert";
+ case 83: return "OpCopyObject";
+ case 84: return "OpTranspose";
+ case 85: return "Bad";
+ case 86: return "OpSampledImage";
+ case 87: return "OpImageSampleImplicitLod";
+ case 88: return "OpImageSampleExplicitLod";
+ case 89: return "OpImageSampleDrefImplicitLod";
+ case 90: return "OpImageSampleDrefExplicitLod";
+ case 91: return "OpImageSampleProjImplicitLod";
+ case 92: return "OpImageSampleProjExplicitLod";
+ case 93: return "OpImageSampleProjDrefImplicitLod";
+ case 94: return "OpImageSampleProjDrefExplicitLod";
+ case 95: return "OpImageFetch";
+ case 96: return "OpImageGather";
+ case 97: return "OpImageDrefGather";
+ case 98: return "OpImageRead";
+ case 99: return "OpImageWrite";
+ case 100: return "OpImageQueryDim";
+ case 101: return "OpImageQueryFormat";
+ case 102: return "OpImageQueryOrder";
+ case 103: return "OpImageQuerySizeLod";
+ case 104: return "OpImageQuerySize";
+ case 105: return "OpImageQueryLod";
+ case 106: return "OpImageQueryLevels";
+ case 107: return "OpImageQuerySamples";
+ case 108: return "Bad";
+ case 109: return "OpConvertFToU";
+ case 110: return "OpConvertFToS";
+ case 111: return "OpConvertSToF";
+ case 112: return "OpConvertUToF";
+ case 113: return "OpUConvert";
+ case 114: return "OpSConvert";
+ case 115: return "OpFConvert";
+ case 116: return "OpQuantizeToF16";
+ case 117: return "OpConvertPtrToU";
+ case 118: return "OpSatConvertSToU";
+ case 119: return "OpSatConvertUToS";
+ case 120: return "OpConvertUToPtr";
+ case 121: return "OpPtrCastToGeneric";
+ case 122: return "OpGenericCastToPtr";
+ case 123: return "OpGenericCastToPtrExplicit";
+ case 124: return "OpBitcast";
+ case 125: return "Bad";
+ case 126: return "OpSNegate";
+ case 127: return "OpFNegate";
+ case 128: return "OpIAdd";
+ case 129: return "OpFAdd";
+ case 130: return "OpISub";
+ case 131: return "OpFSub";
+ case 132: return "OpIMul";
+ case 133: return "OpFMul";
+ case 134: return "OpUDiv";
+ case 135: return "OpSDiv";
+ case 136: return "OpFDiv";
+ case 137: return "OpUMod";
+ case 138: return "OpSRem";
+ case 139: return "OpSMod";
+ case 140: return "OpFRem";
+ case 141: return "OpFMod";
+ case 142: return "OpVectorTimesScalar";
+ case 143: return "OpMatrixTimesScalar";
+ case 144: return "OpVectorTimesMatrix";
+ case 145: return "OpMatrixTimesVector";
+ case 146: return "OpMatrixTimesMatrix";
+ case 147: return "OpOuterProduct";
+ case 148: return "OpDot";
+ case 149: return "OpIAddCarry";
+ case 150: return "OpISubBorrow";
+ case 151: return "OpIMulExtended";
+ case 152: return "Bad";
+ case 153: return "Bad";
+ case 154: return "OpAny";
+ case 155: return "OpAll";
+ case 156: return "OpIsNan";
+ case 157: return "OpIsInf";
+ case 158: return "OpIsFinite";
+ case 159: return "OpIsNormal";
+ case 160: return "OpSignBitSet";
+ case 161: return "OpLessOrGreater";
+ case 162: return "OpOrdered";
+ case 163: return "OpUnordered";
+ case 164: return "OpLogicalEqual";
+ case 165: return "OpLogicalNotEqual";
+ case 166: return "OpLogicalOr";
+ case 167: return "OpLogicalAnd";
+ case 168: return "OpLogicalNot";
+ case 169: return "OpSelect";
+ case 170: return "OpIEqual";
+ case 171: return "OpINotEqual";
+ case 172: return "OpUGreaterThan";
+ case 173: return "OpSGreaterThan";
+ case 174: return "OpUGreaterThanEqual";
+ case 175: return "OpSGreaterThanEqual";
+ case 176: return "OpULessThan";
+ case 177: return "OpSLessThan";
+ case 178: return "OpULessThanEqual";
+ case 179: return "OpSLessThanEqual";
+ case 180: return "OpFOrdEqual";
+ case 181: return "OpFUnordEqual";
+ case 182: return "OpFOrdNotEqual";
+ case 183: return "OpFUnordNotEqual";
+ case 184: return "OpFOrdLessThan";
+ case 185: return "OpFUnordLessThan";
+ case 186: return "OpFOrdGreaterThan";
+ case 187: return "OpFUnordGreaterThan";
+ case 188: return "OpFOrdLessThanEqual";
+ case 189: return "OpFUnordLessThanEqual";
+ case 190: return "OpFOrdGreaterThanEqual";
+ case 191: return "OpFUnordGreaterThanEqual";
+ case 192: return "Bad";
+ case 193: return "Bad";
+ case 194: return "OpShiftRightLogical";
+ case 195: return "OpShiftRightArithmetic";
+ case 196: return "OpShiftLeftLogical";
+ case 197: return "OpBitwiseOr";
+ case 198: return "OpBitwiseXor";
+ case 199: return "OpBitwiseAnd";
+ case 200: return "OpNot";
+ case 201: return "OpBitFieldInsert";
+ case 202: return "OpBitFieldSExtract";
+ case 203: return "OpBitFieldUExtract";
+ case 204: return "OpBitReverse";
+ case 205: return "OpBitCount";
+ case 206: return "Bad";
+ case 207: return "OpDPdx";
+ case 208: return "OpDPdy";
+ case 209: return "OpFwidth";
+ case 210: return "OpDPdxFine";
+ case 211: return "OpDPdyFine";
+ case 212: return "OpFwidthFine";
+ case 213: return "OpDPdxCoarse";
+ case 214: return "OpDPdyCoarse";
+ case 215: return "OpFwidthCoarse";
+ case 216: return "Bad";
+ case 217: return "Bad";
+ case 218: return "OpEmitVertex";
+ case 219: return "OpEndPrimitive";
+ case 220: return "OpEmitStreamVertex";
+ case 221: return "OpEndStreamPrimitive";
+ case 222: return "Bad";
+ case 223: return "Bad";
+ case 224: return "OpControlBarrier";
+ case 225: return "OpMemoryBarrier";
+ case 226: return "Bad";
+ case 227: return "OpAtomicLoad";
+ case 228: return "OpAtomicStore";
+ case 229: return "OpAtomicExchange";
+ case 230: return "OpAtomicCompareExchange";
+ case 231: return "OpAtomicCompareExchangeWeak";
+ case 232: return "OpAtomicIIncrement";
+ case 233: return "OpAtomicIDecrement";
+ case 234: return "OpAtomicIAdd";
+ case 235: return "OpAtomicISub";
+ case 236: return "OpAtomicSMin";
+ case 237: return "OpAtomicUMin";
+ case 238: return "OpAtomicSMax";
+ case 239: return "OpAtomicUMax";
+ case 240: return "OpAtomicAnd";
+ case 241: return "OpAtomicOr";
+ case 242: return "OpAtomicXor";
+ case 243: return "Bad";
+ case 244: return "Bad";
+ case 245: return "OpPhi";
+ case 246: return "OpLoopMerge";
+ case 247: return "OpSelectionMerge";
+ case 248: return "OpLabel";
+ case 249: return "OpBranch";
+ case 250: return "OpBranchConditional";
+ case 251: return "OpSwitch";
+ case 252: return "OpKill";
+ case 253: return "OpReturn";
+ case 254: return "OpReturnValue";
+ case 255: return "OpUnreachable";
+ case 256: return "OpLifetimeStart";
+ case 257: return "OpLifetimeStop";
+ case 258: return "Bad";
+ case 259: return "OpAsyncGroupCopy";
+ case 260: return "OpWaitGroupEvents";
+ case 261: return "OpGroupAll";
+ case 262: return "OpGroupAny";
+ case 263: return "OpGroupBroadcast";
+ case 264: return "OpGroupIAdd";
+ case 265: return "OpGroupFAdd";
+ case 266: return "OpGroupFMin";
+ case 267: return "OpGroupUMin";
+ case 268: return "OpGroupSMin";
+ case 269: return "OpGroupFMax";
+ case 270: return "OpGroupUMax";
+ case 271: return "OpGroupSMax";
+ case 272: return "Bad";
+ case 273: return "Bad";
+ case 274: return "OpReadPipe";
+ case 275: return "OpWritePipe";
+ case 276: return "OpReservedReadPipe";
+ case 277: return "OpReservedWritePipe";
+ case 278: return "OpReserveReadPipePackets";
+ case 279: return "OpReserveWritePipePackets";
+ case 280: return "OpCommitReadPipe";
+ case 281: return "OpCommitWritePipe";
+ case 282: return "OpIsValidReserveId";
+ case 283: return "OpGetNumPipePackets";
+ case 284: return "OpGetMaxPipePackets";
+ case 285: return "OpGroupReserveReadPipePackets";
+ case 286: return "OpGroupReserveWritePipePackets";
+ case 287: return "OpGroupCommitReadPipe";
+ case 288: return "OpGroupCommitWritePipe";
+ case 289: return "Bad";
+ case 290: return "Bad";
+ case 291: return "OpEnqueueMarker";
+ case 292: return "OpEnqueueKernel";
+ case 293: return "OpGetKernelNDrangeSubGroupCount";
+ case 294: return "OpGetKernelNDrangeMaxSubGroupSize";
+ case 295: return "OpGetKernelWorkGroupSize";
+ case 296: return "OpGetKernelPreferredWorkGroupSizeMultiple";
+ case 297: return "OpRetainEvent";
+ case 298: return "OpReleaseEvent";
+ case 299: return "OpCreateUserEvent";
+ case 300: return "OpIsValidEvent";
+ case 301: return "OpSetUserEventStatus";
+ case 302: return "OpCaptureEventProfilingInfo";
+ case 303: return "OpGetDefaultQueue";
+ case 304: return "OpBuildNDRange";
case OpcodeCeiling:
default:
@@ -850,6 +1076,10 @@
EnumParameters StorageParams[StorageClassCeiling];
EnumParameters SamplerAddressingModeParams[SamplerAddressingModeCeiling];
EnumParameters SamplerFilterModeParams[SamplerFilterModeCeiling];
+EnumParameters ImageFormatParams[ImageFormatCeiling];
+EnumParameters ImageChannelOrderParams[ImageChannelOrderCeiling];
+EnumParameters ImageChannelDataTypeParams[ImageChannelDataTypeCeiling];
+EnumParameters ImageOperandsParams[ImageOperandsCeiling];
EnumParameters FPFastMathParams[FPFastMathCeiling];
EnumParameters FPRoundingModeParams[FPRoundingModeCeiling];
EnumParameters LinkageTypeParams[LinkageTypeCeiling];
@@ -864,19 +1094,18 @@
EnumParameters FunctionControlParams[FunctionControlCeiling];
EnumParameters MemorySemanticsParams[MemorySemanticsCeiling];
EnumParameters MemoryAccessParams[MemoryAccessCeiling];
-EnumParameters ExecutionScopeParams[ExecutionScopeCeiling];
+EnumParameters ScopeParams[ScopeCeiling];
EnumParameters KernelEnqueueFlagsParams[KernelEnqueueFlagsCeiling];
EnumParameters KernelProfilingInfoParams[KernelProfilingInfoCeiling];
+EnumParameters CapabilityParams[CapabilityCeiling];
// Set up all the parameterizing descriptions of the opcodes, operands, etc.
void Parameterize()
{
- static bool initialized = false;
-
// only do this once.
+ static bool initialized = false;
if (initialized)
return;
-
initialized = true;
// Exceptions to having a result <id> and a resulting type <id>.
@@ -887,6 +1116,7 @@
InstructionDesc[OpSourceExtension].setResultAndType(false, false);
InstructionDesc[OpExtension].setResultAndType(false, false);
InstructionDesc[OpExtInstImport].setResultAndType(true, false);
+ InstructionDesc[OpCapability].setResultAndType(false, false);
InstructionDesc[OpMemoryModel].setResultAndType(false, false);
InstructionDesc[OpEntryPoint].setResultAndType(false, false);
InstructionDesc[OpExecutionMode].setResultAndType(false, false);
@@ -896,8 +1126,9 @@
InstructionDesc[OpTypeFloat].setResultAndType(true, false);
InstructionDesc[OpTypeVector].setResultAndType(true, false);
InstructionDesc[OpTypeMatrix].setResultAndType(true, false);
+ InstructionDesc[OpTypeImage].setResultAndType(true, false);
InstructionDesc[OpTypeSampler].setResultAndType(true, false);
- InstructionDesc[OpTypeFilter].setResultAndType(true, false);
+ InstructionDesc[OpTypeSampledImage].setResultAndType(true, false);
InstructionDesc[OpTypeArray].setResultAndType(true, false);
InstructionDesc[OpTypeRuntimeArray].setResultAndType(true, false);
InstructionDesc[OpTypeStruct].setResultAndType(true, false);
@@ -911,6 +1142,7 @@
InstructionDesc[OpTypePipe].setResultAndType(true, false);
InstructionDesc[OpFunctionEnd].setResultAndType(false, false);
InstructionDesc[OpStore].setResultAndType(false, false);
+ InstructionDesc[OpImageWrite].setResultAndType(false, false);
InstructionDesc[OpDecorationGroup].setResultAndType(true, false);
InstructionDesc[OpDecorate].setResultAndType(false, false);
InstructionDesc[OpMemberDecorate].setResultAndType(false, false);
@@ -928,7 +1160,6 @@
InstructionDesc[OpEndStreamPrimitive].setResultAndType(false, false);
InstructionDesc[OpControlBarrier].setResultAndType(false, false);
InstructionDesc[OpMemoryBarrier].setResultAndType(false, false);
- InstructionDesc[OpAtomicInit].setResultAndType(false, false);
InstructionDesc[OpAtomicStore].setResultAndType(false, false);
InstructionDesc[OpLoopMerge].setResultAndType(false, false);
InstructionDesc[OpSelectionMerge].setResultAndType(false, false);
@@ -942,7 +1173,6 @@
InstructionDesc[OpUnreachable].setResultAndType(false, false);
InstructionDesc[OpLifetimeStart].setResultAndType(false, false);
InstructionDesc[OpLifetimeStop].setResultAndType(false, false);
- InstructionDesc[OpCompileFlag].setResultAndType(false, false);
InstructionDesc[OpCommitReadPipe].setResultAndType(false, false);
InstructionDesc[OpCommitWritePipe].setResultAndType(false, false);
InstructionDesc[OpGroupCommitWritePipe].setResultAndType(false, false);
@@ -951,10 +1181,11 @@
InstructionDesc[OpSetUserEventStatus].setResultAndType(false, false);
InstructionDesc[OpRetainEvent].setResultAndType(false, false);
InstructionDesc[OpReleaseEvent].setResultAndType(false, false);
+ InstructionDesc[OpWaitGroupEvents].setResultAndType(false, false);
// Specific additional context-dependent operands
- ExecutionModeOperands[ExecutionModeInvocations].push(OperandLiteralNumber, "Number of invocations");
+ ExecutionModeOperands[ExecutionModeInvocations].push(OperandLiteralNumber, "Number of <<Invocation,invocations>>");
ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'x size'");
ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'y size'");
@@ -964,8 +1195,8 @@
ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'y size'");
ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'z size'");
- ExecutionModeOperands[ExecutionModeOutputVertices].push(OperandLiteralNumber, "Vertex count");
- ExecutionModeOperands[ExecutionModeVecTypeHint].push(OperandId, "Vector type");
+ ExecutionModeOperands[ExecutionModeOutputVertices].push(OperandLiteralNumber, "'Vertex count'");
+ ExecutionModeOperands[ExecutionModeVecTypeHint].push(OperandLiteralNumber, "'Vector type'");
DecorationOperands[DecorationStream].push(OperandLiteralNumber, "Stream number");
DecorationOperands[DecorationLocation].push(OperandLiteralNumber, "Location");
@@ -974,9 +1205,10 @@
DecorationOperands[DecorationBinding].push(OperandLiteralNumber, "Binding point");
DecorationOperands[DecorationDescriptorSet].push(OperandLiteralNumber, "Descriptor set");
DecorationOperands[DecorationOffset].push(OperandLiteralNumber, "Byte offset");
- DecorationOperands[DecorationAlignment].push(OperandLiteralNumber, "Declared alignment");
- DecorationOperands[DecorationXfbBuffer].push(OperandLiteralNumber, "XFB Buffer number");
- DecorationOperands[DecorationStride].push(OperandLiteralNumber, "Stride");
+ DecorationOperands[DecorationXfbBuffer].push(OperandLiteralNumber, "XFB buffer number");
+ DecorationOperands[DecorationXfbStride].push(OperandLiteralNumber, "XFB stride");
+ DecorationOperands[DecorationArrayStride].push(OperandLiteralNumber, "Array stride");
+ DecorationOperands[DecorationMatrixStride].push(OperandLiteralNumber, "Matrix stride");
DecorationOperands[DecorationBuiltIn].push(OperandLiteralNumber, "See <<BuiltIn,*BuiltIn*>>");
DecorationOperands[DecorationFPRoundingMode].push(OperandFPRoundingMode, "floating-point rounding mode");
DecorationOperands[DecorationFPFastMathMode].push(OperandFPFastMath, "fast-math mode");
@@ -995,6 +1227,10 @@
OperandClassParams[OperandDimensionality].set(DimensionCeiling, DimensionString, DimensionalityParams);
OperandClassParams[OperandSamplerAddressingMode].set(SamplerAddressingModeCeiling, SamplerAddressingModeString, SamplerAddressingModeParams);
OperandClassParams[OperandSamplerFilterMode].set(SamplerFilterModeCeiling, SamplerFilterModeString, SamplerFilterModeParams);
+ OperandClassParams[OperandSamplerImageFormat].set(ImageFormatCeiling, ImageFormatString, ImageFormatParams);
+ OperandClassParams[OperandImageChannelOrder].set(ImageChannelOrderCeiling, ImageChannelOrderString, ImageChannelOrderParams);
+ OperandClassParams[OperandImageChannelDataType].set(ImageChannelDataTypeCeiling, ImageChannelDataTypeString, ImageChannelDataTypeParams);
+ OperandClassParams[OperandImageOperands].set(ImageOperandsCeiling, ImageOperandsString, ImageOperandsParams, true);
OperandClassParams[OperandFPFastMath].set(FPFastMathCeiling, FPFastMathString, FPFastMathParams, true);
OperandClassParams[OperandFPRoundingMode].set(FPRoundingModeCeiling, FPRoundingModeString, FPRoundingModeParams);
OperandClassParams[OperandLinkageType].set(LinkageTypeCeiling, LinkageTypeString, LinkageTypeParams);
@@ -1008,200 +1244,215 @@
OperandClassParams[OperandFunction].set(FunctionControlCeiling, FunctionControlString, FunctionControlParams, true);
OperandClassParams[OperandMemorySemantics].set(MemorySemanticsCeiling, MemorySemanticsString, MemorySemanticsParams, true);
OperandClassParams[OperandMemoryAccess].set(MemoryAccessCeiling, MemoryAccessString, MemoryAccessParams, true);
- OperandClassParams[OperandExecutionScope].set(ExecutionScopeCeiling, ExecutionScopeString, ExecutionScopeParams);
+ OperandClassParams[OperandScope].set(ScopeCeiling, ScopeString, ScopeParams);
OperandClassParams[OperandGroupOperation].set(GroupOperationCeiling, GroupOperationString, GroupOperationParams);
OperandClassParams[OperandKernelEnqueueFlags].set(KernelEnqueueFlagsCeiling, KernelEnqueueFlagsString, KernelEnqueueFlagsParams);
OperandClassParams[OperandKernelProfilingInfo].set(KernelProfilingInfoCeiling, KernelProfilingInfoString, KernelProfilingInfoParams, true);
+ OperandClassParams[OperandCapability].set(CapabilityCeiling, CapabilityString, CapabilityParams);
OperandClassParams[OperandOpcode].set(OpcodeCeiling, OpcodeString, 0);
- AddressingParams[AddressingModelPhysical32].caps.push_back(CapAddr);
- AddressingParams[AddressingModelPhysical64].caps.push_back(CapAddr);
+ AddressingParams[AddressingModelPhysical32].caps.push_back(CapabilityAddresses);
+ AddressingParams[AddressingModelPhysical64].caps.push_back(CapabilityAddresses);
- MemoryParams[MemoryModelSimple].caps.push_back(CapShader);
- MemoryParams[MemoryModelGLSL450].caps.push_back(CapShader);
- MemoryParams[MemoryModelOpenCL12].caps.push_back(CapKernel);
- MemoryParams[MemoryModelOpenCL20].caps.push_back(CapKernel);
- MemoryParams[MemoryModelOpenCL21].caps.push_back(CapKernel);
+ MemoryParams[MemoryModelSimple].caps.push_back(CapabilityShader);
+ MemoryParams[MemoryModelGLSL450].caps.push_back(CapabilityShader);
+ MemoryParams[MemoryModelOpenCL].caps.push_back(CapabilityKernel);
- ExecutionModelParams[ExecutionModelVertex].caps.push_back(CapShader);
- ExecutionModelParams[ExecutionModelTessellationControl].caps.push_back(CapTess);
- ExecutionModelParams[ExecutionModelTessellationEvaluation].caps.push_back(CapTess);
- ExecutionModelParams[ExecutionModelGeometry].caps.push_back(CapGeom);
- ExecutionModelParams[ExecutionModelFragment].caps.push_back(CapShader);
- ExecutionModelParams[ExecutionModelGLCompute].caps.push_back(CapShader);
- ExecutionModelParams[ExecutionModelKernel].caps.push_back(CapKernel);
+ ExecutionModelParams[ExecutionModelVertex].caps.push_back(CapabilityShader);
+ ExecutionModelParams[ExecutionModelTessellationControl].caps.push_back(CapabilityTessellation);
+ ExecutionModelParams[ExecutionModelTessellationEvaluation].caps.push_back(CapabilityTessellation);
+ ExecutionModelParams[ExecutionModelGeometry].caps.push_back(CapabilityGeometry);
+ ExecutionModelParams[ExecutionModelFragment].caps.push_back(CapabilityShader);
+ ExecutionModelParams[ExecutionModelGLCompute].caps.push_back(CapabilityShader);
+ ExecutionModelParams[ExecutionModelKernel].caps.push_back(CapabilityKernel);
// Storage capabilites
- StorageParams[StorageClassInput].caps.push_back(CapShader);
- StorageParams[StorageClassUniform].caps.push_back(CapShader);
- StorageParams[StorageClassOutput].caps.push_back(CapShader);
- StorageParams[StorageClassPrivateGlobal].caps.push_back(CapShader);
- StorageParams[StorageClassFunction].caps.push_back(CapShader);
- StorageParams[StorageClassGeneric].caps.push_back(CapKernel);
- StorageParams[StorageClassPrivate].caps.push_back(CapKernel);
- StorageParams[StorageClassAtomicCounter].caps.push_back(CapShader);
+ StorageParams[StorageClassInput].caps.push_back(CapabilityShader);
+ StorageParams[StorageClassUniform].caps.push_back(CapabilityShader);
+ StorageParams[StorageClassOutput].caps.push_back(CapabilityShader);
+ StorageParams[StorageClassPrivateGlobal].caps.push_back(CapabilityShader);
+ StorageParams[StorageClassGeneric].caps.push_back(CapabilityKernel);
+ StorageParams[StorageClassAtomicCounter].caps.push_back(CapabilityAtomicStorage);
+
// Sampler Filter & Addressing mode capabilities
- SamplerAddressingModeParams[SamplerAddressingModeNone].caps.push_back(CapKernel);
- SamplerAddressingModeParams[SamplerAddressingModeClampToEdge].caps.push_back(CapKernel);
- SamplerAddressingModeParams[SamplerAddressingModeClamp].caps.push_back(CapKernel);
- SamplerAddressingModeParams[SamplerAddressingModeRepeat].caps.push_back(CapKernel);
- SamplerAddressingModeParams[SamplerAddressingModeRepeatMirrored].caps.push_back(CapKernel);
+ SamplerAddressingModeParams[SamplerAddressingModeNone].caps.push_back(CapabilityKernel);
+ SamplerAddressingModeParams[SamplerAddressingModeClampToEdge].caps.push_back(CapabilityKernel);
+ SamplerAddressingModeParams[SamplerAddressingModeClamp].caps.push_back(CapabilityKernel);
+ SamplerAddressingModeParams[SamplerAddressingModeRepeat].caps.push_back(CapabilityKernel);
+ SamplerAddressingModeParams[SamplerAddressingModeRepeatMirrored].caps.push_back(CapabilityKernel);
- SamplerFilterModeParams[SamplerFilterModeNearest].caps.push_back(CapKernel);
- SamplerFilterModeParams[SamplerFilterModeLinear].caps.push_back(CapKernel);
+ SamplerFilterModeParams[SamplerFilterModeNearest].caps.push_back(CapabilityKernel);
+ SamplerFilterModeParams[SamplerFilterModeLinear].caps.push_back(CapabilityKernel);
+
+ // image format capabilities
+ for (int i = 0; i < ImageFormatCeiling; ++i) {
+ ImageFormatParams[i].caps.push_back(CapabilityShader);
+ }
+
+ // image channel order capabilities
+ for (int i = 0; i < ImageChannelOrderCeiling; ++i) {
+ ImageChannelOrderParams[i].caps.push_back(CapabilityKernel);
+ }
+
+ // image channel type capabilities
+ for (int i = 0; i < ImageChannelDataTypeCeiling; ++i) {
+ ImageChannelDataTypeParams[i].caps.push_back(CapabilityKernel);
+ }
+
+ // image lookup operands
+ ImageOperandsParams[ImageOperandsBiasShift].caps.push_back(CapabilityShader);
+ ImageOperandsParams[ImageOperandsOffsetShift].caps.push_back(CapabilityImageGatherExtended);
// fast math flags capabilities
for (int i = 0; i < FPFastMathCeiling; ++i) {
- FPFastMathParams[i].caps.push_back(CapKernel);
+ FPFastMathParams[i].caps.push_back(CapabilityKernel);
}
// fp rounding mode capabilities
for (int i = 0; i < FPRoundingModeCeiling; ++i) {
- FPRoundingModeParams[i].caps.push_back(CapKernel);
+ FPRoundingModeParams[i].caps.push_back(CapabilityKernel);
}
// linkage types
for (int i = 0; i < LinkageTypeCeiling; ++i) {
- LinkageTypeParams[i].caps.push_back(CapLink);
+ LinkageTypeParams[i].caps.push_back(CapabilityLinkage);
}
// function argument types
for (int i = 0; i < FuncParamAttrCeiling; ++i) {
- FuncParamAttrParams[i].caps.push_back(CapKernel);
+ FuncParamAttrParams[i].caps.push_back(CapabilityKernel);
}
// function argument types
for (int i = 0; i < AccessQualifierCeiling; ++i) {
- AccessQualifierParams[i].caps.push_back(CapKernel);
+ AccessQualifierParams[i].caps.push_back(CapabilityKernel);
}
- ExecutionModeParams[ExecutionModeInvocations].caps.push_back(CapGeom);
- ExecutionModeParams[ExecutionModeSpacingEqual].caps.push_back(CapTess);
- ExecutionModeParams[ExecutionModeSpacingFractionalEven].caps.push_back(CapTess);
- ExecutionModeParams[ExecutionModeSpacingFractionalOdd].caps.push_back(CapTess);
- ExecutionModeParams[ExecutionModeVertexOrderCw].caps.push_back(CapTess);
- ExecutionModeParams[ExecutionModeVertexOrderCcw].caps.push_back(CapTess);
- ExecutionModeParams[ExecutionModePixelCenterInteger].caps.push_back(CapShader);
- ExecutionModeParams[ExecutionModeOriginUpperLeft].caps.push_back(CapShader);
- ExecutionModeParams[ExecutionModeEarlyFragmentTests].caps.push_back(CapShader);
- ExecutionModeParams[ExecutionModePointMode].caps.push_back(CapTess);
- ExecutionModeParams[ExecutionModeXfb].caps.push_back(CapShader);
- ExecutionModeParams[ExecutionModeDepthReplacing].caps.push_back(CapShader);
- ExecutionModeParams[ExecutionModeDepthAny].caps.push_back(CapShader);
- ExecutionModeParams[ExecutionModeDepthGreater].caps.push_back(CapShader);
- ExecutionModeParams[ExecutionModeDepthLess].caps.push_back(CapShader);
- ExecutionModeParams[ExecutionModeDepthUnchanged].caps.push_back(CapShader);
- ExecutionModeParams[ExecutionModeLocalSizeHint].caps.push_back(CapKernel);
- ExecutionModeParams[ExecutionModeInputPoints].caps.push_back(CapGeom);
- ExecutionModeParams[ExecutionModeInputLines].caps.push_back(CapGeom);
- ExecutionModeParams[ExecutionModeInputLinesAdjacency].caps.push_back(CapGeom);
- ExecutionModeParams[ExecutionModeInputTriangles].caps.push_back(CapGeom);
- ExecutionModeParams[ExecutionModeInputTriangles].caps.push_back(CapTess);
- ExecutionModeParams[ExecutionModeInputTrianglesAdjacency].caps.push_back(CapGeom);
- ExecutionModeParams[ExecutionModeInputQuads].caps.push_back(CapTess);
- ExecutionModeParams[ExecutionModeInputIsolines].caps.push_back(CapTess);
- ExecutionModeParams[ExecutionModeOutputVertices].caps.push_back(CapGeom);
- ExecutionModeParams[ExecutionModeOutputVertices].caps.push_back(CapTess);
- ExecutionModeParams[ExecutionModeOutputPoints].caps.push_back(CapGeom);
- ExecutionModeParams[ExecutionModeOutputLineStrip].caps.push_back(CapGeom);
- ExecutionModeParams[ExecutionModeOutputTriangleStrip].caps.push_back(CapGeom);
- ExecutionModeParams[ExecutionModeVecTypeHint].caps.push_back(CapKernel);
- ExecutionModeParams[ExecutionModeContractionOff].caps.push_back(CapKernel);
+ ExecutionModeParams[ExecutionModeInvocations].caps.push_back(CapabilityGeometry);
+ ExecutionModeParams[ExecutionModeSpacingEqual].caps.push_back(CapabilityTessellation);
+ ExecutionModeParams[ExecutionModeSpacingFractionalEven].caps.push_back(CapabilityTessellation);
+ ExecutionModeParams[ExecutionModeSpacingFractionalOdd].caps.push_back(CapabilityTessellation);
+ ExecutionModeParams[ExecutionModeVertexOrderCw].caps.push_back(CapabilityTessellation);
+ ExecutionModeParams[ExecutionModeVertexOrderCcw].caps.push_back(CapabilityTessellation);
+ ExecutionModeParams[ExecutionModePixelCenterInteger].caps.push_back(CapabilityShader);
+ ExecutionModeParams[ExecutionModeOriginUpperLeft].caps.push_back(CapabilityShader);
+ ExecutionModeParams[ExecutionModeOriginLowerLeft].caps.push_back(CapabilityShader);
+ ExecutionModeParams[ExecutionModeEarlyFragmentTests].caps.push_back(CapabilityShader);
+ ExecutionModeParams[ExecutionModePointMode].caps.push_back(CapabilityTessellation);
+ ExecutionModeParams[ExecutionModeXfb].caps.push_back(CapabilityShader);
+ ExecutionModeParams[ExecutionModeDepthReplacing].caps.push_back(CapabilityShader);
+ ExecutionModeParams[ExecutionModeDepthAny].caps.push_back(CapabilityShader);
+ ExecutionModeParams[ExecutionModeDepthGreater].caps.push_back(CapabilityShader);
+ ExecutionModeParams[ExecutionModeDepthLess].caps.push_back(CapabilityShader);
+ ExecutionModeParams[ExecutionModeDepthUnchanged].caps.push_back(CapabilityShader);
+ ExecutionModeParams[ExecutionModeLocalSizeHint].caps.push_back(CapabilityKernel);
+ ExecutionModeParams[ExecutionModeInputPoints].caps.push_back(CapabilityGeometry);
+ ExecutionModeParams[ExecutionModeInputLines].caps.push_back(CapabilityGeometry);
+ ExecutionModeParams[ExecutionModeInputLinesAdjacency].caps.push_back(CapabilityGeometry);
+ ExecutionModeParams[ExecutionModeInputTriangles].caps.push_back(CapabilityGeometry);
+ ExecutionModeParams[ExecutionModeInputTriangles].caps.push_back(CapabilityTessellation);
+ ExecutionModeParams[ExecutionModeInputTrianglesAdjacency].caps.push_back(CapabilityGeometry);
+ ExecutionModeParams[ExecutionModeInputQuads].caps.push_back(CapabilityTessellation);
+ ExecutionModeParams[ExecutionModeInputIsolines].caps.push_back(CapabilityTessellation);
+ ExecutionModeParams[ExecutionModeOutputVertices].caps.push_back(CapabilityGeometry);
+ ExecutionModeParams[ExecutionModeOutputVertices].caps.push_back(CapabilityTessellation);
+ ExecutionModeParams[ExecutionModeOutputPoints].caps.push_back(CapabilityGeometry);
+ ExecutionModeParams[ExecutionModeOutputLineStrip].caps.push_back(CapabilityGeometry);
+ ExecutionModeParams[ExecutionModeOutputTriangleStrip].caps.push_back(CapabilityGeometry);
+ ExecutionModeParams[ExecutionModeVecTypeHint].caps.push_back(CapabilityKernel);
+ ExecutionModeParams[ExecutionModeContractionOff].caps.push_back(CapabilityKernel);
- DecorationParams[DecorationPrecisionLow].caps.push_back(CapShader);
- DecorationParams[DecorationPrecisionMedium].caps.push_back(CapShader);
- DecorationParams[DecorationPrecisionHigh].caps.push_back(CapShader);
- DecorationParams[DecorationBlock].caps.push_back(CapShader);
- DecorationParams[DecorationBufferBlock].caps.push_back(CapShader);
- DecorationParams[DecorationRowMajor].caps.push_back(CapMatrix);
- DecorationParams[DecorationColMajor].caps.push_back(CapMatrix);
- DecorationParams[DecorationGLSLShared].caps.push_back(CapShader);
- DecorationParams[DecorationGLSLStd140].caps.push_back(CapShader);
- DecorationParams[DecorationGLSLStd430].caps.push_back(CapShader);
- DecorationParams[DecorationGLSLPacked].caps.push_back(CapShader);
- DecorationParams[DecorationSmooth].caps.push_back(CapShader);
- DecorationParams[DecorationNoperspective].caps.push_back(CapShader);
- DecorationParams[DecorationFlat].caps.push_back(CapShader);
- DecorationParams[DecorationPatch].caps.push_back(CapTess);
- DecorationParams[DecorationCentroid].caps.push_back(CapShader);
- DecorationParams[DecorationSample].caps.push_back(CapShader);
- DecorationParams[DecorationInvariant].caps.push_back(CapShader);
- DecorationParams[DecorationConstant].caps.push_back(CapKernel);
- DecorationParams[DecorationUniform].caps.push_back(CapShader);
- DecorationParams[DecorationCPacked].caps.push_back(CapKernel);
- DecorationParams[DecorationSaturatedConversion].caps.push_back(CapKernel);
- DecorationParams[DecorationStream].caps.push_back(CapGeom);
- DecorationParams[DecorationLocation].caps.push_back(CapShader);
- DecorationParams[DecorationComponent].caps.push_back(CapShader);
- DecorationParams[DecorationIndex].caps.push_back(CapShader);
- DecorationParams[DecorationBinding].caps.push_back(CapShader);
- DecorationParams[DecorationDescriptorSet].caps.push_back(CapShader);
- DecorationParams[DecorationXfbBuffer].caps.push_back(CapShader);
- DecorationParams[DecorationStride].caps.push_back(CapShader);
- DecorationParams[DecorationBuiltIn].caps.push_back(CapShader);
- DecorationParams[DecorationFuncParamAttr].caps.push_back(CapKernel);
- DecorationParams[DecorationFPRoundingMode].caps.push_back(CapKernel);
- DecorationParams[DecorationFPFastMathMode].caps.push_back(CapKernel);
- DecorationParams[DecorationLinkageAttributes].caps.push_back(CapLink);
- DecorationParams[DecorationSpecId].caps.push_back(CapShader);
+ DecorationParams[DecorationRelaxedPrecision].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationBlock].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationBufferBlock].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationRowMajor].caps.push_back(CapabilityMatrix);
+ DecorationParams[DecorationColMajor].caps.push_back(CapabilityMatrix);
+ DecorationParams[DecorationGLSLShared].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationGLSLPacked].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationSmooth].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationNoperspective].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationFlat].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationPatch].caps.push_back(CapabilityTessellation);
+ DecorationParams[DecorationCentroid].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationSample].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationInvariant].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationConstant].caps.push_back(CapabilityKernel);
+ DecorationParams[DecorationUniform].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationCPacked].caps.push_back(CapabilityKernel);
+ DecorationParams[DecorationSaturatedConversion].caps.push_back(CapabilityKernel);
+ DecorationParams[DecorationStream].caps.push_back(CapabilityGeometry);
+ DecorationParams[DecorationLocation].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationComponent].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationIndex].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationBinding].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationDescriptorSet].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationXfbBuffer].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationXfbStride].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationArrayStride].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationMatrixStride].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationBuiltIn].caps.push_back(CapabilityShader);
+ DecorationParams[DecorationFuncParamAttr].caps.push_back(CapabilityKernel);
+ DecorationParams[DecorationFPRoundingMode].caps.push_back(CapabilityKernel);
+ DecorationParams[DecorationFPFastMathMode].caps.push_back(CapabilityKernel);
+ DecorationParams[DecorationLinkageAttributes].caps.push_back(CapabilityLinkage);
+ DecorationParams[DecorationSpecId].caps.push_back(CapabilityShader);
- BuiltInParams[BuiltInPosition].caps.push_back(CapShader);
- BuiltInParams[BuiltInPointSize].caps.push_back(CapShader);
- BuiltInParams[BuiltInClipVertex].caps.push_back(CapShader);
- BuiltInParams[BuiltInClipDistance].caps.push_back(CapShader);
- BuiltInParams[BuiltInCullDistance].caps.push_back(CapShader);
- BuiltInParams[BuiltInVertexId].caps.push_back(CapShader);
- BuiltInParams[BuiltInInstanceId].caps.push_back(CapShader);
- BuiltInParams[BuiltInPrimitiveId].caps.push_back(CapGeom);
- BuiltInParams[BuiltInPrimitiveId].caps.push_back(CapTess);
- BuiltInParams[BuiltInInvocationId].caps.push_back(CapGeom);
- BuiltInParams[BuiltInInvocationId].caps.push_back(CapTess);
- BuiltInParams[BuiltInLayer].caps.push_back(CapGeom);
- BuiltInParams[BuiltInViewportIndex].caps.push_back(CapGeom);
- BuiltInParams[BuiltInTessLevelOuter].caps.push_back(CapTess);
- BuiltInParams[BuiltInTessLevelInner].caps.push_back(CapTess);
- BuiltInParams[BuiltInTessCoord].caps.push_back(CapTess);
- BuiltInParams[BuiltInPatchVertices].caps.push_back(CapTess);
- BuiltInParams[BuiltInFragCoord].caps.push_back(CapShader);
- BuiltInParams[BuiltInPointCoord].caps.push_back(CapShader);
- BuiltInParams[BuiltInFrontFacing].caps.push_back(CapShader);
- BuiltInParams[BuiltInSampleId].caps.push_back(CapShader);
- BuiltInParams[BuiltInSamplePosition].caps.push_back(CapShader);
- BuiltInParams[BuiltInSampleMask].caps.push_back(CapShader);
- BuiltInParams[BuiltInFragColor].caps.push_back(CapShader);
- BuiltInParams[BuiltInFragDepth].caps.push_back(CapShader);
- BuiltInParams[BuiltInHelperInvocation].caps.push_back(CapShader);
- BuiltInParams[BuiltInLocalInvocationIndex].caps.push_back(CapShader);
- BuiltInParams[BuiltInWorkDim].caps.push_back(CapKernel);
- BuiltInParams[BuiltInGlobalSize].caps.push_back(CapKernel);
- BuiltInParams[BuiltInEnqueuedWorkgroupSize].caps.push_back(CapKernel);
- BuiltInParams[BuiltInGlobalOffset].caps.push_back(CapKernel);
- BuiltInParams[BuiltInGlobalLinearId].caps.push_back(CapKernel);
- BuiltInParams[BuiltInWorkgroupLinearId].caps.push_back(CapKernel);
+ BuiltInParams[BuiltInPosition].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInPointSize].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInClipDistance].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInCullDistance].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInVertexId].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInInstanceId].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInPrimitiveId].caps.push_back(CapabilityGeometry);
+ BuiltInParams[BuiltInPrimitiveId].caps.push_back(CapabilityTessellation);
+ BuiltInParams[BuiltInInvocationId].caps.push_back(CapabilityGeometry);
+ BuiltInParams[BuiltInInvocationId].caps.push_back(CapabilityTessellation);
+ BuiltInParams[BuiltInLayer].caps.push_back(CapabilityGeometry);
+ BuiltInParams[BuiltInViewportIndex].caps.push_back(CapabilityGeometry);
+ BuiltInParams[BuiltInTessLevelOuter].caps.push_back(CapabilityTessellation);
+ BuiltInParams[BuiltInTessLevelInner].caps.push_back(CapabilityTessellation);
+ BuiltInParams[BuiltInTessCoord].caps.push_back(CapabilityTessellation);
+ BuiltInParams[BuiltInPatchVertices].caps.push_back(CapabilityTessellation);
+ BuiltInParams[BuiltInFragCoord].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInPointCoord].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInFrontFacing].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInSampleId].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInSamplePosition].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInSampleMask].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInFragColor].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInFragDepth].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInHelperInvocation].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInLocalInvocationIndex].caps.push_back(CapabilityShader);
+ BuiltInParams[BuiltInWorkDim].caps.push_back(CapabilityKernel);
+ BuiltInParams[BuiltInGlobalSize].caps.push_back(CapabilityKernel);
+ BuiltInParams[BuiltInEnqueuedWorkgroupSize].caps.push_back(CapabilityKernel);
+ BuiltInParams[BuiltInGlobalOffset].caps.push_back(CapabilityKernel);
+ BuiltInParams[BuiltInGlobalLinearId].caps.push_back(CapabilityKernel);
+ BuiltInParams[BuiltInWorkgroupLinearId].caps.push_back(CapabilityKernel);
- BuiltInParams[BuiltInSubgroupSize].caps.push_back(CapKernel);
- BuiltInParams[BuiltInSubgroupMaxSize].caps.push_back(CapKernel);
- BuiltInParams[BuiltInNumSubgroups].caps.push_back(CapKernel);
- BuiltInParams[BuiltInNumEnqueuedSubgroups].caps.push_back(CapKernel);
- BuiltInParams[BuiltInSubgroupId].caps.push_back(CapKernel);
- BuiltInParams[BuiltInSubgroupLocalInvocationId].caps.push_back(CapKernel);
+ BuiltInParams[BuiltInSubgroupSize].caps.push_back(CapabilityKernel);
+ BuiltInParams[BuiltInSubgroupMaxSize].caps.push_back(CapabilityKernel);
+ BuiltInParams[BuiltInNumSubgroups].caps.push_back(CapabilityKernel);
+ BuiltInParams[BuiltInNumEnqueuedSubgroups].caps.push_back(CapabilityKernel);
+ BuiltInParams[BuiltInSubgroupId].caps.push_back(CapabilityKernel);
+ BuiltInParams[BuiltInSubgroupLocalInvocationId].caps.push_back(CapabilityKernel);
- DimensionalityParams[DimCube].caps.push_back(CapShader);
- DimensionalityParams[DimRect].caps.push_back(CapShader);
+ DimensionalityParams[DimCube].caps.push_back(CapabilityShader);
+ DimensionalityParams[DimRect].caps.push_back(CapabilityShader);
// Group Operations
for (int i = 0; i < GroupOperationCeiling; ++i) {
- GroupOperationParams[i].caps.push_back(CapKernel);
+ GroupOperationParams[i].caps.push_back(CapabilityKernel);
}
// Enqueue flags
for (int i = 0; i < KernelEnqueueFlagsCeiling; ++i) {
- KernelEnqueueFlagsParams[i].caps.push_back(CapKernel);
+ KernelEnqueueFlagsParams[i].caps.push_back(CapabilityKernel);
}
// Profiling info
- KernelProfilingInfoParams[0].caps.push_back(CapKernel);
+ KernelProfilingInfoParams[0].caps.push_back(CapabilityKernel);
// set name of operator, an initial set of <id> style operands, and the description
@@ -1228,61 +1479,67 @@
InstructionDesc[OpExtInstImport].operands.push(OperandLiteralString, "'Name'");
+ InstructionDesc[OpCapability].operands.push(OperandCapability, "'Capability'");
+
InstructionDesc[OpMemoryModel].operands.push(OperandAddressing, "");
InstructionDesc[OpMemoryModel].operands.push(OperandMemory, "");
InstructionDesc[OpEntryPoint].operands.push(OperandExecutionModel, "");
InstructionDesc[OpEntryPoint].operands.push(OperandId, "'Entry Point'");
+ InstructionDesc[OpEntryPoint].operands.push(OperandLiteralString, "'Name'");
InstructionDesc[OpExecutionMode].operands.push(OperandId, "'Entry Point'");
InstructionDesc[OpExecutionMode].operands.push(OperandExecutionMode, "'Mode'");
- InstructionDesc[OpExecutionMode].operands.push(OperandVariableLiterals, "See <<Execution Mode,Execution Mode>>");
+ InstructionDesc[OpExecutionMode].operands.push(OperandOptionalLiteral, "See <<Execution Mode,Execution Mode>>");
InstructionDesc[OpTypeInt].operands.push(OperandLiteralNumber, "'Width'");
InstructionDesc[OpTypeInt].operands.push(OperandLiteralNumber, "'Signedness'");
InstructionDesc[OpTypeFloat].operands.push(OperandLiteralNumber, "'Width'");
- InstructionDesc[OpTypeVector].operands.push(OperandId, "'Component type'");
- InstructionDesc[OpTypeVector].operands.push(OperandLiteralNumber, "'Component count'");
+ InstructionDesc[OpTypeVector].operands.push(OperandId, "'Component Type'");
+ InstructionDesc[OpTypeVector].operands.push(OperandLiteralNumber, "'Component Count'");
- InstructionDesc[OpTypeMatrix].capabilities.push_back(CapMatrix);
- InstructionDesc[OpTypeMatrix].operands.push(OperandId, "'Column type'");
- InstructionDesc[OpTypeMatrix].operands.push(OperandLiteralNumber, "'Column count'");
+ InstructionDesc[OpTypeMatrix].capabilities.push_back(CapabilityMatrix);
+ InstructionDesc[OpTypeMatrix].operands.push(OperandId, "'Column Type'");
+ InstructionDesc[OpTypeMatrix].operands.push(OperandLiteralNumber, "'Column Count'");
- InstructionDesc[OpTypeSampler].operands.push(OperandId, "'Sampled Type'");
- InstructionDesc[OpTypeSampler].operands.push(OperandDimensionality, "");
- InstructionDesc[OpTypeSampler].operands.push(OperandLiteralNumber, "'Content'");
- InstructionDesc[OpTypeSampler].operands.push(OperandLiteralNumber, "'Arrayed'");
- InstructionDesc[OpTypeSampler].operands.push(OperandLiteralNumber, "'Compare'");
- InstructionDesc[OpTypeSampler].operands.push(OperandLiteralNumber, "'MS'");
- InstructionDesc[OpTypeSampler].operands.push(OperandOptionalId, "'Qualifier'");
+ InstructionDesc[OpTypeImage].operands.push(OperandId, "'Sampled Type'");
+ InstructionDesc[OpTypeImage].operands.push(OperandDimensionality, "");
+ InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Depth'");
+ InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Arrayed'");
+ InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'MS'");
+ InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Sampled'");
+ InstructionDesc[OpTypeImage].operands.push(OperandSamplerImageFormat, "");
+ InstructionDesc[OpTypeImage].operands.push(OperandOptionalLiteral, "'Access Qualifier'");
- InstructionDesc[OpTypeArray].operands.push(OperandId, "'Element type'");
+ InstructionDesc[OpTypeSampledImage].operands.push(OperandId, "'Image Type'");
+
+ InstructionDesc[OpTypeArray].operands.push(OperandId, "'Element Type'");
InstructionDesc[OpTypeArray].operands.push(OperandId, "'Length'");
- InstructionDesc[OpTypeRuntimeArray].capabilities.push_back(CapShader);
- InstructionDesc[OpTypeRuntimeArray].operands.push(OperandId, "'Element type'");
+ InstructionDesc[OpTypeRuntimeArray].capabilities.push_back(CapabilityShader);
+ InstructionDesc[OpTypeRuntimeArray].operands.push(OperandId, "'Element Type'");
InstructionDesc[OpTypeStruct].operands.push(OperandVariableIds, "'Member 0 type', +\n'member 1 type', +\n...");
- InstructionDesc[OpTypeOpaque].capabilities.push_back(CapKernel);
+ InstructionDesc[OpTypeOpaque].capabilities.push_back(CapabilityKernel);
InstructionDesc[OpTypeOpaque].operands.push(OperandLiteralString, "The name of the opaque type.");
InstructionDesc[OpTypePointer].operands.push(OperandStorage, "");
InstructionDesc[OpTypePointer].operands.push(OperandId, "'Type'");
- InstructionDesc[OpTypeEvent].capabilities.push_back(CapKernel);
+ InstructionDesc[OpTypeEvent].capabilities.push_back(CapabilityKernel);
- InstructionDesc[OpTypeDeviceEvent].capabilities.push_back(CapKernel);
+ InstructionDesc[OpTypeDeviceEvent].capabilities.push_back(CapabilityKernel);
- InstructionDesc[OpTypeReserveId].capabilities.push_back(CapKernel);
+ InstructionDesc[OpTypeReserveId].capabilities.push_back(CapabilityPipes);
- InstructionDesc[OpTypeQueue].capabilities.push_back(CapKernel);
+ InstructionDesc[OpTypeQueue].capabilities.push_back(CapabilityKernel);
InstructionDesc[OpTypePipe].operands.push(OperandId, "'Type'");
InstructionDesc[OpTypePipe].operands.push(OperandAccessQualifier, "'Qualifier'");
- InstructionDesc[OpTypePipe].capabilities.push_back(CapKernel);
+ InstructionDesc[OpTypePipe].capabilities.push_back(CapabilityPipes);
InstructionDesc[OpTypeFunction].operands.push(OperandId, "'Return Type'");
InstructionDesc[OpTypeFunction].operands.push(OperandVariableIds, "'Parameter 0 Type', +\n'Parameter 1 Type', +\n...");
@@ -1291,32 +1548,21 @@
InstructionDesc[OpConstantComposite].operands.push(OperandVariableIds, "'Constituents'");
- InstructionDesc[OpConstantNullPointer].capabilities.push_back(CapAddr);
-
- InstructionDesc[OpConstantNullObject].capabilities.push_back(CapKernel);
-
- InstructionDesc[OpConstantSampler].capabilities.push_back(CapKernel);
- InstructionDesc[OpConstantSampler].operands.push(OperandLiteralNumber, "'Mode'");
+ InstructionDesc[OpConstantSampler].capabilities.push_back(CapabilityLiteralSampler);
+ InstructionDesc[OpConstantSampler].operands.push(OperandSamplerAddressingMode, "");
InstructionDesc[OpConstantSampler].operands.push(OperandLiteralNumber, "'Param'");
- InstructionDesc[OpConstantSampler].operands.push(OperandLiteralNumber, "'Filter'");
-
- InstructionDesc[OpSpecConstantTrue].capabilities.push_back(CapShader);
-
- InstructionDesc[OpSpecConstantFalse].capabilities.push_back(CapShader);
+ InstructionDesc[OpConstantSampler].operands.push(OperandSamplerFilterMode, "");
InstructionDesc[OpSpecConstant].operands.push(OperandVariableLiterals, "'Value'");
- InstructionDesc[OpSpecConstant].capabilities.push_back(CapShader);
InstructionDesc[OpSpecConstantComposite].operands.push(OperandVariableIds, "'Constituents'");
- InstructionDesc[OpSpecConstantComposite].capabilities.push_back(CapShader);
+
+ InstructionDesc[OpSpecConstantOp].operands.push(OperandLiteralNumber, "'Opcode'");
+ InstructionDesc[OpSpecConstantOp].operands.push(OperandVariableIds, "'Operands'");
InstructionDesc[OpVariable].operands.push(OperandStorage, "");
InstructionDesc[OpVariable].operands.push(OperandOptionalId, "'Initializer'");
- InstructionDesc[OpVariableArray].operands.push(OperandStorage, "");
- InstructionDesc[OpVariableArray].operands.push(OperandId, "'N'");
- InstructionDesc[OpVariableArray].capabilities.push_back(CapAddr);
-
InstructionDesc[OpFunction].operands.push(OperandFunction, "");
InstructionDesc[OpFunction].operands.push(OperandId, "'Function Type'");
@@ -1328,28 +1574,28 @@
InstructionDesc[OpExtInst].operands.push(OperandVariableIds, "'Operand 1', +\n'Operand 2', +\n...");
InstructionDesc[OpLoad].operands.push(OperandId, "'Pointer'");
- InstructionDesc[OpLoad].operands.push(OperandVariableLiterals, "'Memory Access'");
+ InstructionDesc[OpLoad].operands.push(OperandOptionalLiteral, "'Memory Access'");
InstructionDesc[OpStore].operands.push(OperandId, "'Pointer'");
InstructionDesc[OpStore].operands.push(OperandId, "'Object'");
- InstructionDesc[OpStore].operands.push(OperandVariableLiterals, "'Memory Access'");
+ InstructionDesc[OpStore].operands.push(OperandOptionalLiteral, "'Memory Access'");
- InstructionDesc[OpPhi].operands.push(OperandVariableIds, "");
+ InstructionDesc[OpPhi].operands.push(OperandVariableIds, "'Variable, Parent, ...'");
InstructionDesc[OpDecorate].operands.push(OperandId, "'Target'");
InstructionDesc[OpDecorate].operands.push(OperandDecoration, "");
InstructionDesc[OpDecorate].operands.push(OperandVariableLiterals, "See <<Decoration,'Decoration'>>.");
- InstructionDesc[OpMemberDecorate].operands.push(OperandId, "'Structure type'");
+ InstructionDesc[OpMemberDecorate].operands.push(OperandId, "'Structure Type'");
InstructionDesc[OpMemberDecorate].operands.push(OperandLiteralNumber, "'Member'");
InstructionDesc[OpMemberDecorate].operands.push(OperandDecoration, "");
InstructionDesc[OpMemberDecorate].operands.push(OperandVariableLiterals, "See <<Decoration,'Decoration'>>.");
- InstructionDesc[OpGroupDecorate].operands.push(OperandId, "'Decoration group'");
- InstructionDesc[OpGroupDecorate].operands.push(OperandVariableIds, "'Target', 'Target', ...");
+ InstructionDesc[OpGroupDecorate].operands.push(OperandId, "'Decoration Group'");
+ InstructionDesc[OpGroupDecorate].operands.push(OperandVariableIds, "'Targets'");
- InstructionDesc[OpGroupMemberDecorate].operands.push(OperandId, "'Decoration group'");
- InstructionDesc[OpGroupMemberDecorate].operands.push(OperandVariableIds, "'Target', 'Target', ...");
+ InstructionDesc[OpGroupMemberDecorate].operands.push(OperandId, "'Decoration Group'");
+ InstructionDesc[OpGroupMemberDecorate].operands.push(OperandVariableIdLiteral, "'Targets'");
InstructionDesc[OpVectorExtractDynamic].operands.push(OperandId, "'Vector'");
InstructionDesc[OpVectorExtractDynamic].operands.push(OperandId, "'Index'");
@@ -1375,145 +1621,107 @@
InstructionDesc[OpCopyMemory].operands.push(OperandId, "'Target'");
InstructionDesc[OpCopyMemory].operands.push(OperandId, "'Source'");
- InstructionDesc[OpCopyMemory].operands.push(OperandVariableLiterals, "'Memory Access'");
+ InstructionDesc[OpCopyMemory].operands.push(OperandOptionalLiteral, "'Memory Access'");
InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Target'");
InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Source'");
InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Size'");
- InstructionDesc[OpCopyMemorySized].operands.push(OperandVariableLiterals, "'Memory Access'");
+ InstructionDesc[OpCopyMemorySized].operands.push(OperandOptionalLiteral, "'Memory Access'");
- InstructionDesc[OpCopyMemorySized].capabilities.push_back(CapAddr);
+ InstructionDesc[OpCopyMemorySized].capabilities.push_back(CapabilityAddresses);
- InstructionDesc[OpSampler].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpSampler].operands.push(OperandId, "'Filter'");
+ InstructionDesc[OpSampledImage].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpSampledImage].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureSample].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureSample].operands.push(OperandId, "'Coordinate'");
- InstructionDesc[OpTextureSample].operands.push(OperandOptionalId, "['Bias']");
- InstructionDesc[OpTextureSample].capabilities.push_back(CapShader);
+ InstructionDesc[OpImageRead].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpImageRead].operands.push(OperandId, "'Coordinate'");
- InstructionDesc[OpTextureSampleDref].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureSampleDref].operands.push(OperandId, "'Coordinate'");
- InstructionDesc[OpTextureSampleDref].operands.push(OperandId, "'D~ref~'");
- InstructionDesc[OpTextureSampleDref].capabilities.push_back(CapShader);
+ InstructionDesc[OpImageWrite].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpImageWrite].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageWrite].operands.push(OperandId, "'Texel'");
- InstructionDesc[OpTextureSampleLod].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureSampleLod].operands.push(OperandId, "'Coordinate'");
- InstructionDesc[OpTextureSampleLod].operands.push(OperandId, "'Level of Detail'");
- InstructionDesc[OpTextureSampleLod].capabilities.push_back(CapShader);
+ InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandOptionalImage, "");
+ InstructionDesc[OpImageSampleImplicitLod].capabilities.push_back(CapabilityShader);
- InstructionDesc[OpTextureSampleProj].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureSampleProj].operands.push(OperandId, "'Coordinate'");
- InstructionDesc[OpTextureSampleProj].operands.push(OperandOptionalId, "['Bias']");
- InstructionDesc[OpTextureSampleProj].capabilities.push_back(CapShader);
+ InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandOptionalImage, "");
- InstructionDesc[OpTextureSampleGrad].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureSampleGrad].operands.push(OperandId, "'Coordinate'");
- InstructionDesc[OpTextureSampleGrad].operands.push(OperandId, "'dx'");
- InstructionDesc[OpTextureSampleGrad].operands.push(OperandId, "'dy'");
- InstructionDesc[OpTextureSampleGrad].capabilities.push_back(CapShader);
+ InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'D~ref~'");
+ InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandOptionalImage, "");
+ InstructionDesc[OpImageSampleDrefImplicitLod].capabilities.push_back(CapabilityShader);
- InstructionDesc[OpTextureSampleOffset].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureSampleOffset].operands.push(OperandId, "'Coordinate'");
- InstructionDesc[OpTextureSampleOffset].operands.push(OperandId, "'Offset'");
- InstructionDesc[OpTextureSampleOffset].operands.push(OperandOptionalId, "['Bias']");
- InstructionDesc[OpTextureSampleOffset].capabilities.push_back(CapShader);
+ InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'D~ref~'");
+ InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandOptionalImage, "");
+ InstructionDesc[OpImageSampleDrefExplicitLod].capabilities.push_back(CapabilityShader);
- InstructionDesc[OpTextureSampleProjLod].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureSampleProjLod].operands.push(OperandId, "'Coordinate'");
- InstructionDesc[OpTextureSampleProjLod].operands.push(OperandId, "'Level of Detail'");
- InstructionDesc[OpTextureSampleProjLod].capabilities.push_back(CapShader);
+ InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandOptionalImage, "");
+ InstructionDesc[OpImageSampleProjImplicitLod].capabilities.push_back(CapabilityShader);
- InstructionDesc[OpTextureSampleProjGrad].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureSampleProjGrad].operands.push(OperandId, "'Coordinate'");
- InstructionDesc[OpTextureSampleProjGrad].operands.push(OperandId, "'dx'");
- InstructionDesc[OpTextureSampleProjGrad].operands.push(OperandId, "'dy'");
- InstructionDesc[OpTextureSampleProjGrad].capabilities.push_back(CapShader);
+ InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandOptionalImage, "");
+ InstructionDesc[OpImageSampleProjExplicitLod].capabilities.push_back(CapabilityShader);
- InstructionDesc[OpTextureSampleLodOffset].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureSampleLodOffset].operands.push(OperandId, "'Coordinate'");
- InstructionDesc[OpTextureSampleLodOffset].operands.push(OperandId, "'Level of Detail'");
- InstructionDesc[OpTextureSampleLodOffset].operands.push(OperandId, "'Offset'");
- InstructionDesc[OpTextureSampleLodOffset].capabilities.push_back(CapShader);
+ InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'D~ref~'");
+ InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandOptionalImage, "");
+ InstructionDesc[OpImageSampleProjDrefImplicitLod].capabilities.push_back(CapabilityShader);
- InstructionDesc[OpTextureSampleProjOffset].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureSampleProjOffset].operands.push(OperandId, "'Coordinate'");
- InstructionDesc[OpTextureSampleProjOffset].operands.push(OperandId, "'Offset'");
- InstructionDesc[OpTextureSampleProjOffset].operands.push(OperandOptionalId, "['Bias']");
- InstructionDesc[OpTextureSampleProjOffset].capabilities.push_back(CapShader);
+ InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'D~ref~'");
+ InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandOptionalImage, "");
+ InstructionDesc[OpImageSampleProjDrefExplicitLod].capabilities.push_back(CapabilityShader);
- InstructionDesc[OpTextureSampleGradOffset].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureSampleGradOffset].operands.push(OperandId, "'Coordinate'");
- InstructionDesc[OpTextureSampleGradOffset].operands.push(OperandId, "'dx'");
- InstructionDesc[OpTextureSampleGradOffset].operands.push(OperandId, "'dy'");
- InstructionDesc[OpTextureSampleGradOffset].operands.push(OperandId, "'Offset'");
- InstructionDesc[OpTextureSampleGradOffset].capabilities.push_back(CapShader);
+ InstructionDesc[OpImageFetch].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageFetch].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageFetch].operands.push(OperandOptionalImage, "");
- InstructionDesc[OpTextureSampleProjLodOffset].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureSampleProjLodOffset].operands.push(OperandId, "'Coordinate'");
- InstructionDesc[OpTextureSampleProjLodOffset].operands.push(OperandId, "'Level of Detail'");
- InstructionDesc[OpTextureSampleProjLodOffset].operands.push(OperandId, "'Offset'");
- InstructionDesc[OpTextureSampleProjLodOffset].capabilities.push_back(CapShader);
+ InstructionDesc[OpImageGather].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageGather].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageGather].operands.push(OperandId, "'Component'");
+ InstructionDesc[OpImageGather].operands.push(OperandOptionalImage, "");
+ InstructionDesc[OpImageGather].capabilities.push_back(CapabilityShader);
- InstructionDesc[OpTextureSampleProjGradOffset].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureSampleProjGradOffset].operands.push(OperandId, "'Coordinate'");
- InstructionDesc[OpTextureSampleProjGradOffset].operands.push(OperandId, "'dx'");
- InstructionDesc[OpTextureSampleProjGradOffset].operands.push(OperandId, "'dy'");
- InstructionDesc[OpTextureSampleProjGradOffset].operands.push(OperandId, "'Offset'");
- InstructionDesc[OpTextureSampleProjGradOffset].capabilities.push_back(CapShader);
+ InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'Sampled Image'");
+ InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'D~ref~'");
+ InstructionDesc[OpImageDrefGather].operands.push(OperandOptionalImage, "");
+ InstructionDesc[OpImageDrefGather].capabilities.push_back(CapabilityShader);
- InstructionDesc[OpTextureFetchTexelLod].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureFetchTexelLod].operands.push(OperandId, "'Coordinate'");
- InstructionDesc[OpTextureFetchTexelLod].operands.push(OperandId, "'Level of Detail'");
- InstructionDesc[OpTextureFetchTexelLod].capabilities.push_back(CapShader);
+ InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Level of Detail'");
- InstructionDesc[OpTextureFetchTexelOffset].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureFetchTexelOffset].operands.push(OperandId, "'Coordinate'");
- InstructionDesc[OpTextureFetchTexelOffset].operands.push(OperandId, "'Offset'");
- InstructionDesc[OpTextureFetchTexelOffset].capabilities.push_back(CapShader);
+ InstructionDesc[OpImageQuerySize].operands.push(OperandId, "'Image'");
- InstructionDesc[OpTextureFetchSample].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureFetchSample].operands.push(OperandId, "'Coordinate'");
- InstructionDesc[OpTextureFetchSample].operands.push(OperandId, "'Sample'");
- InstructionDesc[OpTextureFetchSample].capabilities.push_back(CapShader);
+ InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageQueryLod].capabilities.push_back(CapabilityShader);
- InstructionDesc[OpTextureFetchTexel].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureFetchTexel].operands.push(OperandId, "'Element'");
- InstructionDesc[OpTextureFetchTexel].capabilities.push_back(CapShader);
+ InstructionDesc[OpImageQueryLevels].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpImageQueryLevels].capabilities.push_back(CapabilityShader);
- InstructionDesc[OpTextureGather].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureGather].operands.push(OperandId, "'Coordinate'");
- InstructionDesc[OpTextureGather].operands.push(OperandId, "'Component'");
- InstructionDesc[OpTextureGather].capabilities.push_back(CapShader);
+ InstructionDesc[OpImageQuerySamples].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpImageQuerySamples].capabilities.push_back(CapabilityShader);
- InstructionDesc[OpTextureGatherOffset].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureGatherOffset].operands.push(OperandId, "'Coordinate'");
- InstructionDesc[OpTextureGatherOffset].operands.push(OperandId, "'Component'");
- InstructionDesc[OpTextureGatherOffset].operands.push(OperandId, "'Offset'");
- InstructionDesc[OpTextureGatherOffset].capabilities.push_back(CapShader);
+ InstructionDesc[OpImageQueryDim].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpImageQueryDim].capabilities.push_back(CapabilityKernel);
- InstructionDesc[OpTextureGatherOffsets].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureGatherOffsets].operands.push(OperandId, "'Coordinate'");
- InstructionDesc[OpTextureGatherOffsets].operands.push(OperandId, "'Component'");
- InstructionDesc[OpTextureGatherOffsets].operands.push(OperandId, "'Offsets'");
- InstructionDesc[OpTextureGatherOffsets].capabilities.push_back(CapShader);
+ InstructionDesc[OpImageQueryFormat].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpImageQueryFormat].capabilities.push_back(CapabilityKernel);
- InstructionDesc[OpTextureQuerySizeLod].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureQuerySizeLod].operands.push(OperandId, "'Level of Detail'");
- InstructionDesc[OpTextureQuerySizeLod].capabilities.push_back(CapShader);
-
- InstructionDesc[OpTextureQuerySize].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureQuerySize].capabilities.push_back(CapShader);
-
- InstructionDesc[OpTextureQueryLod].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureQueryLod].operands.push(OperandId, "'Coordinate'");
- InstructionDesc[OpTextureQueryLod].capabilities.push_back(CapShader);
-
- InstructionDesc[OpTextureQueryLevels].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureQueryLevels].capabilities.push_back(CapShader);
-
- InstructionDesc[OpTextureQuerySamples].operands.push(OperandId, "'Sampler'");
- InstructionDesc[OpTextureQuerySamples].capabilities.push_back(CapShader);
+ InstructionDesc[OpImageQueryOrder].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpImageQueryOrder].capabilities.push_back(CapabilityKernel);
InstructionDesc[OpAccessChain].operands.push(OperandId, "'Base'");
InstructionDesc[OpAccessChain].operands.push(OperandVariableIds, "'Indexes'");
@@ -1521,6 +1729,11 @@
InstructionDesc[OpInBoundsAccessChain].operands.push(OperandId, "'Base'");
InstructionDesc[OpInBoundsAccessChain].operands.push(OperandVariableIds, "'Indexes'");
+ InstructionDesc[OpPtrAccessChain].operands.push(OperandId, "'Base'");
+ InstructionDesc[OpPtrAccessChain].operands.push(OperandId, "'Element'");
+ InstructionDesc[OpPtrAccessChain].operands.push(OperandVariableIds, "'Indexes'");
+ InstructionDesc[OpPtrAccessChain].capabilities.push_back(CapabilityAddresses);
+
InstructionDesc[OpSNegate].operands.push(OperandId, "'Operand'");
InstructionDesc[OpFNegate].operands.push(OperandId, "'Operand'");
@@ -1537,73 +1750,74 @@
InstructionDesc[OpConvertSToF].operands.push(OperandId, "'Signed Value'");
- InstructionDesc[OpConvertUToF].operands.push(OperandId, "'Unsigned value'");
+ InstructionDesc[OpConvertUToF].operands.push(OperandId, "'Unsigned Value'");
- InstructionDesc[OpUConvert].operands.push(OperandId, "'Unsigned value'");
+ InstructionDesc[OpUConvert].operands.push(OperandId, "'Unsigned Value'");
InstructionDesc[OpSConvert].operands.push(OperandId, "'Signed Value'");
InstructionDesc[OpFConvert].operands.push(OperandId, "'Float Value'");
InstructionDesc[OpSatConvertSToU].operands.push(OperandId, "'Signed Value'");
- InstructionDesc[OpSatConvertSToU].capabilities.push_back(CapKernel);
+ InstructionDesc[OpSatConvertSToU].capabilities.push_back(CapabilityKernel);
InstructionDesc[OpSatConvertUToS].operands.push(OperandId, "'Unsigned Value'");
- InstructionDesc[OpSatConvertUToS].capabilities.push_back(CapKernel);
+ InstructionDesc[OpSatConvertUToS].capabilities.push_back(CapabilityKernel);
InstructionDesc[OpConvertPtrToU].operands.push(OperandId, "'Pointer'");
- InstructionDesc[OpConvertPtrToU].capabilities.push_back(CapAddr);
+ InstructionDesc[OpConvertPtrToU].capabilities.push_back(CapabilityAddresses);
- InstructionDesc[OpConvertUToPtr].operands.push(OperandId, "'Integer value'");
- InstructionDesc[OpConvertUToPtr].capabilities.push_back(CapAddr);
+ InstructionDesc[OpConvertUToPtr].operands.push(OperandId, "'Integer Value'");
+ InstructionDesc[OpConvertUToPtr].capabilities.push_back(CapabilityAddresses);
- InstructionDesc[OpPtrCastToGeneric].operands.push(OperandId, "'Source pointer'");
- InstructionDesc[OpPtrCastToGeneric].capabilities.push_back(CapKernel);
+ InstructionDesc[OpPtrCastToGeneric].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpPtrCastToGeneric].capabilities.push_back(CapabilityKernel);
+ InstructionDesc[OpGenericCastToPtr].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpGenericCastToPtr].capabilities.push_back(CapabilityKernel);
- InstructionDesc[OpGenericCastToPtr].operands.push(OperandId, "'Source pointer'");
- InstructionDesc[OpGenericCastToPtr].capabilities.push_back(CapKernel);
+ InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandStorage, "'Storage'");
+ InstructionDesc[OpGenericCastToPtrExplicit].capabilities.push_back(CapabilityKernel);
- InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandId, "'Source pointer'");
- InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandStorage, "'storage'");
- InstructionDesc[OpGenericCastToPtrExplicit].capabilities.push_back(CapKernel);
-
- InstructionDesc[OpGenericPtrMemSemantics].operands.push(OperandId, "'ptr'");
- InstructionDesc[OpGenericPtrMemSemantics].capabilities.push_back(CapKernel);
+ InstructionDesc[OpGenericPtrMemSemantics].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpGenericPtrMemSemantics].capabilities.push_back(CapabilityKernel);
InstructionDesc[OpBitcast].operands.push(OperandId, "'Operand'");
- InstructionDesc[OpTranspose].capabilities.push_back(CapMatrix);
+ InstructionDesc[OpQuantizeToF16].operands.push(OperandId, "'Value'");
+
+ InstructionDesc[OpTranspose].capabilities.push_back(CapabilityMatrix);
InstructionDesc[OpTranspose].operands.push(OperandId, "'Matrix'");
InstructionDesc[OpIsNan].operands.push(OperandId, "'x'");
InstructionDesc[OpIsInf].operands.push(OperandId, "'x'");
- InstructionDesc[OpIsFinite].capabilities.push_back(CapKernel);
+ InstructionDesc[OpIsFinite].capabilities.push_back(CapabilityKernel);
InstructionDesc[OpIsFinite].operands.push(OperandId, "'x'");
- InstructionDesc[OpIsNormal].capabilities.push_back(CapKernel);
+ InstructionDesc[OpIsNormal].capabilities.push_back(CapabilityKernel);
InstructionDesc[OpIsNormal].operands.push(OperandId, "'x'");
- InstructionDesc[OpSignBitSet].capabilities.push_back(CapKernel);
+ InstructionDesc[OpSignBitSet].capabilities.push_back(CapabilityKernel);
InstructionDesc[OpSignBitSet].operands.push(OperandId, "'x'");
- InstructionDesc[OpLessOrGreater].capabilities.push_back(CapKernel);
+ InstructionDesc[OpLessOrGreater].capabilities.push_back(CapabilityKernel);
InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'x'");
InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'y'");
- InstructionDesc[OpOrdered].capabilities.push_back(CapKernel);
+ InstructionDesc[OpOrdered].capabilities.push_back(CapabilityKernel);
InstructionDesc[OpOrdered].operands.push(OperandId, "'x'");
InstructionDesc[OpOrdered].operands.push(OperandId, "'y'");
- InstructionDesc[OpUnordered].capabilities.push_back(CapKernel);
+ InstructionDesc[OpUnordered].capabilities.push_back(CapabilityKernel);
InstructionDesc[OpUnordered].operands.push(OperandId, "'x'");
InstructionDesc[OpUnordered].operands.push(OperandId, "'y'");
InstructionDesc[OpArrayLength].operands.push(OperandId, "'Structure'");
InstructionDesc[OpArrayLength].operands.push(OperandLiteralNumber, "'Array member'");
- InstructionDesc[OpArrayLength].capabilities.push_back(CapShader);
+ InstructionDesc[OpArrayLength].capabilities.push_back(CapabilityShader);
InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 1'");
InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 2'");
@@ -1650,47 +1864,52 @@
InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Vector'");
InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Scalar'");
- InstructionDesc[OpMatrixTimesScalar].capabilities.push_back(CapMatrix);
+ InstructionDesc[OpMatrixTimesScalar].capabilities.push_back(CapabilityMatrix);
InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Matrix'");
InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Scalar'");
- InstructionDesc[OpVectorTimesMatrix].capabilities.push_back(CapMatrix);
+ InstructionDesc[OpVectorTimesMatrix].capabilities.push_back(CapabilityMatrix);
InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Vector'");
InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Matrix'");
- InstructionDesc[OpMatrixTimesVector].capabilities.push_back(CapMatrix);
+ InstructionDesc[OpMatrixTimesVector].capabilities.push_back(CapabilityMatrix);
InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Matrix'");
InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Vector'");
- InstructionDesc[OpMatrixTimesMatrix].capabilities.push_back(CapMatrix);
+ InstructionDesc[OpMatrixTimesMatrix].capabilities.push_back(CapabilityMatrix);
InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'LeftMatrix'");
InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'RightMatrix'");
- InstructionDesc[OpOuterProduct].capabilities.push_back(CapMatrix);
+ InstructionDesc[OpOuterProduct].capabilities.push_back(CapabilityMatrix);
InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 1'");
InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 2'");
InstructionDesc[OpDot].operands.push(OperandId, "'Vector 1'");
InstructionDesc[OpDot].operands.push(OperandId, "'Vector 2'");
- InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Operand 1'");
- InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Operand 2'");
+ InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Base'");
+ InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Shift'");
- InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Operand 1'");
- InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Operand 2'");
+ InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Base'");
+ InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Shift'");
- InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Operand 1'");
- InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Operand 2'");
+ InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Base'");
+ InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Shift'");
InstructionDesc[OpLogicalOr].operands.push(OperandId, "'Operand 1'");
InstructionDesc[OpLogicalOr].operands.push(OperandId, "'Operand 2'");
- InstructionDesc[OpLogicalXor].operands.push(OperandId, "'Operand 1'");
- InstructionDesc[OpLogicalXor].operands.push(OperandId, "'Operand 2'");
-
InstructionDesc[OpLogicalAnd].operands.push(OperandId, "'Operand 1'");
InstructionDesc[OpLogicalAnd].operands.push(OperandId, "'Operand 2'");
+ InstructionDesc[OpLogicalEqual].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpLogicalEqual].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpLogicalNotEqual].operands.push(OperandId, "'Operand 1'");
+ InstructionDesc[OpLogicalNotEqual].operands.push(OperandId, "'Operand 2'");
+
+ InstructionDesc[OpLogicalNot].operands.push(OperandId, "'Operand'");
+
InstructionDesc[OpBitwiseOr].operands.push(OperandId, "'Operand 1'");
InstructionDesc[OpBitwiseOr].operands.push(OperandId, "'Operand 2'");
@@ -1700,6 +1919,27 @@
InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 1'");
InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 2'");
+ InstructionDesc[OpBitFieldInsert].capabilities.push_back(CapabilityShader);
+ InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Base'");
+ InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Insert'");
+ InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Offset'");
+ InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Count'");
+
+ InstructionDesc[OpBitFieldSExtract].capabilities.push_back(CapabilityShader);
+ InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Base'");
+ InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Offset'");
+ InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Count'");
+
+ InstructionDesc[OpBitFieldUExtract].capabilities.push_back(CapabilityShader);
+ InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Base'");
+ InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Offset'");
+ InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Count'");
+
+ InstructionDesc[OpBitReverse].capabilities.push_back(CapabilityShader);
+ InstructionDesc[OpBitReverse].operands.push(OperandId, "'Base'");
+
+ InstructionDesc[OpBitCount].operands.push(OperandId, "'Base'");
+
InstructionDesc[OpSelect].operands.push(OperandId, "'Condition'");
InstructionDesc[OpSelect].operands.push(OperandId, "'Object 1'");
InstructionDesc[OpSelect].operands.push(OperandId, "'Object 2'");
@@ -1770,138 +2010,140 @@
InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 1'");
InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 2'");
- InstructionDesc[OpDPdx].capabilities.push_back(CapShader);
+ InstructionDesc[OpDPdx].capabilities.push_back(CapabilityShader);
InstructionDesc[OpDPdx].operands.push(OperandId, "'P'");
- InstructionDesc[OpDPdy].capabilities.push_back(CapShader);
+ InstructionDesc[OpDPdy].capabilities.push_back(CapabilityShader);
InstructionDesc[OpDPdy].operands.push(OperandId, "'P'");
- InstructionDesc[OpFwidth].capabilities.push_back(CapShader);
+ InstructionDesc[OpFwidth].capabilities.push_back(CapabilityShader);
InstructionDesc[OpFwidth].operands.push(OperandId, "'P'");
- InstructionDesc[OpDPdxFine].capabilities.push_back(CapShader);
+ InstructionDesc[OpDPdxFine].capabilities.push_back(CapabilityShader);
InstructionDesc[OpDPdxFine].operands.push(OperandId, "'P'");
- InstructionDesc[OpDPdyFine].capabilities.push_back(CapShader);
+ InstructionDesc[OpDPdyFine].capabilities.push_back(CapabilityShader);
InstructionDesc[OpDPdyFine].operands.push(OperandId, "'P'");
- InstructionDesc[OpFwidthFine].capabilities.push_back(CapShader);
+ InstructionDesc[OpFwidthFine].capabilities.push_back(CapabilityShader);
InstructionDesc[OpFwidthFine].operands.push(OperandId, "'P'");
- InstructionDesc[OpDPdxCoarse].capabilities.push_back(CapShader);
+ InstructionDesc[OpDPdxCoarse].capabilities.push_back(CapabilityShader);
InstructionDesc[OpDPdxCoarse].operands.push(OperandId, "'P'");
- InstructionDesc[OpDPdyCoarse].capabilities.push_back(CapShader);
+ InstructionDesc[OpDPdyCoarse].capabilities.push_back(CapabilityShader);
InstructionDesc[OpDPdyCoarse].operands.push(OperandId, "'P'");
- InstructionDesc[OpFwidthCoarse].capabilities.push_back(CapShader);
+ InstructionDesc[OpFwidthCoarse].capabilities.push_back(CapabilityShader);
InstructionDesc[OpFwidthCoarse].operands.push(OperandId, "'P'");
- InstructionDesc[OpEmitVertex].capabilities.push_back(CapGeom);
+ InstructionDesc[OpEmitVertex].capabilities.push_back(CapabilityGeometry);
- InstructionDesc[OpEndPrimitive].capabilities.push_back(CapGeom);
+ InstructionDesc[OpEndPrimitive].capabilities.push_back(CapabilityGeometry);
InstructionDesc[OpEmitStreamVertex].operands.push(OperandId, "'Stream'");
- InstructionDesc[OpEmitStreamVertex].capabilities.push_back(CapGeom);
+ InstructionDesc[OpEmitStreamVertex].capabilities.push_back(CapabilityGeometry);
InstructionDesc[OpEndStreamPrimitive].operands.push(OperandId, "'Stream'");
- InstructionDesc[OpEndStreamPrimitive].capabilities.push_back(CapGeom);
+ InstructionDesc[OpEndStreamPrimitive].capabilities.push_back(CapabilityGeometry);
- InstructionDesc[OpControlBarrier].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Execution'");
+ InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Memory'");
+ InstructionDesc[OpControlBarrier].operands.push(OperandMemorySemantics, "'Semantics'");
- InstructionDesc[OpMemoryBarrier].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpMemoryBarrier].operands.push(OperandScope, "'Memory'");
InstructionDesc[OpMemoryBarrier].operands.push(OperandMemorySemantics, "'Semantics'");
- InstructionDesc[OpImagePointer].operands.push(OperandId, "'Image'");
- InstructionDesc[OpImagePointer].operands.push(OperandId, "'Coordinate'");
- InstructionDesc[OpImagePointer].operands.push(OperandId, "'Sample'");
-
- InstructionDesc[OpAtomicInit].operands.push(OperandId, "'Pointer'");
- InstructionDesc[OpAtomicInit].operands.push(OperandId, "'Value'");
+ InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Image'");
+ InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Sample'");
InstructionDesc[OpAtomicLoad].operands.push(OperandId, "'Pointer'");
- InstructionDesc[OpAtomicLoad].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpAtomicLoad].operands.push(OperandScope, "'Scope'");
InstructionDesc[OpAtomicLoad].operands.push(OperandMemorySemantics, "'Semantics'");
InstructionDesc[OpAtomicStore].operands.push(OperandId, "'Pointer'");
- InstructionDesc[OpAtomicStore].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpAtomicStore].operands.push(OperandScope, "'Scope'");
InstructionDesc[OpAtomicStore].operands.push(OperandMemorySemantics, "'Semantics'");
InstructionDesc[OpAtomicStore].operands.push(OperandId, "'Value'");
InstructionDesc[OpAtomicExchange].operands.push(OperandId, "'Pointer'");
- InstructionDesc[OpAtomicExchange].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpAtomicExchange].operands.push(OperandScope, "'Scope'");
InstructionDesc[OpAtomicExchange].operands.push(OperandMemorySemantics, "'Semantics'");
InstructionDesc[OpAtomicExchange].operands.push(OperandId, "'Value'");
InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Pointer'");
- InstructionDesc[OpAtomicCompareExchange].operands.push(OperandExecutionScope, "'Scope'");
- InstructionDesc[OpAtomicCompareExchange].operands.push(OperandMemorySemantics, "'Semantics'");
+ InstructionDesc[OpAtomicCompareExchange].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicCompareExchange].operands.push(OperandMemorySemantics, "'Equal'");
+ InstructionDesc[OpAtomicCompareExchange].operands.push(OperandMemorySemantics, "'Unequal'");
InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Value'");
InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Comparator'");
InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Pointer'");
- InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandExecutionScope, "'Scope'");
- InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandMemorySemantics, "'Semantics'");
+ InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandMemorySemantics, "'Equal'");
+ InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandMemorySemantics, "'Unequal'");
InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Value'");
InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Comparator'");
+ InstructionDesc[OpAtomicCompareExchangeWeak].capabilities.push_back(CapabilityKernel);
InstructionDesc[OpAtomicIIncrement].operands.push(OperandId, "'Pointer'");
- InstructionDesc[OpAtomicIIncrement].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpAtomicIIncrement].operands.push(OperandScope, "'Scope'");
InstructionDesc[OpAtomicIIncrement].operands.push(OperandMemorySemantics, "'Semantics'");
InstructionDesc[OpAtomicIDecrement].operands.push(OperandId, "'Pointer'");
- InstructionDesc[OpAtomicIDecrement].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpAtomicIDecrement].operands.push(OperandScope, "'Scope'");
InstructionDesc[OpAtomicIDecrement].operands.push(OperandMemorySemantics, "'Semantics'");
InstructionDesc[OpAtomicIAdd].operands.push(OperandId, "'Pointer'");
- InstructionDesc[OpAtomicIAdd].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpAtomicIAdd].operands.push(OperandScope, "'Scope'");
InstructionDesc[OpAtomicIAdd].operands.push(OperandMemorySemantics, "'Semantics'");
InstructionDesc[OpAtomicIAdd].operands.push(OperandId, "'Value'");
InstructionDesc[OpAtomicISub].operands.push(OperandId, "'Pointer'");
- InstructionDesc[OpAtomicISub].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpAtomicISub].operands.push(OperandScope, "'Scope'");
InstructionDesc[OpAtomicISub].operands.push(OperandMemorySemantics, "'Semantics'");
InstructionDesc[OpAtomicISub].operands.push(OperandId, "'Value'");
InstructionDesc[OpAtomicUMin].operands.push(OperandId, "'Pointer'");
- InstructionDesc[OpAtomicUMin].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpAtomicUMin].operands.push(OperandScope, "'Scope'");
InstructionDesc[OpAtomicUMin].operands.push(OperandMemorySemantics, "'Semantics'");
InstructionDesc[OpAtomicUMin].operands.push(OperandId, "'Value'");
InstructionDesc[OpAtomicUMax].operands.push(OperandId, "'Pointer'");
- InstructionDesc[OpAtomicUMax].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpAtomicUMax].operands.push(OperandScope, "'Scope'");
InstructionDesc[OpAtomicUMax].operands.push(OperandMemorySemantics, "'Semantics'");
InstructionDesc[OpAtomicUMax].operands.push(OperandId, "'Value'");
- InstructionDesc[OpAtomicIMin].operands.push(OperandId, "'Pointer'");
- InstructionDesc[OpAtomicIMin].operands.push(OperandExecutionScope, "'Scope'");
- InstructionDesc[OpAtomicIMin].operands.push(OperandMemorySemantics, "'Semantics'");
- InstructionDesc[OpAtomicIMin].operands.push(OperandId, "'Value'");
+ InstructionDesc[OpAtomicSMin].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpAtomicSMin].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicSMin].operands.push(OperandMemorySemantics, "'Semantics'");
+ InstructionDesc[OpAtomicSMin].operands.push(OperandId, "'Value'");
- InstructionDesc[OpAtomicIMax].operands.push(OperandId, "'Pointer'");
- InstructionDesc[OpAtomicIMax].operands.push(OperandExecutionScope, "'Scope'");
- InstructionDesc[OpAtomicIMax].operands.push(OperandMemorySemantics, "'Semantics'");
- InstructionDesc[OpAtomicIMax].operands.push(OperandId, "'Value'");
+ InstructionDesc[OpAtomicSMax].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpAtomicSMax].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicSMax].operands.push(OperandMemorySemantics, "'Semantics'");
+ InstructionDesc[OpAtomicSMax].operands.push(OperandId, "'Value'");
InstructionDesc[OpAtomicAnd].operands.push(OperandId, "'Pointer'");
- InstructionDesc[OpAtomicAnd].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpAtomicAnd].operands.push(OperandScope, "'Scope'");
InstructionDesc[OpAtomicAnd].operands.push(OperandMemorySemantics, "'Semantics'");
InstructionDesc[OpAtomicAnd].operands.push(OperandId, "'Value'");
InstructionDesc[OpAtomicOr].operands.push(OperandId, "'Pointer'");
- InstructionDesc[OpAtomicOr].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpAtomicOr].operands.push(OperandScope, "'Scope'");
InstructionDesc[OpAtomicOr].operands.push(OperandMemorySemantics, "'Semantics'");
InstructionDesc[OpAtomicOr].operands.push(OperandId, "'Value'");
InstructionDesc[OpAtomicXor].operands.push(OperandId, "'Pointer'");
- InstructionDesc[OpAtomicXor].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpAtomicXor].operands.push(OperandScope, "'Scope'");
InstructionDesc[OpAtomicXor].operands.push(OperandMemorySemantics, "'Semantics'");
InstructionDesc[OpAtomicXor].operands.push(OperandId, "'Value'");
- InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Label'");
+ InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Merge Block'");
InstructionDesc[OpLoopMerge].operands.push(OperandLoop, "");
- InstructionDesc[OpSelectionMerge].operands.push(OperandId, "'Label'");
+ InstructionDesc[OpSelectionMerge].operands.push(OperandId, "'Merge Block'");
InstructionDesc[OpSelectionMerge].operands.push(OperandSelect, "");
InstructionDesc[OpBranch].operands.push(OperandId, "'Target Label'");
@@ -1915,198 +2157,205 @@
InstructionDesc[OpSwitch].operands.push(OperandId, "'Default'");
InstructionDesc[OpSwitch].operands.push(OperandVariableLiteralId, "'Target'");
- InstructionDesc[OpKill].capabilities.push_back(CapShader);
+ InstructionDesc[OpKill].capabilities.push_back(CapabilityShader);
InstructionDesc[OpReturnValue].operands.push(OperandId, "'Value'");
- InstructionDesc[OpUnreachable].capabilities.push_back(CapKernel);
+ InstructionDesc[OpLifetimeStart].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpLifetimeStart].operands.push(OperandLiteralNumber, "'Size'");
- InstructionDesc[OpLifetimeStart].operands.push(OperandId, "");
- InstructionDesc[OpLifetimeStart].operands.push(OperandLiteralNumber, "");
+ InstructionDesc[OpLifetimeStop].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpLifetimeStop].operands.push(OperandLiteralNumber, "'Size'");
- InstructionDesc[OpLifetimeStop].operands.push(OperandId, "");
- InstructionDesc[OpLifetimeStop].operands.push(OperandLiteralNumber, "");
-
- InstructionDesc[OpCompileFlag].capabilities.push_back(CapKernel);
- InstructionDesc[OpCompileFlag].operands.push(OperandLiteralString, "'Flag'");
-
- InstructionDesc[OpAsyncGroupCopy].capabilities.push_back(CapKernel);
- InstructionDesc[OpAsyncGroupCopy].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpAsyncGroupCopy].capabilities.push_back(CapabilityKernel);
+ InstructionDesc[OpAsyncGroupCopy].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpAsyncGroupCopy].operands.push(OperandId, "'Destination'");
InstructionDesc[OpAsyncGroupCopy].operands.push(OperandId, "'Source'");
InstructionDesc[OpAsyncGroupCopy].operands.push(OperandId, "'Num Elements'");
InstructionDesc[OpAsyncGroupCopy].operands.push(OperandId, "'Stride'");
InstructionDesc[OpAsyncGroupCopy].operands.push(OperandId, "'Event'");
- InstructionDesc[OpWaitGroupEvents].capabilities.push_back(CapKernel);
- InstructionDesc[OpWaitGroupEvents].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpWaitGroupEvents].capabilities.push_back(CapabilityKernel);
+ InstructionDesc[OpWaitGroupEvents].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpWaitGroupEvents].operands.push(OperandId, "'Num Events'");
InstructionDesc[OpWaitGroupEvents].operands.push(OperandId, "'Events List'");
- InstructionDesc[OpGroupAll].capabilities.push_back(CapKernel);
- InstructionDesc[OpGroupAll].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpGroupAll].capabilities.push_back(CapabilityGroups);
+ InstructionDesc[OpGroupAll].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupAll].operands.push(OperandId, "'Predicate'");
- InstructionDesc[OpGroupAny].capabilities.push_back(CapKernel);
- InstructionDesc[OpGroupAny].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpGroupAny].capabilities.push_back(CapabilityGroups);
+ InstructionDesc[OpGroupAny].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupAny].operands.push(OperandId, "'Predicate'");
- InstructionDesc[OpGroupBroadcast].capabilities.push_back(CapKernel);
- InstructionDesc[OpGroupBroadcast].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpGroupBroadcast].capabilities.push_back(CapabilityGroups);
+ InstructionDesc[OpGroupBroadcast].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'Value'");
InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'LocalId'");
- InstructionDesc[OpGroupIAdd].capabilities.push_back(CapKernel);
- InstructionDesc[OpGroupIAdd].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpGroupIAdd].capabilities.push_back(CapabilityGroups);
+ InstructionDesc[OpGroupIAdd].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupIAdd].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupIAdd].operands.push(OperandId, "'X'");
- InstructionDesc[OpGroupFAdd].capabilities.push_back(CapKernel);
- InstructionDesc[OpGroupFAdd].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpGroupFAdd].capabilities.push_back(CapabilityGroups);
+ InstructionDesc[OpGroupFAdd].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupFAdd].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupFAdd].operands.push(OperandId, "'X'");
- InstructionDesc[OpGroupUMin].capabilities.push_back(CapKernel);
- InstructionDesc[OpGroupUMin].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpGroupUMin].capabilities.push_back(CapabilityGroups);
+ InstructionDesc[OpGroupUMin].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupUMin].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupUMin].operands.push(OperandId, "'X'");
- InstructionDesc[OpGroupSMin].capabilities.push_back(CapKernel);
- InstructionDesc[OpGroupSMin].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpGroupSMin].capabilities.push_back(CapabilityGroups);
+ InstructionDesc[OpGroupSMin].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupSMin].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupSMin].operands.push(OperandId, "X");
- InstructionDesc[OpGroupFMin].capabilities.push_back(CapKernel);
- InstructionDesc[OpGroupFMin].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpGroupFMin].capabilities.push_back(CapabilityGroups);
+ InstructionDesc[OpGroupFMin].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupFMin].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupFMin].operands.push(OperandId, "X");
- InstructionDesc[OpGroupUMax].capabilities.push_back(CapKernel);
- InstructionDesc[OpGroupUMax].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpGroupUMax].capabilities.push_back(CapabilityGroups);
+ InstructionDesc[OpGroupUMax].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupUMax].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupUMax].operands.push(OperandId, "X");
- InstructionDesc[OpGroupSMax].capabilities.push_back(CapKernel);
- InstructionDesc[OpGroupSMax].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpGroupSMax].capabilities.push_back(CapabilityGroups);
+ InstructionDesc[OpGroupSMax].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupSMax].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupSMax].operands.push(OperandId, "X");
- InstructionDesc[OpGroupFMax].capabilities.push_back(CapKernel);
- InstructionDesc[OpGroupFMax].operands.push(OperandExecutionScope, "'Scope'");
+ InstructionDesc[OpGroupFMax].capabilities.push_back(CapabilityGroups);
+ InstructionDesc[OpGroupFMax].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupFMax].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupFMax].operands.push(OperandId, "X");
- InstructionDesc[OpReadPipe].capabilities.push_back(CapKernel);
- InstructionDesc[OpReadPipe].operands.push(OperandId, "'p'");
- InstructionDesc[OpReadPipe].operands.push(OperandId, "'ptr'");
+ InstructionDesc[OpReadPipe].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpReadPipe].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpReadPipe].operands.push(OperandId, "'Pointer'");
- InstructionDesc[OpWritePipe].capabilities.push_back(CapKernel);
- InstructionDesc[OpWritePipe].operands.push(OperandId, "'p'");
- InstructionDesc[OpWritePipe].operands.push(OperandId, "'ptr'");
+ InstructionDesc[OpWritePipe].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpWritePipe].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpWritePipe].operands.push(OperandId, "'Pointer'");
- InstructionDesc[OpReservedReadPipe].capabilities.push_back(CapKernel);
- InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'p'");
- InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'reserve_id'");
- InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'index'");
- InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'ptr'");
+ InstructionDesc[OpReservedReadPipe].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Reserve Id'");
+ InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Index'");
+ InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Pointer'");
- InstructionDesc[OpReservedWritePipe].capabilities.push_back(CapKernel);
- InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'p'");
- InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'reserve_id'");
- InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'index'");
- InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'ptr'");
+ InstructionDesc[OpReservedWritePipe].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Reserve Id'");
+ InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Index'");
+ InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Pointer'");
- InstructionDesc[OpReserveReadPipePackets].capabilities.push_back(CapKernel);
- InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'p'");
- InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'num_packets'");
+ InstructionDesc[OpReserveReadPipePackets].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Num Packets'");
- InstructionDesc[OpReserveWritePipePackets].capabilities.push_back(CapKernel);
- InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'p'");
- InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'num_packets'");
+ InstructionDesc[OpReserveWritePipePackets].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Num Packets'");
- InstructionDesc[OpCommitReadPipe].capabilities.push_back(CapKernel);
- InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'p'");
- InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'reserve_id'");
+ InstructionDesc[OpCommitReadPipe].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Reserve Id'");
- InstructionDesc[OpCommitWritePipe].capabilities.push_back(CapKernel);
- InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'p'");
- InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'reserve_id'");
+ InstructionDesc[OpCommitWritePipe].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Reserve Id'");
- InstructionDesc[OpIsValidReserveId].capabilities.push_back(CapKernel);
- InstructionDesc[OpIsValidReserveId].operands.push(OperandId, "'reserve_id'");
+ InstructionDesc[OpIsValidReserveId].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpIsValidReserveId].operands.push(OperandId, "'Reserve Id'");
- InstructionDesc[OpGetNumPipePackets].capabilities.push_back(CapKernel);
- InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'p'");
+ InstructionDesc[OpGetNumPipePackets].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Pipe'");
- InstructionDesc[OpGetMaxPipePackets].capabilities.push_back(CapKernel);
- InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'p'");
+ InstructionDesc[OpGetMaxPipePackets].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Pipe'");
- InstructionDesc[OpGroupReserveReadPipePackets].capabilities.push_back(CapKernel);
- InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandExecutionScope, "'Scope'");
- InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'p'");
- InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'num_packets'");
+ InstructionDesc[OpGroupReserveReadPipePackets].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandScope, "'Execution'");
+ InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Num Packets'");
- InstructionDesc[OpGroupReserveWritePipePackets].capabilities.push_back(CapKernel);
- InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandExecutionScope, "'Scope'");
- InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'p'");
- InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'num_packets'");
+ InstructionDesc[OpGroupReserveWritePipePackets].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandScope, "'Execution'");
+ InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Num Packets'");
- InstructionDesc[OpGroupCommitReadPipe].capabilities.push_back(CapKernel);
- InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandExecutionScope, "'Scope'");
- InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'p'");
- InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'reserve_id'");
+ InstructionDesc[OpGroupCommitReadPipe].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandScope, "'Execution'");
+ InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Reserve Id'");
- InstructionDesc[OpGroupCommitWritePipe].capabilities.push_back(CapKernel);
- InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandExecutionScope, "'Scope'");
- InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'p'");
- InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'reserve_id'");
+ InstructionDesc[OpGroupCommitWritePipe].capabilities.push_back(CapabilityPipes);
+ InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandScope, "'Execution'");
+ InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Pipe'");
+ InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Reserve Id'");
- InstructionDesc[OpBuildNDRange].capabilities.push_back(CapKernel);
+ InstructionDesc[OpBuildNDRange].capabilities.push_back(CapabilityDeviceEnqueue);
InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'GlobalWorkSize'");
InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'LocalWorkSize'");
InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'GlobalWorkOffset'");
- InstructionDesc[OpGetDefaultQueue].capabilities.push_back(CapKernel);
+ InstructionDesc[OpGetDefaultQueue].capabilities.push_back(CapabilityDeviceEnqueue);
- InstructionDesc[OpCaptureEventProfilingInfo].capabilities.push_back(CapKernel);
+ InstructionDesc[OpCaptureEventProfilingInfo].capabilities.push_back(CapabilityDeviceEnqueue);
- InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'event'");
- InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandKernelProfilingInfo, "'info'");
- InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'value'");
+ InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Event'");
+ InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Profiling Info'");
+ InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Value'");
- InstructionDesc[OpSetUserEventStatus].capabilities.push_back(CapKernel);
+ InstructionDesc[OpSetUserEventStatus].capabilities.push_back(CapabilityDeviceEnqueue);
- InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'event'");
- InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'status'");
+ InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Event'");
+ InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Status'");
- InstructionDesc[OpIsValidEvent].capabilities.push_back(CapKernel);
- InstructionDesc[OpIsValidEvent].operands.push(OperandId, "'event'");
+ InstructionDesc[OpIsValidEvent].capabilities.push_back(CapabilityDeviceEnqueue);
+ InstructionDesc[OpIsValidEvent].operands.push(OperandId, "'Event'");
- InstructionDesc[OpCreateUserEvent].capabilities.push_back(CapKernel);
+ InstructionDesc[OpCreateUserEvent].capabilities.push_back(CapabilityDeviceEnqueue);
- InstructionDesc[OpRetainEvent].capabilities.push_back(CapKernel);
- InstructionDesc[OpRetainEvent].operands.push(OperandId, "'event'");
+ InstructionDesc[OpRetainEvent].capabilities.push_back(CapabilityDeviceEnqueue);
+ InstructionDesc[OpRetainEvent].operands.push(OperandId, "'Event'");
- InstructionDesc[OpReleaseEvent].capabilities.push_back(CapKernel);
- InstructionDesc[OpReleaseEvent].operands.push(OperandId, "'event'");
+ InstructionDesc[OpReleaseEvent].capabilities.push_back(CapabilityDeviceEnqueue);
+ InstructionDesc[OpReleaseEvent].operands.push(OperandId, "'Event'");
- InstructionDesc[OpGetKernelWorkGroupSize].capabilities.push_back(CapKernel);
+ InstructionDesc[OpGetKernelWorkGroupSize].capabilities.push_back(CapabilityDeviceEnqueue);
InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Invoke'");
+ InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param'");
+ InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param Size'");
+ InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param Align'");
- InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].capabilities.push_back(CapKernel);
+ InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].capabilities.push_back(CapabilityDeviceEnqueue);
InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Invoke'");
+ InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param'");
+ InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param Size'");
+ InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param Align'");
- InstructionDesc[OpGetKernelNDrangeSubGroupCount].capabilities.push_back(CapKernel);
+ InstructionDesc[OpGetKernelNDrangeSubGroupCount].capabilities.push_back(CapabilityDeviceEnqueue);
InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'ND Range'");
InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Invoke'");
+ InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param'");
+ InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param Size'");
+ InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param Align'");
- InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].capabilities.push_back(CapKernel);
+ InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].capabilities.push_back(CapabilityDeviceEnqueue);
InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'ND Range'");
InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Invoke'");
+ InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param'");
+ InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param Size'");
+ InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param Align'");
- InstructionDesc[OpEnqueueKernel].capabilities.push_back(CapKernel);
- InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'q'");
- InstructionDesc[OpEnqueueKernel].operands.push(OperandKernelEnqueueFlags, "'flags'");
+ InstructionDesc[OpEnqueueKernel].capabilities.push_back(CapabilityDeviceEnqueue);
+ InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Queue'");
+ InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Flags'");
InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'ND Range'");
InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Num Events'");
InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Wait Events'");
@@ -2117,8 +2366,8 @@
InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param Align'");
InstructionDesc[OpEnqueueKernel].operands.push(OperandVariableIds, "'Local Size'");
- InstructionDesc[OpEnqueueMarker].capabilities.push_back(CapKernel);
- InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'q'");
+ InstructionDesc[OpEnqueueMarker].capabilities.push_back(CapabilityDeviceEnqueue);
+ InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Queue'");
InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Num Events'");
InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Wait Events'");
InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Ret Event'");
diff --git a/SPIRV/doc.h b/SPIRV/doc.h
old mode 100644
new mode 100755
index 9295af0..c97ca85
--- a/SPIRV/doc.h
+++ b/SPIRV/doc.h
@@ -1,5 +1,5 @@
//
-//Copyright (C) 2014 LunarG, Inc.
+//Copyright (C) 2014-2015 LunarG, Inc.
//
//All rights reserved.
//
@@ -40,7 +40,7 @@
// Parameterize the SPIR-V enumerants.
//
-#include "spirv.h"
+#include "spirv.hpp"
#include <vector>
@@ -64,6 +64,10 @@
const char* FunctionControlString(int);
const char* SamplerAddressingModeString(int);
const char* SamplerFilterModeString(int);
+const char* ImageFormatString(int);
+const char* ImageChannelOrderString(int);
+const char* ImageChannelTypeString(int);
+const char* ImageOperands(int);
const char* FPFastMathString(int);
const char* FPRoundingModeString(int);
const char* LinkageTypeString(int);
@@ -75,11 +79,12 @@
const char* GroupOperationString(int);
const char* KernelEnqueueFlagsString(int);
const char* KernelProfilingInfoString(int);
+const char* CapabilityString(int);
const char* OpcodeString(int);
// For grouping opcodes into subsections
enum OpcodeClass {
- OpClassMisc, // default, until opcode is classified
+ OpClassMisc,
OpClassDebug,
OpClassAnnotate,
OpClassExtension,
@@ -88,10 +93,11 @@
OpClassConstant,
OpClassMemory,
OpClassFunction,
- OpClassTexture,
+ OpClassImage,
OpClassConvert,
OpClassComposite,
OpClassArithmetic,
+ OpClassBit,
OpClassRelationalLogical,
OpClassDerivative,
OpClassFlowControl,
@@ -102,7 +108,8 @@
OpClassDeviceSideEnqueue,
OpClassPipe,
- OpClassCount
+ OpClassCount,
+ OpClassMissing // all instructions start out as missing
};
// For parameterizing operands.
@@ -110,8 +117,11 @@
OperandNone,
OperandId,
OperandOptionalId,
+ OperandOptionalImage,
OperandVariableIds,
+ OperandOptionalLiteral,
OperandVariableLiterals,
+ OperandVariableIdLiteral,
OperandVariableLiteralId,
OperandLiteralNumber,
OperandLiteralString,
@@ -124,6 +134,10 @@
OperandDimensionality,
OperandSamplerAddressingMode,
OperandSamplerFilterMode,
+ OperandSamplerImageFormat,
+ OperandImageChannelOrder,
+ OperandImageChannelDataType,
+ OperandImageOperands,
OperandFPFastMath,
OperandFPRoundingMode,
OperandLinkageType,
@@ -136,29 +150,17 @@
OperandFunction,
OperandMemorySemantics,
OperandMemoryAccess,
- OperandExecutionScope,
+ OperandScope,
OperandGroupOperation,
OperandKernelEnqueueFlags,
OperandKernelProfilingInfo,
+ OperandCapability,
OperandOpcode,
OperandCount
};
-// Set of capabilities. Generally, something is assumed to be in core,
-// if nothing else is said. So, these are used to identify when something
-// requires a specific capability to be declared.
-enum Capability {
- CapMatrix,
- CapShader,
- CapGeom,
- CapTess,
- CapAddr,
- CapLink,
- CapKernel
-};
-
// Any specific enum can have a set of capabilities that allow it:
typedef std::vector<Capability> EnumCaps;
@@ -213,8 +215,8 @@
class InstructionParameters {
public:
InstructionParameters() :
- opDesc(0),
- opClass(OpClassMisc),
+ opDesc("TBD"),
+ opClass(OpClassMissing),
typePresent(true), // most normal, only exceptions have to be spelled out
resultPresent(true) // most normal, only exceptions have to be spelled out
{ }
@@ -238,7 +240,7 @@
int resultPresent : 1;
};
-const int OpcodeCeiling = 267;
+const int OpcodeCeiling = 305;
// The set of objects that hold all the instruction/operand
// parameterization information.
diff --git a/SPIRV/spvIR.h b/SPIRV/spvIR.h
old mode 100644
new mode 100755
index 028671d..8bf369c
--- a/SPIRV/spvIR.h
+++ b/SPIRV/spvIR.h
@@ -50,7 +50,7 @@
#ifndef spvIR_H
#define spvIR_H
-#include "spirv.h"
+#include "spirv.hpp"
#include <vector>
#include <iostream>
diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp
old mode 100644
new mode 100755
index 8eb3ee3..f5646c0
--- a/StandAlone/StandAlone.cpp
+++ b/StandAlone/StandAlone.cpp
@@ -42,7 +42,7 @@
#include "./../glslang/Include/revision.h"
#include "./../glslang/Public/ShaderLang.h"
#include "../SPIRV/GlslangToSpv.h"
-#include "../SPIRV/GLSL450Lib.h"
+#include "../SPIRV/GLSL.std.450.h"
#include "../SPIRV/doc.h"
#include "../SPIRV/disassemble.h"
#include <string.h>
@@ -644,8 +644,6 @@
return 0;
}
-const char* GlslStd450DebugNames[GLSL_STD_450::Count];
-
// Outputs the given string, but only if it is non-null and non-empty.
// This prevents erroneous newlines from appearing.
void PutsIfNonEmpty(const char* str)
@@ -754,7 +752,6 @@
glslang::OutputSpv(spirv, GetBinaryName((EShLanguage)stage));
if (Options & EOptionHumanReadableSpv) {
spv::Parameterize();
- GLSL_STD_450::GetDebugNames(GlslStd450DebugNames);
spv::Disassemble(std::cout, spirv);
}
}
@@ -790,7 +787,7 @@
std::string spirvVersion;
glslang::GetSpirvVersion(spirvVersion);
printf("SPIR-V Version %s\n", spirvVersion.c_str());
- printf("GLSL.std.450 Version %d, Revision %d\n", GLSL_STD_450::Version, GLSL_STD_450::Revision);
+ printf("GLSL.std.450 Version %d, Revision %d\n", GLSLstd450Version, GLSLstd450Revision);
if (Worklist.empty())
return ESuccess;
}
diff --git a/Test/baseResults/spv.100ops.frag.out b/Test/baseResults/spv.100ops.frag.out
old mode 100644
new mode 100755
index 151535b..45e733c
--- a/Test/baseResults/spv.100ops.frag.out
+++ b/Test/baseResults/spv.100ops.frag.out
@@ -8,9 +8,11 @@
// Id's are bound by 48
Source ESSL 100
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 9 "foo("
Name 12 "face1"
@@ -19,68 +21,68 @@
Name 22 "low"
Name 27 "high"
Name 37 "gl_FragColor"
- Decorate 12(face1) PrecisionLow
- Decorate 14(face2) PrecisionLow
- Decorate 18(z) PrecisionMedium
- Decorate 22(low) PrecisionMedium
- Decorate 27(high) PrecisionMedium
- Decorate 37(gl_FragColor) PrecisionMedium
+ Decorate 12(face1) RelaxedPrecision
+ Decorate 14(face2) RelaxedPrecision
+ Decorate 18(z) RelaxedPrecision
+ Decorate 22(low) RelaxedPrecision
+ Decorate 27(high) RelaxedPrecision
+ Decorate 37(gl_FragColor) RelaxedPrecision
Decorate 37(gl_FragColor) BuiltIn FragColor
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
- 8: TypeFunction 7(float)
+ 8: TypeFunction 7(float)
11: TypePointer PrivateGlobal 7(float)
- 12(face1): 11(ptr) Variable PrivateGlobal
+ 12(face1): 11(ptr) Variable PrivateGlobal
13: 7(float) Constant 1093664768
- 14(face2): 11(ptr) Variable PrivateGlobal
+ 14(face2): 11(ptr) Variable PrivateGlobal
15: 7(float) Constant 3221225472
16: TypeInt 32 1
17: TypePointer Function 16(int)
19: 16(int) Constant 3
20: 16(int) Constant 2
21: TypePointer UniformConstant 16(int)
- 22(low): 21(ptr) Variable UniformConstant
+ 22(low): 21(ptr) Variable UniformConstant
25: 16(int) Constant 1
- 27(high): 21(ptr) Variable UniformConstant
+ 27(high): 21(ptr) Variable UniformConstant
29: TypeBool
35: TypeVector 7(float) 4
36: TypePointer Output 35(fvec4)
-37(gl_FragColor): 36(ptr) Variable Output
+37(gl_FragColor): 36(ptr) Variable Output
4(main): 2 Function None 3
5: Label
- 18(z): 17(ptr) Variable Function
- Store 12(face1) 13
- Store 14(face2) 15
- Store 18(z) 19
- 23: 16(int) Load 22(low)
+ 18(z): 17(ptr) Variable Function
+ Store 12(face1) 13
+ Store 14(face2) 15
+ Store 18(z) 19
+ 23: 16(int) Load 22(low)
24: 16(int) IMul 20 23
26: 16(int) IAdd 24 25
- 28: 16(int) Load 27(high)
+ 28: 16(int) Load 27(high)
30: 29(bool) SLessThan 26 28
SelectionMerge 32 None
- BranchConditional 30 31 32
+ BranchConditional 30 31 32
31: Label
- 33: 16(int) Load 18(z)
+ 33: 16(int) Load 18(z)
34: 16(int) IAdd 33 25
- Store 18(z) 34
+ Store 18(z) 34
Branch 32
32: Label
- 38: 7(float) Load 12(face1)
- 39: 16(int) Load 18(z)
+ 38: 7(float) Load 12(face1)
+ 39: 16(int) Load 18(z)
40: 7(float) ConvertSToF 39
41: 35(fvec4) CompositeConstruct 40 40 40 40
42: 35(fvec4) VectorTimesScalar 41 38
- 43: 7(float) FunctionCall 9(foo()
+ 43: 7(float) FunctionCall 9(foo()
44: 35(fvec4) CompositeConstruct 43 43 43 43
45: 35(fvec4) FAdd 42 44
- Store 37(gl_FragColor) 45
+ Store 37(gl_FragColor) 45
Branch 6
6: Label
Return
FunctionEnd
9(foo(): 7(float) Function None 8
10: Label
- 46: 7(float) Load 14(face2)
+ 46: 7(float) Load 14(face2)
ReturnValue 46
FunctionEnd
diff --git a/Test/baseResults/spv.140.frag.out b/Test/baseResults/spv.140.frag.out
old mode 100644
new mode 100755
index afcd6e0..e86e3f9
--- a/Test/baseResults/spv.140.frag.out
+++ b/Test/baseResults/spv.140.frag.out
@@ -5,12 +5,14 @@
// Module Version 99
// Generated by (magic number): 51a00bb
-// Id's are bound by 90
+// Id's are bound by 93
Source GLSL 140
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 9 "foo("
Name 12 "i1"
@@ -19,130 +21,137 @@
Name 29 "o"
Name 34 "gl_ClipDistance"
Name 43 "k"
- Name 54 "sampR"
- Name 60 "sampB"
- Name 83 "samp2Da"
- Name 87 "bn"
- MemberName 87(bn) 0 "matra"
- MemberName 87(bn) 1 "matca"
- MemberName 87(bn) 2 "matr"
- MemberName 87(bn) 3 "matc"
- MemberName 87(bn) 4 "matrdef"
- Name 89 ""
+ Name 55 "sampR"
+ Name 62 "sampB"
+ Name 86 "samp2Da"
+ Name 90 "bn"
+ MemberName 90(bn) 0 "matra"
+ MemberName 90(bn) 1 "matca"
+ MemberName 90(bn) 2 "matr"
+ MemberName 90(bn) 3 "matc"
+ MemberName 90(bn) 4 "matrdef"
+ Name 92 ""
Decorate 17(gl_FrontFacing) BuiltIn FrontFacing
- Decorate 34(gl_ClipDistance) Smooth
+ Decorate 34(gl_ClipDistance) Smooth
Decorate 34(gl_ClipDistance) BuiltIn ClipDistance
- Decorate 43(k) Smooth
- Decorate 83(samp2Da) NoStaticUse
- MemberDecorate 87(bn) 0 RowMajor
- MemberDecorate 87(bn) 1 ColMajor
- MemberDecorate 87(bn) 2 RowMajor
- MemberDecorate 87(bn) 3 ColMajor
- MemberDecorate 87(bn) 4 RowMajor
- Decorate 87(bn) GLSLStd140
- Decorate 87(bn) Block
- Decorate 89 NoStaticUse
+ Decorate 43(k) Smooth
+ Decorate 86(samp2Da) NoStaticUse
+ MemberDecorate 90(bn) 0 RowMajor
+ MemberDecorate 90(bn) 0 Offset 0
+ MemberDecorate 90(bn) 1 ColMajor
+ MemberDecorate 90(bn) 1 Offset 256
+ MemberDecorate 90(bn) 2 RowMajor
+ MemberDecorate 90(bn) 2 Offset 512
+ MemberDecorate 90(bn) 3 ColMajor
+ MemberDecorate 90(bn) 3 Offset 576
+ MemberDecorate 90(bn) 4 RowMajor
+ MemberDecorate 90(bn) 4 Offset 640
+ Decorate 90(bn) Block
+ Decorate 92 NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
- 8: TypeFunction 7(float)
+ 8: TypeFunction 7(float)
11: TypePointer PrivateGlobal 7(float)
- 12(i1): 11(ptr) Variable PrivateGlobal
+ 12(i1): 11(ptr) Variable PrivateGlobal
13: TypePointer Function 7(float)
15: TypeBool
16: TypePointer Input 15(bool)
-17(gl_FrontFacing): 16(ptr) Variable Input
+17(gl_FrontFacing): 16(ptr) Variable Input
21: 7(float) Constant 3221225472
23: 7(float) Constant 1073741824
- 25(i2): 11(ptr) Variable PrivateGlobal
+ 25(i2): 11(ptr) Variable PrivateGlobal
26: 7(float) Constant 1120665600
27: TypeVector 7(float) 4
28: TypePointer Output 27(fvec4)
- 29(o): 28(ptr) Variable Output
+ 29(o): 28(ptr) Variable Output
30: TypeInt 32 0
31: 30(int) Constant 5
32: TypeArray 7(float) 31
33: TypePointer Input 32
-34(gl_ClipDistance): 33(ptr) Variable Input
+34(gl_ClipDistance): 33(ptr) Variable Input
35: TypeInt 32 1
36: 35(int) Constant 2
37: TypePointer Input 7(float)
42: TypePointer Input 27(fvec4)
- 43(k): 42(ptr) Variable Input
+ 43(k): 42(ptr) Variable Input
45: TypeVector 35(int) 4
- 52: TypeSampler7(float) Rect filter+texture
- 53: TypePointer UniformConstant 52
- 54(sampR): 53(ptr) Variable UniformConstant
- 56: TypeVector 35(int) 2
- 58: TypeSampler35(int) Buffer filter+texture
- 59: TypePointer UniformConstant 58
- 60(sampB): 59(ptr) Variable UniformConstant
- 65: TypeVector 7(float) 2
- 68: 7(float) Constant 1120403456
- 79: TypeSampler7(float) 2D filter+texture
- 80: 30(int) Constant 3
- 81: TypeArray 79 80
- 82: TypePointer UniformConstant 81
- 83(samp2Da): 82(ptr) Variable UniformConstant
- 84: TypeMatrix 27(fvec4) 4
- 85: 30(int) Constant 4
- 86: TypeArray 84 85
- 87(bn): TypeStruct 86 86 84 84 84
- 88: TypePointer Uniform 87(bn)
- 89: 88(ptr) Variable Uniform
+ 52: TypeImage 7(float) Rect sampled format:Unknown
+ 53: TypeSampledImage 52
+ 54: TypePointer UniformConstant 53
+ 55(sampR): 54(ptr) Variable UniformConstant
+ 57: TypeVector 35(int) 2
+ 59: TypeImage 35(int) Buffer sampled format:Unknown
+ 60: TypeSampledImage 59
+ 61: TypePointer UniformConstant 60
+ 62(sampB): 61(ptr) Variable UniformConstant
+ 67: TypeVector 7(float) 2
+ 70: 7(float) Constant 1120403456
+ 81: TypeImage 7(float) 2D sampled format:Unknown
+ 82: TypeSampledImage 81
+ 83: 30(int) Constant 3
+ 84: TypeArray 82 83
+ 85: TypePointer UniformConstant 84
+ 86(samp2Da): 85(ptr) Variable UniformConstant
+ 87: TypeMatrix 27(fvec4) 4
+ 88: 30(int) Constant 4
+ 89: TypeArray 87 88
+ 90(bn): TypeStruct 89 89 87 87 87
+ 91: TypePointer Uniform 90(bn)
+ 92: 91(ptr) Variable Uniform
4(main): 2 Function None 3
5: Label
- 14: 13(ptr) Variable Function
- 18: 15(bool) Load 17(gl_FrontFacing)
+ 14: 13(ptr) Variable Function
+ 18: 15(bool) Load 17(gl_FrontFacing)
SelectionMerge 20 None
- BranchConditional 18 19 22
+ BranchConditional 18 19 22
19: Label
- Store 14 21
+ Store 14 21
Branch 20
22: Label
- Store 14 23
+ Store 14 23
Branch 20
20: Label
- 24: 7(float) Load 14
- Store 12(i1) 24
- Store 25(i2) 26
+ 24: 7(float) Load 14
+ Store 12(i1) 24
+ Store 25(i2) 26
38: 37(ptr) AccessChain 34(gl_ClipDistance) 36
- 39: 7(float) Load 38
- 40: 27(fvec4) Load 29(o)
+ 39: 7(float) Load 38
+ 40: 27(fvec4) Load 29(o)
41: 27(fvec4) CompositeInsert 39 40 1
- Store 29(o) 41
- 44: 27(fvec4) Load 43(k)
+ Store 29(o) 41
+ 44: 27(fvec4) Load 43(k)
46: 45(ivec4) ConvertFToS 44
47: 35(int) CompositeExtract 46 0
48: 37(ptr) AccessChain 34(gl_ClipDistance) 47
- 49: 7(float) Load 48
- 50: 27(fvec4) Load 29(o)
+ 49: 7(float) Load 48
+ 50: 27(fvec4) Load 29(o)
51: 27(fvec4) CompositeInsert 49 50 2
- Store 29(o) 51
- 55: 52 Load 54(sampR)
- 57: 56(ivec2) TextureQuerySize 55
- 61: 58 Load 60(sampB)
- 62: 35(int) TextureQuerySize 61
- 63: 56(ivec2) CompositeConstruct 62 62
- 64: 56(ivec2) IAdd 57 63
- 66: 65(fvec2) ConvertSToF 64
- 67: 7(float) CompositeExtract 66 0
- 69: 7(float) FDiv 67 68
- 70: 27(fvec4) Load 29(o)
- 71: 27(fvec4) CompositeInsert 69 70 3
- Store 29(o) 71
- 72: 7(float) FunctionCall 9(foo()
- 73: 27(fvec4) Load 29(o)
- 74: 27(fvec4) CompositeInsert 72 73 2
- Store 29(o) 74
+ Store 29(o) 51
+ 56: 53 Load 55(sampR)
+ 58: 57(ivec2) ImageQuerySize 56
+ 63: 60 Load 62(sampB)
+ 64: 35(int) ImageQuerySize 63
+ 65: 57(ivec2) CompositeConstruct 64 64
+ 66: 57(ivec2) IAdd 58 65
+ 68: 67(fvec2) ConvertSToF 66
+ 69: 7(float) CompositeExtract 68 0
+ 71: 7(float) FDiv 69 70
+ 72: 27(fvec4) Load 29(o)
+ 73: 27(fvec4) CompositeInsert 71 72 3
+ Store 29(o) 73
+ 74: 7(float) FunctionCall 9(foo()
+ 75: 27(fvec4) Load 29(o)
+ 76: 27(fvec4) CompositeInsert 74 75 2
+ Store 29(o) 76
Branch 6
6: Label
Return
FunctionEnd
9(foo(): 7(float) Function None 8
10: Label
- 75: 7(float) Load 12(i1)
- 76: 7(float) Load 25(i2)
- 77: 7(float) FAdd 75 76
- ReturnValue 77
+ 77: 7(float) Load 12(i1)
+ 78: 7(float) Load 25(i2)
+ 79: 7(float) FAdd 77 78
+ ReturnValue 79
FunctionEnd
diff --git a/Test/baseResults/spv.150.geom.out b/Test/baseResults/spv.150.geom.out
old mode 100644
new mode 100755
index c3a9fe6..dcd1feb
--- a/Test/baseResults/spv.150.geom.out
+++ b/Test/baseResults/spv.150.geom.out
@@ -8,12 +8,13 @@
// Id's are bound by 72
Source GLSL 150
+ Capability Geometry
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Geometry 4
- ExecutionMode 4 InputTrianglesAdjacency
+ EntryPoint Geometry 4 "main"
+ ExecutionMode 4 InputTrianglesAdjacency
ExecutionMode 4 Invocations 0
- ExecutionMode 4 OutputTriangleStrip
+ ExecutionMode 4 OutputTriangleStrip
ExecutionMode 4 OutputVertices 30
Name 4 "main"
Name 9 "fromVertex"
@@ -38,36 +39,36 @@
Name 69 "toFragment"
MemberName 69(toFragment) 0 "color"
Name 71 "toF"
- Decorate 9(fromVertex) Block
+ Decorate 9(fromVertex) Block
Decorate 9(fromVertex) Stream 3
Decorate 11 Stream 3
- Decorate 14(fromVertex) Block
+ Decorate 14(fromVertex) Block
MemberDecorate 28(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 28(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 28(gl_PerVertex) 2 BuiltIn ClipDistance
- Decorate 28(gl_PerVertex) Block
+ Decorate 28(gl_PerVertex) Block
Decorate 28(gl_PerVertex) Stream 0
Decorate 30 Stream 0
MemberDecorate 31(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 31(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 31(gl_PerVertex) 2 BuiltIn ClipDistance
- Decorate 31(gl_PerVertex) Block
+ Decorate 31(gl_PerVertex) Block
Decorate 48(gl_PrimitiveID) Stream 0
Decorate 48(gl_PrimitiveID) BuiltIn PrimitiveId
Decorate 50(gl_PrimitiveIDIn) BuiltIn PrimitiveId
Decorate 52(gl_Layer) Stream 0
Decorate 52(gl_Layer) BuiltIn Layer
- Decorate 69(toFragment) Block
+ Decorate 69(toFragment) Block
Decorate 69(toFragment) Stream 3
Decorate 71(toF) Stream 3
- Decorate 71(toF) NoStaticUse
+ Decorate 71(toF) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 3
9(fromVertex): TypeStruct 8(fvec3)
10: TypePointer Output 9(fromVertex)
- 11: 10(ptr) Variable Output
+ 11: 10(ptr) Variable Output
12: TypeInt 32 1
13: 12(int) Constant 0
14(fromVertex): TypeStruct 8(fvec3)
@@ -75,7 +76,7 @@
16: 15(int) Constant 6
17: TypeArray 14(fromVertex) 16
18: TypePointer Input 17
- 19(fromV): 18(ptr) Variable Input
+ 19(fromV): 18(ptr) Variable Input
20: TypePointer Input 8(fvec3)
23: TypePointer Output 8(fvec3)
25: TypeVector 7(float) 4
@@ -83,11 +84,11 @@
27: TypeArray 7(float) 26
28(gl_PerVertex): TypeStruct 25(fvec4) 7(float) 27
29: TypePointer Output 28(gl_PerVertex)
- 30: 29(ptr) Variable Output
+ 30: 29(ptr) Variable Output
31(gl_PerVertex): TypeStruct 25(fvec4) 7(float) 27
32: TypeArray 31(gl_PerVertex) 16
33: TypePointer Input 32
- 34(gl_in): 33(ptr) Variable Input
+ 34(gl_in): 33(ptr) Variable Input
35: TypePointer Input 25(fvec4)
38: TypePointer Output 25(fvec4)
40: 12(int) Constant 1
@@ -95,52 +96,52 @@
42: TypePointer Input 7(float)
45: TypePointer Output 7(float)
47: TypePointer Output 12(int)
-48(gl_PrimitiveID): 47(ptr) Variable Output
+48(gl_PrimitiveID): 47(ptr) Variable Output
49: TypePointer Input 12(int)
-50(gl_PrimitiveIDIn): 49(ptr) Variable Input
- 52(gl_Layer): 47(ptr) Variable Output
+50(gl_PrimitiveIDIn): 49(ptr) Variable Input
+ 52(gl_Layer): 47(ptr) Variable Output
53: 12(int) Constant 2
54: 7(float) Constant 1073741824
69(toFragment): TypeStruct 8(fvec3)
70: TypePointer Output 69(toFragment)
- 71(toF): 70(ptr) Variable Output
+ 71(toF): 70(ptr) Variable Output
4(main): 2 Function None 3
5: Label
21: 20(ptr) AccessChain 19(fromV) 13 13
- 22: 8(fvec3) Load 21
+ 22: 8(fvec3) Load 21
24: 23(ptr) AccessChain 11 13
- Store 24 22
+ Store 24 22
36: 35(ptr) AccessChain 34(gl_in) 13 13
- 37: 25(fvec4) Load 36
+ 37: 25(fvec4) Load 36
39: 38(ptr) AccessChain 30 13
- Store 39 37
+ Store 39 37
43: 42(ptr) AccessChain 34(gl_in) 41 40
- 44: 7(float) Load 43
+ 44: 7(float) Load 43
46: 45(ptr) AccessChain 30 40
- Store 46 44
- 51: 12(int) Load 50(gl_PrimitiveIDIn)
- Store 48(gl_PrimitiveID) 51
- Store 52(gl_Layer) 53
+ Store 46 44
+ 51: 12(int) Load 50(gl_PrimitiveIDIn)
+ Store 48(gl_PrimitiveID) 51
+ Store 52(gl_Layer) 53
EmitVertex
55: 20(ptr) AccessChain 19(fromV) 13 13
- 56: 8(fvec3) Load 55
+ 56: 8(fvec3) Load 55
57: 8(fvec3) VectorTimesScalar 56 54
58: 23(ptr) AccessChain 11 13
- Store 58 57
+ Store 58 57
59: 35(ptr) AccessChain 34(gl_in) 13 13
- 60: 25(fvec4) Load 59
+ 60: 25(fvec4) Load 59
61: 25(fvec4) VectorTimesScalar 60 54
62: 38(ptr) AccessChain 30 13
- Store 62 61
+ Store 62 61
63: 42(ptr) AccessChain 34(gl_in) 41 40
- 64: 7(float) Load 63
+ 64: 7(float) Load 63
65: 7(float) FMul 54 64
66: 45(ptr) AccessChain 30 40
- Store 66 65
- 67: 12(int) Load 50(gl_PrimitiveIDIn)
+ Store 66 65
+ 67: 12(int) Load 50(gl_PrimitiveIDIn)
68: 12(int) IAdd 67 40
- Store 48(gl_PrimitiveID) 68
- Store 52(gl_Layer) 41
+ Store 48(gl_PrimitiveID) 68
+ Store 52(gl_Layer) 41
EmitVertex
EndPrimitive
Branch 6
diff --git a/Test/baseResults/spv.150.vert.out b/Test/baseResults/spv.150.vert.out
old mode 100644
new mode 100755
index 424ecc8..f55399f
--- a/Test/baseResults/spv.150.vert.out
+++ b/Test/baseResults/spv.150.vert.out
@@ -8,9 +8,10 @@
// Id's are bound by 53
Source GLSL 150
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Vertex 4
+ EntryPoint Vertex 4 "main"
Name 4 "main"
Name 14 "gl_PerVertex"
MemberName 14(gl_PerVertex) 0 "gl_Position"
@@ -38,19 +39,18 @@
Name 49 "ui"
Name 51 "gl_VertexID"
Name 52 "gl_InstanceID"
- MemberDecorate 14(gl_PerVertex) 0 Invariant
+ MemberDecorate 14(gl_PerVertex) 0 Invariant
MemberDecorate 14(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 14(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 14(gl_PerVertex) 2 BuiltIn ClipDistance
- MemberDecorate 14(gl_PerVertex) 3 BuiltIn ClipVertex
- Decorate 14(gl_PerVertex) Block
- Decorate 49(ui) NoStaticUse
+ Decorate 14(gl_PerVertex) Block
+ Decorate 49(ui) NoStaticUse
Decorate 51(gl_VertexID) BuiltIn VertexId
- Decorate 51(gl_VertexID) NoStaticUse
+ Decorate 51(gl_VertexID) NoStaticUse
Decorate 52(gl_InstanceID) BuiltIn InstanceId
- Decorate 52(gl_InstanceID) NoStaticUse
+ Decorate 52(gl_InstanceID) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypeInt 32 0
@@ -60,15 +60,15 @@
13: TypeArray 8(fvec4) 12
14(gl_PerVertex): TypeStruct 8(fvec4) 7(float) 11 8(fvec4) 8(fvec4) 8(fvec4) 8(fvec4) 8(fvec4) 13 7(float)
15: TypePointer Output 14(gl_PerVertex)
- 16: 15(ptr) Variable Output
+ 16: 15(ptr) Variable Output
17: TypeInt 32 1
18: 17(int) Constant 0
19: TypePointer Input 8(fvec4)
- 20(iv4): 19(ptr) Variable Input
+ 20(iv4): 19(ptr) Variable Input
22: TypePointer Output 8(fvec4)
24: 17(int) Constant 1
25: TypePointer UniformConstant 7(float)
- 26(ps): 25(ptr) Variable UniformConstant
+ 26(ps): 25(ptr) Variable UniformConstant
28: TypePointer Output 7(float)
30: 17(int) Constant 2
34: 9(int) Constant 3
@@ -77,32 +77,32 @@
37: TypeArray 36(s1) 10
38(s2): TypeStruct 17(int) 37
39: TypePointer Output 38(s2)
- 40(s2out): 39(ptr) Variable Output
+ 40(s2out): 39(ptr) Variable Output
41: TypePointer Function 17(int)
48: TypePointer UniformConstant 17(int)
- 49(ui): 48(ptr) Variable UniformConstant
+ 49(ui): 48(ptr) Variable UniformConstant
50: TypePointer Input 17(int)
- 51(gl_VertexID): 50(ptr) Variable Input
-52(gl_InstanceID): 50(ptr) Variable Input
+ 51(gl_VertexID): 50(ptr) Variable Input
+52(gl_InstanceID): 50(ptr) Variable Input
4(main): 2 Function None 3
5: Label
- 42(i): 41(ptr) Variable Function
- 21: 8(fvec4) Load 20(iv4)
+ 42(i): 41(ptr) Variable Function
+ 21: 8(fvec4) Load 20(iv4)
23: 22(ptr) AccessChain 16 18
- Store 23 21
- 27: 7(float) Load 26(ps)
+ Store 23 21
+ 27: 7(float) Load 26(ps)
29: 28(ptr) AccessChain 16 24
- Store 29 27
- 31: 8(fvec4) Load 20(iv4)
+ Store 29 27
+ 31: 8(fvec4) Load 20(iv4)
32: 7(float) CompositeExtract 31 0
33: 28(ptr) AccessChain 16 30 30
- Store 33 32
- 43: 17(int) Load 42(i)
- 44: 7(float) Load 26(ps)
+ Store 33 32
+ 43: 17(int) Load 42(i)
+ 44: 7(float) Load 26(ps)
45: 22(ptr) AccessChain 40(s2out) 24 43 30 30
- 46: 8(fvec4) Load 45
+ 46: 8(fvec4) Load 45
47: 8(fvec4) CompositeInsert 44 46 3
- Store 45 47
+ Store 45 47
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.300BuiltIns.vert.out b/Test/baseResults/spv.300BuiltIns.vert.out
old mode 100644
new mode 100755
index 1e61e9a..916a5a9
--- a/Test/baseResults/spv.300BuiltIns.vert.out
+++ b/Test/baseResults/spv.300BuiltIns.vert.out
@@ -8,9 +8,10 @@
// Id's are bound by 41
Source ESSL 300
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Vertex 4
+ EntryPoint Vertex 4 "main"
Name 4 "main"
Name 9 "i"
Name 12 "gl_VertexID"
@@ -19,63 +20,59 @@
Name 26 "ps"
Name 34 "gl_PointSize"
Name 40 "gl_InstanceID"
- Decorate 9(i) PrecisionMedium
- Decorate 12(gl_VertexID) PrecisionHigh
+ Decorate 9(i) RelaxedPrecision
Decorate 12(gl_VertexID) BuiltIn VertexId
- Decorate 17(j) PrecisionMedium
- Decorate 24(gl_Position) PrecisionHigh
- Decorate 24(gl_Position) Invariant
+ Decorate 17(j) RelaxedPrecision
+ Decorate 24(gl_Position) Invariant
Decorate 24(gl_Position) BuiltIn Position
- Decorate 26(ps) PrecisionMedium
- Decorate 34(gl_PointSize) PrecisionHigh
+ Decorate 26(ps) RelaxedPrecision
Decorate 34(gl_PointSize) BuiltIn PointSize
- Decorate 40(gl_InstanceID) PrecisionHigh
Decorate 40(gl_InstanceID) BuiltIn InstanceId
- Decorate 40(gl_InstanceID) NoStaticUse
+ Decorate 40(gl_InstanceID) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeInt 32 1
8: TypePointer Function 7(int)
10: 7(int) Constant 4
11: TypePointer Input 7(int)
- 12(gl_VertexID): 11(ptr) Variable Input
+ 12(gl_VertexID): 11(ptr) Variable Input
15: 7(int) Constant 10
21: TypeFloat 32
22: TypeVector 21(float) 4
23: TypePointer Output 22(fvec4)
- 24(gl_Position): 23(ptr) Variable Output
+ 24(gl_Position): 23(ptr) Variable Output
25: TypePointer Input 21(float)
- 26(ps): 25(ptr) Variable Input
+ 26(ps): 25(ptr) Variable Input
33: TypePointer Output 21(float)
-34(gl_PointSize): 33(ptr) Variable Output
-40(gl_InstanceID): 11(ptr) Variable Input
+34(gl_PointSize): 33(ptr) Variable Output
+40(gl_InstanceID): 11(ptr) Variable Input
4(main): 2 Function None 3
5: Label
- 9(i): 8(ptr) Variable Function
- 17(j): 8(ptr) Variable Function
- 13: 7(int) Load 12(gl_VertexID)
+ 9(i): 8(ptr) Variable Function
+ 17(j): 8(ptr) Variable Function
+ 13: 7(int) Load 12(gl_VertexID)
14: 7(int) IMul 10 13
16: 7(int) ISub 14 15
- Store 9(i) 16
- 18: 7(int) Load 12(gl_VertexID)
+ Store 9(i) 16
+ 18: 7(int) Load 12(gl_VertexID)
19: 7(int) IMul 10 18
20: 7(int) ISub 19 15
- Store 17(j) 20
- 27: 21(float) Load 26(ps)
+ Store 17(j) 20
+ 27: 21(float) Load 26(ps)
28: 22(fvec4) CompositeConstruct 27 27 27 27
- Store 24(gl_Position) 28
- 29: 7(int) Load 9(i)
+ Store 24(gl_Position) 28
+ 29: 7(int) Load 9(i)
30: 21(float) ConvertSToF 29
- 31: 22(fvec4) Load 24(gl_Position)
+ 31: 22(fvec4) Load 24(gl_Position)
32: 22(fvec4) VectorTimesScalar 31 30
- Store 24(gl_Position) 32
- 35: 21(float) Load 26(ps)
- Store 34(gl_PointSize) 35
- 36: 7(int) Load 17(j)
+ Store 24(gl_Position) 32
+ 35: 21(float) Load 26(ps)
+ Store 34(gl_PointSize) 35
+ 36: 7(int) Load 17(j)
37: 21(float) ConvertSToF 36
- 38: 21(float) Load 34(gl_PointSize)
+ 38: 21(float) Load 34(gl_PointSize)
39: 21(float) FMul 38 37
- Store 34(gl_PointSize) 39
+ Store 34(gl_PointSize) 39
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.300layout.frag.out b/Test/baseResults/spv.300layout.frag.out
old mode 100644
new mode 100755
index 678ceec..9845acf
--- a/Test/baseResults/spv.300layout.frag.out
+++ b/Test/baseResults/spv.300layout.frag.out
@@ -8,9 +8,11 @@
// Id's are bound by 38
Source ESSL 300
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 10 "c"
Name 12 "color"
@@ -20,27 +22,27 @@
Name 16 "s"
Name 27 "p"
Name 30 "pos"
- Decorate 10(c) PrecisionMedium
+ Decorate 10(c) RelaxedPrecision
Decorate 10(c) Location 7
- Decorate 12(color) PrecisionMedium
- Decorate 12(color) Smooth
- MemberDecorate 14(S) 0 PrecisionMedium
- MemberDecorate 14(S) 1 PrecisionMedium
- Decorate 27(p) PrecisionMedium
+ Decorate 12(color) RelaxedPrecision
+ Decorate 12(color) Smooth
+ MemberDecorate 14(S) 0 RelaxedPrecision
+ MemberDecorate 14(S) 1 RelaxedPrecision
+ Decorate 27(p) RelaxedPrecision
Decorate 27(p) Location 3
- Decorate 30(pos) PrecisionMedium
- Decorate 30(pos) Smooth
+ Decorate 30(pos) RelaxedPrecision
+ Decorate 30(pos) Smooth
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 3
9: TypePointer Output 8(fvec3)
- 10(c): 9(ptr) Variable Output
+ 10(c): 9(ptr) Variable Output
11: TypePointer Input 8(fvec3)
- 12(color): 11(ptr) Variable Input
+ 12(color): 11(ptr) Variable Input
14(S): TypeStruct 8(fvec3) 7(float)
15: TypePointer Input 14(S)
- 16(s): 15(ptr) Variable Input
+ 16(s): 15(ptr) Variable Input
17: TypeInt 32 1
18: 17(int) Constant 0
22: TypeVector 7(float) 4
@@ -48,25 +50,25 @@
24: 23(int) Constant 2
25: TypeArray 22(fvec4) 24
26: TypePointer Output 25
- 27(p): 26(ptr) Variable Output
+ 27(p): 26(ptr) Variable Output
28: 17(int) Constant 1
29: TypePointer Input 22(fvec4)
- 30(pos): 29(ptr) Variable Input
+ 30(pos): 29(ptr) Variable Input
32: TypePointer Input 7(float)
36: TypePointer Output 22(fvec4)
4(main): 2 Function None 3
5: Label
- 13: 8(fvec3) Load 12(color)
+ 13: 8(fvec3) Load 12(color)
19: 11(ptr) AccessChain 16(s) 18
- 20: 8(fvec3) Load 19
+ 20: 8(fvec3) Load 19
21: 8(fvec3) FAdd 13 20
- Store 10(c) 21
- 31: 22(fvec4) Load 30(pos)
+ Store 10(c) 21
+ 31: 22(fvec4) Load 30(pos)
33: 32(ptr) AccessChain 16(s) 28
- 34: 7(float) Load 33
+ 34: 7(float) Load 33
35: 22(fvec4) VectorTimesScalar 31 34
37: 36(ptr) AccessChain 27(p) 28
- Store 37 35
+ Store 37 35
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.300layoutp.vert.out b/Test/baseResults/spv.300layoutp.vert.out
old mode 100644
new mode 100755
index 5a813b8..1c78f6f
--- a/Test/baseResults/spv.300layoutp.vert.out
+++ b/Test/baseResults/spv.300layoutp.vert.out
@@ -8,9 +8,10 @@
// Id's are bound by 112
Source ESSL 300
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Vertex 4
+ EntryPoint Vertex 4 "main"
Name 4 "main"
Name 10 "pos"
Name 12 "p"
@@ -41,64 +42,47 @@
Name 80 "s"
Name 110 "gl_VertexID"
Name 111 "gl_InstanceID"
- Decorate 10(pos) PrecisionHigh
- Decorate 10(pos) Smooth
- Decorate 12(p) PrecisionHigh
+ Decorate 10(pos) Smooth
Decorate 12(p) Location 3
- MemberDecorate 18(Transform) 0 RowMajor
- MemberDecorate 18(Transform) 0 PrecisionHigh
- MemberDecorate 18(Transform) 1 ColMajor
- MemberDecorate 18(Transform) 1 PrecisionHigh
- MemberDecorate 18(Transform) 2 RowMajor
- MemberDecorate 18(Transform) 2 PrecisionHigh
- MemberDecorate 18(Transform) 3 PrecisionHigh
- Decorate 18(Transform) GLSLStd140
- Decorate 18(Transform) Block
- MemberDecorate 34(T3) 0 ColMajor
- MemberDecorate 34(T3) 0 PrecisionHigh
- MemberDecorate 34(T3) 1 RowMajor
- MemberDecorate 34(T3) 1 PrecisionHigh
- MemberDecorate 34(T3) 2 ColMajor
- MemberDecorate 34(T3) 2 PrecisionHigh
- MemberDecorate 34(T3) 3 PrecisionHigh
- Decorate 34(T3) GLSLShared
- Decorate 34(T3) Block
- MemberDecorate 44(T2) 1 RowMajor
- MemberDecorate 44(T2) 1 PrecisionHigh
- Decorate 44(T2) GLSLShared
- Decorate 44(T2) Block
- Decorate 52(color) PrecisionHigh
- Decorate 52(color) Smooth
- Decorate 54(c) PrecisionHigh
+ MemberDecorate 18(Transform) 0 RowMajor
+ MemberDecorate 18(Transform) 0 Offset 0
+ MemberDecorate 18(Transform) 1 ColMajor
+ MemberDecorate 18(Transform) 1 Offset 64
+ MemberDecorate 18(Transform) 2 RowMajor
+ MemberDecorate 18(Transform) 2 Offset 128
+ MemberDecorate 18(Transform) 3 Offset 176
+ Decorate 18(Transform) Block
+ MemberDecorate 34(T3) 0 ColMajor
+ MemberDecorate 34(T3) 1 RowMajor
+ MemberDecorate 34(T3) 2 ColMajor
+ Decorate 34(T3) GLSLShared
+ Decorate 34(T3) Block
+ MemberDecorate 44(T2) 1 RowMajor
+ Decorate 44(T2) GLSLShared
+ Decorate 44(T2) Block
+ Decorate 52(color) Smooth
Decorate 54(c) Location 7
- Decorate 62(iout) PrecisionHigh
- Decorate 62(iout) Flat
- Decorate 68(uiuin) PrecisionHigh
- Decorate 74(aiv2) PrecisionHigh
+ Decorate 62(iout) Flat
Decorate 74(aiv2) Location 9
- MemberDecorate 78(S) 0 PrecisionHigh
- MemberDecorate 78(S) 1 PrecisionHigh
- Decorate 110(gl_VertexID) PrecisionHigh
Decorate 110(gl_VertexID) BuiltIn VertexId
- Decorate 110(gl_VertexID) NoStaticUse
- Decorate 111(gl_InstanceID) PrecisionHigh
+ Decorate 110(gl_VertexID) NoStaticUse
Decorate 111(gl_InstanceID) BuiltIn InstanceId
- Decorate 111(gl_InstanceID) NoStaticUse
+ Decorate 111(gl_InstanceID) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypePointer Output 8(fvec4)
- 10(pos): 9(ptr) Variable Output
+ 10(pos): 9(ptr) Variable Output
11: TypePointer Input 8(fvec4)
- 12(p): 11(ptr) Variable Input
+ 12(p): 11(ptr) Variable Input
14: TypeMatrix 8(fvec4) 4
15: TypeVector 7(float) 3
16: TypeMatrix 15(fvec3) 3
17: TypeInt 32 1
18(Transform): TypeStruct 14 14 16 17(int)
19: TypePointer Uniform 18(Transform)
- 20(tblock): 19(ptr) Variable Uniform
+ 20(tblock): 19(ptr) Variable Uniform
21: 17(int) Constant 0
22: TypePointer Uniform 14
25: 17(int) Constant 1
@@ -109,29 +93,29 @@
33: TypeArray 31(ivec3) 32
34(T3): TypeStruct 14 14 29 33
35: TypePointer Uniform 34(T3)
- 36: 35(ptr) Variable Uniform
+ 36: 35(ptr) Variable Uniform
43: TypeBool
44(T2): TypeStruct 43(bool) 14
45: TypePointer Uniform 44(T2)
- 46: 45(ptr) Variable Uniform
+ 46: 45(ptr) Variable Uniform
51: TypePointer Output 15(fvec3)
- 52(color): 51(ptr) Variable Output
+ 52(color): 51(ptr) Variable Output
53: TypePointer Input 15(fvec3)
- 54(c): 53(ptr) Variable Input
+ 54(c): 53(ptr) Variable Input
56: 17(int) Constant 2
57: TypePointer Uniform 16
61: TypePointer Output 17(int)
- 62(iout): 61(ptr) Variable Output
+ 62(iout): 61(ptr) Variable Output
63: 17(int) Constant 3
64: TypePointer Uniform 17(int)
67: TypePointer UniformConstant 30(int)
- 68(uiuin): 67(ptr) Variable UniformConstant
+ 68(uiuin): 67(ptr) Variable UniformConstant
72: TypeVector 17(int) 2
73: TypePointer Input 72(ivec2)
- 74(aiv2): 73(ptr) Variable Input
+ 74(aiv2): 73(ptr) Variable Input
78(S): TypeStruct 15(fvec3) 7(float)
79: TypePointer Output 78(S)
- 80(s): 79(ptr) Variable Output
+ 80(s): 79(ptr) Variable Output
85: TypePointer Output 7(float)
87: TypePointer Uniform 15(fvec3)
90: 7(float) Constant 1065353216
@@ -141,65 +125,65 @@
98: 30(int) Constant 5
99: 31(ivec3) ConstantComposite 98 98 98
109: TypePointer Input 17(int)
-110(gl_VertexID): 109(ptr) Variable Input
-111(gl_InstanceID): 109(ptr) Variable Input
+110(gl_VertexID): 109(ptr) Variable Input
+111(gl_InstanceID): 109(ptr) Variable Input
4(main): 2 Function None 3
5: Label
- 13: 8(fvec4) Load 12(p)
+ 13: 8(fvec4) Load 12(p)
23: 22(ptr) AccessChain 20(tblock) 21
- 24: 14 Load 23
+ 24: 14 Load 23
26: 22(ptr) AccessChain 20(tblock) 25
- 27: 14 Load 26
+ 27: 14 Load 26
28: 14 MatrixTimesMatrix 24 27
37: 22(ptr) AccessChain 36 25
- 38: 14 Load 37
+ 38: 14 Load 37
39: 14 MatrixTimesMatrix 28 38
40: 22(ptr) AccessChain 36 21
- 41: 14 Load 40
+ 41: 14 Load 40
42: 14 MatrixTimesMatrix 39 41
47: 22(ptr) AccessChain 46 25
- 48: 14 Load 47
+ 48: 14 Load 47
49: 14 MatrixTimesMatrix 42 48
50: 8(fvec4) VectorTimesMatrix 13 49
- Store 10(pos) 50
- 55: 15(fvec3) Load 54(c)
+ Store 10(pos) 50
+ 55: 15(fvec3) Load 54(c)
58: 57(ptr) AccessChain 20(tblock) 56
- 59: 16 Load 58
+ 59: 16 Load 58
60: 15(fvec3) VectorTimesMatrix 55 59
- Store 52(color) 60
+ Store 52(color) 60
65: 64(ptr) AccessChain 20(tblock) 63
- 66: 17(int) Load 65
- 69: 30(int) Load 68(uiuin)
+ 66: 17(int) Load 65
+ 69: 30(int) Load 68(uiuin)
70: 17(int) Bitcast 69
71: 17(int) IAdd 66 70
- 75: 72(ivec2) Load 74(aiv2)
+ 75: 72(ivec2) Load 74(aiv2)
76: 17(int) CompositeExtract 75 1
77: 17(int) IAdd 71 76
- Store 62(iout) 77
- 81: 15(fvec3) Load 54(c)
+ Store 62(iout) 77
+ 81: 15(fvec3) Load 54(c)
82: 51(ptr) AccessChain 80(s) 21
- Store 82 81
- 83: 8(fvec4) Load 12(p)
+ Store 82 81
+ 83: 8(fvec4) Load 12(p)
84: 7(float) CompositeExtract 83 0
86: 85(ptr) AccessChain 80(s) 25
- Store 86 84
+ Store 86 84
88: 87(ptr) AccessChain 36 56 25
- 89: 15(fvec3) Load 88
+ 89: 15(fvec3) Load 88
93: 92(bvec3) FOrdNotEqual 89 91
94: 43(bool) Any 93
96: 95(ptr) AccessChain 36 63 56
- 97: 31(ivec3) Load 96
+ 97: 31(ivec3) Load 96
100: 92(bvec3) INotEqual 97 99
101: 43(bool) Any 100
102: 43(bool) LogicalOr 94 101
SelectionMerge 104 None
- BranchConditional 102 103 104
+ BranchConditional 102 103 104
103: Label
105: 51(ptr) AccessChain 80(s) 21
- 106: 15(fvec3) Load 105
+ 106: 15(fvec3) Load 105
107: 15(fvec3) CompositeConstruct 90 90 90
108: 15(fvec3) FAdd 106 107
- Store 105 108
+ Store 105 108
Branch 104
104: Label
Branch 6
diff --git a/Test/baseResults/spv.330.geom.out b/Test/baseResults/spv.330.geom.out
old mode 100644
new mode 100755
index 24c938e..7ce0eb4
--- a/Test/baseResults/spv.330.geom.out
+++ b/Test/baseResults/spv.330.geom.out
@@ -9,12 +9,13 @@
Source GLSL 330
SourceExtension "GL_ARB_separate_shader_objects"
+ Capability Geometry
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Geometry 4
- ExecutionMode 4 InputTriangles
+ EntryPoint Geometry 4 "main"
+ ExecutionMode 4 InputTriangles
ExecutionMode 4 Invocations 0
- ExecutionMode 4 OutputTriangleStrip
+ ExecutionMode 4 OutputTriangleStrip
ExecutionMode 4 OutputVertices 3
Name 4 "main"
Name 12 "gl_PerVertex"
@@ -27,14 +28,14 @@
Name 21 "gl_in"
MemberDecorate 12(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 12(gl_PerVertex) 1 BuiltIn ClipDistance
- Decorate 12(gl_PerVertex) Block
+ Decorate 12(gl_PerVertex) Block
Decorate 12(gl_PerVertex) Stream 0
Decorate 14 Stream 0
MemberDecorate 17(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 17(gl_PerVertex) 1 BuiltIn ClipDistance
- Decorate 17(gl_PerVertex) Block
+ Decorate 17(gl_PerVertex) Block
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypeInt 32 0
@@ -42,14 +43,14 @@
11: TypeArray 7(float) 10
12(gl_PerVertex): TypeStruct 8(fvec4) 11
13: TypePointer Output 12(gl_PerVertex)
- 14: 13(ptr) Variable Output
+ 14: 13(ptr) Variable Output
15: TypeInt 32 1
16: 15(int) Constant 0
17(gl_PerVertex): TypeStruct 8(fvec4) 11
18: 9(int) Constant 3
19: TypeArray 17(gl_PerVertex) 18
20: TypePointer Input 19
- 21(gl_in): 20(ptr) Variable Input
+ 21(gl_in): 20(ptr) Variable Input
22: 15(int) Constant 1
23: TypePointer Input 8(fvec4)
26: TypePointer Output 8(fvec4)
@@ -58,13 +59,13 @@
4(main): 2 Function None 3
5: Label
24: 23(ptr) AccessChain 21(gl_in) 22 16
- 25: 8(fvec4) Load 24
+ 25: 8(fvec4) Load 24
27: 26(ptr) AccessChain 14 16
- Store 27 25
+ Store 27 25
29: 28(ptr) AccessChain 21(gl_in) 22 22 16
- 30: 7(float) Load 29
+ 30: 7(float) Load 29
32: 31(ptr) AccessChain 14 22 16
- Store 32 30
+ Store 32 30
EmitVertex
EndPrimitive
Branch 6
diff --git a/Test/baseResults/spv.400.tesc.out b/Test/baseResults/spv.400.tesc.out
old mode 100644
new mode 100755
index 56ece6d..49ff1b8
--- a/Test/baseResults/spv.400.tesc.out
+++ b/Test/baseResults/spv.400.tesc.out
@@ -7,170 +7,173 @@
// Module Version 99
// Generated by (magic number): 51a00bb
-// Id's are bound by 89
+// Id's are bound by 91
Source GLSL 400
SourceExtension "GL_ARB_separate_shader_objects"
+ Capability Tessellation
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint TessellationControl 4
+ EntryPoint TessellationControl 4 "main"
ExecutionMode 4 OutputVertices 4
Name 4 "main"
- Name 9 "a"
- Name 14 "p"
- Name 18 "gl_PerVertex"
- MemberName 18(gl_PerVertex) 0 "gl_Position"
- MemberName 18(gl_PerVertex) 1 "gl_PointSize"
- MemberName 18(gl_PerVertex) 2 "gl_ClipDistance"
- Name 22 "gl_in"
- Name 29 "ps"
- Name 33 "cd"
- Name 37 "pvi"
- Name 39 "gl_PatchVerticesIn"
- Name 41 "pid"
- Name 42 "gl_PrimitiveID"
- Name 44 "iid"
- Name 45 "gl_InvocationID"
- Name 47 "gl_PerVertex"
- MemberName 47(gl_PerVertex) 0 "gl_Position"
- MemberName 47(gl_PerVertex) 1 "gl_PointSize"
- MemberName 47(gl_PerVertex) 2 "gl_ClipDistance"
- Name 51 "gl_out"
- Name 62 "gl_TessLevelOuter"
- Name 69 "gl_TessLevelInner"
- Name 74 "outa"
- Name 75 "patchOut"
- Name 79 "inb"
- Name 80 "ind"
- Name 83 "ivla"
- Name 84 "ivlb"
- Name 87 "ovla"
- Name 88 "ovlb"
- Decorate 18(gl_PerVertex) Block
- Decorate 39(gl_PatchVerticesIn) BuiltIn PatchVertices
- Decorate 42(gl_PrimitiveID) BuiltIn PrimitiveId
- Decorate 45(gl_InvocationID) BuiltIn InvocationId
- MemberDecorate 47(gl_PerVertex) 0 BuiltIn Position
- MemberDecorate 47(gl_PerVertex) 1 BuiltIn PointSize
- MemberDecorate 47(gl_PerVertex) 2 BuiltIn ClipDistance
- Decorate 47(gl_PerVertex) Block
- Decorate 62(gl_TessLevelOuter) Patch
- Decorate 62(gl_TessLevelOuter) BuiltIn TessLevelOuter
- Decorate 69(gl_TessLevelInner) Patch
- Decorate 69(gl_TessLevelInner) BuiltIn TessLevelInner
- Decorate 74(outa) NoStaticUse
- Decorate 75(patchOut) Patch
- Decorate 75(patchOut) NoStaticUse
- Decorate 79(inb) NoStaticUse
- Decorate 80(ind) NoStaticUse
- Decorate 83(ivla) Location 3
- Decorate 83(ivla) NoStaticUse
- Decorate 84(ivlb) Location 4
- Decorate 84(ivlb) NoStaticUse
- Decorate 87(ovla) Location 3
- Decorate 87(ovla) NoStaticUse
- Decorate 88(ovlb) Location 4
- Decorate 88(ovlb) NoStaticUse
+ Name 13 "a"
+ Name 18 "p"
+ Name 20 "gl_PerVertex"
+ MemberName 20(gl_PerVertex) 0 "gl_Position"
+ MemberName 20(gl_PerVertex) 1 "gl_PointSize"
+ MemberName 20(gl_PerVertex) 2 "gl_ClipDistance"
+ Name 24 "gl_in"
+ Name 31 "ps"
+ Name 35 "cd"
+ Name 39 "pvi"
+ Name 41 "gl_PatchVerticesIn"
+ Name 43 "pid"
+ Name 44 "gl_PrimitiveID"
+ Name 46 "iid"
+ Name 47 "gl_InvocationID"
+ Name 49 "gl_PerVertex"
+ MemberName 49(gl_PerVertex) 0 "gl_Position"
+ MemberName 49(gl_PerVertex) 1 "gl_PointSize"
+ MemberName 49(gl_PerVertex) 2 "gl_ClipDistance"
+ Name 53 "gl_out"
+ Name 64 "gl_TessLevelOuter"
+ Name 71 "gl_TessLevelInner"
+ Name 76 "outa"
+ Name 77 "patchOut"
+ Name 81 "inb"
+ Name 82 "ind"
+ Name 85 "ivla"
+ Name 86 "ivlb"
+ Name 89 "ovla"
+ Name 90 "ovlb"
+ Decorate 20(gl_PerVertex) Block
+ Decorate 41(gl_PatchVerticesIn) BuiltIn PatchVertices
+ Decorate 44(gl_PrimitiveID) BuiltIn PrimitiveId
+ Decorate 47(gl_InvocationID) BuiltIn InvocationId
+ MemberDecorate 49(gl_PerVertex) 0 BuiltIn Position
+ MemberDecorate 49(gl_PerVertex) 1 BuiltIn PointSize
+ MemberDecorate 49(gl_PerVertex) 2 BuiltIn ClipDistance
+ Decorate 49(gl_PerVertex) Block
+ Decorate 64(gl_TessLevelOuter) Patch
+ Decorate 64(gl_TessLevelOuter) BuiltIn TessLevelOuter
+ Decorate 71(gl_TessLevelInner) Patch
+ Decorate 71(gl_TessLevelInner) BuiltIn TessLevelInner
+ Decorate 76(outa) NoStaticUse
+ Decorate 77(patchOut) Patch
+ Decorate 77(patchOut) NoStaticUse
+ Decorate 81(inb) NoStaticUse
+ Decorate 82(ind) NoStaticUse
+ Decorate 85(ivla) Location 3
+ Decorate 85(ivla) NoStaticUse
+ Decorate 86(ivlb) Location 4
+ Decorate 86(ivlb) NoStaticUse
+ Decorate 89(ovla) Location 3
+ Decorate 89(ovla) NoStaticUse
+ Decorate 90(ovlb) Location 4
+ Decorate 90(ovlb) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
- 7: TypeInt 32 1
- 8: TypePointer Function 7(int)
- 10: 7(int) Constant 5392
- 11: TypeFloat 32
- 12: TypeVector 11(float) 4
- 13: TypePointer Function 12(fvec4)
- 15: TypeInt 32 0
- 16: 15(int) Constant 1
- 17: TypeArray 11(float) 16
-18(gl_PerVertex): TypeStruct 12(fvec4) 11(float) 17
- 19: 15(int) Constant 32
- 20: TypeArray 18(gl_PerVertex) 19
- 21: TypePointer Input 20
- 22(gl_in): 21(ptr) Variable Input
- 23: 7(int) Constant 1
- 24: 7(int) Constant 0
- 25: TypePointer Input 12(fvec4)
- 28: TypePointer Function 11(float)
- 30: TypePointer Input 11(float)
- 34: 7(int) Constant 2
- 38: TypePointer Input 7(int)
-39(gl_PatchVerticesIn): 38(ptr) Variable Input
-42(gl_PrimitiveID): 38(ptr) Variable Input
-45(gl_InvocationID): 38(ptr) Variable Input
-47(gl_PerVertex): TypeStruct 12(fvec4) 11(float) 17
- 48: 15(int) Constant 4
- 49: TypeArray 47(gl_PerVertex) 48
- 50: TypePointer Output 49
- 51(gl_out): 50(ptr) Variable Output
- 53: TypePointer Output 12(fvec4)
- 56: TypePointer Output 11(float)
- 60: TypeArray 11(float) 48
- 61: TypePointer Output 60
-62(gl_TessLevelOuter): 61(ptr) Variable Output
- 63: 7(int) Constant 3
- 64: 11(float) Constant 1078774989
- 66: 15(int) Constant 2
- 67: TypeArray 11(float) 66
- 68: TypePointer Output 67
-69(gl_TessLevelInner): 68(ptr) Variable Output
- 70: 11(float) Constant 1067869798
- 72: TypeArray 7(int) 48
- 73: TypePointer PrivateGlobal 72
- 74(outa): 73(ptr) Variable PrivateGlobal
- 75(patchOut): 53(ptr) Variable Output
- 76: TypeVector 11(float) 2
- 77: TypeArray 76(fvec2) 19
- 78: TypePointer Input 77
- 79(inb): 78(ptr) Variable Input
- 80(ind): 78(ptr) Variable Input
- 81: TypeArray 12(fvec4) 19
- 82: TypePointer Input 81
- 83(ivla): 82(ptr) Variable Input
- 84(ivlb): 82(ptr) Variable Input
- 85: TypeArray 12(fvec4) 48
- 86: TypePointer Output 85
- 87(ovla): 86(ptr) Variable Output
- 88(ovlb): 86(ptr) Variable Output
+ 3: TypeFunction 2
+ 7: TypeInt 32 0
+ 8: 7(int) Constant 1
+ 9: 7(int) Constant 1023
+ 10: 7(int) Constant 0
+ 11: TypeInt 32 1
+ 12: TypePointer Function 11(int)
+ 14: 11(int) Constant 5392
+ 15: TypeFloat 32
+ 16: TypeVector 15(float) 4
+ 17: TypePointer Function 16(fvec4)
+ 19: TypeArray 15(float) 8
+20(gl_PerVertex): TypeStruct 16(fvec4) 15(float) 19
+ 21: 7(int) Constant 32
+ 22: TypeArray 20(gl_PerVertex) 21
+ 23: TypePointer Input 22
+ 24(gl_in): 23(ptr) Variable Input
+ 25: 11(int) Constant 1
+ 26: 11(int) Constant 0
+ 27: TypePointer Input 16(fvec4)
+ 30: TypePointer Function 15(float)
+ 32: TypePointer Input 15(float)
+ 36: 11(int) Constant 2
+ 40: TypePointer Input 11(int)
+41(gl_PatchVerticesIn): 40(ptr) Variable Input
+44(gl_PrimitiveID): 40(ptr) Variable Input
+47(gl_InvocationID): 40(ptr) Variable Input
+49(gl_PerVertex): TypeStruct 16(fvec4) 15(float) 19
+ 50: 7(int) Constant 4
+ 51: TypeArray 49(gl_PerVertex) 50
+ 52: TypePointer Output 51
+ 53(gl_out): 52(ptr) Variable Output
+ 55: TypePointer Output 16(fvec4)
+ 58: TypePointer Output 15(float)
+ 62: TypeArray 15(float) 50
+ 63: TypePointer Output 62
+64(gl_TessLevelOuter): 63(ptr) Variable Output
+ 65: 11(int) Constant 3
+ 66: 15(float) Constant 1078774989
+ 68: 7(int) Constant 2
+ 69: TypeArray 15(float) 68
+ 70: TypePointer Output 69
+71(gl_TessLevelInner): 70(ptr) Variable Output
+ 72: 15(float) Constant 1067869798
+ 74: TypeArray 11(int) 50
+ 75: TypePointer PrivateGlobal 74
+ 76(outa): 75(ptr) Variable PrivateGlobal
+ 77(patchOut): 55(ptr) Variable Output
+ 78: TypeVector 15(float) 2
+ 79: TypeArray 78(fvec2) 21
+ 80: TypePointer Input 79
+ 81(inb): 80(ptr) Variable Input
+ 82(ind): 80(ptr) Variable Input
+ 83: TypeArray 16(fvec4) 21
+ 84: TypePointer Input 83
+ 85(ivla): 84(ptr) Variable Input
+ 86(ivlb): 84(ptr) Variable Input
+ 87: TypeArray 16(fvec4) 50
+ 88: TypePointer Output 87
+ 89(ovla): 88(ptr) Variable Output
+ 90(ovlb): 88(ptr) Variable Output
4(main): 2 Function None 3
5: Label
- 9(a): 8(ptr) Variable Function
- 14(p): 13(ptr) Variable Function
- 29(ps): 28(ptr) Variable Function
- 33(cd): 28(ptr) Variable Function
- 37(pvi): 8(ptr) Variable Function
- 41(pid): 8(ptr) Variable Function
- 44(iid): 8(ptr) Variable Function
- MemoryBarrier Device Relaxed SequentiallyConsistent Acquire Release UniformMemory SubgroupMemory WorkgroupLocalMemory WorkgroupGlobalMemory AtomicCounterMemory ImageMemory
- ControlBarrier Device
- Store 9(a) 10
- 26: 25(ptr) AccessChain 22(gl_in) 23 24
- 27: 12(fvec4) Load 26
- Store 14(p) 27
- 31: 30(ptr) AccessChain 22(gl_in) 23 23
- 32: 11(float) Load 31
- Store 29(ps) 32
- 35: 30(ptr) AccessChain 22(gl_in) 23 34 34
- 36: 11(float) Load 35
- Store 33(cd) 36
- 40: 7(int) Load 39(gl_PatchVerticesIn)
- Store 37(pvi) 40
- 43: 7(int) Load 42(gl_PrimitiveID)
- Store 41(pid) 43
- 46: 7(int) Load 45(gl_InvocationID)
- Store 44(iid) 46
- 52: 12(fvec4) Load 14(p)
- 54: 53(ptr) AccessChain 51(gl_out) 23 24
- Store 54 52
- 55: 11(float) Load 29(ps)
- 57: 56(ptr) AccessChain 51(gl_out) 23 23
- Store 57 55
- 58: 11(float) Load 33(cd)
- 59: 56(ptr) AccessChain 51(gl_out) 23 34 23
- Store 59 58
- 65: 56(ptr) AccessChain 62(gl_TessLevelOuter) 63
- Store 65 64
- 71: 56(ptr) AccessChain 69(gl_TessLevelInner) 23
- Store 71 70
+ 13(a): 12(ptr) Variable Function
+ 18(p): 17(ptr) Variable Function
+ 31(ps): 30(ptr) Variable Function
+ 35(cd): 30(ptr) Variable Function
+ 39(pvi): 12(ptr) Variable Function
+ 43(pid): 12(ptr) Variable Function
+ 46(iid): 12(ptr) Variable Function
+ MemoryBarrier 8 9
+ ControlBarrier 8 8 10
+ Store 13(a) 14
+ 28: 27(ptr) AccessChain 24(gl_in) 25 26
+ 29: 16(fvec4) Load 28
+ Store 18(p) 29
+ 33: 32(ptr) AccessChain 24(gl_in) 25 25
+ 34: 15(float) Load 33
+ Store 31(ps) 34
+ 37: 32(ptr) AccessChain 24(gl_in) 25 36 36
+ 38: 15(float) Load 37
+ Store 35(cd) 38
+ 42: 11(int) Load 41(gl_PatchVerticesIn)
+ Store 39(pvi) 42
+ 45: 11(int) Load 44(gl_PrimitiveID)
+ Store 43(pid) 45
+ 48: 11(int) Load 47(gl_InvocationID)
+ Store 46(iid) 48
+ 54: 16(fvec4) Load 18(p)
+ 56: 55(ptr) AccessChain 53(gl_out) 25 26
+ Store 56 54
+ 57: 15(float) Load 31(ps)
+ 59: 58(ptr) AccessChain 53(gl_out) 25 25
+ Store 59 57
+ 60: 15(float) Load 35(cd)
+ 61: 58(ptr) AccessChain 53(gl_out) 25 36 25
+ Store 61 60
+ 67: 58(ptr) AccessChain 64(gl_TessLevelOuter) 65
+ Store 67 66
+ 73: 58(ptr) AccessChain 71(gl_TessLevelInner) 25
+ Store 73 72
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.400.tese.out b/Test/baseResults/spv.400.tese.out
old mode 100644
new mode 100755
index 5bcd393..fab8235
--- a/Test/baseResults/spv.400.tese.out
+++ b/Test/baseResults/spv.400.tese.out
@@ -11,10 +11,11 @@
Source GLSL 400
SourceExtension "GL_ARB_separate_shader_objects"
+ Capability Tessellation
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint TessellationEvaluation 4
- ExecutionMode 4 InputTriangles
+ EntryPoint TessellationEvaluation 4 "main"
+ ExecutionMode 4 InputTriangles
Name 4 "main"
Name 9 "a"
Name 14 "p"
@@ -52,34 +53,34 @@
Name 94 "ivla"
Name 95 "ivlb"
Name 98 "ovla"
- Decorate 18(gl_PerVertex) Block
+ Decorate 18(gl_PerVertex) Block
Decorate 39(gl_PatchVerticesIn) BuiltIn PatchVertices
Decorate 42(gl_PrimitiveID) BuiltIn PrimitiveId
Decorate 48(gl_TessCoord) BuiltIn TessCoord
- Decorate 54(gl_TessLevelOuter) Patch
+ Decorate 54(gl_TessLevelOuter) Patch
Decorate 54(gl_TessLevelOuter) BuiltIn TessLevelOuter
- Decorate 62(gl_TessLevelInner) Patch
+ Decorate 62(gl_TessLevelInner) Patch
Decorate 62(gl_TessLevelInner) BuiltIn TessLevelInner
MemberDecorate 67(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 67(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 67(gl_PerVertex) 2 BuiltIn ClipDistance
- Decorate 67(gl_PerVertex) Block
- Decorate 78(patchIn) Patch
- Decorate 78(patchIn) NoStaticUse
- Decorate 82(inb) NoStaticUse
- Decorate 83(ind) NoStaticUse
- Decorate 84(testblb) Block
- Decorate 87(blb) NoStaticUse
- Decorate 88(testbld) Block
- Decorate 91(bld) NoStaticUse
+ Decorate 67(gl_PerVertex) Block
+ Decorate 78(patchIn) Patch
+ Decorate 78(patchIn) NoStaticUse
+ Decorate 82(inb) NoStaticUse
+ Decorate 83(ind) NoStaticUse
+ Decorate 84(testblb) Block
+ Decorate 87(blb) NoStaticUse
+ Decorate 88(testbld) Block
+ Decorate 91(bld) NoStaticUse
Decorate 94(ivla) Location 23
- Decorate 94(ivla) NoStaticUse
+ Decorate 94(ivla) NoStaticUse
Decorate 95(ivlb) Location 24
- Decorate 95(ivlb) NoStaticUse
+ Decorate 95(ivlb) NoStaticUse
Decorate 98(ovla) Location 23
- Decorate 98(ovla) NoStaticUse
+ Decorate 98(ovla) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeInt 32 1
8: TypePointer Function 7(int)
10: 7(int) Constant 1512
@@ -93,7 +94,7 @@
19: 15(int) Constant 32
20: TypeArray 18(gl_PerVertex) 19
21: TypePointer Input 20
- 22(gl_in): 21(ptr) Variable Input
+ 22(gl_in): 21(ptr) Variable Input
23: 7(int) Constant 1
24: 7(int) Constant 0
25: TypePointer Input 12(fvec4)
@@ -101,91 +102,91 @@
30: TypePointer Input 11(float)
34: 7(int) Constant 2
38: TypePointer Input 7(int)
-39(gl_PatchVerticesIn): 38(ptr) Variable Input
-42(gl_PrimitiveID): 38(ptr) Variable Input
+39(gl_PatchVerticesIn): 38(ptr) Variable Input
+42(gl_PrimitiveID): 38(ptr) Variable Input
44: TypeVector 11(float) 3
45: TypePointer Function 44(fvec3)
47: TypePointer Input 44(fvec3)
-48(gl_TessCoord): 47(ptr) Variable Input
+48(gl_TessCoord): 47(ptr) Variable Input
51: 15(int) Constant 4
52: TypeArray 11(float) 51
53: TypePointer Input 52
-54(gl_TessLevelOuter): 53(ptr) Variable Input
+54(gl_TessLevelOuter): 53(ptr) Variable Input
55: 7(int) Constant 3
59: 15(int) Constant 2
60: TypeArray 11(float) 59
61: TypePointer Input 60
-62(gl_TessLevelInner): 61(ptr) Variable Input
+62(gl_TessLevelInner): 61(ptr) Variable Input
65: 15(int) Constant 3
66: TypeArray 11(float) 65
67(gl_PerVertex): TypeStruct 12(fvec4) 11(float) 66
68: TypePointer Output 67(gl_PerVertex)
- 69: 68(ptr) Variable Output
+ 69: 68(ptr) Variable Output
71: TypePointer Output 12(fvec4)
74: TypePointer Output 11(float)
- 78(patchIn): 25(ptr) Variable Input
+ 78(patchIn): 25(ptr) Variable Input
79: TypeVector 11(float) 2
80: TypeArray 79(fvec2) 19
81: TypePointer Input 80
- 82(inb): 81(ptr) Variable Input
- 83(ind): 81(ptr) Variable Input
+ 82(inb): 81(ptr) Variable Input
+ 83(ind): 81(ptr) Variable Input
84(testblb): TypeStruct 7(int)
85: TypeArray 84(testblb) 19
86: TypePointer Input 85
- 87(blb): 86(ptr) Variable Input
+ 87(blb): 86(ptr) Variable Input
88(testbld): TypeStruct 7(int)
89: TypeArray 88(testbld) 19
90: TypePointer Input 89
- 91(bld): 90(ptr) Variable Input
+ 91(bld): 90(ptr) Variable Input
92: TypeArray 12(fvec4) 19
93: TypePointer Input 92
- 94(ivla): 93(ptr) Variable Input
- 95(ivlb): 93(ptr) Variable Input
+ 94(ivla): 93(ptr) Variable Input
+ 95(ivlb): 93(ptr) Variable Input
96: TypeArray 12(fvec4) 59
97: TypePointer Output 96
- 98(ovla): 97(ptr) Variable Output
+ 98(ovla): 97(ptr) Variable Output
4(main): 2 Function None 3
5: Label
- 9(a): 8(ptr) Variable Function
- 14(p): 13(ptr) Variable Function
- 29(ps): 28(ptr) Variable Function
- 33(cd): 28(ptr) Variable Function
- 37(pvi): 8(ptr) Variable Function
- 41(pid): 8(ptr) Variable Function
- 46(tc): 45(ptr) Variable Function
- 50(tlo): 28(ptr) Variable Function
- 58(tli): 28(ptr) Variable Function
- Store 9(a) 10
+ 9(a): 8(ptr) Variable Function
+ 14(p): 13(ptr) Variable Function
+ 29(ps): 28(ptr) Variable Function
+ 33(cd): 28(ptr) Variable Function
+ 37(pvi): 8(ptr) Variable Function
+ 41(pid): 8(ptr) Variable Function
+ 46(tc): 45(ptr) Variable Function
+ 50(tlo): 28(ptr) Variable Function
+ 58(tli): 28(ptr) Variable Function
+ Store 9(a) 10
26: 25(ptr) AccessChain 22(gl_in) 23 24
- 27: 12(fvec4) Load 26
- Store 14(p) 27
+ 27: 12(fvec4) Load 26
+ Store 14(p) 27
31: 30(ptr) AccessChain 22(gl_in) 23 23
- 32: 11(float) Load 31
- Store 29(ps) 32
+ 32: 11(float) Load 31
+ Store 29(ps) 32
35: 30(ptr) AccessChain 22(gl_in) 23 34 34
- 36: 11(float) Load 35
- Store 33(cd) 36
- 40: 7(int) Load 39(gl_PatchVerticesIn)
- Store 37(pvi) 40
- 43: 7(int) Load 42(gl_PrimitiveID)
- Store 41(pid) 43
- 49: 44(fvec3) Load 48(gl_TessCoord)
- Store 46(tc) 49
+ 36: 11(float) Load 35
+ Store 33(cd) 36
+ 40: 7(int) Load 39(gl_PatchVerticesIn)
+ Store 37(pvi) 40
+ 43: 7(int) Load 42(gl_PrimitiveID)
+ Store 41(pid) 43
+ 49: 44(fvec3) Load 48(gl_TessCoord)
+ Store 46(tc) 49
56: 30(ptr) AccessChain 54(gl_TessLevelOuter) 55
- 57: 11(float) Load 56
- Store 50(tlo) 57
+ 57: 11(float) Load 56
+ Store 50(tlo) 57
63: 30(ptr) AccessChain 62(gl_TessLevelInner) 23
- 64: 11(float) Load 63
- Store 58(tli) 64
- 70: 12(fvec4) Load 14(p)
+ 64: 11(float) Load 63
+ Store 58(tli) 64
+ 70: 12(fvec4) Load 14(p)
72: 71(ptr) AccessChain 69 24
- Store 72 70
- 73: 11(float) Load 29(ps)
+ Store 72 70
+ 73: 11(float) Load 29(ps)
75: 74(ptr) AccessChain 69 23
- Store 75 73
- 76: 11(float) Load 33(cd)
+ Store 75 73
+ 76: 11(float) Load 33(cd)
77: 74(ptr) AccessChain 69 34 34
- Store 77 76
+ Store 77 76
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.430.vert.out b/Test/baseResults/spv.430.vert.out
old mode 100644
new mode 100755
index 5a556cf..082ae0a
--- a/Test/baseResults/spv.430.vert.out
+++ b/Test/baseResults/spv.430.vert.out
@@ -7,12 +7,13 @@
// Module Version 99
// Generated by (magic number): 51a00bb
-// Id's are bound by 62
+// Id's are bound by 63
Source GLSL 430
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Vertex 4
+ EntryPoint Vertex 4 "main"
Name 4 "main"
Name 11 "gl_PerVertex"
MemberName 11(gl_PerVertex) 0 "gl_ClipDistance"
@@ -29,49 +30,49 @@
Name 49 "anonblock"
MemberName 49(anonblock) 0 "aoeu"
Name 51 ""
- Name 54 "sampb1"
- Name 57 "sampb2"
- Name 58 "sampb4"
- Name 60 "gl_VertexID"
- Name 61 "gl_InstanceID"
+ Name 55 "sampb1"
+ Name 58 "sampb2"
+ Name 59 "sampb4"
+ Name 61 "gl_VertexID"
+ Name 62 "gl_InstanceID"
MemberDecorate 11(gl_PerVertex) 0 BuiltIn ClipDistance
- Decorate 11(gl_PerVertex) Block
- Decorate 35(badorder3) Flat
+ Decorate 11(gl_PerVertex) Block
+ Decorate 35(badorder3) Flat
Decorate 43(uv4) Location 4
- Decorate 43(uv4) NoStaticUse
- Decorate 29 NoStaticUse
- Decorate 29 NoStaticUse
- Decorate 44(badorder) NoStaticUse
- Decorate 45(badorder2) Smooth
- Decorate 45(badorder2) Invariant
- Decorate 45(badorder2) NoStaticUse
- Decorate 46(boundblock) GLSLShared
- Decorate 46(boundblock) Block
+ Decorate 43(uv4) NoStaticUse
+ Decorate 29 NoStaticUse
+ Decorate 29 NoStaticUse
+ Decorate 44(badorder) NoStaticUse
+ Decorate 45(badorder2) Smooth
+ Decorate 45(badorder2) Invariant
+ Decorate 45(badorder2) NoStaticUse
+ Decorate 46(boundblock) GLSLShared
+ Decorate 46(boundblock) Block
Decorate 48(boundInst) Binding 3
- Decorate 48(boundInst) NoStaticUse
- Decorate 49(anonblock) GLSLShared
- Decorate 49(anonblock) Block
+ Decorate 48(boundInst) NoStaticUse
+ Decorate 49(anonblock) GLSLShared
+ Decorate 49(anonblock) Block
Decorate 51 Binding 7
- Decorate 51 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 51 NoStaticUse
+ Decorate 55(sampb1) Binding 4
+ Decorate 55(sampb1) NoStaticUse
+ Decorate 58(sampb2) Binding 5
+ Decorate 58(sampb2) NoStaticUse
+ Decorate 59(sampb4) Binding 31
+ Decorate 59(sampb4) NoStaticUse
+ Decorate 61(gl_VertexID) BuiltIn VertexId
+ Decorate 61(gl_VertexID) NoStaticUse
+ Decorate 62(gl_InstanceID) BuiltIn InstanceId
+ Decorate 62(gl_InstanceID) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeInt 32 0
9: 8(int) Constant 3
10: TypeArray 7(float) 9
11(gl_PerVertex): TypeStruct 10
12: TypePointer Output 11(gl_PerVertex)
- 13: 12(ptr) Variable Output
+ 13: 12(ptr) Variable Output
14: TypeInt 32 1
15: 14(int) Constant 0
16: 14(int) Constant 2
@@ -81,53 +82,54 @@
21: 8(int) Constant 10
22: TypeArray 20(fvec4) 21
23: TypePointer Input 22
- 24(bad): 23(ptr) Variable Input
+ 24(bad): 23(ptr) Variable Input
25: TypePointer Input 20(fvec4)
29: 7(float) Constant 1082549862
30: TypeBool
34: TypePointer Output 20(fvec4)
- 35(badorder3): 34(ptr) Variable Output
+ 35(badorder3): 34(ptr) Variable Output
38: TypePointer UniformConstant 7(float)
- 39(f): 38(ptr) Variable UniformConstant
+ 39(f): 38(ptr) Variable UniformConstant
42: TypePointer UniformConstant 20(fvec4)
- 43(uv4): 42(ptr) Variable UniformConstant
- 44(badorder): 25(ptr) Variable Input
- 45(badorder2): 34(ptr) Variable Output
+ 43(uv4): 42(ptr) Variable UniformConstant
+ 44(badorder): 25(ptr) Variable Input
+ 45(badorder2): 34(ptr) Variable Output
46(boundblock): TypeStruct 14(int)
47: TypePointer Uniform 46(boundblock)
- 48(boundInst): 47(ptr) Variable Uniform
+ 48(boundInst): 47(ptr) Variable Uniform
49(anonblock): TypeStruct 14(int)
50: TypePointer Uniform 49(anonblock)
- 51: 50(ptr) Variable Uniform
- 52: TypeSampler7(float) 2D filter+texture
- 53: TypePointer UniformConstant 52
- 54(sampb1): 53(ptr) Variable UniformConstant
- 55: TypeArray 52 21
- 56: TypePointer UniformConstant 55
- 57(sampb2): 56(ptr) Variable UniformConstant
- 58(sampb4): 53(ptr) Variable UniformConstant
- 59: TypePointer Input 14(int)
- 60(gl_VertexID): 59(ptr) Variable Input
-61(gl_InstanceID): 59(ptr) Variable Input
+ 51: 50(ptr) Variable Uniform
+ 52: TypeImage 7(float) 2D sampled format:Unknown
+ 53: TypeSampledImage 52
+ 54: TypePointer UniformConstant 53
+ 55(sampb1): 54(ptr) Variable UniformConstant
+ 56: TypeArray 53 21
+ 57: TypePointer UniformConstant 56
+ 58(sampb2): 57(ptr) Variable UniformConstant
+ 59(sampb4): 54(ptr) Variable UniformConstant
+ 60: TypePointer Input 14(int)
+ 61(gl_VertexID): 60(ptr) Variable Input
+62(gl_InstanceID): 60(ptr) Variable Input
4(main): 2 Function None 3
5: Label
19: 18(ptr) AccessChain 13 15 16
- Store 19 17
+ Store 19 17
26: 25(ptr) AccessChain 24(bad) 15
- 27: 20(fvec4) Load 26
+ 27: 20(fvec4) Load 26
28: 7(float) CompositeExtract 27 0
31: 30(bool) FOrdEqual 28 29
SelectionMerge 33 None
- BranchConditional 31 32 33
+ BranchConditional 31 32 33
32: Label
36: 25(ptr) AccessChain 24(bad) 15
- 37: 20(fvec4) Load 36
- Store 35(badorder3) 37
+ 37: 20(fvec4) Load 36
+ Store 35(badorder3) 37
Branch 33
33: Label
- 40: 7(float) Load 39(f)
+ 40: 7(float) Load 39(f)
41: 18(ptr) AccessChain 13 15 15
- Store 41 40
+ Store 41 40
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.Operations.frag.out b/Test/baseResults/spv.Operations.frag.out
old mode 100644
new mode 100755
index 38ddcd9..9858f85
--- a/Test/baseResults/spv.Operations.frag.out
+++ b/Test/baseResults/spv.Operations.frag.out
@@ -8,9 +8,11 @@
// Id's are bound by 399
Source GLSL 130
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 10 "v"
Name 12 "uv4"
@@ -25,27 +27,27 @@
Name 396 "uiv4"
Name 398 "ub"
Decorate 378(gl_FragColor) BuiltIn FragColor
- Decorate 396(uiv4) NoStaticUse
- Decorate 398(ub) NoStaticUse
+ Decorate 396(uiv4) NoStaticUse
+ Decorate 398(ub) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypePointer Function 8(fvec4)
11: TypePointer UniformConstant 8(fvec4)
- 12(uv4): 11(ptr) Variable UniformConstant
+ 12(uv4): 11(ptr) Variable UniformConstant
19: TypeInt 32 1
20: TypePointer Function 19(int)
22: TypePointer UniformConstant 19(int)
- 23(ui): 22(ptr) Variable UniformConstant
+ 23(ui): 22(ptr) Variable UniformConstant
169: TypePointer UniformConstant 7(float)
- 170(uf): 169(ptr) Variable UniformConstant
+ 170(uf): 169(ptr) Variable UniformConstant
215: TypeBool
216: TypePointer Function 215(bool)
220: TypeVector 215(bool) 4
242: TypePointer UniformConstant 220(bvec4)
- 243(ub41): 242(ptr) Variable UniformConstant
- 245(ub42): 242(ptr) Variable UniformConstant
+ 243(ub41): 242(ptr) Variable UniformConstant
+ 245(ub42): 242(ptr) Variable UniformConstant
292: 19(int) Constant 2
299: 19(int) Constant 1
301: TypePointer Function 7(float)
@@ -55,458 +57,458 @@
359: 19(int) Constant 66
365: 19(int) Constant 17
377: TypePointer Output 8(fvec4)
-378(gl_FragColor): 377(ptr) Variable Output
+378(gl_FragColor): 377(ptr) Variable Output
394: TypeVector 19(int) 4
395: TypePointer UniformConstant 394(ivec4)
- 396(uiv4): 395(ptr) Variable UniformConstant
+ 396(uiv4): 395(ptr) Variable UniformConstant
397: TypePointer UniformConstant 215(bool)
- 398(ub): 397(ptr) Variable UniformConstant
+ 398(ub): 397(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
- 10(v): 9(ptr) Variable Function
- 21(i): 20(ptr) Variable Function
- 217(b): 216(ptr) Variable Function
- 302(f): 301(ptr) Variable Function
- 379: 9(ptr) Variable Function
- 13: 8(fvec4) Load 12(uv4)
- 14: 8(fvec4) ExtInst 1(GLSL.std.450) 8(radians) 13
- Store 10(v) 14
- 15: 8(fvec4) Load 10(v)
- 16: 8(fvec4) ExtInst 1(GLSL.std.450) 9(degrees) 15
- 17: 8(fvec4) Load 10(v)
+ 10(v): 9(ptr) Variable Function
+ 21(i): 20(ptr) Variable Function
+ 217(b): 216(ptr) Variable Function
+ 302(f): 301(ptr) Variable Function
+ 379: 9(ptr) Variable Function
+ 13: 8(fvec4) Load 12(uv4)
+ 14: 8(fvec4) ExtInst 1(GLSL.std.450) 11(Radians) 13
+ Store 10(v) 14
+ 15: 8(fvec4) Load 10(v)
+ 16: 8(fvec4) ExtInst 1(GLSL.std.450) 12(Degrees) 15
+ 17: 8(fvec4) Load 10(v)
18: 8(fvec4) FAdd 17 16
- Store 10(v) 18
- 24: 19(int) Load 23(ui)
- 25: 19(int) Load 23(ui)
+ Store 10(v) 18
+ 24: 19(int) Load 23(ui)
+ 25: 19(int) Load 23(ui)
26: 19(int) IMul 24 25
- Store 21(i) 26
- 27: 8(fvec4) Load 10(v)
- 28: 8(fvec4) ExtInst 1(GLSL.std.450) 10(sin) 27
- 29: 8(fvec4) Load 10(v)
+ Store 21(i) 26
+ 27: 8(fvec4) Load 10(v)
+ 28: 8(fvec4) ExtInst 1(GLSL.std.450) 13(Sin) 27
+ 29: 8(fvec4) Load 10(v)
30: 8(fvec4) FAdd 29 28
- Store 10(v) 30
- 31: 8(fvec4) Load 10(v)
- 32: 8(fvec4) ExtInst 1(GLSL.std.450) 11(cos) 31
- 33: 8(fvec4) Load 10(v)
+ Store 10(v) 30
+ 31: 8(fvec4) Load 10(v)
+ 32: 8(fvec4) ExtInst 1(GLSL.std.450) 14(Cos) 31
+ 33: 8(fvec4) Load 10(v)
34: 8(fvec4) FAdd 33 32
- Store 10(v) 34
- 35: 8(fvec4) Load 10(v)
- 36: 8(fvec4) ExtInst 1(GLSL.std.450) 12(tan) 35
- 37: 8(fvec4) Load 10(v)
+ Store 10(v) 34
+ 35: 8(fvec4) Load 10(v)
+ 36: 8(fvec4) ExtInst 1(GLSL.std.450) 15(Tan) 35
+ 37: 8(fvec4) Load 10(v)
38: 8(fvec4) FAdd 37 36
- Store 10(v) 38
- 39: 8(fvec4) Load 10(v)
- 40: 8(fvec4) ExtInst 1(GLSL.std.450) 13(asin) 39
- 41: 8(fvec4) Load 10(v)
+ Store 10(v) 38
+ 39: 8(fvec4) Load 10(v)
+ 40: 8(fvec4) ExtInst 1(GLSL.std.450) 16(Asin) 39
+ 41: 8(fvec4) Load 10(v)
42: 8(fvec4) FAdd 41 40
- Store 10(v) 42
- 43: 8(fvec4) Load 10(v)
- 44: 8(fvec4) ExtInst 1(GLSL.std.450) 14(acos) 43
- 45: 8(fvec4) Load 10(v)
+ Store 10(v) 42
+ 43: 8(fvec4) Load 10(v)
+ 44: 8(fvec4) ExtInst 1(GLSL.std.450) 17(Acos) 43
+ 45: 8(fvec4) Load 10(v)
46: 8(fvec4) FAdd 45 44
- Store 10(v) 46
- 47: 8(fvec4) Load 10(v)
- 48: 8(fvec4) ExtInst 1(GLSL.std.450) 15(atan) 47
- 49: 8(fvec4) Load 10(v)
+ Store 10(v) 46
+ 47: 8(fvec4) Load 10(v)
+ 48: 8(fvec4) ExtInst 1(GLSL.std.450) 18(Atan) 47
+ 49: 8(fvec4) Load 10(v)
50: 8(fvec4) FAdd 49 48
- Store 10(v) 50
- 51: 8(fvec4) Load 10(v)
- 52: 8(fvec4) ExtInst 1(GLSL.std.450) 16(sinh) 51
- 53: 8(fvec4) Load 10(v)
+ Store 10(v) 50
+ 51: 8(fvec4) Load 10(v)
+ 52: 8(fvec4) ExtInst 1(GLSL.std.450) 19(Sinh) 51
+ 53: 8(fvec4) Load 10(v)
54: 8(fvec4) FAdd 53 52
- Store 10(v) 54
- 55: 8(fvec4) Load 10(v)
- 56: 8(fvec4) ExtInst 1(GLSL.std.450) 17(cosh) 55
- 57: 8(fvec4) Load 10(v)
+ Store 10(v) 54
+ 55: 8(fvec4) Load 10(v)
+ 56: 8(fvec4) ExtInst 1(GLSL.std.450) 20(Cosh) 55
+ 57: 8(fvec4) Load 10(v)
58: 8(fvec4) FAdd 57 56
- Store 10(v) 58
- 59: 8(fvec4) Load 10(v)
- 60: 8(fvec4) ExtInst 1(GLSL.std.450) 18(tanh) 59
- 61: 8(fvec4) Load 10(v)
+ Store 10(v) 58
+ 59: 8(fvec4) Load 10(v)
+ 60: 8(fvec4) ExtInst 1(GLSL.std.450) 21(Tanh) 59
+ 61: 8(fvec4) Load 10(v)
62: 8(fvec4) FAdd 61 60
- Store 10(v) 62
- 63: 8(fvec4) Load 10(v)
- 64: 8(fvec4) ExtInst 1(GLSL.std.450) 19(asinh) 63
- 65: 8(fvec4) Load 10(v)
+ Store 10(v) 62
+ 63: 8(fvec4) Load 10(v)
+ 64: 8(fvec4) ExtInst 1(GLSL.std.450) 22(Asinh) 63
+ 65: 8(fvec4) Load 10(v)
66: 8(fvec4) FAdd 65 64
- Store 10(v) 66
- 67: 8(fvec4) Load 10(v)
- 68: 8(fvec4) ExtInst 1(GLSL.std.450) 20(acosh) 67
- 69: 8(fvec4) Load 10(v)
+ Store 10(v) 66
+ 67: 8(fvec4) Load 10(v)
+ 68: 8(fvec4) ExtInst 1(GLSL.std.450) 23(Acosh) 67
+ 69: 8(fvec4) Load 10(v)
70: 8(fvec4) FAdd 69 68
- Store 10(v) 70
- 71: 8(fvec4) Load 10(v)
- 72: 8(fvec4) ExtInst 1(GLSL.std.450) 21(atanh) 71
- 73: 8(fvec4) Load 10(v)
+ Store 10(v) 70
+ 71: 8(fvec4) Load 10(v)
+ 72: 8(fvec4) ExtInst 1(GLSL.std.450) 24(Atanh) 71
+ 73: 8(fvec4) Load 10(v)
74: 8(fvec4) FAdd 73 72
- Store 10(v) 74
- 75: 8(fvec4) Load 10(v)
- 76: 8(fvec4) Load 10(v)
- 77: 8(fvec4) ExtInst 1(GLSL.std.450) 23(pow) 75 76
- 78: 8(fvec4) Load 10(v)
+ Store 10(v) 74
+ 75: 8(fvec4) Load 10(v)
+ 76: 8(fvec4) Load 10(v)
+ 77: 8(fvec4) ExtInst 1(GLSL.std.450) 26(Pow) 75 76
+ 78: 8(fvec4) Load 10(v)
79: 8(fvec4) FAdd 78 77
- Store 10(v) 79
- 80: 8(fvec4) Load 10(v)
- 81: 8(fvec4) ExtInst 1(GLSL.std.450) 24(exp) 80
- 82: 8(fvec4) Load 10(v)
+ Store 10(v) 79
+ 80: 8(fvec4) Load 10(v)
+ 81: 8(fvec4) ExtInst 1(GLSL.std.450) 27(Exp) 80
+ 82: 8(fvec4) Load 10(v)
83: 8(fvec4) FAdd 82 81
- Store 10(v) 83
- 84: 8(fvec4) Load 10(v)
- 85: 8(fvec4) ExtInst 1(GLSL.std.450) 25(log) 84
- 86: 8(fvec4) Load 10(v)
+ Store 10(v) 83
+ 84: 8(fvec4) Load 10(v)
+ 85: 8(fvec4) ExtInst 1(GLSL.std.450) 28(Log) 84
+ 86: 8(fvec4) Load 10(v)
87: 8(fvec4) FAdd 86 85
- Store 10(v) 87
- 88: 8(fvec4) Load 10(v)
- 89: 8(fvec4) ExtInst 1(GLSL.std.450) 26(exp2) 88
- 90: 8(fvec4) Load 10(v)
+ Store 10(v) 87
+ 88: 8(fvec4) Load 10(v)
+ 89: 8(fvec4) ExtInst 1(GLSL.std.450) 29(Exp2) 88
+ 90: 8(fvec4) Load 10(v)
91: 8(fvec4) FAdd 90 89
- Store 10(v) 91
- 92: 8(fvec4) Load 10(v)
- 93: 8(fvec4) ExtInst 1(GLSL.std.450) 27(log2) 92
- 94: 8(fvec4) Load 10(v)
+ Store 10(v) 91
+ 92: 8(fvec4) Load 10(v)
+ 93: 8(fvec4) ExtInst 1(GLSL.std.450) 30(Log2) 92
+ 94: 8(fvec4) Load 10(v)
95: 8(fvec4) FAdd 94 93
- Store 10(v) 95
- 96: 8(fvec4) Load 10(v)
- 97: 8(fvec4) ExtInst 1(GLSL.std.450) 28(sqrt) 96
- 98: 8(fvec4) Load 10(v)
+ Store 10(v) 95
+ 96: 8(fvec4) Load 10(v)
+ 97: 8(fvec4) ExtInst 1(GLSL.std.450) 31(Sqrt) 96
+ 98: 8(fvec4) Load 10(v)
99: 8(fvec4) FAdd 98 97
- Store 10(v) 99
- 100: 8(fvec4) Load 10(v)
- 101: 8(fvec4) ExtInst 1(GLSL.std.450) 29(inverseSqrt) 100
- 102: 8(fvec4) Load 10(v)
+ Store 10(v) 99
+ 100: 8(fvec4) Load 10(v)
+ 101: 8(fvec4) ExtInst 1(GLSL.std.450) 32(Inversesqrt) 100
+ 102: 8(fvec4) Load 10(v)
103: 8(fvec4) FAdd 102 101
- Store 10(v) 103
- 104: 8(fvec4) Load 10(v)
- 105: 8(fvec4) ExtInst 1(GLSL.std.450) 3(abs) 104
- 106: 8(fvec4) Load 10(v)
+ Store 10(v) 103
+ 104: 8(fvec4) Load 10(v)
+ 105: 8(fvec4) ExtInst 1(GLSL.std.450) 4(FAbs) 104
+ 106: 8(fvec4) Load 10(v)
107: 8(fvec4) FAdd 106 105
- Store 10(v) 107
- 108: 8(fvec4) Load 10(v)
- 109: 8(fvec4) ExtInst 1(GLSL.std.450) 4(sign) 108
- 110: 8(fvec4) Load 10(v)
+ Store 10(v) 107
+ 108: 8(fvec4) Load 10(v)
+ 109: 8(fvec4) ExtInst 1(GLSL.std.450) 6(FSign) 108
+ 110: 8(fvec4) Load 10(v)
111: 8(fvec4) FAdd 110 109
- Store 10(v) 111
- 112: 8(fvec4) Load 10(v)
- 113: 8(fvec4) ExtInst 1(GLSL.std.450) 5(floor) 112
- 114: 8(fvec4) Load 10(v)
+ Store 10(v) 111
+ 112: 8(fvec4) Load 10(v)
+ 113: 8(fvec4) ExtInst 1(GLSL.std.450) 8(Floor) 112
+ 114: 8(fvec4) Load 10(v)
115: 8(fvec4) FAdd 114 113
- Store 10(v) 115
- 116: 8(fvec4) Load 10(v)
- 117: 8(fvec4) ExtInst 1(GLSL.std.450) 6(ceil) 116
- 118: 8(fvec4) Load 10(v)
+ Store 10(v) 115
+ 116: 8(fvec4) Load 10(v)
+ 117: 8(fvec4) ExtInst 1(GLSL.std.450) 9(Ceil) 116
+ 118: 8(fvec4) Load 10(v)
119: 8(fvec4) FAdd 118 117
- Store 10(v) 119
- 120: 8(fvec4) Load 10(v)
- 121: 8(fvec4) ExtInst 1(GLSL.std.450) 7(fract) 120
- 122: 8(fvec4) Load 10(v)
+ Store 10(v) 119
+ 120: 8(fvec4) Load 10(v)
+ 121: 8(fvec4) ExtInst 1(GLSL.std.450) 10(Fract) 120
+ 122: 8(fvec4) Load 10(v)
123: 8(fvec4) FAdd 122 121
- Store 10(v) 123
- 124: 8(fvec4) Load 10(v)
- 125: 8(fvec4) Load 10(v)
+ Store 10(v) 123
+ 124: 8(fvec4) Load 10(v)
+ 125: 8(fvec4) Load 10(v)
126: 8(fvec4) FMod 124 125
- 127: 8(fvec4) Load 10(v)
+ 127: 8(fvec4) Load 10(v)
128: 8(fvec4) FAdd 127 126
- Store 10(v) 128
- 129: 8(fvec4) Load 10(v)
- 130: 8(fvec4) Load 10(v)
+ Store 10(v) 128
+ 129: 8(fvec4) Load 10(v)
+ 130: 8(fvec4) Load 10(v)
131: 7(float) CompositeExtract 130 0
132: 8(fvec4) CompositeConstruct 131 131 131 131
133: 8(fvec4) FMod 129 132
- 134: 8(fvec4) Load 10(v)
+ 134: 8(fvec4) Load 10(v)
135: 8(fvec4) FAdd 134 133
- Store 10(v) 135
- 136: 8(fvec4) Load 10(v)
- 137: 8(fvec4) Load 12(uv4)
- 138: 8(fvec4) ExtInst 1(GLSL.std.450) 33(min) 136 137
- 139: 8(fvec4) Load 10(v)
+ Store 10(v) 135
+ 136: 8(fvec4) Load 10(v)
+ 137: 8(fvec4) Load 12(uv4)
+ 138: 8(fvec4) ExtInst 1(GLSL.std.450) 37(FMin) 136 137
+ 139: 8(fvec4) Load 10(v)
140: 8(fvec4) FAdd 139 138
- Store 10(v) 140
- 141: 8(fvec4) Load 10(v)
- 142: 8(fvec4) Load 12(uv4)
- 143: 8(fvec4) ExtInst 1(GLSL.std.450) 34(max) 141 142
- 144: 8(fvec4) Load 10(v)
+ Store 10(v) 140
+ 141: 8(fvec4) Load 10(v)
+ 142: 8(fvec4) Load 12(uv4)
+ 143: 8(fvec4) ExtInst 1(GLSL.std.450) 40(FMax) 141 142
+ 144: 8(fvec4) Load 10(v)
145: 8(fvec4) FAdd 144 143
- Store 10(v) 145
- 146: 8(fvec4) Load 10(v)
- 147: 8(fvec4) Load 12(uv4)
- 148: 8(fvec4) Load 12(uv4)
- 149: 8(fvec4) ExtInst 1(GLSL.std.450) 35(clamp) 146 147 148
- 150: 8(fvec4) Load 10(v)
+ Store 10(v) 145
+ 146: 8(fvec4) Load 10(v)
+ 147: 8(fvec4) Load 12(uv4)
+ 148: 8(fvec4) Load 12(uv4)
+ 149: 8(fvec4) ExtInst 1(GLSL.std.450) 43(FClamp) 146 147 148
+ 150: 8(fvec4) Load 10(v)
151: 8(fvec4) FAdd 150 149
- Store 10(v) 151
- 152: 8(fvec4) Load 10(v)
- 153: 8(fvec4) Load 10(v)
- 154: 8(fvec4) Load 10(v)
- 155: 8(fvec4) ExtInst 1(GLSL.std.450) 36(mix) 152 153 154
- 156: 8(fvec4) Load 10(v)
+ Store 10(v) 151
+ 152: 8(fvec4) Load 10(v)
+ 153: 8(fvec4) Load 10(v)
+ 154: 8(fvec4) Load 10(v)
+ 155: 8(fvec4) ExtInst 1(GLSL.std.450) 46(Mix) 152 153 154
+ 156: 8(fvec4) Load 10(v)
157: 8(fvec4) FAdd 156 155
- Store 10(v) 157
- 158: 8(fvec4) Load 10(v)
- 159: 8(fvec4) Load 10(v)
- 160: 8(fvec4) ExtInst 1(GLSL.std.450) 37(step) 158 159
- 161: 8(fvec4) Load 10(v)
+ Store 10(v) 157
+ 158: 8(fvec4) Load 10(v)
+ 159: 8(fvec4) Load 10(v)
+ 160: 8(fvec4) ExtInst 1(GLSL.std.450) 47(Step) 158 159
+ 161: 8(fvec4) Load 10(v)
162: 8(fvec4) FAdd 161 160
- Store 10(v) 162
- 163: 8(fvec4) Load 10(v)
- 164: 8(fvec4) Load 10(v)
- 165: 8(fvec4) Load 10(v)
- 166: 8(fvec4) ExtInst 1(GLSL.std.450) 38(smoothStep) 163 164 165
- 167: 8(fvec4) Load 10(v)
+ Store 10(v) 162
+ 163: 8(fvec4) Load 10(v)
+ 164: 8(fvec4) Load 10(v)
+ 165: 8(fvec4) Load 10(v)
+ 166: 8(fvec4) ExtInst 1(GLSL.std.450) 48(Smoothstep) 163 164 165
+ 167: 8(fvec4) Load 10(v)
168: 8(fvec4) FAdd 167 166
- Store 10(v) 168
- 171: 7(float) Load 170(uf)
- 172: 8(fvec4) Load 10(v)
- 173: 8(fvec4) ExtInst 1(GLSL.std.450) 37(step) 171 172
- 174: 8(fvec4) Load 10(v)
+ Store 10(v) 168
+ 171: 7(float) Load 170(uf)
+ 172: 8(fvec4) Load 10(v)
+ 173: 8(fvec4) ExtInst 1(GLSL.std.450) 47(Step) 171 172
+ 174: 8(fvec4) Load 10(v)
175: 8(fvec4) FAdd 174 173
- Store 10(v) 175
- 176: 7(float) Load 170(uf)
- 177: 7(float) Load 170(uf)
- 178: 8(fvec4) Load 10(v)
- 179: 8(fvec4) ExtInst 1(GLSL.std.450) 38(smoothStep) 176 177 178
- 180: 8(fvec4) Load 10(v)
+ Store 10(v) 175
+ 176: 7(float) Load 170(uf)
+ 177: 7(float) Load 170(uf)
+ 178: 8(fvec4) Load 10(v)
+ 179: 8(fvec4) ExtInst 1(GLSL.std.450) 48(Smoothstep) 176 177 178
+ 180: 8(fvec4) Load 10(v)
181: 8(fvec4) FAdd 180 179
- Store 10(v) 181
- 182: 8(fvec4) Load 10(v)
- 183: 8(fvec4) ExtInst 1(GLSL.std.450) 61(normalize) 182
- 184: 8(fvec4) Load 10(v)
+ Store 10(v) 181
+ 182: 8(fvec4) Load 10(v)
+ 183: 8(fvec4) ExtInst 1(GLSL.std.450) 68(Normalize) 182
+ 184: 8(fvec4) Load 10(v)
185: 8(fvec4) FAdd 184 183
- Store 10(v) 185
- 186: 8(fvec4) Load 10(v)
- 187: 8(fvec4) Load 10(v)
- 188: 8(fvec4) Load 10(v)
- 189: 8(fvec4) ExtInst 1(GLSL.std.450) 63(faceForward) 186 187 188
- 190: 8(fvec4) Load 10(v)
+ Store 10(v) 185
+ 186: 8(fvec4) Load 10(v)
+ 187: 8(fvec4) Load 10(v)
+ 188: 8(fvec4) Load 10(v)
+ 189: 8(fvec4) ExtInst 1(GLSL.std.450) 69(Faceforward) 186 187 188
+ 190: 8(fvec4) Load 10(v)
191: 8(fvec4) FAdd 190 189
- Store 10(v) 191
- 192: 8(fvec4) Load 10(v)
- 193: 8(fvec4) Load 10(v)
- 194: 8(fvec4) ExtInst 1(GLSL.std.450) 64(reflect) 192 193
- 195: 8(fvec4) Load 10(v)
+ Store 10(v) 191
+ 192: 8(fvec4) Load 10(v)
+ 193: 8(fvec4) Load 10(v)
+ 194: 8(fvec4) ExtInst 1(GLSL.std.450) 70(Reflect) 192 193
+ 195: 8(fvec4) Load 10(v)
196: 8(fvec4) FAdd 195 194
- Store 10(v) 196
- 197: 8(fvec4) Load 10(v)
- 198: 8(fvec4) Load 10(v)
- 199: 7(float) Load 170(uf)
- 200: 8(fvec4) ExtInst 1(GLSL.std.450) 65(refract) 197 198 199
- 201: 8(fvec4) Load 10(v)
+ Store 10(v) 196
+ 197: 8(fvec4) Load 10(v)
+ 198: 8(fvec4) Load 10(v)
+ 199: 7(float) Load 170(uf)
+ 200: 8(fvec4) ExtInst 1(GLSL.std.450) 71(Refract) 197 198 199
+ 201: 8(fvec4) Load 10(v)
202: 8(fvec4) FAdd 201 200
- Store 10(v) 202
- 203: 8(fvec4) Load 10(v)
+ Store 10(v) 202
+ 203: 8(fvec4) Load 10(v)
204: 8(fvec4) DPdx 203
- 205: 8(fvec4) Load 10(v)
+ 205: 8(fvec4) Load 10(v)
206: 8(fvec4) FAdd 205 204
- Store 10(v) 206
- 207: 8(fvec4) Load 10(v)
+ Store 10(v) 206
+ 207: 8(fvec4) Load 10(v)
208: 8(fvec4) DPdy 207
- 209: 8(fvec4) Load 10(v)
+ 209: 8(fvec4) Load 10(v)
210: 8(fvec4) FAdd 209 208
- Store 10(v) 210
- 211: 8(fvec4) Load 10(v)
+ Store 10(v) 210
+ 211: 8(fvec4) Load 10(v)
212: 8(fvec4) Fwidth 211
- 213: 8(fvec4) Load 10(v)
+ 213: 8(fvec4) Load 10(v)
214: 8(fvec4) FAdd 213 212
- Store 10(v) 214
- 218: 8(fvec4) Load 10(v)
- 219: 8(fvec4) Load 12(uv4)
+ Store 10(v) 214
+ 218: 8(fvec4) Load 10(v)
+ 219: 8(fvec4) Load 12(uv4)
221: 220(bvec4) FOrdLessThan 218 219
222: 215(bool) Any 221
- Store 217(b) 222
- 223: 215(bool) Load 217(b)
- 224: 8(fvec4) Load 10(v)
- 225: 8(fvec4) Load 12(uv4)
+ Store 217(b) 222
+ 223: 215(bool) Load 217(b)
+ 224: 8(fvec4) Load 10(v)
+ 225: 8(fvec4) Load 12(uv4)
226: 220(bvec4) FOrdLessThanEqual 224 225
227: 215(bool) Any 226
228: 215(bool) LogicalAnd 223 227
- Store 217(b) 228
- 229: 215(bool) Load 217(b)
- 230: 8(fvec4) Load 10(v)
- 231: 8(fvec4) Load 12(uv4)
+ Store 217(b) 228
+ 229: 215(bool) Load 217(b)
+ 230: 8(fvec4) Load 10(v)
+ 231: 8(fvec4) Load 12(uv4)
232: 220(bvec4) FOrdGreaterThan 230 231
233: 215(bool) Any 232
234: 215(bool) LogicalAnd 229 233
- Store 217(b) 234
- 235: 215(bool) Load 217(b)
- 236: 8(fvec4) Load 10(v)
- 237: 8(fvec4) Load 12(uv4)
+ Store 217(b) 234
+ 235: 215(bool) Load 217(b)
+ 236: 8(fvec4) Load 10(v)
+ 237: 8(fvec4) Load 12(uv4)
238: 220(bvec4) FOrdGreaterThanEqual 236 237
239: 215(bool) Any 238
240: 215(bool) LogicalAnd 235 239
- Store 217(b) 240
- 241: 215(bool) Load 217(b)
- 244: 220(bvec4) Load 243(ub41)
- 246: 220(bvec4) Load 245(ub42)
+ Store 217(b) 240
+ 241: 215(bool) Load 217(b)
+ 244: 220(bvec4) Load 243(ub41)
+ 246: 220(bvec4) Load 245(ub42)
247: 220(bvec4) IEqual 244 246
248: 215(bool) Any 247
249: 215(bool) LogicalAnd 241 248
- Store 217(b) 249
- 250: 215(bool) Load 217(b)
- 251: 220(bvec4) Load 243(ub41)
- 252: 220(bvec4) Load 245(ub42)
+ Store 217(b) 249
+ 250: 215(bool) Load 217(b)
+ 251: 220(bvec4) Load 243(ub41)
+ 252: 220(bvec4) Load 245(ub42)
253: 220(bvec4) INotEqual 251 252
254: 215(bool) Any 253
255: 215(bool) LogicalAnd 250 254
- Store 217(b) 255
- 256: 215(bool) Load 217(b)
- 257: 220(bvec4) Load 243(ub41)
+ Store 217(b) 255
+ 256: 215(bool) Load 217(b)
+ 257: 220(bvec4) Load 243(ub41)
258: 215(bool) Any 257
259: 215(bool) LogicalAnd 256 258
- Store 217(b) 259
- 260: 215(bool) Load 217(b)
- 261: 220(bvec4) Load 243(ub41)
+ Store 217(b) 259
+ 260: 215(bool) Load 217(b)
+ 261: 220(bvec4) Load 243(ub41)
262: 215(bool) All 261
263: 215(bool) LogicalAnd 260 262
- Store 217(b) 263
- 264: 215(bool) Load 217(b)
- 265: 220(bvec4) Load 243(ub41)
- 266: 220(bvec4) Not 265
+ Store 217(b) 263
+ 264: 215(bool) Load 217(b)
+ 265: 220(bvec4) Load 243(ub41)
+ 266: 220(bvec4) LogicalNot 265
267: 215(bool) Any 266
268: 215(bool) LogicalAnd 264 267
- Store 217(b) 268
- 269: 19(int) Load 21(i)
- 270: 19(int) Load 23(ui)
+ Store 217(b) 268
+ 269: 19(int) Load 21(i)
+ 270: 19(int) Load 23(ui)
271: 19(int) IAdd 269 270
- 272: 19(int) Load 21(i)
+ 272: 19(int) Load 21(i)
273: 19(int) IMul 271 272
- 274: 19(int) Load 23(ui)
+ 274: 19(int) Load 23(ui)
275: 19(int) ISub 273 274
- 276: 19(int) Load 21(i)
+ 276: 19(int) Load 21(i)
277: 19(int) SDiv 275 276
- Store 21(i) 277
- 278: 19(int) Load 21(i)
- 279: 19(int) Load 23(ui)
+ Store 21(i) 277
+ 278: 19(int) Load 21(i)
+ 279: 19(int) Load 23(ui)
280: 19(int) SMod 278 279
- Store 21(i) 280
- 281: 19(int) Load 21(i)
- 282: 19(int) Load 23(ui)
+ Store 21(i) 280
+ 281: 19(int) Load 21(i)
+ 282: 19(int) Load 23(ui)
283: 215(bool) IEqual 281 282
- 284: 19(int) Load 21(i)
- 285: 19(int) Load 23(ui)
+ 284: 19(int) Load 21(i)
+ 285: 19(int) Load 23(ui)
286: 215(bool) INotEqual 284 285
- 287: 19(int) Load 21(i)
- 288: 19(int) Load 23(ui)
+ 287: 19(int) Load 21(i)
+ 288: 19(int) Load 23(ui)
289: 215(bool) IEqual 287 288
290: 215(bool) LogicalAnd 286 289
- 291: 19(int) Load 21(i)
+ 291: 19(int) Load 21(i)
293: 215(bool) INotEqual 291 292
- 294: 215(bool) LogicalXor 290 293
+ 294: 215(bool) LogicalNotEqual 290 293
295: 215(bool) LogicalOr 283 294
SelectionMerge 297 None
- BranchConditional 295 296 297
+ BranchConditional 295 296 297
296: Label
- 298: 19(int) Load 21(i)
+ 298: 19(int) Load 21(i)
300: 19(int) IAdd 298 299
- Store 21(i) 300
+ Store 21(i) 300
Branch 297
297: Label
- 303: 7(float) Load 170(uf)
- 304: 7(float) Load 170(uf)
+ 303: 7(float) Load 170(uf)
+ 304: 7(float) Load 170(uf)
305: 7(float) FAdd 303 304
- 306: 7(float) Load 170(uf)
+ 306: 7(float) Load 170(uf)
307: 7(float) FMul 305 306
- 308: 7(float) Load 170(uf)
+ 308: 7(float) Load 170(uf)
309: 7(float) FSub 307 308
- 310: 7(float) Load 170(uf)
+ 310: 7(float) Load 170(uf)
311: 7(float) FDiv 309 310
- Store 302(f) 311
- 312: 8(fvec4) Load 10(v)
- 313: 7(float) ExtInst 1(GLSL.std.450) 58(length) 312
- 314: 7(float) Load 302(f)
+ Store 302(f) 311
+ 312: 8(fvec4) Load 10(v)
+ 313: 7(float) ExtInst 1(GLSL.std.450) 65(Length) 312
+ 314: 7(float) Load 302(f)
315: 7(float) FAdd 314 313
- Store 302(f) 315
- 316: 8(fvec4) Load 10(v)
- 317: 8(fvec4) Load 10(v)
- 318: 7(float) ExtInst 1(GLSL.std.450) 59(distance) 316 317
- 319: 7(float) Load 302(f)
+ Store 302(f) 315
+ 316: 8(fvec4) Load 10(v)
+ 317: 8(fvec4) Load 10(v)
+ 318: 7(float) ExtInst 1(GLSL.std.450) 66(Distance) 316 317
+ 319: 7(float) Load 302(f)
320: 7(float) FAdd 319 318
- Store 302(f) 320
- 321: 8(fvec4) Load 10(v)
- 322: 8(fvec4) Load 10(v)
+ Store 302(f) 320
+ 321: 8(fvec4) Load 10(v)
+ 322: 8(fvec4) Load 10(v)
323: 7(float) Dot 321 322
- 324: 7(float) Load 302(f)
+ 324: 7(float) Load 302(f)
325: 7(float) FAdd 324 323
- Store 302(f) 325
- 326: 7(float) Load 302(f)
- 327: 7(float) Load 170(uf)
+ Store 302(f) 325
+ 326: 7(float) Load 302(f)
+ 327: 7(float) Load 170(uf)
328: 7(float) FMul 326 327
- 329: 7(float) Load 302(f)
+ 329: 7(float) Load 302(f)
330: 7(float) FAdd 329 328
- Store 302(f) 330
- 331: 8(fvec4) Load 10(v)
+ Store 302(f) 330
+ 331: 8(fvec4) Load 10(v)
333: 332(fvec3) VectorShuffle 331 331 0 1 2
- 334: 8(fvec4) Load 10(v)
+ 334: 8(fvec4) Load 10(v)
335: 332(fvec3) VectorShuffle 334 334 0 1 2
- 336: 332(fvec3) ExtInst 1(GLSL.std.450) 60(cross) 333 335
+ 336: 332(fvec3) ExtInst 1(GLSL.std.450) 67(Cross) 333 335
337: 7(float) CompositeExtract 336 0
- 338: 7(float) Load 302(f)
+ 338: 7(float) Load 302(f)
339: 7(float) FAdd 338 337
- Store 302(f) 339
- 340: 7(float) Load 302(f)
- 341: 7(float) Load 170(uf)
+ Store 302(f) 339
+ 340: 7(float) Load 302(f)
+ 341: 7(float) Load 170(uf)
342: 215(bool) FOrdEqual 340 341
- 343: 7(float) Load 302(f)
- 344: 7(float) Load 170(uf)
+ 343: 7(float) Load 302(f)
+ 344: 7(float) Load 170(uf)
345: 215(bool) FOrdNotEqual 343 344
- 346: 7(float) Load 302(f)
+ 346: 7(float) Load 302(f)
348: 215(bool) FOrdNotEqual 346 347
349: 215(bool) LogicalAnd 345 348
350: 215(bool) LogicalOr 342 349
SelectionMerge 352 None
- BranchConditional 350 351 352
+ BranchConditional 350 351 352
351: Label
- 353: 7(float) Load 302(f)
+ 353: 7(float) Load 302(f)
355: 7(float) FAdd 353 354
- Store 302(f) 355
+ Store 302(f) 355
Branch 352
352: Label
- 356: 19(int) Load 23(ui)
- 357: 19(int) Load 21(i)
+ 356: 19(int) Load 23(ui)
+ 357: 19(int) Load 21(i)
358: 19(int) BitwiseAnd 357 356
- Store 21(i) 358
- 360: 19(int) Load 21(i)
+ Store 21(i) 358
+ 360: 19(int) Load 21(i)
361: 19(int) BitwiseOr 360 359
- Store 21(i) 361
- 362: 19(int) Load 23(ui)
- 363: 19(int) Load 21(i)
+ Store 21(i) 361
+ 362: 19(int) Load 23(ui)
+ 363: 19(int) Load 21(i)
364: 19(int) BitwiseXor 363 362
- Store 21(i) 364
- 366: 19(int) Load 21(i)
+ Store 21(i) 364
+ 366: 19(int) Load 21(i)
367: 19(int) SMod 366 365
- Store 21(i) 367
- 368: 19(int) Load 21(i)
+ Store 21(i) 367
+ 368: 19(int) Load 21(i)
369: 19(int) ShiftRightArithmetic 368 292
- Store 21(i) 369
- 370: 19(int) Load 23(ui)
- 371: 19(int) Load 21(i)
+ Store 21(i) 369
+ 370: 19(int) Load 23(ui)
+ 371: 19(int) Load 21(i)
372: 19(int) ShiftLeftLogical 371 370
- Store 21(i) 372
- 373: 19(int) Load 21(i)
+ Store 21(i) 372
+ 373: 19(int) Load 21(i)
374: 19(int) Not 373
- Store 21(i) 374
- 375: 215(bool) Load 217(b)
- 376: 215(bool) Not 375
- Store 217(b) 376
- 380: 215(bool) Load 217(b)
+ Store 21(i) 374
+ 375: 215(bool) Load 217(b)
+ 376: 215(bool) LogicalNot 375
+ Store 217(b) 376
+ 380: 215(bool) Load 217(b)
SelectionMerge 382 None
- BranchConditional 380 381 391
+ BranchConditional 380 381 391
381: Label
- 383: 19(int) Load 21(i)
+ 383: 19(int) Load 21(i)
384: 7(float) ConvertSToF 383
385: 8(fvec4) CompositeConstruct 384 384 384 384
- 386: 7(float) Load 302(f)
+ 386: 7(float) Load 302(f)
387: 8(fvec4) CompositeConstruct 386 386 386 386
388: 8(fvec4) FAdd 385 387
- 389: 8(fvec4) Load 10(v)
+ 389: 8(fvec4) Load 10(v)
390: 8(fvec4) FAdd 388 389
- Store 379 390
+ Store 379 390
Branch 382
391: Label
- 392: 8(fvec4) Load 10(v)
- Store 379 392
+ 392: 8(fvec4) Load 10(v)
+ Store 379 392
Branch 382
382: Label
- 393: 8(fvec4) Load 379
- Store 378(gl_FragColor) 393
+ 393: 8(fvec4) Load 379
+ Store 378(gl_FragColor) 393
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.accessChain.frag.out b/Test/baseResults/spv.accessChain.frag.out
old mode 100644
new mode 100755
index fc3a321..f45cc34
--- a/Test/baseResults/spv.accessChain.frag.out
+++ b/Test/baseResults/spv.accessChain.frag.out
@@ -10,9 +10,11 @@
// Id's are bound by 198
Source GLSL 420
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 9 "S"
MemberName 9(S) 0 "color"
@@ -71,7 +73,7 @@
Name 195 "param"
Decorate 66(OutColor) Location 0
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 3
9(S): TypeStruct 8(fvec3)
@@ -80,7 +82,7 @@
15: TypePointer Function 14(int)
16: TypeFunction 2 9(S) 15(ptr)
65: TypePointer Output 8(fvec3)
- 66(OutColor): 65(ptr) Variable Output
+ 66(OutColor): 65(ptr) Variable Output
67: 14(int) Constant 0
68: TypeInt 32 0
69: 68(int) Constant 0
@@ -90,72 +92,72 @@
143: 8(fvec3) ConstantComposite 142 142 142
144: TypePointer Function 9(S)
149: TypePointer UniformConstant 14(int)
- 150(u): 149(ptr) Variable UniformConstant
+ 150(u): 149(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
- 145(s): 144(ptr) Variable Function
- 151(param): 15(ptr) Variable Function
- 155(param): 15(ptr) Variable Function
- 159(param): 15(ptr) Variable Function
- 163(param): 15(ptr) Variable Function
- 167(param): 15(ptr) Variable Function
- 171(param): 15(ptr) Variable Function
- 175(param): 15(ptr) Variable Function
- 179(param): 15(ptr) Variable Function
- 183(param): 15(ptr) Variable Function
- 187(param): 15(ptr) Variable Function
- 191(param): 15(ptr) Variable Function
- 195(param): 15(ptr) Variable Function
- Store 66(OutColor) 143
- 146: 9(S) Load 145(s)
+ 145(s): 144(ptr) Variable Function
+ 151(param): 15(ptr) Variable Function
+ 155(param): 15(ptr) Variable Function
+ 159(param): 15(ptr) Variable Function
+ 163(param): 15(ptr) Variable Function
+ 167(param): 15(ptr) Variable Function
+ 171(param): 15(ptr) Variable Function
+ 175(param): 15(ptr) Variable Function
+ 179(param): 15(ptr) Variable Function
+ 183(param): 15(ptr) Variable Function
+ 187(param): 15(ptr) Variable Function
+ 191(param): 15(ptr) Variable Function
+ 195(param): 15(ptr) Variable Function
+ Store 66(OutColor) 143
+ 146: 9(S) Load 145(s)
147: 2 FunctionCall 12(GetColor1(struct-S-vf31;) 146
- 148: 9(S) Load 145(s)
- 152: 14(int) Load 150(u)
- Store 151(param) 152
+ 148: 9(S) Load 145(s)
+ 152: 14(int) Load 150(u)
+ Store 151(param) 152
153: 2 FunctionCall 19(GetColor2(struct-S-vf31;i1;) 148 151(param)
- 154: 9(S) Load 145(s)
- 156: 14(int) Load 150(u)
- Store 155(param) 156
+ 154: 9(S) Load 145(s)
+ 156: 14(int) Load 150(u)
+ Store 155(param) 156
157: 2 FunctionCall 23(GetColor3(struct-S-vf31;i1;) 154 155(param)
- 158: 9(S) Load 145(s)
- 160: 14(int) Load 150(u)
- Store 159(param) 160
+ 158: 9(S) Load 145(s)
+ 160: 14(int) Load 150(u)
+ Store 159(param) 160
161: 2 FunctionCall 27(GetColor4(struct-S-vf31;i1;) 158 159(param)
- 162: 9(S) Load 145(s)
- 164: 14(int) Load 150(u)
- Store 163(param) 164
+ 162: 9(S) Load 145(s)
+ 164: 14(int) Load 150(u)
+ Store 163(param) 164
165: 2 FunctionCall 31(GetColor5(struct-S-vf31;i1;) 162 163(param)
- 166: 9(S) Load 145(s)
- 168: 14(int) Load 150(u)
- Store 167(param) 168
+ 166: 9(S) Load 145(s)
+ 168: 14(int) Load 150(u)
+ Store 167(param) 168
169: 2 FunctionCall 35(GetColor6(struct-S-vf31;i1;) 166 167(param)
- 170: 9(S) Load 145(s)
- 172: 14(int) Load 150(u)
- Store 171(param) 172
+ 170: 9(S) Load 145(s)
+ 172: 14(int) Load 150(u)
+ Store 171(param) 172
173: 2 FunctionCall 39(GetColor7(struct-S-vf31;i1;) 170 171(param)
- 174: 9(S) Load 145(s)
- 176: 14(int) Load 150(u)
- Store 175(param) 176
+ 174: 9(S) Load 145(s)
+ 176: 14(int) Load 150(u)
+ Store 175(param) 176
177: 2 FunctionCall 43(GetColor8(struct-S-vf31;i1;) 174 175(param)
- 178: 9(S) Load 145(s)
- 180: 14(int) Load 150(u)
- Store 179(param) 180
+ 178: 9(S) Load 145(s)
+ 180: 14(int) Load 150(u)
+ Store 179(param) 180
181: 2 FunctionCall 47(GetColor9(struct-S-vf31;i1;) 178 179(param)
- 182: 9(S) Load 145(s)
- 184: 14(int) Load 150(u)
- Store 183(param) 184
+ 182: 9(S) Load 145(s)
+ 184: 14(int) Load 150(u)
+ Store 183(param) 184
185: 2 FunctionCall 51(GetColor10(struct-S-vf31;i1;) 182 183(param)
- 186: 9(S) Load 145(s)
- 188: 14(int) Load 150(u)
- Store 187(param) 188
+ 186: 9(S) Load 145(s)
+ 188: 14(int) Load 150(u)
+ Store 187(param) 188
189: 2 FunctionCall 55(GetColor11(struct-S-vf31;i1;) 186 187(param)
- 190: 9(S) Load 145(s)
- 192: 14(int) Load 150(u)
- Store 191(param) 192
+ 190: 9(S) Load 145(s)
+ 192: 14(int) Load 150(u)
+ Store 191(param) 192
193: 2 FunctionCall 59(GetColor12(struct-S-vf31;i1;) 190 191(param)
- 194: 9(S) Load 145(s)
- 196: 14(int) Load 150(u)
- Store 195(param) 196
+ 194: 9(S) Load 145(s)
+ 196: 14(int) Load 150(u)
+ Store 195(param) 196
197: 2 FunctionCall 63(GetColor13(struct-S-vf31;i1;) 194 195(param)
Branch 6
6: Label
@@ -165,49 +167,49 @@
11(i): 9(S) FunctionParameter
13: Label
70: 7(float) CompositeExtract 11(i) 0 0
- 71: 8(fvec3) Load 66(OutColor)
+ 71: 8(fvec3) Load 66(OutColor)
72: 8(fvec3) CompositeConstruct 70 70 70
73: 8(fvec3) FAdd 71 72
- Store 66(OutColor) 73
+ Store 66(OutColor) 73
Return
FunctionEnd
19(GetColor2(struct-S-vf31;i1;): 2 Function None 16
17(i): 9(S) FunctionParameter
18(comp): 15(ptr) FunctionParameter
20: Label
- 74: 14(int) Load 18(comp)
+ 74: 14(int) Load 18(comp)
75: 8(fvec3) CompositeExtract 17(i) 0
76: 7(float) VectorExtractDynamic 75 74
- 77: 8(fvec3) Load 66(OutColor)
+ 77: 8(fvec3) Load 66(OutColor)
78: 8(fvec3) CompositeConstruct 76 76 76
79: 8(fvec3) FAdd 77 78
- Store 66(OutColor) 79
+ Store 66(OutColor) 79
Return
FunctionEnd
23(GetColor3(struct-S-vf31;i1;): 2 Function None 16
21(i): 9(S) FunctionParameter
22(comp): 15(ptr) FunctionParameter
24: Label
- 80: 14(int) Load 22(comp)
+ 80: 14(int) Load 22(comp)
81: 8(fvec3) CompositeExtract 21(i) 0
82: 7(float) VectorExtractDynamic 81 80
- 83: 8(fvec3) Load 66(OutColor)
+ 83: 8(fvec3) Load 66(OutColor)
84: 8(fvec3) CompositeConstruct 82 82 82
85: 8(fvec3) FAdd 83 84
- Store 66(OutColor) 85
+ Store 66(OutColor) 85
Return
FunctionEnd
27(GetColor4(struct-S-vf31;i1;): 2 Function None 16
25(i): 9(S) FunctionParameter
26(comp): 15(ptr) FunctionParameter
28: Label
- 86: 14(int) Load 26(comp)
+ 86: 14(int) Load 26(comp)
87: 8(fvec3) CompositeExtract 25(i) 0
88: 7(float) VectorExtractDynamic 87 86
- 89: 8(fvec3) Load 66(OutColor)
+ 89: 8(fvec3) Load 66(OutColor)
90: 8(fvec3) CompositeConstruct 88 88 88
91: 8(fvec3) FAdd 89 90
- Store 66(OutColor) 91
+ Store 66(OutColor) 91
Return
FunctionEnd
31(GetColor5(struct-S-vf31;i1;): 2 Function None 16
@@ -215,23 +217,23 @@
30(comp): 15(ptr) FunctionParameter
32: Label
92: 8(fvec3) CompositeExtract 29(i) 0
- 93: 8(fvec3) Load 66(OutColor)
+ 93: 8(fvec3) Load 66(OutColor)
94: 8(fvec3) FAdd 93 92
- Store 66(OutColor) 94
+ Store 66(OutColor) 94
Return
FunctionEnd
35(GetColor6(struct-S-vf31;i1;): 2 Function None 16
33(i): 9(S) FunctionParameter
34(comp): 15(ptr) FunctionParameter
36: Label
- 95: 14(int) Load 34(comp)
+ 95: 14(int) Load 34(comp)
96: 8(fvec3) CompositeExtract 33(i) 0
98: 97(fvec2) VectorShuffle 96 96 1 0
99: 7(float) VectorExtractDynamic 98 95
- 100: 8(fvec3) Load 66(OutColor)
+ 100: 8(fvec3) Load 66(OutColor)
101: 8(fvec3) CompositeConstruct 99 99 99
102: 8(fvec3) FAdd 100 101
- Store 66(OutColor) 102
+ Store 66(OutColor) 102
Return
FunctionEnd
39(GetColor7(struct-S-vf31;i1;): 2 Function None 16
@@ -240,12 +242,12 @@
40: Label
103: 8(fvec3) CompositeExtract 37(i) 0
104: 97(fvec2) VectorShuffle 103 103 0 1
- 105: 8(fvec3) Load 66(OutColor)
+ 105: 8(fvec3) Load 66(OutColor)
106: 97(fvec2) VectorShuffle 105 105 0 1
107: 97(fvec2) FAdd 106 104
- 108: 8(fvec3) Load 66(OutColor)
+ 108: 8(fvec3) Load 66(OutColor)
109: 8(fvec3) VectorShuffle 108 107 3 4 2
- Store 66(OutColor) 109
+ Store 66(OutColor) 109
Return
FunctionEnd
43(GetColor8(struct-S-vf31;i1;): 2 Function None 16
@@ -253,10 +255,10 @@
42(comp): 15(ptr) FunctionParameter
44: Label
111: 7(float) CompositeExtract 41(i) 0 2
- 112: 8(fvec3) Load 66(OutColor)
+ 112: 8(fvec3) Load 66(OutColor)
113: 8(fvec3) CompositeConstruct 111 111 111
114: 8(fvec3) FAdd 112 113
- Store 66(OutColor) 114
+ Store 66(OutColor) 114
Return
FunctionEnd
47(GetColor9(struct-S-vf31;i1;): 2 Function None 16
@@ -264,12 +266,12 @@
46(comp): 15(ptr) FunctionParameter
48: Label
115: 8(fvec3) CompositeExtract 45(i) 0
- 116: 8(fvec3) Load 66(OutColor)
+ 116: 8(fvec3) Load 66(OutColor)
117: 8(fvec3) VectorShuffle 116 116 2 0 1
118: 8(fvec3) FAdd 117 115
- 119: 8(fvec3) Load 66(OutColor)
+ 119: 8(fvec3) Load 66(OutColor)
120: 8(fvec3) VectorShuffle 119 118 4 5 3
- Store 66(OutColor) 120
+ Store 66(OutColor) 120
Return
FunctionEnd
51(GetColor10(struct-S-vf31;i1;): 2 Function None 16
@@ -278,12 +280,12 @@
52: Label
121: 8(fvec3) CompositeExtract 49(i) 0
122: 97(fvec2) VectorShuffle 121 121 0 1
- 123: 8(fvec3) Load 66(OutColor)
+ 123: 8(fvec3) Load 66(OutColor)
124: 97(fvec2) VectorShuffle 123 123 2 1
125: 97(fvec2) FAdd 124 122
- 126: 8(fvec3) Load 66(OutColor)
+ 126: 8(fvec3) Load 66(OutColor)
127: 8(fvec3) VectorShuffle 126 125 0 4 3
- Store 66(OutColor) 127
+ Store 66(OutColor) 127
Return
FunctionEnd
55(GetColor11(struct-S-vf31;i1;): 2 Function None 16
@@ -292,26 +294,26 @@
56: Label
128: 8(fvec3) CompositeExtract 53(i) 0
129: 97(fvec2) VectorShuffle 128 128 0 1
- 130: 8(fvec3) Load 66(OutColor)
+ 130: 8(fvec3) Load 66(OutColor)
131: 97(fvec2) VectorShuffle 130 130 0 2
132: 97(fvec2) FAdd 131 129
- 133: 8(fvec3) Load 66(OutColor)
+ 133: 8(fvec3) Load 66(OutColor)
134: 8(fvec3) VectorShuffle 133 132 3 1 4
- Store 66(OutColor) 134
+ Store 66(OutColor) 134
Return
FunctionEnd
59(GetColor12(struct-S-vf31;i1;): 2 Function None 16
57(i): 9(S) FunctionParameter
58(comp): 15(ptr) FunctionParameter
60: Label
- 135: 14(int) Load 58(comp)
+ 135: 14(int) Load 58(comp)
136: 7(float) CompositeExtract 57(i) 0 0
- 137: 8(fvec3) Load 66(OutColor)
+ 137: 8(fvec3) Load 66(OutColor)
138: 7(float) VectorExtractDynamic 137 135
139: 7(float) FAdd 138 136
- 140: 8(fvec3) Load 66(OutColor)
+ 140: 8(fvec3) Load 66(OutColor)
141: 8(fvec3) VectorInsertDynamic 140 139 135
- Store 66(OutColor) 141
+ Store 66(OutColor) 141
Return
FunctionEnd
63(GetColor13(struct-S-vf31;i1;): 2 Function None 16
diff --git a/Test/baseResults/spv.always-discard.frag.out b/Test/baseResults/spv.always-discard.frag.out
old mode 100644
new mode 100755
index b57b543..ffcd1a9
--- a/Test/baseResults/spv.always-discard.frag.out
+++ b/Test/baseResults/spv.always-discard.frag.out
@@ -8,9 +8,11 @@
// Id's are bound by 81
Source GLSL 110
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 10 "white"
Name 13 "black"
@@ -20,10 +22,10 @@
Name 28 "y"
Name 33 "radius"
Name 56 "gl_FragColor"
- Decorate 22(tex_coord) Smooth
+ Decorate 22(tex_coord) Smooth
Decorate 56(gl_FragColor) BuiltIn FragColor
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypePointer Function 8(fvec4)
@@ -34,96 +36,96 @@
18: TypePointer Function 7(float)
20: TypeVector 7(float) 2
21: TypePointer Input 20(fvec2)
- 22(tex_coord): 21(ptr) Variable Input
+ 22(tex_coord): 21(ptr) Variable Input
25: 7(float) Constant 1073741824
43: TypeBool
48: 7(float) Constant 1066192077
55: TypePointer Output 8(fvec4)
-56(gl_FragColor): 55(ptr) Variable Output
+56(gl_FragColor): 55(ptr) Variable Output
59: 7(float) Constant 1067030938
68: 7(float) Constant 1061158912
73: 7(float) Constant 1098907648
4(main): 2 Function None 3
5: Label
- 10(white): 9(ptr) Variable Function
- 13(black): 9(ptr) Variable Function
- 16(color): 9(ptr) Variable Function
- 19(x): 18(ptr) Variable Function
- 28(y): 18(ptr) Variable Function
- 33(radius): 18(ptr) Variable Function
- Store 10(white) 12
- Store 13(black) 15
- 17: 8(fvec4) Load 10(white)
- Store 16(color) 17
- 23: 20(fvec2) Load 22(tex_coord)
+ 10(white): 9(ptr) Variable Function
+ 13(black): 9(ptr) Variable Function
+ 16(color): 9(ptr) Variable Function
+ 19(x): 18(ptr) Variable Function
+ 28(y): 18(ptr) Variable Function
+ 33(radius): 18(ptr) Variable Function
+ Store 10(white) 12
+ Store 13(black) 15
+ 17: 8(fvec4) Load 10(white)
+ Store 16(color) 17
+ 23: 20(fvec2) Load 22(tex_coord)
24: 7(float) CompositeExtract 23 0
26: 7(float) FMul 24 25
27: 7(float) FSub 26 11
- Store 19(x) 27
- 29: 20(fvec2) Load 22(tex_coord)
+ Store 19(x) 27
+ 29: 20(fvec2) Load 22(tex_coord)
30: 7(float) CompositeExtract 29 1
31: 7(float) FMul 30 25
32: 7(float) FSub 31 11
- Store 28(y) 32
- 34: 7(float) Load 19(x)
- 35: 7(float) Load 19(x)
+ Store 28(y) 32
+ 34: 7(float) Load 19(x)
+ 35: 7(float) Load 19(x)
36: 7(float) FMul 34 35
- 37: 7(float) Load 28(y)
- 38: 7(float) Load 28(y)
+ 37: 7(float) Load 28(y)
+ 38: 7(float) Load 28(y)
39: 7(float) FMul 37 38
40: 7(float) FAdd 36 39
- 41: 7(float) ExtInst 1(GLSL.std.450) 28(sqrt) 40
- Store 33(radius) 41
- 42: 7(float) Load 33(radius)
+ 41: 7(float) ExtInst 1(GLSL.std.450) 31(Sqrt) 40
+ Store 33(radius) 41
+ 42: 7(float) Load 33(radius)
44: 43(bool) FOrdGreaterThan 42 11
SelectionMerge 46 None
- BranchConditional 44 45 46
+ BranchConditional 44 45 46
45: Label
- 47: 7(float) Load 33(radius)
+ 47: 7(float) Load 33(radius)
49: 43(bool) FOrdGreaterThan 47 48
SelectionMerge 51 None
- BranchConditional 49 50 51
+ BranchConditional 49 50 51
50: Label
- 52: 8(fvec4) Load 16(color)
+ 52: 8(fvec4) Load 16(color)
53: 8(fvec4) CompositeConstruct 11 11 11 11
54: 8(fvec4) FAdd 52 53
- Store 16(color) 54
+ Store 16(color) 54
Branch 51
51: Label
- 57: 8(fvec4) Load 16(color)
- Store 56(gl_FragColor) 57
- 58: 7(float) Load 33(radius)
+ 57: 8(fvec4) Load 16(color)
+ Store 56(gl_FragColor) 57
+ 58: 7(float) Load 33(radius)
60: 43(bool) FOrdGreaterThan 58 59
SelectionMerge 62 None
- BranchConditional 60 61 62
+ BranchConditional 60 61 62
61: Label
- 63: 8(fvec4) Load 16(color)
+ 63: 8(fvec4) Load 16(color)
64: 8(fvec4) CompositeConstruct 11 11 11 11
65: 8(fvec4) FAdd 63 64
- Store 16(color) 65
+ Store 16(color) 65
Branch 62
62: Label
Branch 46
46: Label
Kill
66: Label
- 67: 7(float) Load 33(radius)
+ 67: 7(float) Load 33(radius)
69: 43(bool) FOrdGreaterThanEqual 67 68
SelectionMerge 71 None
- BranchConditional 69 70 71
+ BranchConditional 69 70 71
70: Label
- 72: 7(float) Load 33(radius)
- 74: 7(float) ExtInst 1(GLSL.std.450) 23(pow) 72 73
+ 72: 7(float) Load 33(radius)
+ 74: 7(float) ExtInst 1(GLSL.std.450) 26(Pow) 72 73
75: 7(float) FDiv 74 25
- 76: 7(float) ExtInst 1(GLSL.std.450) 3(abs) 75
- 77: 8(fvec4) Load 16(color)
+ 76: 7(float) ExtInst 1(GLSL.std.450) 4(FAbs) 75
+ 77: 8(fvec4) Load 16(color)
78: 8(fvec4) CompositeConstruct 76 76 76 76
79: 8(fvec4) FSub 77 78
- Store 16(color) 79
+ Store 16(color) 79
Branch 71
71: Label
- 80: 8(fvec4) Load 16(color)
- Store 56(gl_FragColor) 80
+ 80: 8(fvec4) Load 16(color)
+ Store 56(gl_FragColor) 80
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.always-discard2.frag.out b/Test/baseResults/spv.always-discard2.frag.out
old mode 100644
new mode 100755
index 06cc543..767558e
--- a/Test/baseResults/spv.always-discard2.frag.out
+++ b/Test/baseResults/spv.always-discard2.frag.out
@@ -8,9 +8,11 @@
// Id's are bound by 37
Source GLSL 110
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 10 "white"
Name 13 "black"
@@ -19,10 +21,10 @@
Name 22 "tex_coord"
Name 28 "y"
Name 35 "gl_FragColor"
- Decorate 22(tex_coord) Smooth
+ Decorate 22(tex_coord) Smooth
Decorate 35(gl_FragColor) BuiltIn FragColor
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypePointer Function 8(fvec4)
@@ -33,31 +35,31 @@
18: TypePointer Function 7(float)
20: TypeVector 7(float) 2
21: TypePointer Input 20(fvec2)
- 22(tex_coord): 21(ptr) Variable Input
+ 22(tex_coord): 21(ptr) Variable Input
25: 7(float) Constant 1073741824
34: TypePointer Output 8(fvec4)
-35(gl_FragColor): 34(ptr) Variable Output
+35(gl_FragColor): 34(ptr) Variable Output
4(main): 2 Function None 3
5: Label
- 10(white): 9(ptr) Variable Function
- 13(black): 9(ptr) Variable Function
- 16(color): 9(ptr) Variable Function
- 19(x): 18(ptr) Variable Function
- 28(y): 18(ptr) Variable Function
- Store 10(white) 12
- Store 13(black) 15
- 17: 8(fvec4) Load 10(white)
- Store 16(color) 17
- 23: 20(fvec2) Load 22(tex_coord)
+ 10(white): 9(ptr) Variable Function
+ 13(black): 9(ptr) Variable Function
+ 16(color): 9(ptr) Variable Function
+ 19(x): 18(ptr) Variable Function
+ 28(y): 18(ptr) Variable Function
+ Store 10(white) 12
+ Store 13(black) 15
+ 17: 8(fvec4) Load 10(white)
+ Store 16(color) 17
+ 23: 20(fvec2) Load 22(tex_coord)
24: 7(float) CompositeExtract 23 0
26: 7(float) FMul 24 25
27: 7(float) FSub 26 11
- Store 19(x) 27
- 29: 20(fvec2) Load 22(tex_coord)
+ Store 19(x) 27
+ 29: 20(fvec2) Load 22(tex_coord)
30: 7(float) CompositeExtract 29 1
31: 7(float) FMul 30 25
32: 7(float) FSub 31 11
- Store 28(y) 32
+ Store 28(y) 32
Kill
6: Label
Return
diff --git a/Test/baseResults/spv.atomic.comp.out b/Test/baseResults/spv.atomic.comp.out
old mode 100644
new mode 100755
index c518380..4396dff
--- a/Test/baseResults/spv.atomic.comp.out
+++ b/Test/baseResults/spv.atomic.comp.out
@@ -8,88 +8,80 @@
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 75
+// Id's are bound by 77
Source ESSL 310
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint GLCompute 4
+ EntryPoint GLCompute 4 "main"
Name 4 "main"
Name 11 "func(au1;"
Name 10 "c"
Name 13 "atoms("
- Name 20 "counter"
- Name 21 "param"
- Name 24 "val"
- Name 28 "countArr"
- Name 38 "origi"
- Name 40 "atomi"
- Name 44 "origu"
- Name 46 "atomu"
- Name 48 "value"
- Name 72 "arrX"
- Name 73 "arrY"
- Name 74 "arrZ"
- Decorate 20(counter) PrecisionHigh
- Decorate 20(counter) Binding 0
- Decorate 24(val) PrecisionHigh
- Decorate 28(countArr) PrecisionHigh
- Decorate 28(countArr) Binding 0
- Decorate 38(origi) PrecisionHigh
- Decorate 40(atomi) PrecisionHigh
- Decorate 44(origu) PrecisionHigh
- Decorate 46(atomu) PrecisionHigh
- Decorate 48(value) PrecisionHigh
- Decorate 72(arrX) PrecisionHigh
- Decorate 72(arrX) NoStaticUse
- Decorate 73(arrY) PrecisionHigh
- Decorate 73(arrY) NoStaticUse
- Decorate 74(arrZ) PrecisionHigh
- Decorate 74(arrZ) NoStaticUse
+ Name 23 "counter"
+ Name 24 "param"
+ Name 27 "val"
+ Name 31 "countArr"
+ Name 41 "origi"
+ Name 43 "atomi"
+ Name 47 "origu"
+ Name 49 "atomu"
+ Name 51 "value"
+ Name 74 "arrX"
+ Name 75 "arrY"
+ Name 76 "arrZ"
+ Decorate 23(counter) Binding 0
+ Decorate 31(countArr) Binding 0
+ Decorate 74(arrX) NoStaticUse
+ Decorate 75(arrY) NoStaticUse
+ Decorate 76(arrZ) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeInt 32 0
8: TypePointer Function 7(int)
9: TypeFunction 7(int) 8(ptr)
- 19: TypePointer UniformConstant 7(int)
- 20(counter): 19(ptr) Variable UniformConstant
- 25: 7(int) Constant 4
- 26: TypeArray 7(int) 25
- 27: TypePointer UniformConstant 26
- 28(countArr): 27(ptr) Variable UniformConstant
- 29: TypeInt 32 1
- 30: 29(int) Constant 2
- 37: TypePointer Function 29(int)
- 39: TypePointer WorkgroupLocal 29(int)
- 40(atomi): 39(ptr) Variable WorkgroupLocal
- 42: 29(int) Constant 3
- 45: TypePointer WorkgroupLocal 7(int)
- 46(atomu): 45(ptr) Variable WorkgroupLocal
- 48(value): 19(ptr) Variable UniformConstant
- 52: 7(int) Constant 7
- 60: 29(int) Constant 7
- 66: 7(int) Constant 10
- 69: 7(int) Constant 1
- 70: TypeArray 29(int) 69
- 71: TypePointer PrivateGlobal 70
- 72(arrX): 71(ptr) Variable PrivateGlobal
- 73(arrY): 71(ptr) Variable PrivateGlobal
- 74(arrZ): 71(ptr) Variable PrivateGlobal
+ 16: 7(int) Constant 1
+ 17: 7(int) Constant 0
+ 21: 7(int) Constant 256
+ 22: TypePointer UniformConstant 7(int)
+ 23(counter): 22(ptr) Variable UniformConstant
+ 28: 7(int) Constant 4
+ 29: TypeArray 7(int) 28
+ 30: TypePointer UniformConstant 29
+ 31(countArr): 30(ptr) Variable UniformConstant
+ 32: TypeInt 32 1
+ 33: 32(int) Constant 2
+ 40: TypePointer Function 32(int)
+ 42: TypePointer WorkgroupLocal 32(int)
+ 43(atomi): 42(ptr) Variable WorkgroupLocal
+ 45: 32(int) Constant 3
+ 48: TypePointer WorkgroupLocal 7(int)
+ 49(atomu): 48(ptr) Variable WorkgroupLocal
+ 51(value): 22(ptr) Variable UniformConstant
+ 55: 7(int) Constant 7
+ 63: 32(int) Constant 7
+ 69: 7(int) Constant 10
+ 72: TypeArray 32(int) 16
+ 73: TypePointer PrivateGlobal 72
+ 74(arrX): 73(ptr) Variable PrivateGlobal
+ 75(arrY): 73(ptr) Variable PrivateGlobal
+ 76(arrZ): 73(ptr) Variable PrivateGlobal
4(main): 2 Function None 3
5: Label
- 21(param): 8(ptr) Variable Function
- 24(val): 8(ptr) Variable Function
- MemoryBarrier Device AtomicCounterMemory
- 22: 7(int) Load 20(counter)
- Store 21(param) 22
- 23: 7(int) FunctionCall 11(func(au1;) 21(param)
- 31: 19(ptr) AccessChain 28(countArr) 30
- 32: 7(int) Load 31
- 33: 7(int) AtomicLoad 32 Device None
- 34: 7(int) Load 31
- Store 24(val) 34
- 35: 7(int) Load 20(counter)
- 36: 7(int) AtomicIDecrement 35 Device None
+ 24(param): 8(ptr) Variable Function
+ 27(val): 8(ptr) Variable Function
+ MemoryBarrier 16 21
+ 25: 7(int) Load 23(counter)
+ Store 24(param) 25
+ 26: 7(int) FunctionCall 11(func(au1;) 24(param)
+ 34: 22(ptr) AccessChain 31(countArr) 33
+ 35: 7(int) Load 34
+ 36: 7(int) AtomicLoad 35 16 17
+ 37: 7(int) Load 34
+ Store 27(val) 37
+ 38: 7(int) Load 23(counter)
+ 39: 7(int) AtomicIDecrement 38 16 17
Branch 6
6: Label
Return
@@ -97,42 +89,42 @@
11(func(au1;): 7(int) Function None 9
10(c): 8(ptr) FunctionParameter
12: Label
- 15: 7(int) Load 10(c)
- 16: 7(int) AtomicIIncrement 15 Device None
- 17: 7(int) Load 10(c)
- ReturnValue 17
+ 15: 7(int) Load 10(c)
+ 18: 7(int) AtomicIIncrement 15 16 17
+ 19: 7(int) Load 10(c)
+ ReturnValue 19
FunctionEnd
13(atoms(): 2 Function None 3
14: Label
- 38(origi): 37(ptr) Variable Function
- 44(origu): 8(ptr) Variable Function
- 41: 29(int) Load 40(atomi)
- 43: 29(int) AtomicIAdd 41 Device None 42
- Store 38(origi) 43
- 47: 7(int) Load 46(atomu)
- 49: 7(int) Load 48(value)
- 50: 7(int) AtomicAnd 47 Device None 49
- Store 44(origu) 50
- 51: 7(int) Load 46(atomu)
- 53: 7(int) AtomicOr 51 Device None 52
- Store 44(origu) 53
- 54: 7(int) Load 46(atomu)
- 55: 7(int) AtomicXor 54 Device None 52
- Store 44(origu) 55
- 56: 7(int) Load 46(atomu)
- 57: 7(int) Load 48(value)
- 58: 7(int) AtomicIMin 56 Device None 57
- Store 44(origu) 58
- 59: 29(int) Load 40(atomi)
- 61: 29(int) AtomicIMax 59 Device None 60
- Store 38(origi) 61
- 62: 29(int) Load 40(atomi)
- 63: 29(int) Load 38(origi)
- 64: 29(int) AtomicExchange 62 Device None 63
- Store 38(origi) 64
- 65: 7(int) Load 46(atomu)
- 67: 7(int) Load 48(value)
- 68: 7(int) AtomicCompareExchange 65 Device None 66 67
- Store 44(origu) 68
+ 41(origi): 40(ptr) Variable Function
+ 47(origu): 8(ptr) Variable Function
+ 44: 32(int) Load 43(atomi)
+ 46: 32(int) AtomicIAdd 44 16 17 45
+ Store 41(origi) 46
+ 50: 7(int) Load 49(atomu)
+ 52: 7(int) Load 51(value)
+ 53: 7(int) AtomicAnd 50 16 17 52
+ Store 47(origu) 53
+ 54: 7(int) Load 49(atomu)
+ 56: 7(int) AtomicOr 54 16 17 55
+ Store 47(origu) 56
+ 57: 7(int) Load 49(atomu)
+ 58: 7(int) AtomicXor 57 16 17 55
+ Store 47(origu) 58
+ 59: 7(int) Load 49(atomu)
+ 60: 7(int) Load 51(value)
+ 61: 7(int) AtomicSMin 59 16 17 60
+ Store 47(origu) 61
+ 62: 32(int) Load 43(atomi)
+ 64: 32(int) AtomicSMax 62 16 17 63
+ Store 41(origi) 64
+ 65: 32(int) Load 43(atomi)
+ 66: 32(int) Load 41(origi)
+ 67: 32(int) AtomicExchange 65 16 17 66
+ Store 41(origi) 67
+ 68: 7(int) Load 49(atomu)
+ 70: 7(int) Load 51(value)
+ 71: 7(int) AtomicCompareExchange 68 16 17 69 70
+ Store 47(origu) 71
Return
FunctionEnd
diff --git a/Test/baseResults/spv.conditionalDiscard.frag.out b/Test/baseResults/spv.conditionalDiscard.frag.out
old mode 100644
new mode 100755
index ea21a72..b5488af
--- a/Test/baseResults/spv.conditionalDiscard.frag.out
+++ b/Test/baseResults/spv.conditionalDiscard.frag.out
@@ -5,56 +5,59 @@
// Module Version 99
// Generated by (magic number): 51a00bb
-// Id's are bound by 36
+// Id's are bound by 37
Source GLSL 110
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 10 "v"
- Name 13 "tex"
- Name 17 "coord"
- Name 34 "gl_FragColor"
- Decorate 17(coord) Smooth
- Decorate 34(gl_FragColor) BuiltIn FragColor
+ Name 14 "tex"
+ Name 18 "coord"
+ Name 35 "gl_FragColor"
+ Decorate 18(coord) Smooth
+ Decorate 35(gl_FragColor) BuiltIn FragColor
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypePointer Function 8(fvec4)
- 11: TypeSampler7(float) 2D filter+texture
- 12: TypePointer UniformConstant 11
- 13(tex): 12(ptr) Variable UniformConstant
- 15: TypeVector 7(float) 2
- 16: TypePointer Input 15(fvec2)
- 17(coord): 16(ptr) Variable Input
- 21: 7(float) Constant 1036831949
- 22: 7(float) Constant 1045220557
- 23: 7(float) Constant 1050253722
- 24: 7(float) Constant 1053609165
- 25: 8(fvec4) ConstantComposite 21 22 23 24
- 26: TypeBool
- 27: TypeVector 26(bool) 4
- 33: TypePointer Output 8(fvec4)
-34(gl_FragColor): 33(ptr) Variable Output
+ 11: TypeImage 7(float) 2D sampled format:Unknown
+ 12: TypeSampledImage 11
+ 13: TypePointer UniformConstant 12
+ 14(tex): 13(ptr) Variable UniformConstant
+ 16: TypeVector 7(float) 2
+ 17: TypePointer Input 16(fvec2)
+ 18(coord): 17(ptr) Variable Input
+ 22: 7(float) Constant 1036831949
+ 23: 7(float) Constant 1045220557
+ 24: 7(float) Constant 1050253722
+ 25: 7(float) Constant 1053609165
+ 26: 8(fvec4) ConstantComposite 22 23 24 25
+ 27: TypeBool
+ 28: TypeVector 27(bool) 4
+ 34: TypePointer Output 8(fvec4)
+35(gl_FragColor): 34(ptr) Variable Output
4(main): 2 Function None 3
5: Label
- 10(v): 9(ptr) Variable Function
- 14: 11 Load 13(tex)
- 18: 15(fvec2) Load 17(coord)
- 19: 8(fvec4) TextureSample 14 18
- Store 10(v) 19
- 20: 8(fvec4) Load 10(v)
- 28: 27(bvec4) FOrdEqual 20 25
- 29: 26(bool) All 28
- SelectionMerge 31 None
- BranchConditional 29 30 31
- 30: Label
+ 10(v): 9(ptr) Variable Function
+ 15: 12 Load 14(tex)
+ 19: 16(fvec2) Load 18(coord)
+ 20: 8(fvec4) ImageSampleImplicitLod 15 19
+ Store 10(v) 20
+ 21: 8(fvec4) Load 10(v)
+ 29: 28(bvec4) FOrdEqual 21 26
+ 30: 27(bool) All 29
+ SelectionMerge 32 None
+ BranchConditional 30 31 32
+ 31: Label
Kill
- 31: Label
- 35: 8(fvec4) Load 10(v)
- Store 34(gl_FragColor) 35
+ 32: Label
+ 36: 8(fvec4) Load 10(v)
+ Store 35(gl_FragColor) 36
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.conversion.frag.out b/Test/baseResults/spv.conversion.frag.out
old mode 100644
new mode 100755
index f8ba2cd..ebe95e0
--- a/Test/baseResults/spv.conversion.frag.out
+++ b/Test/baseResults/spv.conversion.frag.out
@@ -8,9 +8,11 @@
// Id's are bound by 444
Source GLSL 130
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 9 "b"
Name 12 "u_i"
@@ -51,54 +53,54 @@
Name 439 "i_f2"
Name 441 "i_f3"
Name 443 "i_f4"
- Decorate 40(i_i) Flat
- Decorate 54(i_f) Smooth
- Decorate 158(i_i4) Flat
+ Decorate 40(i_i) Flat
+ Decorate 54(i_f) Smooth
+ Decorate 158(i_i4) Flat
Decorate 313(gl_FragColor) BuiltIn FragColor
- Decorate 417(u_b) NoStaticUse
- Decorate 419(u_b2) NoStaticUse
- Decorate 421(u_b3) NoStaticUse
- Decorate 423(u_b4) NoStaticUse
- Decorate 425(u_i2) NoStaticUse
- Decorate 427(u_i3) NoStaticUse
- Decorate 429(u_i4) NoStaticUse
- Decorate 430(i_b) NoStaticUse
- Decorate 431(i_b2) NoStaticUse
- Decorate 432(i_b3) NoStaticUse
- Decorate 433(i_b4) NoStaticUse
- Decorate 435(i_i2) Flat
- Decorate 435(i_i2) NoStaticUse
- Decorate 437(i_i3) Flat
- Decorate 437(i_i3) NoStaticUse
- Decorate 439(i_f2) Smooth
- Decorate 439(i_f2) NoStaticUse
- Decorate 441(i_f3) Smooth
- Decorate 441(i_f3) NoStaticUse
- Decorate 443(i_f4) Smooth
- Decorate 443(i_f4) NoStaticUse
+ Decorate 417(u_b) NoStaticUse
+ Decorate 419(u_b2) NoStaticUse
+ Decorate 421(u_b3) NoStaticUse
+ Decorate 423(u_b4) NoStaticUse
+ Decorate 425(u_i2) NoStaticUse
+ Decorate 427(u_i3) NoStaticUse
+ Decorate 429(u_i4) NoStaticUse
+ Decorate 430(i_b) NoStaticUse
+ Decorate 431(i_b2) NoStaticUse
+ Decorate 432(i_b3) NoStaticUse
+ Decorate 433(i_b4) NoStaticUse
+ Decorate 435(i_i2) Flat
+ Decorate 435(i_i2) NoStaticUse
+ Decorate 437(i_i3) Flat
+ Decorate 437(i_i3) NoStaticUse
+ Decorate 439(i_f2) Smooth
+ Decorate 439(i_f2) NoStaticUse
+ Decorate 441(i_f3) Smooth
+ Decorate 441(i_f3) NoStaticUse
+ Decorate 443(i_f4) Smooth
+ Decorate 443(i_f4) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeBool
8: TypePointer Function 7(bool)
10: TypeInt 32 1
11: TypePointer UniformConstant 10(int)
- 12(u_i): 11(ptr) Variable UniformConstant
+ 12(u_i): 11(ptr) Variable UniformConstant
14: TypeInt 32 0
15: 14(int) Constant 0
17: TypeFloat 32
18: TypePointer UniformConstant 17(float)
- 19(u_f): 18(ptr) Variable UniformConstant
+ 19(u_f): 18(ptr) Variable UniformConstant
21: 17(float) Constant 0
24: TypeVector 7(bool) 2
25: TypePointer Function 24(bvec2)
32: TypeVector 7(bool) 3
33: TypePointer Function 32(bvec3)
39: TypePointer Input 10(int)
- 40(i_i): 39(ptr) Variable Input
+ 40(i_i): 39(ptr) Variable Input
44: TypeVector 7(bool) 4
45: TypePointer Function 44(bvec4)
53: TypePointer Input 17(float)
- 54(i_f): 53(ptr) Variable Input
+ 54(i_f): 53(ptr) Variable Input
58: TypePointer Function 10(int)
63: 10(int) Constant 0
64: 10(int) Constant 1
@@ -106,21 +108,21 @@
68: TypePointer Function 67(ivec2)
70: TypeVector 17(float) 2
71: TypePointer UniformConstant 70(fvec2)
- 72(u_f2): 71(ptr) Variable UniformConstant
+ 72(u_f2): 71(ptr) Variable UniformConstant
76: 67(ivec2) ConstantComposite 63 63
77: 67(ivec2) ConstantComposite 64 64
80: TypeVector 10(int) 3
81: TypePointer Function 80(ivec3)
83: TypeVector 17(float) 3
84: TypePointer UniformConstant 83(fvec3)
- 85(u_f3): 84(ptr) Variable UniformConstant
+ 85(u_f3): 84(ptr) Variable UniformConstant
89: 80(ivec3) ConstantComposite 63 63 63
90: 80(ivec3) ConstantComposite 64 64 64
93: TypeVector 10(int) 4
94: TypePointer Function 93(ivec4)
96: TypeVector 17(float) 4
97: TypePointer UniformConstant 96(fvec4)
- 98(u_f4): 97(ptr) Variable UniformConstant
+ 98(u_f4): 97(ptr) Variable UniformConstant
102: 93(ivec4) ConstantComposite 63 63 63 63
103: 93(ivec4) ConstantComposite 64 64 64 64
106: TypePointer Function 17(float)
@@ -135,442 +137,442 @@
151: 96(fvec4) ConstantComposite 21 21 21 21
152: 96(fvec4) ConstantComposite 125 125 125 125
157: TypePointer Input 93(ivec4)
- 158(i_i4): 157(ptr) Variable Input
+ 158(i_i4): 157(ptr) Variable Input
160: TypeVector 14(int) 4
161: 160(ivec4) ConstantComposite 15 15 15 15
312: TypePointer Output 96(fvec4)
-313(gl_FragColor): 312(ptr) Variable Output
+313(gl_FragColor): 312(ptr) Variable Output
416: TypePointer UniformConstant 7(bool)
- 417(u_b): 416(ptr) Variable UniformConstant
+ 417(u_b): 416(ptr) Variable UniformConstant
418: TypePointer UniformConstant 24(bvec2)
- 419(u_b2): 418(ptr) Variable UniformConstant
+ 419(u_b2): 418(ptr) Variable UniformConstant
420: TypePointer UniformConstant 32(bvec3)
- 421(u_b3): 420(ptr) Variable UniformConstant
+ 421(u_b3): 420(ptr) Variable UniformConstant
422: TypePointer UniformConstant 44(bvec4)
- 423(u_b4): 422(ptr) Variable UniformConstant
+ 423(u_b4): 422(ptr) Variable UniformConstant
424: TypePointer UniformConstant 67(ivec2)
- 425(u_i2): 424(ptr) Variable UniformConstant
+ 425(u_i2): 424(ptr) Variable UniformConstant
426: TypePointer UniformConstant 80(ivec3)
- 427(u_i3): 426(ptr) Variable UniformConstant
+ 427(u_i3): 426(ptr) Variable UniformConstant
428: TypePointer UniformConstant 93(ivec4)
- 429(u_i4): 428(ptr) Variable UniformConstant
- 430(i_b): 416(ptr) Variable UniformConstant
- 431(i_b2): 418(ptr) Variable UniformConstant
- 432(i_b3): 420(ptr) Variable UniformConstant
- 433(i_b4): 422(ptr) Variable UniformConstant
+ 429(u_i4): 428(ptr) Variable UniformConstant
+ 430(i_b): 416(ptr) Variable UniformConstant
+ 431(i_b2): 418(ptr) Variable UniformConstant
+ 432(i_b3): 420(ptr) Variable UniformConstant
+ 433(i_b4): 422(ptr) Variable UniformConstant
434: TypePointer Input 67(ivec2)
- 435(i_i2): 434(ptr) Variable Input
+ 435(i_i2): 434(ptr) Variable Input
436: TypePointer Input 80(ivec3)
- 437(i_i3): 436(ptr) Variable Input
+ 437(i_i3): 436(ptr) Variable Input
438: TypePointer Input 70(fvec2)
- 439(i_f2): 438(ptr) Variable Input
+ 439(i_f2): 438(ptr) Variable Input
440: TypePointer Input 83(fvec3)
- 441(i_f3): 440(ptr) Variable Input
+ 441(i_f3): 440(ptr) Variable Input
442: TypePointer Input 96(fvec4)
- 443(i_f4): 442(ptr) Variable Input
+ 443(i_f4): 442(ptr) Variable Input
4(main): 2 Function None 3
5: Label
- 9(b): 8(ptr) Variable Function
- 26(b2): 25(ptr) Variable Function
- 34(b3): 33(ptr) Variable Function
- 46(b4): 45(ptr) Variable Function
- 59(i): 58(ptr) Variable Function
- 69(i2): 68(ptr) Variable Function
- 82(i3): 81(ptr) Variable Function
- 95(i4): 94(ptr) Variable Function
- 107(f): 106(ptr) Variable Function
- 111(f2): 110(ptr) Variable Function
- 115(f3): 114(ptr) Variable Function
- 119(f4): 118(ptr) Variable Function
- 289: 106(ptr) Variable Function
- 299: 106(ptr) Variable Function
- 314: 118(ptr) Variable Function
- 406(cv2): 94(ptr) Variable Function
- 407(cv5): 45(ptr) Variable Function
- 13: 10(int) Load 12(u_i)
+ 9(b): 8(ptr) Variable Function
+ 26(b2): 25(ptr) Variable Function
+ 34(b3): 33(ptr) Variable Function
+ 46(b4): 45(ptr) Variable Function
+ 59(i): 58(ptr) Variable Function
+ 69(i2): 68(ptr) Variable Function
+ 82(i3): 81(ptr) Variable Function
+ 95(i4): 94(ptr) Variable Function
+ 107(f): 106(ptr) Variable Function
+ 111(f2): 110(ptr) Variable Function
+ 115(f3): 114(ptr) Variable Function
+ 119(f4): 118(ptr) Variable Function
+ 289: 106(ptr) Variable Function
+ 299: 106(ptr) Variable Function
+ 314: 118(ptr) Variable Function
+ 406(cv2): 94(ptr) Variable Function
+ 407(cv5): 45(ptr) Variable Function
+ 13: 10(int) Load 12(u_i)
16: 7(bool) INotEqual 13 15
- 20: 17(float) Load 19(u_f)
+ 20: 17(float) Load 19(u_f)
22: 7(bool) FOrdNotEqual 20 21
- 23: 7(bool) LogicalXor 16 22
- Store 9(b) 23
- 27: 10(int) Load 12(u_i)
+ 23: 7(bool) LogicalNotEqual 16 22
+ Store 9(b) 23
+ 27: 10(int) Load 12(u_i)
28: 7(bool) INotEqual 27 15
- 29: 17(float) Load 19(u_f)
+ 29: 17(float) Load 19(u_f)
30: 7(bool) FOrdNotEqual 29 21
31: 24(bvec2) CompositeConstruct 28 30
- Store 26(b2) 31
- 35: 10(int) Load 12(u_i)
+ Store 26(b2) 31
+ 35: 10(int) Load 12(u_i)
36: 7(bool) INotEqual 35 15
- 37: 17(float) Load 19(u_f)
+ 37: 17(float) Load 19(u_f)
38: 7(bool) FOrdNotEqual 37 21
- 41: 10(int) Load 40(i_i)
+ 41: 10(int) Load 40(i_i)
42: 7(bool) INotEqual 41 15
43: 32(bvec3) CompositeConstruct 36 38 42
- Store 34(b3) 43
- 47: 10(int) Load 12(u_i)
+ Store 34(b3) 43
+ 47: 10(int) Load 12(u_i)
48: 7(bool) INotEqual 47 15
- 49: 17(float) Load 19(u_f)
+ 49: 17(float) Load 19(u_f)
50: 7(bool) FOrdNotEqual 49 21
- 51: 10(int) Load 40(i_i)
+ 51: 10(int) Load 40(i_i)
52: 7(bool) INotEqual 51 15
- 55: 17(float) Load 54(i_f)
+ 55: 17(float) Load 54(i_f)
56: 7(bool) FOrdNotEqual 55 21
57: 44(bvec4) CompositeConstruct 48 50 52 56
- Store 46(b4) 57
- 60: 17(float) Load 19(u_f)
+ Store 46(b4) 57
+ 60: 17(float) Load 19(u_f)
61: 10(int) ConvertFToS 60
- 62: 7(bool) Load 9(b)
+ 62: 7(bool) Load 9(b)
65: 10(int) Select 62 64 63
66: 10(int) IAdd 61 65
- Store 59(i) 66
- 73: 70(fvec2) Load 72(u_f2)
+ Store 59(i) 66
+ 73: 70(fvec2) Load 72(u_f2)
74: 67(ivec2) ConvertFToS 73
- 75: 24(bvec2) Load 26(b2)
+ 75: 24(bvec2) Load 26(b2)
78: 67(ivec2) Select 75 77 76
79: 67(ivec2) IAdd 74 78
- Store 69(i2) 79
- 86: 83(fvec3) Load 85(u_f3)
+ Store 69(i2) 79
+ 86: 83(fvec3) Load 85(u_f3)
87: 80(ivec3) ConvertFToS 86
- 88: 32(bvec3) Load 34(b3)
+ 88: 32(bvec3) Load 34(b3)
91: 80(ivec3) Select 88 90 89
92: 80(ivec3) IAdd 87 91
- Store 82(i3) 92
- 99: 96(fvec4) Load 98(u_f4)
+ Store 82(i3) 92
+ 99: 96(fvec4) Load 98(u_f4)
100: 93(ivec4) ConvertFToS 99
- 101: 44(bvec4) Load 46(b4)
+ 101: 44(bvec4) Load 46(b4)
104: 93(ivec4) Select 101 103 102
105: 93(ivec4) IAdd 100 104
- Store 95(i4) 105
- 108: 10(int) Load 59(i)
+ Store 95(i4) 105
+ 108: 10(int) Load 59(i)
109: 17(float) ConvertSToF 108
- Store 107(f) 109
- 112: 67(ivec2) Load 69(i2)
+ Store 107(f) 109
+ 112: 67(ivec2) Load 69(i2)
113: 70(fvec2) ConvertSToF 112
- Store 111(f2) 113
- 116: 80(ivec3) Load 82(i3)
+ Store 111(f2) 113
+ 116: 80(ivec3) Load 82(i3)
117: 83(fvec3) ConvertSToF 116
- Store 115(f3) 117
- 120: 93(ivec4) Load 95(i4)
+ Store 115(f3) 117
+ 120: 93(ivec4) Load 95(i4)
121: 96(fvec4) ConvertSToF 120
- Store 119(f4) 121
- 122: 10(int) Load 59(i)
+ Store 119(f4) 121
+ 122: 10(int) Load 59(i)
123: 17(float) ConvertSToF 122
- 124: 7(bool) Load 9(b)
+ 124: 7(bool) Load 9(b)
126: 17(float) Select 124 125 21
127: 17(float) FAdd 123 126
- 128: 17(float) Load 107(f)
+ 128: 17(float) Load 107(f)
129: 17(float) FAdd 128 127
- Store 107(f) 129
- 130: 67(ivec2) Load 69(i2)
+ Store 107(f) 129
+ 130: 67(ivec2) Load 69(i2)
131: 70(fvec2) ConvertSToF 130
- 132: 24(bvec2) Load 26(b2)
+ 132: 24(bvec2) Load 26(b2)
135: 70(fvec2) Select 132 134 133
136: 70(fvec2) FAdd 131 135
- 137: 70(fvec2) Load 111(f2)
+ 137: 70(fvec2) Load 111(f2)
138: 70(fvec2) FSub 137 136
- Store 111(f2) 138
- 139: 80(ivec3) Load 82(i3)
+ Store 111(f2) 138
+ 139: 80(ivec3) Load 82(i3)
140: 83(fvec3) ConvertSToF 139
- 141: 32(bvec3) Load 34(b3)
+ 141: 32(bvec3) Load 34(b3)
144: 83(fvec3) Select 141 143 142
145: 83(fvec3) FAdd 140 144
- 146: 83(fvec3) Load 115(f3)
+ 146: 83(fvec3) Load 115(f3)
147: 83(fvec3) FDiv 146 145
- Store 115(f3) 147
- 148: 93(ivec4) Load 95(i4)
+ Store 115(f3) 147
+ 148: 93(ivec4) Load 95(i4)
149: 96(fvec4) ConvertSToF 148
- 150: 44(bvec4) Load 46(b4)
+ 150: 44(bvec4) Load 46(b4)
153: 96(fvec4) Select 150 152 151
154: 96(fvec4) FAdd 149 153
- 155: 96(fvec4) Load 119(f4)
+ 155: 96(fvec4) Load 119(f4)
156: 96(fvec4) FAdd 155 154
- Store 119(f4) 156
- 159: 93(ivec4) Load 158(i_i4)
+ Store 119(f4) 156
+ 159: 93(ivec4) Load 158(i_i4)
162: 44(bvec4) INotEqual 159 161
163: 96(fvec4) Select 162 152 151
- 164: 96(fvec4) Load 119(f4)
+ 164: 96(fvec4) Load 119(f4)
165: 96(fvec4) FAdd 164 163
- Store 119(f4) 165
- 166: 96(fvec4) Load 98(u_f4)
+ Store 119(f4) 165
+ 166: 96(fvec4) Load 98(u_f4)
167: 44(bvec4) FOrdNotEqual 166 151
168: 96(fvec4) Select 167 152 151
- 169: 96(fvec4) Load 119(f4)
+ 169: 96(fvec4) Load 119(f4)
170: 96(fvec4) FAdd 169 168
- Store 119(f4) 170
- 171: 17(float) Load 107(f)
- 172: 10(int) Load 59(i)
+ Store 119(f4) 170
+ 171: 17(float) Load 107(f)
+ 172: 10(int) Load 59(i)
173: 17(float) ConvertSToF 172
174: 17(float) FSub 171 173
- 175: 17(float) Load 107(f)
+ 175: 17(float) Load 107(f)
176: 17(float) FAdd 175 174
- Store 107(f) 176
- 177: 17(float) Load 107(f)
- 178: 10(int) Load 59(i)
+ Store 107(f) 176
+ 177: 17(float) Load 107(f)
+ 178: 10(int) Load 59(i)
179: 17(float) ConvertSToF 178
180: 70(fvec2) CompositeConstruct 177 179
- 181: 67(ivec2) Load 69(i2)
+ 181: 67(ivec2) Load 69(i2)
182: 70(fvec2) ConvertSToF 181
183: 70(fvec2) FAdd 180 182
- 184: 70(fvec2) Load 111(f2)
+ 184: 70(fvec2) Load 111(f2)
185: 70(fvec2) FAdd 184 183
- Store 111(f2) 185
- 186: 80(ivec3) Load 82(i3)
+ Store 111(f2) 185
+ 186: 80(ivec3) Load 82(i3)
187: 83(fvec3) ConvertSToF 186
- 188: 17(float) Load 107(f)
- 189: 10(int) Load 59(i)
+ 188: 17(float) Load 107(f)
+ 189: 10(int) Load 59(i)
190: 17(float) ConvertSToF 189
- 191: 17(float) Load 107(f)
+ 191: 17(float) Load 107(f)
192: 83(fvec3) CompositeConstruct 188 190 191
193: 83(fvec3) FAdd 187 192
- 194: 83(fvec3) Load 115(f3)
+ 194: 83(fvec3) Load 115(f3)
195: 83(fvec3) FAdd 194 193
- Store 115(f3) 195
- 196: 7(bool) Load 9(b)
+ Store 115(f3) 195
+ 196: 7(bool) Load 9(b)
197: 17(float) Select 196 125 21
- 198: 10(int) Load 59(i)
+ 198: 10(int) Load 59(i)
199: 17(float) ConvertSToF 198
- 200: 17(float) Load 107(f)
- 201: 10(int) Load 59(i)
+ 200: 17(float) Load 107(f)
+ 201: 10(int) Load 59(i)
202: 17(float) ConvertSToF 201
203: 96(fvec4) CompositeConstruct 197 199 200 202
- 204: 93(ivec4) Load 95(i4)
+ 204: 93(ivec4) Load 95(i4)
205: 96(fvec4) ConvertSToF 204
206: 96(fvec4) FAdd 203 205
- 207: 96(fvec4) Load 119(f4)
+ 207: 96(fvec4) Load 119(f4)
208: 96(fvec4) FAdd 207 206
- Store 119(f4) 208
- 209: 17(float) Load 107(f)
- 210: 10(int) Load 59(i)
+ Store 119(f4) 208
+ 209: 17(float) Load 107(f)
+ 210: 10(int) Load 59(i)
211: 17(float) ConvertSToF 210
212: 70(fvec2) CompositeConstruct 209 211
- 213: 10(int) Load 59(i)
+ 213: 10(int) Load 59(i)
214: 17(float) ConvertSToF 213
215: 70(fvec2) VectorTimesScalar 212 214
- 216: 70(fvec2) Load 111(f2)
+ 216: 70(fvec2) Load 111(f2)
217: 70(fvec2) FAdd 216 215
- Store 111(f2) 217
- 218: 17(float) Load 107(f)
- 219: 10(int) Load 59(i)
+ Store 111(f2) 217
+ 218: 17(float) Load 107(f)
+ 219: 10(int) Load 59(i)
220: 17(float) ConvertSToF 219
- 221: 17(float) Load 107(f)
+ 221: 17(float) Load 107(f)
222: 83(fvec3) CompositeConstruct 218 220 221
- 223: 10(int) Load 59(i)
+ 223: 10(int) Load 59(i)
224: 17(float) ConvertSToF 223
225: 83(fvec3) CompositeConstruct 224 224 224
226: 83(fvec3) FAdd 222 225
- 227: 83(fvec3) Load 115(f3)
+ 227: 83(fvec3) Load 115(f3)
228: 83(fvec3) FAdd 227 226
- Store 115(f3) 228
- 229: 10(int) Load 59(i)
+ Store 115(f3) 228
+ 229: 10(int) Load 59(i)
230: 17(float) ConvertSToF 229
- 231: 7(bool) Load 9(b)
+ 231: 7(bool) Load 9(b)
232: 17(float) Select 231 125 21
- 233: 10(int) Load 59(i)
+ 233: 10(int) Load 59(i)
234: 17(float) ConvertSToF 233
- 235: 17(float) Load 107(f)
- 236: 10(int) Load 59(i)
+ 235: 17(float) Load 107(f)
+ 236: 10(int) Load 59(i)
237: 17(float) ConvertSToF 236
238: 96(fvec4) CompositeConstruct 232 234 235 237
239: 96(fvec4) CompositeConstruct 230 230 230 230
240: 96(fvec4) FSub 239 238
- 241: 96(fvec4) Load 119(f4)
+ 241: 96(fvec4) Load 119(f4)
242: 96(fvec4) FAdd 241 240
- Store 119(f4) 242
- 243: 17(float) Load 107(f)
+ Store 119(f4) 242
+ 243: 17(float) Load 107(f)
244: 10(int) ConvertFToS 243
- 245: 10(int) Load 59(i)
+ 245: 10(int) Load 59(i)
246: 67(ivec2) CompositeConstruct 244 245
- 247: 67(ivec2) Load 69(i2)
+ 247: 67(ivec2) Load 69(i2)
248: 67(ivec2) IAdd 247 246
- Store 69(i2) 248
- 249: 17(float) Load 107(f)
+ Store 69(i2) 248
+ 249: 17(float) Load 107(f)
250: 10(int) ConvertFToS 249
- 251: 10(int) Load 59(i)
- 252: 17(float) Load 107(f)
+ 251: 10(int) Load 59(i)
+ 252: 17(float) Load 107(f)
253: 10(int) ConvertFToS 252
254: 80(ivec3) CompositeConstruct 250 251 253
- 255: 80(ivec3) Load 82(i3)
+ 255: 80(ivec3) Load 82(i3)
256: 80(ivec3) IAdd 255 254
- Store 82(i3) 256
- 257: 7(bool) Load 9(b)
+ Store 82(i3) 256
+ 257: 7(bool) Load 9(b)
258: 10(int) Select 257 64 63
- 259: 10(int) Load 59(i)
- 260: 17(float) Load 107(f)
+ 259: 10(int) Load 59(i)
+ 260: 17(float) Load 107(f)
261: 10(int) ConvertFToS 260
- 262: 10(int) Load 59(i)
+ 262: 10(int) Load 59(i)
263: 93(ivec4) CompositeConstruct 258 259 261 262
- 264: 93(ivec4) Load 95(i4)
+ 264: 93(ivec4) Load 95(i4)
265: 93(ivec4) IAdd 264 263
- Store 95(i4) 265
- 266: 17(float) Load 107(f)
- 267: 10(int) Load 59(i)
+ Store 95(i4) 265
+ 266: 17(float) Load 107(f)
+ 267: 10(int) Load 59(i)
268: 17(float) ConvertSToF 267
269: 7(bool) FOrdLessThan 266 268
- 270: 10(int) Load 59(i)
+ 270: 10(int) Load 59(i)
271: 17(float) ConvertSToF 270
- 272: 17(float) Load 107(f)
+ 272: 17(float) Load 107(f)
273: 7(bool) FOrdLessThan 271 272
274: 7(bool) LogicalOr 269 273
- 275: 70(fvec2) Load 111(f2)
- 276: 67(ivec2) Load 69(i2)
+ 275: 70(fvec2) Load 111(f2)
+ 276: 67(ivec2) Load 69(i2)
277: 70(fvec2) ConvertSToF 276
278: 24(bvec2) FOrdEqual 275 277
279: 7(bool) All 278
280: 7(bool) LogicalOr 274 279
- 281: 80(ivec3) Load 82(i3)
+ 281: 80(ivec3) Load 82(i3)
282: 83(fvec3) ConvertSToF 281
- 283: 83(fvec3) Load 115(f3)
+ 283: 83(fvec3) Load 115(f3)
284: 32(bvec3) FOrdNotEqual 282 283
285: 7(bool) Any 284
286: 7(bool) LogicalOr 280 285
SelectionMerge 288 None
- BranchConditional 286 287 288
+ BranchConditional 286 287 288
287: Label
- 290: 7(bool) Load 9(b)
+ 290: 7(bool) Load 9(b)
SelectionMerge 292 None
- BranchConditional 290 291 295
+ BranchConditional 290 291 295
291: Label
- 293: 10(int) Load 59(i)
+ 293: 10(int) Load 59(i)
294: 17(float) ConvertSToF 293
- Store 289 294
+ Store 289 294
Branch 292
295: Label
- 296: 70(fvec2) Load 111(f2)
+ 296: 70(fvec2) Load 111(f2)
297: 17(float) CompositeExtract 296 0
- Store 289 297
+ Store 289 297
Branch 292
292: Label
- 298: 17(float) Load 289
- 300: 24(bvec2) Load 26(b2)
+ 298: 17(float) Load 289
+ 300: 24(bvec2) Load 26(b2)
301: 7(bool) CompositeExtract 300 0
SelectionMerge 303 None
- BranchConditional 301 302 306
+ BranchConditional 301 302 306
302: Label
- 304: 83(fvec3) Load 115(f3)
+ 304: 83(fvec3) Load 115(f3)
305: 17(float) CompositeExtract 304 0
- Store 299 305
+ Store 299 305
Branch 303
306: Label
- 307: 67(ivec2) Load 69(i2)
+ 307: 67(ivec2) Load 69(i2)
308: 10(int) CompositeExtract 307 1
309: 17(float) ConvertSToF 308
- Store 299 309
+ Store 299 309
Branch 303
303: Label
- 310: 17(float) Load 299
+ 310: 17(float) Load 299
311: 17(float) FAdd 298 310
- Store 107(f) 311
+ Store 107(f) 311
Branch 288
288: Label
- 315: 7(bool) Load 9(b)
- 316: 24(bvec2) Load 26(b2)
+ 315: 7(bool) Load 9(b)
+ 316: 24(bvec2) Load 26(b2)
317: 7(bool) CompositeExtract 316 0
318: 7(bool) LogicalOr 315 317
- 319: 24(bvec2) Load 26(b2)
+ 319: 24(bvec2) Load 26(b2)
320: 7(bool) CompositeExtract 319 1
321: 7(bool) LogicalOr 318 320
- 322: 32(bvec3) Load 34(b3)
+ 322: 32(bvec3) Load 34(b3)
323: 7(bool) CompositeExtract 322 0
324: 7(bool) LogicalOr 321 323
- 325: 32(bvec3) Load 34(b3)
+ 325: 32(bvec3) Load 34(b3)
326: 7(bool) CompositeExtract 325 1
327: 7(bool) LogicalOr 324 326
- 328: 32(bvec3) Load 34(b3)
+ 328: 32(bvec3) Load 34(b3)
329: 7(bool) CompositeExtract 328 2
330: 7(bool) LogicalOr 327 329
- 331: 44(bvec4) Load 46(b4)
+ 331: 44(bvec4) Load 46(b4)
332: 7(bool) CompositeExtract 331 0
333: 7(bool) LogicalOr 330 332
- 334: 44(bvec4) Load 46(b4)
+ 334: 44(bvec4) Load 46(b4)
335: 7(bool) CompositeExtract 334 1
336: 7(bool) LogicalOr 333 335
- 337: 44(bvec4) Load 46(b4)
+ 337: 44(bvec4) Load 46(b4)
338: 7(bool) CompositeExtract 337 2
339: 7(bool) LogicalOr 336 338
- 340: 44(bvec4) Load 46(b4)
+ 340: 44(bvec4) Load 46(b4)
341: 7(bool) CompositeExtract 340 3
342: 7(bool) LogicalOr 339 341
SelectionMerge 344 None
- BranchConditional 342 343 404
+ BranchConditional 342 343 404
343: Label
- 345: 10(int) Load 59(i)
- 346: 67(ivec2) Load 69(i2)
+ 345: 10(int) Load 59(i)
+ 346: 67(ivec2) Load 69(i2)
347: 10(int) CompositeExtract 346 0
348: 10(int) IAdd 345 347
- 349: 67(ivec2) Load 69(i2)
+ 349: 67(ivec2) Load 69(i2)
350: 10(int) CompositeExtract 349 1
351: 10(int) IAdd 348 350
- 352: 80(ivec3) Load 82(i3)
+ 352: 80(ivec3) Load 82(i3)
353: 10(int) CompositeExtract 352 0
354: 10(int) IAdd 351 353
- 355: 80(ivec3) Load 82(i3)
+ 355: 80(ivec3) Load 82(i3)
356: 10(int) CompositeExtract 355 1
357: 10(int) IAdd 354 356
- 358: 80(ivec3) Load 82(i3)
+ 358: 80(ivec3) Load 82(i3)
359: 10(int) CompositeExtract 358 2
360: 10(int) IAdd 357 359
- 361: 93(ivec4) Load 95(i4)
+ 361: 93(ivec4) Load 95(i4)
362: 10(int) CompositeExtract 361 0
363: 10(int) IAdd 360 362
- 364: 93(ivec4) Load 95(i4)
+ 364: 93(ivec4) Load 95(i4)
365: 10(int) CompositeExtract 364 1
366: 10(int) IAdd 363 365
- 367: 93(ivec4) Load 95(i4)
+ 367: 93(ivec4) Load 95(i4)
368: 10(int) CompositeExtract 367 2
369: 10(int) IAdd 366 368
- 370: 93(ivec4) Load 95(i4)
+ 370: 93(ivec4) Load 95(i4)
371: 10(int) CompositeExtract 370 3
372: 10(int) IAdd 369 371
373: 17(float) ConvertSToF 372
- 374: 17(float) Load 107(f)
+ 374: 17(float) Load 107(f)
375: 17(float) FAdd 373 374
- 376: 70(fvec2) Load 111(f2)
+ 376: 70(fvec2) Load 111(f2)
377: 17(float) CompositeExtract 376 0
378: 17(float) FAdd 375 377
- 379: 70(fvec2) Load 111(f2)
+ 379: 70(fvec2) Load 111(f2)
380: 17(float) CompositeExtract 379 1
381: 17(float) FAdd 378 380
- 382: 83(fvec3) Load 115(f3)
+ 382: 83(fvec3) Load 115(f3)
383: 17(float) CompositeExtract 382 0
384: 17(float) FAdd 381 383
- 385: 83(fvec3) Load 115(f3)
+ 385: 83(fvec3) Load 115(f3)
386: 17(float) CompositeExtract 385 1
387: 17(float) FAdd 384 386
- 388: 83(fvec3) Load 115(f3)
+ 388: 83(fvec3) Load 115(f3)
389: 17(float) CompositeExtract 388 2
390: 17(float) FAdd 387 389
- 391: 96(fvec4) Load 119(f4)
+ 391: 96(fvec4) Load 119(f4)
392: 17(float) CompositeExtract 391 0
393: 17(float) FAdd 390 392
- 394: 96(fvec4) Load 119(f4)
+ 394: 96(fvec4) Load 119(f4)
395: 17(float) CompositeExtract 394 1
396: 17(float) FAdd 393 395
- 397: 96(fvec4) Load 119(f4)
+ 397: 96(fvec4) Load 119(f4)
398: 17(float) CompositeExtract 397 2
399: 17(float) FAdd 396 398
- 400: 96(fvec4) Load 119(f4)
+ 400: 96(fvec4) Load 119(f4)
401: 17(float) CompositeExtract 400 3
402: 17(float) FAdd 399 401
403: 96(fvec4) CompositeConstruct 402 402 402 402
- Store 314 403
+ Store 314 403
Branch 344
404: Label
- Store 314 152
+ Store 314 152
Branch 344
344: Label
- 405: 96(fvec4) Load 314
- Store 313(gl_FragColor) 405
- Store 406(cv2) 103
- 408: 93(ivec4) Load 406(cv2)
+ 405: 96(fvec4) Load 314
+ Store 313(gl_FragColor) 405
+ Store 406(cv2) 103
+ 408: 93(ivec4) Load 406(cv2)
409: 44(bvec4) INotEqual 408 161
- Store 407(cv5) 409
- 410: 44(bvec4) Load 407(cv5)
+ Store 407(cv5) 409
+ 410: 44(bvec4) Load 407(cv5)
411: 96(fvec4) Select 410 152 151
412: 17(float) CompositeExtract 411 0
- 413: 96(fvec4) Load 313(gl_FragColor)
+ 413: 96(fvec4) Load 313(gl_FragColor)
414: 96(fvec4) CompositeConstruct 412 412 412 412
415: 96(fvec4) FAdd 413 414
- Store 313(gl_FragColor) 415
+ Store 313(gl_FragColor) 415
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.dataOut.frag.out b/Test/baseResults/spv.dataOut.frag.out
old mode 100644
new mode 100755
index fee2eef..af9854c
--- a/Test/baseResults/spv.dataOut.frag.out
+++ b/Test/baseResults/spv.dataOut.frag.out
@@ -10,33 +10,35 @@
// Id's are bound by 21
Source GLSL 130
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 13 "gl_FragData"
Name 17 "Color"
Decorate 13(gl_FragData) BuiltIn FragColor
- Decorate 17(Color) Smooth
+ Decorate 17(Color) Smooth
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypeInt 32 0
10: 9(int) Constant 32
11: TypeArray 8(fvec4) 10
12: TypePointer Output 11
- 13(gl_FragData): 12(ptr) Variable Output
+ 13(gl_FragData): 12(ptr) Variable Output
14: TypeInt 32 1
15: 14(int) Constant 1
16: TypePointer Input 8(fvec4)
- 17(Color): 16(ptr) Variable Input
+ 17(Color): 16(ptr) Variable Input
19: TypePointer Output 8(fvec4)
4(main): 2 Function None 3
5: Label
- 18: 8(fvec4) Load 17(Color)
+ 18: 8(fvec4) Load 17(Color)
20: 19(ptr) AccessChain 13(gl_FragData) 15
- Store 20 18
+ Store 20 18
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.dataOutIndirect.frag.out b/Test/baseResults/spv.dataOutIndirect.frag.out
old mode 100644
new mode 100755
index 7a75b6d..b103e2d
--- a/Test/baseResults/spv.dataOutIndirect.frag.out
+++ b/Test/baseResults/spv.dataOutIndirect.frag.out
@@ -10,36 +10,38 @@
// Id's are bound by 23
Source GLSL 130
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 13 "gl_FragData"
Name 16 "i"
Name 19 "Color"
Decorate 13(gl_FragData) BuiltIn FragColor
- Decorate 19(Color) Smooth
+ Decorate 19(Color) Smooth
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypeInt 32 0
10: 9(int) Constant 32
11: TypeArray 8(fvec4) 10
12: TypePointer Output 11
- 13(gl_FragData): 12(ptr) Variable Output
+ 13(gl_FragData): 12(ptr) Variable Output
14: TypeInt 32 1
15: TypePointer UniformConstant 14(int)
- 16(i): 15(ptr) Variable UniformConstant
+ 16(i): 15(ptr) Variable UniformConstant
18: TypePointer Input 8(fvec4)
- 19(Color): 18(ptr) Variable Input
+ 19(Color): 18(ptr) Variable Input
21: TypePointer Output 8(fvec4)
4(main): 2 Function None 3
5: Label
- 17: 14(int) Load 16(i)
- 20: 8(fvec4) Load 19(Color)
+ 17: 14(int) Load 16(i)
+ 20: 8(fvec4) Load 19(Color)
22: 21(ptr) AccessChain 13(gl_FragData) 17
- Store 22 20
+ Store 22 20
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.dataOutIndirect.vert.out b/Test/baseResults/spv.dataOutIndirect.vert.out
old mode 100644
new mode 100755
index 8fc8457..bcf68be
--- a/Test/baseResults/spv.dataOutIndirect.vert.out
+++ b/Test/baseResults/spv.dataOutIndirect.vert.out
@@ -11,21 +11,22 @@
// Id's are bound by 39
Source GLSL 130
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Vertex 4
+ EntryPoint Vertex 4 "main"
Name 4 "main"
Name 9 "i"
Name 24 "colorOut"
Name 27 "color"
Name 33 "gl_Position"
Name 38 "gl_VertexID"
- Decorate 24(colorOut) Smooth
+ Decorate 24(colorOut) Smooth
Decorate 33(gl_Position) BuiltIn Position
Decorate 38(gl_VertexID) BuiltIn VertexId
- Decorate 38(gl_VertexID) NoStaticUse
+ Decorate 38(gl_VertexID) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeInt 32 1
8: TypePointer Function 7(int)
10: 7(int) Constant 1
@@ -37,37 +38,37 @@
21: 20(int) Constant 6
22: TypeArray 19(fvec4) 21
23: TypePointer Output 22
- 24(colorOut): 23(ptr) Variable Output
+ 24(colorOut): 23(ptr) Variable Output
26: TypePointer Input 19(fvec4)
- 27(color): 26(ptr) Variable Input
+ 27(color): 26(ptr) Variable Input
29: TypePointer Output 19(fvec4)
- 33(gl_Position): 29(ptr) Variable Output
+ 33(gl_Position): 29(ptr) Variable Output
34: 7(int) Constant 2
37: TypePointer Input 7(int)
- 38(gl_VertexID): 37(ptr) Variable Input
+ 38(gl_VertexID): 37(ptr) Variable Input
4(main): 2 Function None 3
5: Label
- 9(i): 8(ptr) Variable Function
- Store 9(i) 10
+ 9(i): 8(ptr) Variable Function
+ Store 9(i) 10
Branch 11
11: Label
- 14: 7(int) Load 9(i)
+ 14: 7(int) Load 9(i)
17: 16(bool) SLessThan 14 15
LoopMerge 12 None
- BranchConditional 17 13 12
+ BranchConditional 17 13 12
13: Label
- 25: 7(int) Load 9(i)
- 28: 19(fvec4) Load 27(color)
+ 25: 7(int) Load 9(i)
+ 28: 19(fvec4) Load 27(color)
30: 29(ptr) AccessChain 24(colorOut) 25
- Store 30 28
- 31: 7(int) Load 9(i)
+ Store 30 28
+ 31: 7(int) Load 9(i)
32: 7(int) IAdd 31 10
- Store 9(i) 32
+ Store 9(i) 32
Branch 11
12: Label
35: 29(ptr) AccessChain 24(colorOut) 34
- 36: 19(fvec4) Load 35
- Store 33(gl_Position) 36
+ 36: 19(fvec4) Load 35
+ Store 33(gl_Position) 36
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.depthOut.frag.out b/Test/baseResults/spv.depthOut.frag.out
old mode 100644
new mode 100755
index 211ab14..319d79b
--- a/Test/baseResults/spv.depthOut.frag.out
+++ b/Test/baseResults/spv.depthOut.frag.out
@@ -11,36 +11,38 @@
// Id's are bound by 19
Source GLSL 130
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 9 "gl_FragDepth"
Name 11 "Depth"
Name 15 "gl_FragColor"
Name 17 "Color"
Decorate 9(gl_FragDepth) BuiltIn FragDepth
- Decorate 11(Depth) Smooth
+ Decorate 11(Depth) Smooth
Decorate 15(gl_FragColor) BuiltIn FragColor
- Decorate 17(Color) Smooth
+ Decorate 17(Color) Smooth
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypePointer Output 7(float)
- 9(gl_FragDepth): 8(ptr) Variable Output
+ 9(gl_FragDepth): 8(ptr) Variable Output
10: TypePointer Input 7(float)
- 11(Depth): 10(ptr) Variable Input
+ 11(Depth): 10(ptr) Variable Input
13: TypeVector 7(float) 4
14: TypePointer Output 13(fvec4)
-15(gl_FragColor): 14(ptr) Variable Output
+15(gl_FragColor): 14(ptr) Variable Output
16: TypePointer Input 13(fvec4)
- 17(Color): 16(ptr) Variable Input
+ 17(Color): 16(ptr) Variable Input
4(main): 2 Function None 3
5: Label
- 12: 7(float) Load 11(Depth)
- Store 9(gl_FragDepth) 12
- 18: 13(fvec4) Load 17(Color)
- Store 15(gl_FragColor) 18
+ 12: 7(float) Load 11(Depth)
+ Store 9(gl_FragDepth) 12
+ 18: 13(fvec4) Load 17(Color)
+ Store 15(gl_FragColor) 18
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.discard-dce.frag.out b/Test/baseResults/spv.discard-dce.frag.out
old mode 100644
new mode 100755
index 366b5bc..ef1bf46
--- a/Test/baseResults/spv.discard-dce.frag.out
+++ b/Test/baseResults/spv.discard-dce.frag.out
@@ -8,9 +8,11 @@
// Id's are bound by 81
Source GLSL 110
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 10 "white"
Name 13 "black"
@@ -20,10 +22,10 @@
Name 28 "y"
Name 33 "radius"
Name 56 "gl_FragColor"
- Decorate 22(tex_coord) Smooth
+ Decorate 22(tex_coord) Smooth
Decorate 56(gl_FragColor) BuiltIn FragColor
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypePointer Function 8(fvec4)
@@ -34,94 +36,94 @@
18: TypePointer Function 7(float)
20: TypeVector 7(float) 2
21: TypePointer Input 20(fvec2)
- 22(tex_coord): 21(ptr) Variable Input
+ 22(tex_coord): 21(ptr) Variable Input
25: 7(float) Constant 1073741824
43: TypeBool
48: 7(float) Constant 1066192077
55: TypePointer Output 8(fvec4)
-56(gl_FragColor): 55(ptr) Variable Output
+56(gl_FragColor): 55(ptr) Variable Output
59: 7(float) Constant 1067030938
68: 7(float) Constant 1061158912
73: 7(float) Constant 1098907648
4(main): 2 Function None 3
5: Label
- 10(white): 9(ptr) Variable Function
- 13(black): 9(ptr) Variable Function
- 16(color): 9(ptr) Variable Function
- 19(x): 18(ptr) Variable Function
- 28(y): 18(ptr) Variable Function
- 33(radius): 18(ptr) Variable Function
- Store 10(white) 12
- Store 13(black) 15
- 17: 8(fvec4) Load 10(white)
- Store 16(color) 17
- 23: 20(fvec2) Load 22(tex_coord)
+ 10(white): 9(ptr) Variable Function
+ 13(black): 9(ptr) Variable Function
+ 16(color): 9(ptr) Variable Function
+ 19(x): 18(ptr) Variable Function
+ 28(y): 18(ptr) Variable Function
+ 33(radius): 18(ptr) Variable Function
+ Store 10(white) 12
+ Store 13(black) 15
+ 17: 8(fvec4) Load 10(white)
+ Store 16(color) 17
+ 23: 20(fvec2) Load 22(tex_coord)
24: 7(float) CompositeExtract 23 0
26: 7(float) FMul 24 25
27: 7(float) FSub 26 11
- Store 19(x) 27
- 29: 20(fvec2) Load 22(tex_coord)
+ Store 19(x) 27
+ 29: 20(fvec2) Load 22(tex_coord)
30: 7(float) CompositeExtract 29 1
31: 7(float) FMul 30 25
32: 7(float) FSub 31 11
- Store 28(y) 32
- 34: 7(float) Load 19(x)
- 35: 7(float) Load 19(x)
+ Store 28(y) 32
+ 34: 7(float) Load 19(x)
+ 35: 7(float) Load 19(x)
36: 7(float) FMul 34 35
- 37: 7(float) Load 28(y)
- 38: 7(float) Load 28(y)
+ 37: 7(float) Load 28(y)
+ 38: 7(float) Load 28(y)
39: 7(float) FMul 37 38
40: 7(float) FAdd 36 39
- 41: 7(float) ExtInst 1(GLSL.std.450) 28(sqrt) 40
- Store 33(radius) 41
- 42: 7(float) Load 33(radius)
+ 41: 7(float) ExtInst 1(GLSL.std.450) 31(Sqrt) 40
+ Store 33(radius) 41
+ 42: 7(float) Load 33(radius)
44: 43(bool) FOrdGreaterThan 42 11
SelectionMerge 46 None
- BranchConditional 44 45 46
+ BranchConditional 44 45 46
45: Label
- 47: 7(float) Load 33(radius)
+ 47: 7(float) Load 33(radius)
49: 43(bool) FOrdGreaterThan 47 48
SelectionMerge 51 None
- BranchConditional 49 50 51
+ BranchConditional 49 50 51
50: Label
- 52: 8(fvec4) Load 16(color)
+ 52: 8(fvec4) Load 16(color)
53: 8(fvec4) CompositeConstruct 11 11 11 11
54: 8(fvec4) FAdd 52 53
- Store 16(color) 54
+ Store 16(color) 54
Branch 51
51: Label
- 57: 8(fvec4) Load 16(color)
- Store 56(gl_FragColor) 57
- 58: 7(float) Load 33(radius)
+ 57: 8(fvec4) Load 16(color)
+ Store 56(gl_FragColor) 57
+ 58: 7(float) Load 33(radius)
60: 43(bool) FOrdGreaterThan 58 59
SelectionMerge 62 None
- BranchConditional 60 61 62
+ BranchConditional 60 61 62
61: Label
- 63: 8(fvec4) Load 16(color)
+ 63: 8(fvec4) Load 16(color)
64: 8(fvec4) CompositeConstruct 11 11 11 11
65: 8(fvec4) FAdd 63 64
- Store 16(color) 65
+ Store 16(color) 65
Branch 62
62: Label
Kill
46: Label
- 67: 7(float) Load 33(radius)
+ 67: 7(float) Load 33(radius)
69: 43(bool) FOrdGreaterThanEqual 67 68
SelectionMerge 71 None
- BranchConditional 69 70 71
+ BranchConditional 69 70 71
70: Label
- 72: 7(float) Load 33(radius)
- 74: 7(float) ExtInst 1(GLSL.std.450) 23(pow) 72 73
+ 72: 7(float) Load 33(radius)
+ 74: 7(float) ExtInst 1(GLSL.std.450) 26(Pow) 72 73
75: 7(float) FDiv 74 25
- 76: 7(float) ExtInst 1(GLSL.std.450) 3(abs) 75
- 77: 8(fvec4) Load 16(color)
+ 76: 7(float) ExtInst 1(GLSL.std.450) 4(FAbs) 75
+ 77: 8(fvec4) Load 16(color)
78: 8(fvec4) CompositeConstruct 76 76 76 76
79: 8(fvec4) FSub 77 78
- Store 16(color) 79
+ Store 16(color) 79
Branch 71
71: Label
- 80: 8(fvec4) Load 16(color)
- Store 56(gl_FragColor) 80
+ 80: 8(fvec4) Load 16(color)
+ Store 56(gl_FragColor) 80
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.do-simple.vert.out b/Test/baseResults/spv.do-simple.vert.out
old mode 100644
new mode 100755
index a006e3d..4ba5330
--- a/Test/baseResults/spv.do-simple.vert.out
+++ b/Test/baseResults/spv.do-simple.vert.out
@@ -8,22 +8,20 @@
// Id's are bound by 30
Source ESSL 300
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Vertex 4
+ EntryPoint Vertex 4 "main"
Name 4 "main"
Name 9 "i"
Name 28 "gl_VertexID"
Name 29 "gl_InstanceID"
- Decorate 9(i) PrecisionHigh
- Decorate 28(gl_VertexID) PrecisionHigh
Decorate 28(gl_VertexID) BuiltIn VertexId
- Decorate 28(gl_VertexID) NoStaticUse
- Decorate 29(gl_InstanceID) PrecisionHigh
+ Decorate 28(gl_VertexID) NoStaticUse
Decorate 29(gl_InstanceID) BuiltIn InstanceId
- Decorate 29(gl_InstanceID) NoStaticUse
+ Decorate 29(gl_InstanceID) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeInt 32 1
8: TypePointer Function 7(int)
10: 7(int) Constant 0
@@ -33,12 +31,12 @@
24: 7(int) Constant 1
26: 15(bool) ConstantFalse
27: TypePointer Input 7(int)
- 28(gl_VertexID): 27(ptr) Variable Input
-29(gl_InstanceID): 27(ptr) Variable Input
+ 28(gl_VertexID): 27(ptr) Variable Input
+29(gl_InstanceID): 27(ptr) Variable Input
4(main): 2 Function None 3
5: Label
- 9(i): 8(ptr) Variable Function
- Store 9(i) 10
+ 9(i): 8(ptr) Variable Function
+ Store 9(i) 10
Branch 11
11: Label
14: 15(bool) Phi 16 5 26 13
@@ -46,18 +44,18 @@
Branch 17
17: Label
SelectionMerge 13 None
- BranchConditional 14 13 18
+ BranchConditional 14 13 18
18: Label
- 19: 7(int) Load 9(i)
+ 19: 7(int) Load 9(i)
21: 15(bool) SLessThan 19 20
SelectionMerge 22 None
- BranchConditional 21 22 12
+ BranchConditional 21 22 12
22: Label
Branch 13
13: Label
- 23: 7(int) Load 9(i)
+ 23: 7(int) Load 9(i)
25: 7(int) IAdd 23 24
- Store 9(i) 25
+ Store 9(i) 25
Branch 11
12: Label
Branch 6
diff --git a/Test/baseResults/spv.do-while-continue-break.vert.out b/Test/baseResults/spv.do-while-continue-break.vert.out
old mode 100644
new mode 100755
index 8613a6d..e230233
--- a/Test/baseResults/spv.do-while-continue-break.vert.out
+++ b/Test/baseResults/spv.do-while-continue-break.vert.out
@@ -8,9 +8,10 @@
// Id's are bound by 52
Source ESSL 300
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Vertex 4
+ EntryPoint Vertex 4 "main"
Name 4 "main"
Name 9 "i"
Name 25 "A"
@@ -22,22 +23,12 @@
Name 47 "G"
Name 50 "gl_VertexID"
Name 51 "gl_InstanceID"
- Decorate 9(i) PrecisionHigh
- Decorate 25(A) PrecisionHigh
- Decorate 31(B) PrecisionHigh
- Decorate 34(C) PrecisionHigh
- Decorate 40(D) PrecisionHigh
- Decorate 43(E) PrecisionHigh
- Decorate 45(F) PrecisionHigh
- Decorate 47(G) PrecisionHigh
- Decorate 50(gl_VertexID) PrecisionHigh
Decorate 50(gl_VertexID) BuiltIn VertexId
- Decorate 50(gl_VertexID) NoStaticUse
- Decorate 51(gl_InstanceID) PrecisionHigh
+ Decorate 50(gl_VertexID) NoStaticUse
Decorate 51(gl_InstanceID) BuiltIn InstanceId
- Decorate 51(gl_InstanceID) NoStaticUse
+ Decorate 51(gl_InstanceID) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeInt 32 1
8: TypePointer Function 7(int)
10: 7(int) Constant 0
@@ -53,19 +44,19 @@
46: 7(int) Constant 99
48: 7(int) Constant 12
49: TypePointer Input 7(int)
- 50(gl_VertexID): 49(ptr) Variable Input
-51(gl_InstanceID): 49(ptr) Variable Input
+ 50(gl_VertexID): 49(ptr) Variable Input
+51(gl_InstanceID): 49(ptr) Variable Input
4(main): 2 Function None 3
5: Label
- 9(i): 8(ptr) Variable Function
- 25(A): 8(ptr) Variable Function
- 31(B): 8(ptr) Variable Function
- 34(C): 8(ptr) Variable Function
- 40(D): 8(ptr) Variable Function
- 43(E): 8(ptr) Variable Function
- 45(F): 8(ptr) Variable Function
- 47(G): 8(ptr) Variable Function
- Store 9(i) 10
+ 9(i): 8(ptr) Variable Function
+ 25(A): 8(ptr) Variable Function
+ 31(B): 8(ptr) Variable Function
+ 34(C): 8(ptr) Variable Function
+ 40(D): 8(ptr) Variable Function
+ 43(E): 8(ptr) Variable Function
+ 45(F): 8(ptr) Variable Function
+ 47(G): 8(ptr) Variable Function
+ Store 9(i) 10
Branch 11
11: Label
14: 15(bool) Phi 16 5 32 29 32 39
@@ -73,44 +64,44 @@
Branch 17
17: Label
SelectionMerge 13 None
- BranchConditional 14 13 18
+ BranchConditional 14 13 18
18: Label
- 19: 7(int) Load 9(i)
+ 19: 7(int) Load 9(i)
21: 7(int) IAdd 19 20
- Store 9(i) 21
+ Store 9(i) 21
23: 15(bool) SLessThan 21 22
SelectionMerge 24 None
- BranchConditional 23 24 12
+ BranchConditional 23 24 12
24: Label
Branch 13
13: Label
- Store 25(A) 10
- 26: 7(int) Load 9(i)
+ Store 25(A) 10
+ 26: 7(int) Load 9(i)
28: 15(bool) IEqual 26 27
SelectionMerge 30 None
- BranchConditional 28 29 30
+ BranchConditional 28 29 30
29: Label
- Store 31(B) 20
+ Store 31(B) 20
Branch 11
33: Label
- Store 34(C) 27
+ Store 34(C) 27
Branch 30
30: Label
- 35: 7(int) Load 9(i)
+ 35: 7(int) Load 9(i)
37: 15(bool) IEqual 35 36
SelectionMerge 39 None
- BranchConditional 37 38 39
+ BranchConditional 37 38 39
38: Label
- Store 40(D) 41
+ Store 40(D) 41
Branch 12
42: Label
- Store 43(E) 44
+ Store 43(E) 44
Branch 39
39: Label
- Store 45(F) 46
+ Store 45(F) 46
Branch 11
12: Label
- Store 47(G) 48
+ Store 47(G) 48
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.doWhileLoop.frag.out b/Test/baseResults/spv.doWhileLoop.frag.out
old mode 100644
new mode 100755
index bf9b1ff..4034137
--- a/Test/baseResults/spv.doWhileLoop.frag.out
+++ b/Test/baseResults/spv.doWhileLoop.frag.out
@@ -8,38 +8,40 @@
// Id's are bound by 38
Source GLSL 110
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 10 "color"
Name 12 "BaseColor"
Name 25 "d"
Name 30 "bigColor"
Name 36 "gl_FragColor"
- Decorate 12(BaseColor) Smooth
+ Decorate 12(BaseColor) Smooth
Decorate 36(gl_FragColor) BuiltIn FragColor
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypePointer Function 8(fvec4)
11: TypePointer Input 8(fvec4)
- 12(BaseColor): 11(ptr) Variable Input
+ 12(BaseColor): 11(ptr) Variable Input
18: TypeBool
19: 18(bool) ConstantTrue
24: TypePointer UniformConstant 7(float)
- 25(d): 24(ptr) Variable UniformConstant
+ 25(d): 24(ptr) Variable UniformConstant
29: TypePointer UniformConstant 8(fvec4)
- 30(bigColor): 29(ptr) Variable UniformConstant
+ 30(bigColor): 29(ptr) Variable UniformConstant
34: 18(bool) ConstantFalse
35: TypePointer Output 8(fvec4)
-36(gl_FragColor): 35(ptr) Variable Output
+36(gl_FragColor): 35(ptr) Variable Output
4(main): 2 Function None 3
5: Label
- 10(color): 9(ptr) Variable Function
- 13: 8(fvec4) Load 12(BaseColor)
- Store 10(color) 13
+ 10(color): 9(ptr) Variable Function
+ 13: 8(fvec4) Load 12(BaseColor)
+ Store 10(color) 13
Branch 14
14: Label
17: 18(bool) Phi 19 5 34 16
@@ -47,25 +49,25 @@
Branch 20
20: Label
SelectionMerge 16 None
- BranchConditional 17 16 21
+ BranchConditional 17 16 21
21: Label
- 22: 8(fvec4) Load 10(color)
+ 22: 8(fvec4) Load 10(color)
23: 7(float) CompositeExtract 22 0
- 26: 7(float) Load 25(d)
+ 26: 7(float) Load 25(d)
27: 18(bool) FOrdLessThan 23 26
SelectionMerge 28 None
- BranchConditional 27 28 15
+ BranchConditional 27 28 15
28: Label
Branch 16
16: Label
- 31: 8(fvec4) Load 30(bigColor)
- 32: 8(fvec4) Load 10(color)
+ 31: 8(fvec4) Load 30(bigColor)
+ 32: 8(fvec4) Load 10(color)
33: 8(fvec4) FAdd 32 31
- Store 10(color) 33
+ Store 10(color) 33
Branch 14
15: Label
- 37: 8(fvec4) Load 10(color)
- Store 36(gl_FragColor) 37
+ 37: 8(fvec4) Load 10(color)
+ Store 36(gl_FragColor) 37
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.double.comp.out b/Test/baseResults/spv.double.comp.out
old mode 100644
new mode 100755
index 6e11825..3f2ca15
--- a/Test/baseResults/spv.double.comp.out
+++ b/Test/baseResults/spv.double.comp.out
@@ -10,9 +10,10 @@
// Id's are bound by 63
Source GLSL 430
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint GLCompute 4
+ EntryPoint GLCompute 4 "main"
Name 4 "main"
Name 9 "bufName"
MemberName 9(bufName) 0 "f"
@@ -26,23 +27,23 @@
Name 55 "globalCoef"
Name 59 "roll"
Name 62 "destTex"
- Decorate 9(bufName) GLSLShared
- Decorate 9(bufName) BufferBlock
+ Decorate 9(bufName) GLSLShared
+ Decorate 9(bufName) BufferBlock
Decorate 27(gl_GlobalInvocationID) BuiltIn GlobalInvocationId
Decorate 34(gl_LocalInvocationID) BuiltIn LocalInvocationId
- Decorate 14 NoStaticUse
- Decorate 57 NoStaticUse
- Decorate 14 NoStaticUse
- Decorate 14 NoStaticUse
- Decorate 59(roll) NoStaticUse
- Decorate 62(destTex) NoStaticUse
+ Decorate 14 NoStaticUse
+ Decorate 57 NoStaticUse
+ Decorate 14 NoStaticUse
+ Decorate 14 NoStaticUse
+ Decorate 59(roll) NoStaticUse
+ Decorate 62(destTex) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeFloat 64
9(bufName): TypeStruct 7(float) 8(float)
10: TypePointer Uniform 9(bufName)
- 11(bufInst): 10(ptr) Variable Uniform
+ 11(bufInst): 10(ptr) Variable Uniform
12: TypeInt 32 1
13: 12(int) Constant 1
14: 8(float) Constant 1413754136 1074340347
@@ -55,10 +56,10 @@
24: TypeInt 32 0
25: TypeVector 24(int) 3
26: TypePointer Input 25(ivec3)
-27(gl_GlobalInvocationID): 26(ptr) Variable Input
+27(gl_GlobalInvocationID): 26(ptr) Variable Input
29: TypeVector 24(int) 2
32: TypePointer Function 8(float)
-34(gl_LocalInvocationID): 26(ptr) Variable Input
+34(gl_LocalInvocationID): 26(ptr) Variable Input
38: 12(int) Constant 8
41: TypeVector 7(float) 2
43: 7(float) Constant 1090519040
@@ -71,25 +72,25 @@
56: 8(float) Constant 0 1072693248
57: 8(float) Constant 3229815407 1074340298
58: TypePointer UniformConstant 8(float)
- 59(roll): 58(ptr) Variable UniformConstant
- 60: TypeSampler7(float) 2D image
+ 59(roll): 58(ptr) Variable UniformConstant
+ 60: TypeImage 7(float) 2D nonsampled format:Unknown
61: TypePointer UniformConstant 60
- 62(destTex): 61(ptr) Variable UniformConstant
+ 62(destTex): 61(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
- 23(storePos): 22(ptr) Variable Function
- 33(localCoef): 32(ptr) Variable Function
- 50(aa): 49(ptr) Variable Function
- 55(globalCoef): 32(ptr) Variable Function
+ 23(storePos): 22(ptr) Variable Function
+ 33(localCoef): 32(ptr) Variable Function
+ 50(aa): 49(ptr) Variable Function
+ 55(globalCoef): 32(ptr) Variable Function
16: 15(ptr) AccessChain 11(bufInst) 13
- Store 16 14
+ Store 16 14
20: 19(ptr) AccessChain 11(bufInst) 17
- Store 20 18
- 28: 25(ivec3) Load 27(gl_GlobalInvocationID)
+ Store 20 18
+ 28: 25(ivec3) Load 27(gl_GlobalInvocationID)
30: 29(ivec2) VectorShuffle 28 28 0 1
31: 21(ivec2) Bitcast 30
- Store 23(storePos) 31
- 35: 25(ivec3) Load 34(gl_LocalInvocationID)
+ Store 23(storePos) 31
+ 35: 25(ivec3) Load 34(gl_LocalInvocationID)
36: 29(ivec2) VectorShuffle 35 35 0 1
37: 21(ivec2) Bitcast 36
39: 21(ivec2) CompositeConstruct 38 38
@@ -97,11 +98,11 @@
42: 41(fvec2) ConvertSToF 40
44: 41(fvec2) CompositeConstruct 43 43
45: 41(fvec2) FDiv 42 44
- 46: 7(float) ExtInst 1(GLSL.std.450) 58(length) 45
+ 46: 7(float) ExtInst 1(GLSL.std.450) 65(Length) 45
47: 8(float) FConvert 46
- Store 33(localCoef) 47
- Store 50(aa) 54
- Store 55(globalCoef) 56
+ Store 33(localCoef) 47
+ Store 50(aa) 54
+ Store 55(globalCoef) 56
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.earlyReturnDiscard.frag.out b/Test/baseResults/spv.earlyReturnDiscard.frag.out
old mode 100644
new mode 100755
index bb61deb..e2df2e7
--- a/Test/baseResults/spv.earlyReturnDiscard.frag.out
+++ b/Test/baseResults/spv.earlyReturnDiscard.frag.out
@@ -8,9 +8,11 @@
// Id's are bound by 112
Source GLSL 110
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 10 "color"
Name 12 "BaseColor"
@@ -26,130 +28,130 @@
Name 78 "b"
Name 107 "gl_FragColor"
Name 111 "threshhold3"
- Decorate 12(BaseColor) Smooth
- Decorate 19(c) Smooth
+ Decorate 12(BaseColor) Smooth
+ Decorate 19(c) Smooth
Decorate 107(gl_FragColor) BuiltIn FragColor
- Decorate 111(threshhold3) NoStaticUse
+ Decorate 111(threshhold3) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypePointer Function 8(fvec4)
11: TypePointer Input 8(fvec4)
- 12(BaseColor): 11(ptr) Variable Input
+ 12(BaseColor): 11(ptr) Variable Input
15: TypePointer UniformConstant 8(fvec4)
- 16(otherColor): 15(ptr) Variable UniformConstant
+ 16(otherColor): 15(ptr) Variable UniformConstant
18: TypePointer Input 7(float)
- 19(c): 18(ptr) Variable Input
+ 19(c): 18(ptr) Variable Input
21: TypePointer UniformConstant 7(float)
- 22(d): 21(ptr) Variable UniformConstant
+ 22(d): 21(ptr) Variable UniformConstant
24: TypeBool
- 28(bigColor): 15(ptr) Variable UniformConstant
- 33(smallColor): 15(ptr) Variable UniformConstant
- 39(minimum): 21(ptr) Variable UniformConstant
+ 28(bigColor): 15(ptr) Variable UniformConstant
+ 33(smallColor): 15(ptr) Variable UniformConstant
+ 39(minimum): 21(ptr) Variable UniformConstant
47: 7(float) Constant 1065353216
- 53(threshhold): 21(ptr) Variable UniformConstant
- 64(threshhold2): 21(ptr) Variable UniformConstant
+ 53(threshhold): 21(ptr) Variable UniformConstant
+ 64(threshhold2): 21(ptr) Variable UniformConstant
77: TypePointer UniformConstant 24(bool)
- 78(b): 77(ptr) Variable UniformConstant
+ 78(b): 77(ptr) Variable UniformConstant
106: TypePointer Output 8(fvec4)
-107(gl_FragColor): 106(ptr) Variable Output
-111(threshhold3): 21(ptr) Variable UniformConstant
+107(gl_FragColor): 106(ptr) Variable Output
+111(threshhold3): 21(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
- 10(color): 9(ptr) Variable Function
- 14(color2): 9(ptr) Variable Function
- 13: 8(fvec4) Load 12(BaseColor)
- Store 10(color) 13
- 17: 8(fvec4) Load 16(otherColor)
- Store 14(color2) 17
- 20: 7(float) Load 19(c)
- 23: 7(float) Load 22(d)
+ 10(color): 9(ptr) Variable Function
+ 14(color2): 9(ptr) Variable Function
+ 13: 8(fvec4) Load 12(BaseColor)
+ Store 10(color) 13
+ 17: 8(fvec4) Load 16(otherColor)
+ Store 14(color2) 17
+ 20: 7(float) Load 19(c)
+ 23: 7(float) Load 22(d)
25: 24(bool) FOrdGreaterThan 20 23
SelectionMerge 27 None
- BranchConditional 25 26 32
+ BranchConditional 25 26 32
26: Label
- 29: 8(fvec4) Load 28(bigColor)
- 30: 8(fvec4) Load 10(color)
+ 29: 8(fvec4) Load 28(bigColor)
+ 30: 8(fvec4) Load 10(color)
31: 8(fvec4) FAdd 30 29
- Store 10(color) 31
+ Store 10(color) 31
Branch 27
32: Label
- 34: 8(fvec4) Load 33(smallColor)
- 35: 8(fvec4) Load 10(color)
+ 34: 8(fvec4) Load 33(smallColor)
+ 35: 8(fvec4) Load 10(color)
36: 8(fvec4) FAdd 35 34
- Store 10(color) 36
+ Store 10(color) 36
Branch 27
27: Label
- 37: 8(fvec4) Load 10(color)
+ 37: 8(fvec4) Load 10(color)
38: 7(float) CompositeExtract 37 2
- 40: 7(float) Load 39(minimum)
+ 40: 7(float) Load 39(minimum)
41: 24(bool) FOrdLessThan 38 40
SelectionMerge 43 None
- BranchConditional 41 42 43
+ BranchConditional 41 42 43
42: Label
Branch 6
43: Label
- 45: 8(fvec4) Load 10(color)
+ 45: 8(fvec4) Load 10(color)
46: 7(float) CompositeExtract 45 2
48: 7(float) FAdd 46 47
- 49: 8(fvec4) Load 10(color)
+ 49: 8(fvec4) Load 10(color)
50: 8(fvec4) CompositeInsert 48 49 2
- Store 10(color) 50
- 51: 8(fvec4) Load 10(color)
+ Store 10(color) 50
+ 51: 8(fvec4) Load 10(color)
52: 7(float) CompositeExtract 51 2
- 54: 7(float) Load 53(threshhold)
+ 54: 7(float) Load 53(threshhold)
55: 24(bool) FOrdGreaterThan 52 54
SelectionMerge 57 None
- BranchConditional 55 56 57
+ BranchConditional 55 56 57
56: Label
Kill
57: Label
- 59: 8(fvec4) Load 10(color)
+ 59: 8(fvec4) Load 10(color)
60: 8(fvec4) CompositeConstruct 47 47 47 47
61: 8(fvec4) FAdd 59 60
- Store 10(color) 61
- 62: 8(fvec4) Load 10(color)
+ Store 10(color) 61
+ 62: 8(fvec4) Load 10(color)
63: 7(float) CompositeExtract 62 3
- 65: 7(float) Load 64(threshhold2)
+ 65: 7(float) Load 64(threshhold2)
66: 24(bool) FOrdGreaterThan 63 65
SelectionMerge 68 None
- BranchConditional 66 67 99
+ BranchConditional 66 67 99
67: Label
- 69: 8(fvec4) Load 10(color)
+ 69: 8(fvec4) Load 10(color)
70: 7(float) CompositeExtract 69 2
- 71: 7(float) Load 64(threshhold2)
+ 71: 7(float) Load 64(threshhold2)
72: 24(bool) FOrdGreaterThan 70 71
SelectionMerge 74 None
- BranchConditional 72 73 76
+ BranchConditional 72 73 76
73: Label
Branch 6
76: Label
- 79: 24(bool) Load 78(b)
+ 79: 24(bool) Load 78(b)
SelectionMerge 81 None
- BranchConditional 79 80 87
+ BranchConditional 79 80 87
80: Label
- 82: 8(fvec4) Load 10(color)
+ 82: 8(fvec4) Load 10(color)
83: 7(float) CompositeExtract 82 2
84: 7(float) FAdd 83 47
- 85: 8(fvec4) Load 10(color)
+ 85: 8(fvec4) Load 10(color)
86: 8(fvec4) CompositeInsert 84 85 2
- Store 10(color) 86
+ Store 10(color) 86
Branch 81
87: Label
- 88: 8(fvec4) Load 10(color)
+ 88: 8(fvec4) Load 10(color)
89: 7(float) CompositeExtract 88 0
- 90: 7(float) Load 39(minimum)
+ 90: 7(float) Load 39(minimum)
91: 24(bool) FOrdLessThan 89 90
SelectionMerge 93 None
- BranchConditional 91 92 95
+ BranchConditional 91 92 95
92: Label
Kill
95: Label
- 96: 8(fvec4) Load 10(color)
+ 96: 8(fvec4) Load 10(color)
97: 8(fvec4) CompositeConstruct 47 47 47 47
98: 8(fvec4) FAdd 96 97
- Store 10(color) 98
+ Store 10(color) 98
Branch 93
93: Label
Branch 81
@@ -158,9 +160,9 @@
74: Label
Branch 68
99: Label
- 100: 24(bool) Load 78(b)
+ 100: 24(bool) Load 78(b)
SelectionMerge 102 None
- BranchConditional 100 101 104
+ BranchConditional 100 101 104
101: Label
Kill
104: Label
@@ -168,10 +170,10 @@
102: Label
Branch 68
68: Label
- 108: 8(fvec4) Load 10(color)
- 109: 8(fvec4) Load 14(color2)
+ 108: 8(fvec4) Load 10(color)
+ 109: 8(fvec4) Load 14(color2)
110: 8(fvec4) FMul 108 109
- Store 107(gl_FragColor) 110
+ Store 107(gl_FragColor) 110
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.flowControl.frag.out b/Test/baseResults/spv.flowControl.frag.out
old mode 100644
new mode 100755
index 982f282..fc8cb3f
--- a/Test/baseResults/spv.flowControl.frag.out
+++ b/Test/baseResults/spv.flowControl.frag.out
@@ -8,9 +8,11 @@
// Id's are bound by 42
Source GLSL 120
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 10 "color"
Name 12 "BaseColor"
@@ -21,57 +23,57 @@
Name 28 "bigColor"
Name 33 "smallColor"
Name 38 "gl_FragColor"
- Decorate 12(BaseColor) Smooth
- Decorate 19(c) Smooth
+ Decorate 12(BaseColor) Smooth
+ Decorate 19(c) Smooth
Decorate 38(gl_FragColor) BuiltIn FragColor
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypePointer Function 8(fvec4)
11: TypePointer Input 8(fvec4)
- 12(BaseColor): 11(ptr) Variable Input
+ 12(BaseColor): 11(ptr) Variable Input
15: TypePointer UniformConstant 8(fvec4)
- 16(otherColor): 15(ptr) Variable UniformConstant
+ 16(otherColor): 15(ptr) Variable UniformConstant
18: TypePointer Input 7(float)
- 19(c): 18(ptr) Variable Input
+ 19(c): 18(ptr) Variable Input
21: TypePointer UniformConstant 7(float)
- 22(d): 21(ptr) Variable UniformConstant
+ 22(d): 21(ptr) Variable UniformConstant
24: TypeBool
- 28(bigColor): 15(ptr) Variable UniformConstant
- 33(smallColor): 15(ptr) Variable UniformConstant
+ 28(bigColor): 15(ptr) Variable UniformConstant
+ 33(smallColor): 15(ptr) Variable UniformConstant
37: TypePointer Output 8(fvec4)
-38(gl_FragColor): 37(ptr) Variable Output
+38(gl_FragColor): 37(ptr) Variable Output
4(main): 2 Function None 3
5: Label
- 10(color): 9(ptr) Variable Function
- 14(color2): 9(ptr) Variable Function
- 13: 8(fvec4) Load 12(BaseColor)
- Store 10(color) 13
- 17: 8(fvec4) Load 16(otherColor)
- Store 14(color2) 17
- 20: 7(float) Load 19(c)
- 23: 7(float) Load 22(d)
+ 10(color): 9(ptr) Variable Function
+ 14(color2): 9(ptr) Variable Function
+ 13: 8(fvec4) Load 12(BaseColor)
+ Store 10(color) 13
+ 17: 8(fvec4) Load 16(otherColor)
+ Store 14(color2) 17
+ 20: 7(float) Load 19(c)
+ 23: 7(float) Load 22(d)
25: 24(bool) FOrdGreaterThan 20 23
SelectionMerge 27 None
- BranchConditional 25 26 32
+ BranchConditional 25 26 32
26: Label
- 29: 8(fvec4) Load 28(bigColor)
- 30: 8(fvec4) Load 10(color)
+ 29: 8(fvec4) Load 28(bigColor)
+ 30: 8(fvec4) Load 10(color)
31: 8(fvec4) FAdd 30 29
- Store 10(color) 31
+ Store 10(color) 31
Branch 27
32: Label
- 34: 8(fvec4) Load 33(smallColor)
- 35: 8(fvec4) Load 10(color)
+ 34: 8(fvec4) Load 33(smallColor)
+ 35: 8(fvec4) Load 10(color)
36: 8(fvec4) FAdd 35 34
- Store 10(color) 36
+ Store 10(color) 36
Branch 27
27: Label
- 39: 8(fvec4) Load 10(color)
- 40: 8(fvec4) Load 14(color2)
+ 39: 8(fvec4) Load 10(color)
+ 40: 8(fvec4) Load 14(color2)
41: 8(fvec4) FMul 39 40
- Store 38(gl_FragColor) 41
+ Store 38(gl_FragColor) 41
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.for-continue-break.vert.out b/Test/baseResults/spv.for-continue-break.vert.out
old mode 100644
new mode 100755
index a1de5b4..cec5dae
--- a/Test/baseResults/spv.for-continue-break.vert.out
+++ b/Test/baseResults/spv.for-continue-break.vert.out
@@ -8,9 +8,10 @@
// Id's are bound by 49
Source ESSL 300
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Vertex 4
+ EntryPoint Vertex 4 "main"
Name 4 "main"
Name 9 "i"
Name 18 "A"
@@ -22,22 +23,12 @@
Name 44 "G"
Name 47 "gl_VertexID"
Name 48 "gl_InstanceID"
- Decorate 9(i) PrecisionHigh
- Decorate 18(A) PrecisionHigh
- Decorate 26(B) PrecisionHigh
- Decorate 30(C) PrecisionHigh
- Decorate 37(D) PrecisionHigh
- Decorate 39(E) PrecisionHigh
- Decorate 40(F) PrecisionHigh
- Decorate 44(G) PrecisionHigh
- Decorate 47(gl_VertexID) PrecisionHigh
Decorate 47(gl_VertexID) BuiltIn VertexId
- Decorate 47(gl_VertexID) NoStaticUse
- Decorate 48(gl_InstanceID) PrecisionHigh
+ Decorate 47(gl_VertexID) NoStaticUse
Decorate 48(gl_InstanceID) BuiltIn InstanceId
- Decorate 48(gl_InstanceID) NoStaticUse
+ Decorate 48(gl_InstanceID) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeInt 32 1
8: TypePointer Function 7(int)
10: 7(int) Constant 0
@@ -49,61 +40,61 @@
41: 7(int) Constant 12
45: 7(int) Constant 99
46: TypePointer Input 7(int)
- 47(gl_VertexID): 46(ptr) Variable Input
-48(gl_InstanceID): 46(ptr) Variable Input
+ 47(gl_VertexID): 46(ptr) Variable Input
+48(gl_InstanceID): 46(ptr) Variable Input
4(main): 2 Function None 3
5: Label
- 9(i): 8(ptr) Variable Function
- 18(A): 8(ptr) Variable Function
- 26(B): 8(ptr) Variable Function
- 30(C): 8(ptr) Variable Function
- 37(D): 8(ptr) Variable Function
- 39(E): 8(ptr) Variable Function
- 40(F): 8(ptr) Variable Function
- 44(G): 8(ptr) Variable Function
- Store 9(i) 10
+ 9(i): 8(ptr) Variable Function
+ 18(A): 8(ptr) Variable Function
+ 26(B): 8(ptr) Variable Function
+ 30(C): 8(ptr) Variable Function
+ 37(D): 8(ptr) Variable Function
+ 39(E): 8(ptr) Variable Function
+ 40(F): 8(ptr) Variable Function
+ 44(G): 8(ptr) Variable Function
+ Store 9(i) 10
Branch 11
11: Label
- 14: 7(int) Load 9(i)
+ 14: 7(int) Load 9(i)
17: 16(bool) SLessThan 14 15
LoopMerge 12 None
- BranchConditional 17 13 12
+ BranchConditional 17 13 12
13: Label
- Store 18(A) 19
- 20: 7(int) Load 9(i)
+ Store 18(A) 19
+ 20: 7(int) Load 9(i)
22: 7(int) SMod 20 21
23: 16(bool) IEqual 22 10
SelectionMerge 25 None
- BranchConditional 23 24 25
+ BranchConditional 23 24 25
24: Label
- Store 26(B) 19
- 27: 7(int) Load 9(i)
+ Store 26(B) 19
+ 27: 7(int) Load 9(i)
28: 7(int) IAdd 27 19
- Store 9(i) 28
+ Store 9(i) 28
Branch 11
29: Label
- Store 30(C) 19
+ Store 30(C) 19
Branch 25
25: Label
- 31: 7(int) Load 9(i)
+ 31: 7(int) Load 9(i)
33: 7(int) SMod 31 32
34: 16(bool) IEqual 33 10
SelectionMerge 36 None
- BranchConditional 34 35 36
+ BranchConditional 34 35 36
35: Label
- Store 37(D) 19
+ Store 37(D) 19
Branch 12
38: Label
- Store 39(E) 19
+ Store 39(E) 19
Branch 36
36: Label
- Store 40(F) 41
- 42: 7(int) Load 9(i)
+ Store 40(F) 41
+ 42: 7(int) Load 9(i)
43: 7(int) IAdd 42 19
- Store 9(i) 43
+ Store 9(i) 43
Branch 11
12: Label
- Store 44(G) 45
+ Store 44(G) 45
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.for-simple.vert.out b/Test/baseResults/spv.for-simple.vert.out
old mode 100644
new mode 100755
index 8facddc..11050df
--- a/Test/baseResults/spv.for-simple.vert.out
+++ b/Test/baseResults/spv.for-simple.vert.out
@@ -8,24 +8,21 @@
// Id's are bound by 26
Source ESSL 300
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Vertex 4
+ EntryPoint Vertex 4 "main"
Name 4 "main"
Name 9 "i"
Name 18 "j"
Name 24 "gl_VertexID"
Name 25 "gl_InstanceID"
- Decorate 9(i) PrecisionHigh
- Decorate 18(j) PrecisionHigh
- Decorate 24(gl_VertexID) PrecisionHigh
Decorate 24(gl_VertexID) BuiltIn VertexId
- Decorate 24(gl_VertexID) NoStaticUse
- Decorate 25(gl_InstanceID) PrecisionHigh
+ Decorate 24(gl_VertexID) NoStaticUse
Decorate 25(gl_InstanceID) BuiltIn InstanceId
- Decorate 25(gl_InstanceID) NoStaticUse
+ Decorate 25(gl_InstanceID) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeInt 32 1
8: TypePointer Function 7(int)
10: 7(int) Constant 0
@@ -34,24 +31,24 @@
19: 7(int) Constant 12
21: 7(int) Constant 1
23: TypePointer Input 7(int)
- 24(gl_VertexID): 23(ptr) Variable Input
-25(gl_InstanceID): 23(ptr) Variable Input
+ 24(gl_VertexID): 23(ptr) Variable Input
+25(gl_InstanceID): 23(ptr) Variable Input
4(main): 2 Function None 3
5: Label
- 9(i): 8(ptr) Variable Function
- 18(j): 8(ptr) Variable Function
- Store 9(i) 10
+ 9(i): 8(ptr) Variable Function
+ 18(j): 8(ptr) Variable Function
+ Store 9(i) 10
Branch 11
11: Label
- 14: 7(int) Load 9(i)
+ 14: 7(int) Load 9(i)
17: 16(bool) SLessThan 14 15
LoopMerge 12 None
- BranchConditional 17 13 12
+ BranchConditional 17 13 12
13: Label
- Store 18(j) 19
- 20: 7(int) Load 9(i)
+ Store 18(j) 19
+ 20: 7(int) Load 9(i)
22: 7(int) IAdd 20 21
- Store 9(i) 22
+ Store 9(i) 22
Branch 11
12: Label
Branch 6
diff --git a/Test/baseResults/spv.forLoop.frag.out b/Test/baseResults/spv.forLoop.frag.out
old mode 100644
new mode 100755
index 6ad719d..972ecea
--- a/Test/baseResults/spv.forLoop.frag.out
+++ b/Test/baseResults/spv.forLoop.frag.out
@@ -8,9 +8,11 @@
// Id's are bound by 123
Source GLSL 130
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 10 "color"
Name 12 "BaseColor"
@@ -27,168 +29,168 @@
Name 90 "i"
Name 98 "f"
Name 111 "i"
- Decorate 12(BaseColor) Smooth
+ Decorate 12(BaseColor) Smooth
Decorate 36(gl_FragColor) BuiltIn FragColor
- Decorate 98(f) Smooth
+ Decorate 98(f) Smooth
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypePointer Function 8(fvec4)
11: TypePointer Input 8(fvec4)
- 12(BaseColor): 11(ptr) Variable Input
+ 12(BaseColor): 11(ptr) Variable Input
14: TypeInt 32 1
15: TypePointer Function 14(int)
17: 14(int) Constant 0
22: TypePointer UniformConstant 14(int)
- 23(Count): 22(ptr) Variable UniformConstant
+ 23(Count): 22(ptr) Variable UniformConstant
25: TypeBool
27: TypePointer UniformConstant 8(fvec4)
- 28(bigColor): 27(ptr) Variable UniformConstant
+ 28(bigColor): 27(ptr) Variable UniformConstant
33: 14(int) Constant 1
35: TypePointer Output 8(fvec4)
-36(gl_FragColor): 35(ptr) Variable Output
+36(gl_FragColor): 35(ptr) Variable Output
38: TypePointer Function 7(float)
40: 7(float) Constant 0
46: 14(int) Constant 4
48: TypeInt 32 0
49: TypeVector 48(int) 4
50: TypePointer UniformConstant 49(ivec4)
- 51(v4): 50(ptr) Variable UniformConstant
+ 51(v4): 50(ptr) Variable UniformConstant
71: 48(int) Constant 4
86: TypeVector 7(float) 3
97: TypePointer Input 7(float)
- 98(f): 97(ptr) Variable Input
+ 98(f): 97(ptr) Variable Input
116: 14(int) Constant 16
4(main): 2 Function None 3
5: Label
- 10(color): 9(ptr) Variable Function
- 16(i): 15(ptr) Variable Function
- 39(sum): 38(ptr) Variable Function
- 41(i): 15(ptr) Variable Function
- 60(i): 15(ptr) Variable Function
- 66(tv4): 9(ptr) Variable Function
- 84(r): 9(ptr) Variable Function
- 90(i): 15(ptr) Variable Function
- 111(i): 15(ptr) Variable Function
- 13: 8(fvec4) Load 12(BaseColor)
- Store 10(color) 13
- Store 16(i) 17
+ 10(color): 9(ptr) Variable Function
+ 16(i): 15(ptr) Variable Function
+ 39(sum): 38(ptr) Variable Function
+ 41(i): 15(ptr) Variable Function
+ 60(i): 15(ptr) Variable Function
+ 66(tv4): 9(ptr) Variable Function
+ 84(r): 9(ptr) Variable Function
+ 90(i): 15(ptr) Variable Function
+ 111(i): 15(ptr) Variable Function
+ 13: 8(fvec4) Load 12(BaseColor)
+ Store 10(color) 13
+ Store 16(i) 17
Branch 18
18: Label
- 21: 14(int) Load 16(i)
- 24: 14(int) Load 23(Count)
+ 21: 14(int) Load 16(i)
+ 24: 14(int) Load 23(Count)
26: 25(bool) SLessThan 21 24
LoopMerge 19 None
- BranchConditional 26 20 19
+ BranchConditional 26 20 19
20: Label
- 29: 8(fvec4) Load 28(bigColor)
- 30: 8(fvec4) Load 10(color)
+ 29: 8(fvec4) Load 28(bigColor)
+ 30: 8(fvec4) Load 10(color)
31: 8(fvec4) FAdd 30 29
- Store 10(color) 31
- 32: 14(int) Load 16(i)
+ Store 10(color) 31
+ 32: 14(int) Load 16(i)
34: 14(int) IAdd 32 33
- Store 16(i) 34
+ Store 16(i) 34
Branch 18
19: Label
- 37: 8(fvec4) Load 10(color)
- Store 36(gl_FragColor) 37
- Store 39(sum) 40
- Store 41(i) 17
+ 37: 8(fvec4) Load 10(color)
+ Store 36(gl_FragColor) 37
+ Store 39(sum) 40
+ Store 41(i) 17
Branch 42
42: Label
- 45: 14(int) Load 41(i)
+ 45: 14(int) Load 41(i)
47: 25(bool) SLessThan 45 46
LoopMerge 43 None
- BranchConditional 47 44 43
+ BranchConditional 47 44 43
44: Label
- 52: 14(int) Load 41(i)
- 53: 49(ivec4) Load 51(v4)
+ 52: 14(int) Load 41(i)
+ 53: 49(ivec4) Load 51(v4)
54: 48(int) VectorExtractDynamic 53 52
55: 7(float) ConvertUToF 54
- 56: 7(float) Load 39(sum)
+ 56: 7(float) Load 39(sum)
57: 7(float) FAdd 56 55
- Store 39(sum) 57
- 58: 14(int) Load 41(i)
+ Store 39(sum) 57
+ 58: 14(int) Load 41(i)
59: 14(int) IAdd 58 33
- Store 41(i) 59
+ Store 41(i) 59
Branch 42
43: Label
- Store 60(i) 17
+ Store 60(i) 17
Branch 61
61: Label
- 64: 14(int) Load 60(i)
+ 64: 14(int) Load 60(i)
65: 25(bool) SLessThan 64 46
LoopMerge 62 None
- BranchConditional 65 63 62
+ BranchConditional 65 63 62
63: Label
- 67: 14(int) Load 60(i)
- 68: 14(int) Load 60(i)
- 69: 49(ivec4) Load 51(v4)
+ 67: 14(int) Load 60(i)
+ 68: 14(int) Load 60(i)
+ 69: 49(ivec4) Load 51(v4)
70: 48(int) VectorExtractDynamic 69 68
72: 48(int) IMul 70 71
73: 7(float) ConvertUToF 72
- 74: 8(fvec4) Load 66(tv4)
+ 74: 8(fvec4) Load 66(tv4)
75: 8(fvec4) VectorInsertDynamic 74 73 67
- Store 66(tv4) 75
- 76: 14(int) Load 60(i)
+ Store 66(tv4) 75
+ 76: 14(int) Load 60(i)
77: 14(int) IAdd 76 33
- Store 60(i) 77
+ Store 60(i) 77
Branch 61
62: Label
- 78: 7(float) Load 39(sum)
+ 78: 7(float) Load 39(sum)
79: 8(fvec4) CompositeConstruct 78 78 78 78
- 80: 8(fvec4) Load 66(tv4)
+ 80: 8(fvec4) Load 66(tv4)
81: 8(fvec4) FAdd 79 80
- 82: 8(fvec4) Load 36(gl_FragColor)
+ 82: 8(fvec4) Load 36(gl_FragColor)
83: 8(fvec4) FAdd 82 81
- Store 36(gl_FragColor) 83
- 85: 8(fvec4) Load 12(BaseColor)
+ Store 36(gl_FragColor) 83
+ 85: 8(fvec4) Load 12(BaseColor)
87: 86(fvec3) VectorShuffle 85 85 0 1 2
- 88: 8(fvec4) Load 84(r)
+ 88: 8(fvec4) Load 84(r)
89: 8(fvec4) VectorShuffle 88 87 4 5 6 3
- Store 84(r) 89
- Store 90(i) 17
+ Store 84(r) 89
+ Store 90(i) 17
Branch 91
91: Label
- 94: 14(int) Load 90(i)
- 95: 14(int) Load 23(Count)
+ 94: 14(int) Load 90(i)
+ 95: 14(int) Load 23(Count)
96: 25(bool) SLessThan 94 95
LoopMerge 92 None
- BranchConditional 96 93 92
+ BranchConditional 96 93 92
93: Label
- 99: 7(float) Load 98(f)
- 100: 8(fvec4) Load 84(r)
+ 99: 7(float) Load 98(f)
+ 100: 8(fvec4) Load 84(r)
101: 8(fvec4) CompositeInsert 99 100 3
- Store 84(r) 101
- 102: 14(int) Load 90(i)
+ Store 84(r) 101
+ 102: 14(int) Load 90(i)
103: 14(int) IAdd 102 33
- Store 90(i) 103
+ Store 90(i) 103
Branch 91
92: Label
- 104: 8(fvec4) Load 84(r)
+ 104: 8(fvec4) Load 84(r)
105: 86(fvec3) VectorShuffle 104 104 0 1 2
- 106: 8(fvec4) Load 36(gl_FragColor)
+ 106: 8(fvec4) Load 36(gl_FragColor)
107: 86(fvec3) VectorShuffle 106 106 0 1 2
108: 86(fvec3) FAdd 107 105
- 109: 8(fvec4) Load 36(gl_FragColor)
+ 109: 8(fvec4) Load 36(gl_FragColor)
110: 8(fvec4) VectorShuffle 109 108 4 5 6 3
- Store 36(gl_FragColor) 110
- Store 111(i) 17
+ Store 36(gl_FragColor) 110
+ Store 111(i) 17
Branch 112
112: Label
- 115: 14(int) Load 111(i)
+ 115: 14(int) Load 111(i)
117: 25(bool) SLessThan 115 116
LoopMerge 113 None
- BranchConditional 117 114 113
+ BranchConditional 117 114 113
114: Label
- 118: 7(float) Load 98(f)
- 119: 8(fvec4) Load 36(gl_FragColor)
+ 118: 7(float) Load 98(f)
+ 119: 8(fvec4) Load 36(gl_FragColor)
120: 8(fvec4) VectorTimesScalar 119 118
- Store 36(gl_FragColor) 120
- 121: 14(int) Load 111(i)
+ Store 36(gl_FragColor) 120
+ 121: 14(int) Load 111(i)
122: 14(int) IAdd 121 46
- Store 111(i) 122
+ Store 111(i) 122
Branch 112
113: Label
Branch 6
diff --git a/Test/baseResults/spv.forwardFun.frag.out b/Test/baseResults/spv.forwardFun.frag.out
old mode 100644
new mode 100755
index a4781e3..5934bd6
--- a/Test/baseResults/spv.forwardFun.frag.out
+++ b/Test/baseResults/spv.forwardFun.frag.out
@@ -8,9 +8,11 @@
// Id's are bound by 59
Source ESSL 100
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 7 "bar("
Name 11 "unreachableReturn("
@@ -24,52 +26,52 @@
Name 37 "d"
Name 49 "dummyReturn"
Name 58 "bigColor"
- Decorate 19(color) PrecisionMedium
- Decorate 21(BaseColor) PrecisionMedium
- Decorate 21(BaseColor) Smooth
- Decorate 28(f) PrecisionMedium
- Decorate 31(gl_FragColor) PrecisionMedium
+ Decorate 19(color) RelaxedPrecision
+ Decorate 21(BaseColor) RelaxedPrecision
+ Decorate 21(BaseColor) Smooth
+ Decorate 28(f) RelaxedPrecision
+ Decorate 31(gl_FragColor) RelaxedPrecision
Decorate 31(gl_FragColor) BuiltIn FragColor
- Decorate 37(d) PrecisionMedium
- Decorate 58(bigColor) PrecisionMedium
- Decorate 58(bigColor) NoStaticUse
+ Decorate 37(d) RelaxedPrecision
+ Decorate 58(bigColor) RelaxedPrecision
+ Decorate 58(bigColor) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
9: TypeFloat 32
- 10: TypeFunction 9(float)
+ 10: TypeFunction 9(float)
13: TypeVector 9(float) 4
14: TypePointer Function 13(fvec4)
15: TypeFunction 9(float) 14(ptr)
20: TypePointer Input 13(fvec4)
- 21(BaseColor): 20(ptr) Variable Input
+ 21(BaseColor): 20(ptr) Variable Input
27: TypePointer Function 9(float)
30: TypePointer Output 13(fvec4)
-31(gl_FragColor): 30(ptr) Variable Output
+31(gl_FragColor): 30(ptr) Variable Output
36: TypePointer UniformConstant 9(float)
- 37(d): 36(ptr) Variable UniformConstant
+ 37(d): 36(ptr) Variable UniformConstant
39: 9(float) Constant 1082549862
40: TypeBool
44: 9(float) Constant 1067030938
47: 9(float) Constant 1083179008
57: TypePointer UniformConstant 13(fvec4)
- 58(bigColor): 57(ptr) Variable UniformConstant
+ 58(bigColor): 57(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
- 19(color): 14(ptr) Variable Function
- 22(param): 14(ptr) Variable Function
- 28(f): 27(ptr) Variable Function
- 23: 13(fvec4) Load 21(BaseColor)
- Store 22(param) 23
+ 19(color): 14(ptr) Variable Function
+ 22(param): 14(ptr) Variable Function
+ 28(f): 27(ptr) Variable Function
+ 23: 13(fvec4) Load 21(BaseColor)
+ Store 22(param) 23
24: 9(float) FunctionCall 17(foo(vf4;) 22(param)
25: 13(fvec4) CompositeConstruct 24 24 24 24
- Store 19(color) 25
- 26: 2 FunctionCall 7(bar()
- 29: 9(float) FunctionCall 11(unreachableReturn()
- Store 28(f) 29
- 32: 13(fvec4) Load 19(color)
- 33: 9(float) Load 28(f)
+ Store 19(color) 25
+ 26: 2 FunctionCall 7(bar()
+ 29: 9(float) FunctionCall 11(unreachableReturn()
+ Store 28(f) 29
+ 32: 13(fvec4) Load 19(color)
+ 33: 9(float) Load 28(f)
34: 13(fvec4) VectorTimesScalar 32 33
- Store 31(gl_FragColor) 34
+ Store 31(gl_FragColor) 34
Branch 6
6: Label
Return
@@ -80,26 +82,26 @@
FunctionEnd
11(unreachableReturn(): 9(float) Function None 10
12: Label
- 49(dummyReturn): 27(ptr) Variable Function
- 35: 2 FunctionCall 7(bar()
- 38: 9(float) Load 37(d)
+ 49(dummyReturn): 27(ptr) Variable Function
+ 35: 2 FunctionCall 7(bar()
+ 38: 9(float) Load 37(d)
41: 40(bool) FOrdLessThan 38 39
SelectionMerge 43 None
- BranchConditional 41 42 46
+ BranchConditional 41 42 46
42: Label
ReturnValue 44
46: Label
ReturnValue 47
43: Label
- 50: 9(float) Load 49(dummyReturn)
+ 50: 9(float) Load 49(dummyReturn)
ReturnValue 50
FunctionEnd
17(foo(vf4;): 9(float) Function None 15
16(bar): 14(ptr) FunctionParameter
18: Label
- 51: 13(fvec4) Load 16(bar)
+ 51: 13(fvec4) Load 16(bar)
52: 9(float) CompositeExtract 51 0
- 53: 13(fvec4) Load 16(bar)
+ 53: 13(fvec4) Load 16(bar)
54: 9(float) CompositeExtract 53 1
55: 9(float) FAdd 52 54
ReturnValue 55
diff --git a/Test/baseResults/spv.functionCall.frag.out b/Test/baseResults/spv.functionCall.frag.out
old mode 100644
new mode 100755
index 1d7aa74..19af2d3
--- a/Test/baseResults/spv.functionCall.frag.out
+++ b/Test/baseResults/spv.functionCall.frag.out
@@ -10,9 +10,11 @@
// Id's are bound by 76
Source GLSL 130
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 12 "foo(vf4;"
Name 11 "bar"
@@ -30,21 +32,21 @@
Name 65 "g"
Name 68 "gl_FragColor"
Name 75 "bigColor"
- Decorate 57(BaseColor) Smooth
+ Decorate 57(BaseColor) Smooth
Decorate 68(gl_FragColor) BuiltIn FragColor
- Decorate 75(bigColor) NoStaticUse
+ Decorate 75(bigColor) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypePointer Function 8(fvec4)
10: TypeFunction 7(float) 9(ptr)
- 16: TypeFunction 7(float)
+ 16: TypeFunction 7(float)
21: TypePointer PrivateGlobal 7(float)
- 22(h): 21(ptr) Variable PrivateGlobal
+ 22(h): 21(ptr) Variable PrivateGlobal
23: 7(float) Constant 0
30: TypePointer UniformConstant 7(float)
- 31(d): 30(ptr) Variable UniformConstant
+ 31(d): 30(ptr) Variable UniformConstant
33: 7(float) Constant 1082549862
34: TypeBool
38: 7(float) Constant 1067030938
@@ -52,34 +54,34 @@
43: TypePointer Function 7(float)
51: 7(float) Constant 1081711002
56: TypePointer Input 8(fvec4)
- 57(BaseColor): 56(ptr) Variable Input
+ 57(BaseColor): 56(ptr) Variable Input
67: TypePointer Output 8(fvec4)
-68(gl_FragColor): 67(ptr) Variable Output
+68(gl_FragColor): 67(ptr) Variable Output
74: TypePointer UniformConstant 8(fvec4)
- 75(bigColor): 74(ptr) Variable UniformConstant
+ 75(bigColor): 74(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
- 55(color): 9(ptr) Variable Function
- 58(param): 9(ptr) Variable Function
- 63(f): 43(ptr) Variable Function
- 65(g): 43(ptr) Variable Function
- Store 22(h) 23
- 59: 8(fvec4) Load 57(BaseColor)
- Store 58(param) 59
+ 55(color): 9(ptr) Variable Function
+ 58(param): 9(ptr) Variable Function
+ 63(f): 43(ptr) Variable Function
+ 65(g): 43(ptr) Variable Function
+ Store 22(h) 23
+ 59: 8(fvec4) Load 57(BaseColor)
+ Store 58(param) 59
60: 7(float) FunctionCall 12(foo(vf4;) 58(param)
61: 8(fvec4) CompositeConstruct 60 60 60 60
- Store 55(color) 61
- 62: 2 FunctionCall 14(bar()
- 64: 7(float) FunctionCall 17(unreachableReturn()
- Store 63(f) 64
- 66: 7(float) FunctionCall 19(missingReturn()
- Store 65(g) 66
- 69: 8(fvec4) Load 55(color)
- 70: 7(float) Load 63(f)
+ Store 55(color) 61
+ 62: 2 FunctionCall 14(bar()
+ 64: 7(float) FunctionCall 17(unreachableReturn()
+ Store 63(f) 64
+ 66: 7(float) FunctionCall 19(missingReturn()
+ Store 65(g) 66
+ 69: 8(fvec4) Load 55(color)
+ 70: 7(float) Load 63(f)
71: 8(fvec4) VectorTimesScalar 69 70
- 72: 7(float) Load 22(h)
+ 72: 7(float) Load 22(h)
73: 8(fvec4) VectorTimesScalar 71 72
- Store 68(gl_FragColor) 73
+ Store 68(gl_FragColor) 73
Branch 6
6: Label
Return
@@ -87,9 +89,9 @@
12(foo(vf4;): 7(float) Function None 10
11(bar): 9(ptr) FunctionParameter
13: Label
- 24: 8(fvec4) Load 11(bar)
+ 24: 8(fvec4) Load 11(bar)
25: 7(float) CompositeExtract 24 0
- 26: 8(fvec4) Load 11(bar)
+ 26: 8(fvec4) Load 11(bar)
27: 7(float) CompositeExtract 26 1
28: 7(float) FAdd 25 27
ReturnValue 28
@@ -100,31 +102,31 @@
FunctionEnd
17(unreachableReturn(): 7(float) Function None 16
18: Label
- 44(dummyReturn): 43(ptr) Variable Function
- 32: 7(float) Load 31(d)
+ 44(dummyReturn): 43(ptr) Variable Function
+ 32: 7(float) Load 31(d)
35: 34(bool) FOrdLessThan 32 33
SelectionMerge 37 None
- BranchConditional 35 36 40
+ BranchConditional 35 36 40
36: Label
ReturnValue 38
40: Label
ReturnValue 41
37: Label
- 45: 7(float) Load 44(dummyReturn)
+ 45: 7(float) Load 44(dummyReturn)
ReturnValue 45
FunctionEnd
19(missingReturn(): 7(float) Function None 16
20: Label
- 53(dummyReturn): 43(ptr) Variable Function
- 46: 7(float) Load 31(d)
+ 53(dummyReturn): 43(ptr) Variable Function
+ 46: 7(float) Load 31(d)
47: 34(bool) FOrdLessThan 46 41
SelectionMerge 49 None
- BranchConditional 47 48 49
+ BranchConditional 47 48 49
48: Label
- 50: 7(float) Load 31(d)
- Store 22(h) 50
+ 50: 7(float) Load 31(d)
+ Store 22(h) 50
ReturnValue 51
49: Label
- 54: 7(float) Load 53(dummyReturn)
+ 54: 7(float) Load 53(dummyReturn)
ReturnValue 54
FunctionEnd
diff --git a/Test/baseResults/spv.functionSemantics.frag.out b/Test/baseResults/spv.functionSemantics.frag.out
old mode 100644
new mode 100755
index 3eafe32..aba41c3
--- a/Test/baseResults/spv.functionSemantics.frag.out
+++ b/Test/baseResults/spv.functionSemantics.frag.out
@@ -10,9 +10,11 @@
// Id's are bound by 159
Source GLSL 400
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 16 "foo(i1;i1;i1;i1;i1;i1;"
Name 10 "a"
@@ -48,7 +50,7 @@
Name 155 "gl_FragColor"
Decorate 155(gl_FragColor) BuiltIn FragColor
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeInt 32 1
8: TypePointer Function 7(int)
9: TypeFunction 7(int) 8(ptr) 7(int) 8(ptr) 7(int) 8(ptr) 8(ptr)
@@ -57,13 +59,13 @@
20: TypeVector 18(float) 3
21: TypePointer Function 20(fvec3)
22: TypeFunction 7(int) 19(ptr) 21(ptr) 8(ptr)
- 28: TypeFunction 7(int)
+ 28: TypeFunction 7(int)
39: 7(int) Constant 64
44: 7(int) Constant 1024
62: 18(float) Constant 1077936128
66: 18(float) Constant 1084227584
72: TypePointer UniformConstant 18(float)
- 73(u): 72(ptr) Variable UniformConstant
+ 73(u): 72(ptr) Variable UniformConstant
75: 18(float) Constant 1078774989
76: TypeBool
81: 7(int) Constant 1000000
@@ -79,89 +81,89 @@
102: 7(int) Constant 8
117: 7(int) Constant 128
127: TypePointer PrivateGlobal 7(int)
- 128(tempReturn): 127(ptr) Variable PrivateGlobal
+ 128(tempReturn): 127(ptr) Variable PrivateGlobal
129: 18(float) Constant 1082130432
130: 18(float) Constant 1065353216
131: 18(float) Constant 1073741824
132: 20(fvec3) ConstantComposite 130 131 62
153: TypeVector 18(float) 4
154: TypePointer Output 153(fvec4)
-155(gl_FragColor): 154(ptr) Variable Output
+155(gl_FragColor): 154(ptr) Variable Output
4(main): 2 Function None 3
5: Label
- 85(t): 8(ptr) Variable Function
- 90(f): 89(ptr) Variable Function
- 97(color): 8(ptr) Variable Function
- 103(e): 8(ptr) Variable Function
- 104(param): 8(ptr) Variable Function
- 105(param): 8(ptr) Variable Function
- 106(param): 8(ptr) Variable Function
- 107(param): 8(ptr) Variable Function
- 126(ret): 19(ptr) Variable Function
- 133(tempArg): 8(ptr) Variable Function
- 134(param): 19(ptr) Variable Function
- 135(param): 21(ptr) Variable Function
- 136(param): 8(ptr) Variable Function
- 139(arg): 19(ptr) Variable Function
- Store 85(t) 86
+ 85(t): 8(ptr) Variable Function
+ 90(f): 89(ptr) Variable Function
+ 97(color): 8(ptr) Variable Function
+ 103(e): 8(ptr) Variable Function
+ 104(param): 8(ptr) Variable Function
+ 105(param): 8(ptr) Variable Function
+ 106(param): 8(ptr) Variable Function
+ 107(param): 8(ptr) Variable Function
+ 126(ret): 19(ptr) Variable Function
+ 133(tempArg): 8(ptr) Variable Function
+ 134(param): 19(ptr) Variable Function
+ 135(param): 21(ptr) Variable Function
+ 136(param): 8(ptr) Variable Function
+ 139(arg): 19(ptr) Variable Function
+ Store 85(t) 86
94: 93(ptr) AccessChain 90(f) 91
- 95: 87(ivec4) Load 94
+ 95: 87(ivec4) Load 94
96: 87(ivec4) CompositeInsert 92 95 1
- Store 94 96
- 99: 7(int) Load 85(t)
- 100: 7(int) Load 85(t)
+ Store 94 96
+ 99: 7(int) Load 85(t)
+ 100: 7(int) Load 85(t)
101: 7(int) IAdd 99 100
- Store 104(param) 98
- Store 105(param) 101
+ Store 104(param) 98
+ Store 105(param) 101
108: 93(ptr) AccessChain 90(f) 91
- 109: 87(ivec4) Load 108
+ 109: 87(ivec4) Load 108
110: 7(int) CompositeExtract 109 1
- Store 107(param) 110
+ Store 107(param) 110
111: 7(int) FunctionCall 16(foo(i1;i1;i1;i1;i1;i1;) 104(param) 86 105(param) 102 106(param) 107(param)
- 112: 7(int) Load 106(param)
- Store 103(e) 112
- 113: 7(int) Load 107(param)
+ 112: 7(int) Load 106(param)
+ Store 103(e) 112
+ 113: 7(int) Load 107(param)
114: 93(ptr) AccessChain 90(f) 91
- 115: 87(ivec4) Load 114
+ 115: 87(ivec4) Load 114
116: 87(ivec4) CompositeInsert 113 115 1
- Store 114 116
- Store 97(color) 111
- 118: 7(int) Load 103(e)
+ Store 114 116
+ Store 97(color) 111
+ 118: 7(int) Load 103(e)
119: 93(ptr) AccessChain 90(f) 91
- 120: 87(ivec4) Load 119
+ 120: 87(ivec4) Load 119
121: 7(int) CompositeExtract 120 1
122: 7(int) IAdd 118 121
123: 7(int) IMul 117 122
- 124: 7(int) Load 97(color)
+ 124: 7(int) Load 97(color)
125: 7(int) IAdd 124 123
- Store 97(color) 125
- Store 134(param) 129
- Store 135(param) 132
+ Store 97(color) 125
+ Store 134(param) 129
+ Store 135(param) 132
137: 7(int) FunctionCall 26(foo2(f1;vf3;i1;) 134(param) 135(param) 136(param)
- 138: 7(int) Load 136(param)
- Store 133(tempArg) 138
- Store 128(tempReturn) 137
- 140: 7(int) Load 133(tempArg)
+ 138: 7(int) Load 136(param)
+ Store 133(tempArg) 138
+ Store 128(tempReturn) 137
+ 140: 7(int) Load 133(tempArg)
141: 18(float) ConvertSToF 140
- Store 139(arg) 141
- 142: 7(int) Load 128(tempReturn)
+ Store 139(arg) 141
+ 142: 7(int) Load 128(tempReturn)
143: 18(float) ConvertSToF 142
- Store 126(ret) 143
- 144: 18(float) Load 126(ret)
- 145: 18(float) Load 139(arg)
+ Store 126(ret) 143
+ 144: 18(float) Load 126(ret)
+ 145: 18(float) Load 139(arg)
146: 18(float) FAdd 144 145
147: 7(int) ConvertFToS 146
- 148: 7(int) Load 97(color)
+ 148: 7(int) Load 97(color)
149: 7(int) IAdd 148 147
- Store 97(color) 149
- 150: 7(int) FunctionCall 29(foo3()
- 151: 7(int) Load 97(color)
+ Store 97(color) 149
+ 150: 7(int) FunctionCall 29(foo3()
+ 151: 7(int) Load 97(color)
152: 7(int) IAdd 151 150
- Store 97(color) 152
- 156: 7(int) Load 97(color)
+ Store 97(color) 152
+ 156: 7(int) Load 97(color)
157: 18(float) ConvertSToF 156
158: 153(fvec4) CompositeConstruct 157 157 157 157
- Store 155(gl_FragColor) 158
+ Store 155(gl_FragColor) 158
Branch 6
6: Label
Return
@@ -174,40 +176,40 @@
14(e): 8(ptr) FunctionParameter
15(f): 8(ptr) FunctionParameter
17: Label
- 31(sum): 8(ptr) Variable Function
- 32: 7(int) Load 10(a)
+ 31(sum): 8(ptr) Variable Function
+ 32: 7(int) Load 10(a)
33: 7(int) IAdd 32 11(b)
- 34: 7(int) Load 12(c)
+ 34: 7(int) Load 12(c)
35: 7(int) IAdd 33 34
36: 7(int) IAdd 35 13(d)
- 37: 7(int) Load 15(f)
+ 37: 7(int) Load 15(f)
38: 7(int) IAdd 36 37
- Store 31(sum) 38
- 40: 7(int) Load 10(a)
+ Store 31(sum) 38
+ 40: 7(int) Load 10(a)
41: 7(int) IMul 40 39
- Store 10(a) 41
- 42: 7(int) Load 12(c)
+ Store 10(a) 41
+ 42: 7(int) Load 12(c)
43: 7(int) IMul 42 39
- Store 12(c) 43
- Store 14(e) 44
- 45: 7(int) Load 15(f)
+ Store 12(c) 43
+ Store 14(e) 44
+ 45: 7(int) Load 15(f)
46: 7(int) IMul 45 39
- Store 15(f) 46
- 47: 7(int) Load 10(a)
+ Store 15(f) 46
+ 47: 7(int) Load 10(a)
48: 7(int) IMul 39 11(b)
49: 7(int) IAdd 47 48
- 50: 7(int) Load 12(c)
+ 50: 7(int) Load 12(c)
51: 7(int) IAdd 49 50
52: 7(int) IMul 39 13(d)
53: 7(int) IAdd 51 52
- 54: 7(int) Load 14(e)
+ 54: 7(int) Load 14(e)
55: 7(int) IAdd 53 54
- 56: 7(int) Load 15(f)
+ 56: 7(int) Load 15(f)
57: 7(int) IAdd 55 56
- 58: 7(int) Load 31(sum)
+ 58: 7(int) Load 31(sum)
59: 7(int) IAdd 58 57
- Store 31(sum) 59
- 60: 7(int) Load 31(sum)
+ Store 31(sum) 59
+ 60: 7(int) Load 31(sum)
ReturnValue 60
FunctionEnd
26(foo2(f1;vf3;i1;): 7(int) Function None 22
@@ -215,11 +217,11 @@
24(b): 21(ptr) FunctionParameter
25(r): 8(ptr) FunctionParameter
27: Label
- 63: 18(float) Load 23(a)
+ 63: 18(float) Load 23(a)
64: 18(float) FMul 62 63
65: 7(int) ConvertFToS 64
- Store 25(r) 65
- 67: 20(fvec3) Load 24(b)
+ Store 25(r) 65
+ 67: 20(fvec3) Load 24(b)
68: 18(float) CompositeExtract 67 1
69: 18(float) FMul 66 68
70: 7(int) ConvertFToS 69
@@ -227,10 +229,10 @@
FunctionEnd
29(foo3(): 7(int) Function None 28
30: Label
- 74: 18(float) Load 73(u)
+ 74: 18(float) Load 73(u)
77: 76(bool) FOrdGreaterThan 74 75
SelectionMerge 79 None
- BranchConditional 77 78 79
+ BranchConditional 77 78 79
78: Label
Kill
79: Label
diff --git a/Test/baseResults/spv.length.frag.out b/Test/baseResults/spv.length.frag.out
old mode 100644
new mode 100755
index 8de3e4b..b56e804
--- a/Test/baseResults/spv.length.frag.out
+++ b/Test/baseResults/spv.length.frag.out
@@ -8,19 +8,21 @@
// Id's are bound by 34
Source GLSL 120
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 10 "t"
Name 15 "v"
Name 27 "gl_FragColor"
Name 33 "u"
- Decorate 15(v) Smooth
+ Decorate 15(v) Smooth
Decorate 27(gl_FragColor) BuiltIn FragColor
- Decorate 33(u) NoStaticUse
+ Decorate 33(u) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 2
9: TypePointer Function 8(fvec2)
@@ -28,30 +30,30 @@
12: 11(int) Constant 2
13: TypeArray 8(fvec2) 12
14: TypePointer Input 13
- 15(v): 14(ptr) Variable Input
+ 15(v): 14(ptr) Variable Input
16: TypeInt 32 1
17: 16(int) Constant 0
18: TypePointer Input 8(fvec2)
21: 16(int) Constant 1
25: TypeVector 7(float) 4
26: TypePointer Output 25(fvec4)
-27(gl_FragColor): 26(ptr) Variable Output
+27(gl_FragColor): 26(ptr) Variable Output
28: 7(float) Constant 1106247680
29: 25(fvec4) ConstantComposite 28 28 28 28
30: 11(int) Constant 3
31: TypeArray 25(fvec4) 30
32: TypePointer UniformConstant 31
- 33(u): 32(ptr) Variable UniformConstant
+ 33(u): 32(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
- 10(t): 9(ptr) Variable Function
+ 10(t): 9(ptr) Variable Function
19: 18(ptr) AccessChain 15(v) 17
- 20: 8(fvec2) Load 19
+ 20: 8(fvec2) Load 19
22: 18(ptr) AccessChain 15(v) 21
- 23: 8(fvec2) Load 22
+ 23: 8(fvec2) Load 22
24: 8(fvec2) FAdd 20 23
- Store 10(t) 24
- Store 27(gl_FragColor) 29
+ Store 10(t) 24
+ Store 27(gl_FragColor) 29
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.localAggregates.frag.out b/Test/baseResults/spv.localAggregates.frag.out
old mode 100644
new mode 100755
index 1ebe299..37f124e
--- a/Test/baseResults/spv.localAggregates.frag.out
+++ b/Test/baseResults/spv.localAggregates.frag.out
@@ -8,12 +8,14 @@
// Module Version 99
// Generated by (magic number): 51a00bb
-// Id's are bound by 134
+// Id's are bound by 135
Source GLSL 130
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 9 "s1"
MemberName 9(s1) 0 "i"
@@ -40,18 +42,18 @@
Name 87 "condition"
Name 95 "color"
Name 105 "gl_FragColor"
- Name 124 "sampler"
- Name 130 "foo"
- Name 131 "foo2"
- Name 133 "uFloatArray"
- Decorate 41(coord) Smooth
- Decorate 95(color) Smooth
+ Name 125 "sampler"
+ Name 131 "foo"
+ Name 132 "foo2"
+ Name 134 "uFloatArray"
+ Decorate 41(coord) Smooth
+ Decorate 95(color) Smooth
Decorate 105(gl_FragColor) BuiltIn FragColor
- Decorate 130(foo) NoStaticUse
- Decorate 131(foo2) NoStaticUse
- Decorate 133(uFloatArray) NoStaticUse
+ Decorate 131(foo) NoStaticUse
+ Decorate 132(foo2) NoStaticUse
+ Decorate 134(uFloatArray) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeInt 32 1
8: TypeFloat 32
9(s1): TypeStruct 7(int) 8(float)
@@ -60,7 +62,7 @@
12: TypePointer Function 11(s2)
14(s3): TypeStruct 11(s2) 7(int) 8(float) 9(s1)
15: TypePointer UniformConstant 14(s3)
- 16(foo3): 15(ptr) Variable UniformConstant
+ 16(foo3): 15(ptr) Variable UniformConstant
17: 7(int) Constant 0
18: TypePointer UniformConstant 11(s2)
21: TypePointer UniformConstant 7(int)
@@ -76,7 +78,7 @@
38: 7(int) Constant 4
39: TypeVector 8(float) 2
40: TypePointer Input 39(fvec2)
- 41(coord): 40(ptr) Variable Input
+ 41(coord): 40(ptr) Variable Input
45: 33(int) Constant 8
46: TypeArray 7(int) 45
47: TypePointer Function 46
@@ -84,134 +86,135 @@
68: 7(int) Constant 5
79: 7(int) Constant 16
83: 8(float) Constant 0
- 87(condition): 21(ptr) Variable UniformConstant
+ 87(condition): 21(ptr) Variable UniformConstant
93: 7(int) Constant 3
94: TypePointer Input 10(fvec4)
- 95(color): 94(ptr) Variable Input
+ 95(color): 94(ptr) Variable Input
97: TypePointer Function 10(fvec4)
104: TypePointer Output 10(fvec4)
-105(gl_FragColor): 104(ptr) Variable Output
- 122: TypeSampler8(float) 2D filter+texture
- 123: TypePointer UniformConstant 122
- 124(sampler): 123(ptr) Variable UniformConstant
- 129: TypePointer UniformConstant 9(s1)
- 130(foo): 129(ptr) Variable UniformConstant
- 131(foo2): 18(ptr) Variable UniformConstant
- 132: TypePointer UniformConstant 35
-133(uFloatArray): 132(ptr) Variable UniformConstant
+105(gl_FragColor): 104(ptr) Variable Output
+ 122: TypeImage 8(float) 2D sampled format:Unknown
+ 123: TypeSampledImage 122
+ 124: TypePointer UniformConstant 123
+ 125(sampler): 124(ptr) Variable UniformConstant
+ 130: TypePointer UniformConstant 9(s1)
+ 131(foo): 130(ptr) Variable UniformConstant
+ 132(foo2): 18(ptr) Variable UniformConstant
+ 133: TypePointer UniformConstant 35
+134(uFloatArray): 133(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
- 13(locals2): 12(ptr) Variable Function
- 37(localFArray): 36(ptr) Variable Function
- 48(localIArray): 47(ptr) Variable Function
- 67(x): 51(ptr) Variable Function
- 69(localArray): 36(ptr) Variable Function
- 74(i): 51(ptr) Variable Function
- 81(a): 36(ptr) Variable Function
+ 13(locals2): 12(ptr) Variable Function
+ 37(localFArray): 36(ptr) Variable Function
+ 48(localIArray): 47(ptr) Variable Function
+ 67(x): 51(ptr) Variable Function
+ 69(localArray): 36(ptr) Variable Function
+ 74(i): 51(ptr) Variable Function
+ 81(a): 36(ptr) Variable Function
19: 18(ptr) AccessChain 16(foo3) 17
- 20: 11(s2) Load 19
- Store 13(locals2) 20
+ 20: 11(s2) Load 19
+ Store 13(locals2) 20
22: 21(ptr) AccessChain 16(foo3) 17 17
- 23: 7(int) Load 22
+ 23: 7(int) Load 22
25: 24(bool) SGreaterThan 23 17
SelectionMerge 27 None
- BranchConditional 25 26 53
+ BranchConditional 25 26 53
26: Label
32: 31(ptr) AccessChain 13(locals2) 28 29
- Store 32 30
- 42: 39(fvec2) Load 41(coord)
+ Store 32 30
+ 42: 39(fvec2) Load 41(coord)
43: 8(float) CompositeExtract 42 0
44: 31(ptr) AccessChain 37(localFArray) 38
- Store 44 43
+ Store 44 43
49: 21(ptr) AccessChain 16(foo3) 17 17
- 50: 7(int) Load 49
+ 50: 7(int) Load 49
52: 51(ptr) AccessChain 48(localIArray) 28
- Store 52 50
+ Store 52 50
Branch 27
53: Label
- 54: 39(fvec2) Load 41(coord)
+ 54: 39(fvec2) Load 41(coord)
55: 8(float) CompositeExtract 54 0
56: 31(ptr) AccessChain 13(locals2) 28 29
- Store 56 55
+ Store 56 55
57: 31(ptr) AccessChain 37(localFArray) 38
- Store 57 30
+ Store 57 30
58: 51(ptr) AccessChain 48(localIArray) 28
- Store 58 17
+ Store 58 17
Branch 27
27: Label
59: 51(ptr) AccessChain 48(localIArray) 28
- 60: 7(int) Load 59
+ 60: 7(int) Load 59
61: 24(bool) IEqual 60 17
SelectionMerge 63 None
- BranchConditional 61 62 63
+ BranchConditional 61 62 63
62: Label
64: 31(ptr) AccessChain 37(localFArray) 38
- 65: 8(float) Load 64
+ 65: 8(float) Load 64
66: 8(float) FAdd 65 30
- Store 64 66
+ Store 64 66
Branch 63
63: Label
- Store 67(x) 68
- 70: 7(int) Load 67(x)
- 71: 39(fvec2) Load 41(coord)
+ Store 67(x) 68
+ 70: 7(int) Load 67(x)
+ 71: 39(fvec2) Load 41(coord)
72: 8(float) CompositeExtract 71 0
73: 31(ptr) AccessChain 69(localArray) 70
- Store 73 72
- Store 74(i) 17
+ Store 73 72
+ Store 74(i) 17
Branch 75
75: Label
- 78: 7(int) Load 74(i)
+ 78: 7(int) Load 74(i)
80: 24(bool) SLessThan 78 79
LoopMerge 76 None
- BranchConditional 80 77 76
+ BranchConditional 80 77 76
77: Label
- 82: 7(int) Load 74(i)
+ 82: 7(int) Load 74(i)
84: 31(ptr) AccessChain 81(a) 82
- Store 84 83
- 85: 7(int) Load 74(i)
+ Store 84 83
+ 85: 7(int) Load 74(i)
86: 7(int) IAdd 85 29
- Store 74(i) 86
+ Store 74(i) 86
Branch 75
76: Label
- 88: 7(int) Load 87(condition)
+ 88: 7(int) Load 87(condition)
89: 24(bool) IEqual 88 29
SelectionMerge 91 None
- BranchConditional 89 90 91
+ BranchConditional 89 90 91
90: Label
- 92: 35 Load 69(localArray)
- Store 81(a) 92
+ 92: 35 Load 69(localArray)
+ Store 81(a) 92
Branch 91
91: Label
- 96: 10(fvec4) Load 95(color)
+ 96: 10(fvec4) Load 95(color)
98: 97(ptr) AccessChain 13(locals2) 93
- Store 98 96
- 99: 39(fvec2) Load 41(coord)
+ Store 98 96
+ 99: 39(fvec2) Load 41(coord)
100: 8(float) CompositeExtract 99 1
101: 97(ptr) AccessChain 13(locals2) 93
- 102: 10(fvec4) Load 101
+ 102: 10(fvec4) Load 101
103: 10(fvec4) CompositeInsert 100 102 2
- Store 101 103
+ Store 101 103
106: 97(ptr) AccessChain 13(locals2) 93
- 107: 10(fvec4) Load 106
+ 107: 10(fvec4) Load 106
108: 31(ptr) AccessChain 37(localFArray) 38
- 109: 8(float) Load 108
+ 109: 8(float) Load 108
110: 31(ptr) AccessChain 13(locals2) 28 29
- 111: 8(float) Load 110
+ 111: 8(float) Load 110
112: 8(float) FAdd 109 111
- 113: 7(int) Load 67(x)
+ 113: 7(int) Load 67(x)
114: 31(ptr) AccessChain 69(localArray) 113
- 115: 8(float) Load 114
+ 115: 8(float) Load 114
116: 8(float) FAdd 112 115
- 117: 7(int) Load 67(x)
+ 117: 7(int) Load 67(x)
118: 31(ptr) AccessChain 81(a) 117
- 119: 8(float) Load 118
+ 119: 8(float) Load 118
120: 8(float) FAdd 116 119
121: 10(fvec4) VectorTimesScalar 107 120
- 125: 122 Load 124(sampler)
- 126: 39(fvec2) Load 41(coord)
- 127: 10(fvec4) TextureSample 125 126
- 128: 10(fvec4) FMul 121 127
- Store 105(gl_FragColor) 128
+ 126: 123 Load 125(sampler)
+ 127: 39(fvec2) Load 41(coord)
+ 128: 10(fvec4) ImageSampleImplicitLod 126 127
+ 129: 10(fvec4) FMul 121 128
+ Store 105(gl_FragColor) 129
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.loops.frag.out b/Test/baseResults/spv.loops.frag.out
old mode 100644
new mode 100755
index 6b8e3fb..8cc3a1c
--- a/Test/baseResults/spv.loops.frag.out
+++ b/Test/baseResults/spv.loops.frag.out
@@ -10,9 +10,11 @@
// Id's are bound by 750
Source GLSL 130
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 10 "color"
Name 12 "BaseColor"
@@ -69,32 +71,32 @@
Name 747 "d32"
Name 748 "d33"
Name 749 "d34"
- Decorate 12(BaseColor) Smooth
+ Decorate 12(BaseColor) Smooth
Decorate 628(gl_FragColor) BuiltIn FragColor
- Decorate 733(d13) NoStaticUse
- Decorate 734(d19) NoStaticUse
- Decorate 735(d20) NoStaticUse
- Decorate 736(d21) NoStaticUse
- Decorate 737(d22) NoStaticUse
- Decorate 738(d23) NoStaticUse
- Decorate 739(d24) NoStaticUse
- Decorate 740(d25) NoStaticUse
- Decorate 741(d26) NoStaticUse
- Decorate 742(d27) NoStaticUse
- Decorate 743(d28) NoStaticUse
- Decorate 744(d29) NoStaticUse
- Decorate 745(d30) NoStaticUse
- Decorate 746(d31) NoStaticUse
- Decorate 747(d32) NoStaticUse
- Decorate 748(d33) NoStaticUse
- Decorate 749(d34) NoStaticUse
+ Decorate 733(d13) NoStaticUse
+ Decorate 734(d19) NoStaticUse
+ Decorate 735(d20) NoStaticUse
+ Decorate 736(d21) NoStaticUse
+ Decorate 737(d22) NoStaticUse
+ Decorate 738(d23) NoStaticUse
+ Decorate 739(d24) NoStaticUse
+ Decorate 740(d25) NoStaticUse
+ Decorate 741(d26) NoStaticUse
+ Decorate 742(d27) NoStaticUse
+ Decorate 743(d28) NoStaticUse
+ Decorate 744(d29) NoStaticUse
+ Decorate 745(d30) NoStaticUse
+ Decorate 746(d31) NoStaticUse
+ Decorate 747(d32) NoStaticUse
+ Decorate 748(d33) NoStaticUse
+ Decorate 749(d34) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypePointer Function 8(fvec4)
11: TypePointer Input 8(fvec4)
- 12(BaseColor): 11(ptr) Variable Input
+ 12(BaseColor): 11(ptr) Variable Input
17: TypeBool
18: 17(bool) ConstantTrue
21: 7(float) Constant 1051260355
@@ -102,235 +104,235 @@
31: 7(float) Constant 1059648963
35: 8(fvec4) ConstantComposite 31 31 31 31
47: TypePointer UniformConstant 7(float)
- 48(d): 47(ptr) Variable UniformConstant
+ 48(d): 47(ptr) Variable UniformConstant
51: TypePointer UniformConstant 8(fvec4)
- 52(bigColor): 51(ptr) Variable UniformConstant
- 63(bigColor1_1): 51(ptr) Variable UniformConstant
+ 52(bigColor): 51(ptr) Variable UniformConstant
+ 63(bigColor1_1): 51(ptr) Variable UniformConstant
82: 7(float) Constant 1109917696
85: 7(float) Constant 1065353216
- 93(d2): 47(ptr) Variable UniformConstant
- 98(d3): 47(ptr) Variable UniformConstant
-102(bigColor1_2): 51(ptr) Variable UniformConstant
-113(bigColor1_3): 51(ptr) Variable UniformConstant
- 119(d4): 47(ptr) Variable UniformConstant
+ 93(d2): 47(ptr) Variable UniformConstant
+ 98(d3): 47(ptr) Variable UniformConstant
+102(bigColor1_2): 51(ptr) Variable UniformConstant
+113(bigColor1_3): 51(ptr) Variable UniformConstant
+ 119(d4): 47(ptr) Variable UniformConstant
128: TypeInt 32 1
129: TypePointer Function 128(int)
131: 128(int) Constant 0
136: TypePointer UniformConstant 128(int)
- 137(Count): 136(ptr) Variable UniformConstant
- 140(bigColor2): 51(ptr) Variable UniformConstant
+ 137(Count): 136(ptr) Variable UniformConstant
+ 140(bigColor2): 51(ptr) Variable UniformConstant
145: 128(int) Constant 1
- 158(bigColor3): 51(ptr) Variable UniformConstant
+ 158(bigColor3): 51(ptr) Variable UniformConstant
162: 17(bool) ConstantFalse
168: 128(int) Constant 42
183: 128(int) Constant 100
187: 7(float) Constant 1101004800
221: 128(int) Constant 120
- 306(bigColor4): 51(ptr) Variable UniformConstant
- 344(d5): 47(ptr) Variable UniformConstant
- 348(bigColor5): 51(ptr) Variable UniformConstant
- 366(d6): 47(ptr) Variable UniformConstant
- 378(bigColor6): 51(ptr) Variable UniformConstant
- 413(d7): 47(ptr) Variable UniformConstant
+ 306(bigColor4): 51(ptr) Variable UniformConstant
+ 344(d5): 47(ptr) Variable UniformConstant
+ 348(bigColor5): 51(ptr) Variable UniformConstant
+ 366(d6): 47(ptr) Variable UniformConstant
+ 378(bigColor6): 51(ptr) Variable UniformConstant
+ 413(d7): 47(ptr) Variable UniformConstant
442: 7(float) Constant 0
- 447(bigColor7): 51(ptr) Variable UniformConstant
- 472(d8): 47(ptr) Variable UniformConstant
+ 447(bigColor7): 51(ptr) Variable UniformConstant
+ 472(d8): 47(ptr) Variable UniformConstant
494: 7(float) Constant 1073741824
- 518(d9): 47(ptr) Variable UniformConstant
+ 518(d9): 47(ptr) Variable UniformConstant
534: 7(float) Constant 1084227584
- 550(d10): 47(ptr) Variable UniformConstant
- 560(d11): 47(ptr) Variable UniformConstant
- 572(d12): 47(ptr) Variable UniformConstant
+ 550(d10): 47(ptr) Variable UniformConstant
+ 560(d11): 47(ptr) Variable UniformConstant
+ 572(d12): 47(ptr) Variable UniformConstant
598: 7(float) Constant 1092616192
- 600(bigColor8): 51(ptr) Variable UniformConstant
+ 600(bigColor8): 51(ptr) Variable UniformConstant
627: TypePointer Output 8(fvec4)
-628(gl_FragColor): 627(ptr) Variable Output
- 635(d14): 47(ptr) Variable UniformConstant
- 640(d15): 47(ptr) Variable UniformConstant
- 658(d16): 47(ptr) Variable UniformConstant
- 696(d17): 47(ptr) Variable UniformConstant
- 702(d18): 47(ptr) Variable UniformConstant
- 733(d13): 47(ptr) Variable UniformConstant
- 734(d19): 47(ptr) Variable UniformConstant
- 735(d20): 47(ptr) Variable UniformConstant
- 736(d21): 47(ptr) Variable UniformConstant
- 737(d22): 47(ptr) Variable UniformConstant
- 738(d23): 47(ptr) Variable UniformConstant
- 739(d24): 47(ptr) Variable UniformConstant
- 740(d25): 47(ptr) Variable UniformConstant
- 741(d26): 47(ptr) Variable UniformConstant
- 742(d27): 47(ptr) Variable UniformConstant
- 743(d28): 47(ptr) Variable UniformConstant
- 744(d29): 47(ptr) Variable UniformConstant
- 745(d30): 47(ptr) Variable UniformConstant
- 746(d31): 47(ptr) Variable UniformConstant
- 747(d32): 47(ptr) Variable UniformConstant
- 748(d33): 47(ptr) Variable UniformConstant
- 749(d34): 47(ptr) Variable UniformConstant
+628(gl_FragColor): 627(ptr) Variable Output
+ 635(d14): 47(ptr) Variable UniformConstant
+ 640(d15): 47(ptr) Variable UniformConstant
+ 658(d16): 47(ptr) Variable UniformConstant
+ 696(d17): 47(ptr) Variable UniformConstant
+ 702(d18): 47(ptr) Variable UniformConstant
+ 733(d13): 47(ptr) Variable UniformConstant
+ 734(d19): 47(ptr) Variable UniformConstant
+ 735(d20): 47(ptr) Variable UniformConstant
+ 736(d21): 47(ptr) Variable UniformConstant
+ 737(d22): 47(ptr) Variable UniformConstant
+ 738(d23): 47(ptr) Variable UniformConstant
+ 739(d24): 47(ptr) Variable UniformConstant
+ 740(d25): 47(ptr) Variable UniformConstant
+ 741(d26): 47(ptr) Variable UniformConstant
+ 742(d27): 47(ptr) Variable UniformConstant
+ 743(d28): 47(ptr) Variable UniformConstant
+ 744(d29): 47(ptr) Variable UniformConstant
+ 745(d30): 47(ptr) Variable UniformConstant
+ 746(d31): 47(ptr) Variable UniformConstant
+ 747(d32): 47(ptr) Variable UniformConstant
+ 748(d33): 47(ptr) Variable UniformConstant
+ 749(d34): 47(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
- 10(color): 9(ptr) Variable Function
- 130(i): 129(ptr) Variable Function
- 163(i): 129(ptr) Variable Function
- 178(i): 129(ptr) Variable Function
- 216(i): 129(ptr) Variable Function
- 241(i): 129(ptr) Variable Function
- 269(i): 129(ptr) Variable Function
- 13: 8(fvec4) Load 12(BaseColor)
- Store 10(color) 13
+ 10(color): 9(ptr) Variable Function
+ 130(i): 129(ptr) Variable Function
+ 163(i): 129(ptr) Variable Function
+ 178(i): 129(ptr) Variable Function
+ 216(i): 129(ptr) Variable Function
+ 241(i): 129(ptr) Variable Function
+ 269(i): 129(ptr) Variable Function
+ 13: 8(fvec4) Load 12(BaseColor)
+ Store 10(color) 13
Branch 14
14: Label
LoopMerge 15 None
- BranchConditional 18 16 15
+ BranchConditional 18 16 15
16: Label
- 19: 8(fvec4) Load 10(color)
+ 19: 8(fvec4) Load 10(color)
20: 7(float) CompositeExtract 19 0
22: 17(bool) FOrdLessThan 20 21
SelectionMerge 24 None
- BranchConditional 22 23 24
+ BranchConditional 22 23 24
23: Label
- 26: 8(fvec4) Load 10(color)
+ 26: 8(fvec4) Load 10(color)
27: 8(fvec4) FAdd 26 25
- Store 10(color) 27
+ Store 10(color) 27
Branch 15
24: Label
- 29: 8(fvec4) Load 10(color)
+ 29: 8(fvec4) Load 10(color)
30: 7(float) CompositeExtract 29 0
32: 17(bool) FOrdLessThan 30 31
SelectionMerge 34 None
- BranchConditional 32 33 34
+ BranchConditional 32 33 34
33: Label
- 36: 8(fvec4) Load 10(color)
+ 36: 8(fvec4) Load 10(color)
37: 8(fvec4) FAdd 36 35
- Store 10(color) 37
+ Store 10(color) 37
Branch 15
34: Label
- 39: 8(fvec4) Load 10(color)
+ 39: 8(fvec4) Load 10(color)
40: 8(fvec4) FAdd 39 25
- Store 10(color) 40
+ Store 10(color) 40
Branch 15
15: Label
Branch 42
42: Label
- 45: 8(fvec4) Load 10(color)
+ 45: 8(fvec4) Load 10(color)
46: 7(float) CompositeExtract 45 0
- 49: 7(float) Load 48(d)
+ 49: 7(float) Load 48(d)
50: 17(bool) FOrdLessThan 46 49
LoopMerge 43 None
- BranchConditional 50 44 43
+ BranchConditional 50 44 43
44: Label
- 53: 8(fvec4) Load 52(bigColor)
- 54: 8(fvec4) Load 10(color)
+ 53: 8(fvec4) Load 52(bigColor)
+ 54: 8(fvec4) Load 10(color)
55: 8(fvec4) FAdd 54 53
- Store 10(color) 55
+ Store 10(color) 55
Branch 42
43: Label
Branch 56
56: Label
- 59: 8(fvec4) Load 10(color)
+ 59: 8(fvec4) Load 10(color)
60: 7(float) CompositeExtract 59 2
- 61: 7(float) Load 48(d)
+ 61: 7(float) Load 48(d)
62: 17(bool) FOrdLessThan 60 61
LoopMerge 57 None
- BranchConditional 62 58 57
+ BranchConditional 62 58 57
58: Label
- 64: 8(fvec4) Load 63(bigColor1_1)
- 65: 8(fvec4) Load 10(color)
+ 64: 8(fvec4) Load 63(bigColor1_1)
+ 65: 8(fvec4) Load 10(color)
66: 8(fvec4) FAdd 65 64
- Store 10(color) 66
- 67: 8(fvec4) Load 10(color)
+ Store 10(color) 66
+ 67: 8(fvec4) Load 10(color)
68: 7(float) CompositeExtract 67 3
- 69: 7(float) Load 48(d)
+ 69: 7(float) Load 48(d)
70: 17(bool) FOrdLessThan 68 69
SelectionMerge 72 None
- BranchConditional 70 71 72
+ BranchConditional 70 71 72
71: Label
Branch 56
72: Label
- 74: 8(fvec4) Load 63(bigColor1_1)
- 75: 8(fvec4) Load 10(color)
+ 74: 8(fvec4) Load 63(bigColor1_1)
+ 75: 8(fvec4) Load 10(color)
76: 8(fvec4) FAdd 75 74
- Store 10(color) 76
+ Store 10(color) 76
Branch 56
57: Label
Branch 77
77: Label
- 80: 8(fvec4) Load 10(color)
+ 80: 8(fvec4) Load 10(color)
81: 7(float) CompositeExtract 80 0
83: 17(bool) FOrdLessThan 81 82
LoopMerge 78 None
- BranchConditional 83 79 78
+ BranchConditional 83 79 78
79: Label
- 84: 8(fvec4) Load 10(color)
+ 84: 8(fvec4) Load 10(color)
86: 8(fvec4) CompositeConstruct 85 85 85 85
87: 8(fvec4) FAdd 84 86
- Store 10(color) 87
+ Store 10(color) 87
Branch 77
78: Label
Branch 88
88: Label
- 91: 8(fvec4) Load 10(color)
+ 91: 8(fvec4) Load 10(color)
92: 7(float) CompositeExtract 91 3
- 94: 7(float) Load 93(d2)
+ 94: 7(float) Load 93(d2)
95: 17(bool) FOrdLessThan 92 94
- 96: 8(fvec4) Load 10(color)
+ 96: 8(fvec4) Load 10(color)
97: 7(float) CompositeExtract 96 1
- 99: 7(float) Load 98(d3)
+ 99: 7(float) Load 98(d3)
100: 17(bool) FOrdLessThan 97 99
101: 17(bool) LogicalAnd 95 100
LoopMerge 89 None
- BranchConditional 101 90 89
+ BranchConditional 101 90 89
90: Label
- 103: 8(fvec4) Load 102(bigColor1_2)
- 104: 8(fvec4) Load 10(color)
+ 103: 8(fvec4) Load 102(bigColor1_2)
+ 104: 8(fvec4) Load 10(color)
105: 8(fvec4) FAdd 104 103
- Store 10(color) 105
+ Store 10(color) 105
Branch 88
89: Label
Branch 106
106: Label
- 109: 8(fvec4) Load 10(color)
+ 109: 8(fvec4) Load 10(color)
110: 7(float) CompositeExtract 109 2
- 111: 7(float) Load 98(d3)
+ 111: 7(float) Load 98(d3)
112: 17(bool) FOrdLessThan 110 111
LoopMerge 107 None
- BranchConditional 112 108 107
+ BranchConditional 112 108 107
108: Label
- 114: 8(fvec4) Load 113(bigColor1_3)
- 115: 8(fvec4) Load 10(color)
+ 114: 8(fvec4) Load 113(bigColor1_3)
+ 115: 8(fvec4) Load 10(color)
116: 8(fvec4) FAdd 115 114
- Store 10(color) 116
- 117: 8(fvec4) Load 10(color)
+ Store 10(color) 116
+ 117: 8(fvec4) Load 10(color)
118: 7(float) CompositeExtract 117 1
- 120: 7(float) Load 119(d4)
+ 120: 7(float) Load 119(d4)
121: 17(bool) FOrdLessThan 118 120
SelectionMerge 123 None
- BranchConditional 121 122 123
+ BranchConditional 121 122 123
122: Label
Branch 107
123: Label
- 125: 8(fvec4) Load 113(bigColor1_3)
- 126: 8(fvec4) Load 10(color)
+ 125: 8(fvec4) Load 113(bigColor1_3)
+ 126: 8(fvec4) Load 10(color)
127: 8(fvec4) FAdd 126 125
- Store 10(color) 127
+ Store 10(color) 127
Branch 106
107: Label
- Store 130(i) 131
+ Store 130(i) 131
Branch 132
132: Label
- 135: 128(int) Load 130(i)
- 138: 128(int) Load 137(Count)
+ 135: 128(int) Load 130(i)
+ 138: 128(int) Load 137(Count)
139: 17(bool) SLessThan 135 138
LoopMerge 133 None
- BranchConditional 139 134 133
+ BranchConditional 139 134 133
134: Label
- 141: 8(fvec4) Load 140(bigColor2)
- 142: 8(fvec4) Load 10(color)
+ 141: 8(fvec4) Load 140(bigColor2)
+ 142: 8(fvec4) Load 10(color)
143: 8(fvec4) FAdd 142 141
- Store 10(color) 143
- 144: 128(int) Load 130(i)
+ Store 10(color) 143
+ 144: 128(int) Load 130(i)
146: 128(int) IAdd 144 145
- Store 130(i) 146
+ Store 130(i) 146
Branch 132
133: Label
Branch 147
@@ -340,202 +342,202 @@
Branch 151
151: Label
SelectionMerge 149 None
- BranchConditional 150 149 152
+ BranchConditional 150 149 152
152: Label
- 153: 8(fvec4) Load 10(color)
+ 153: 8(fvec4) Load 10(color)
154: 7(float) CompositeExtract 153 0
- 155: 7(float) Load 93(d2)
+ 155: 7(float) Load 93(d2)
156: 17(bool) FOrdLessThan 154 155
SelectionMerge 157 None
- BranchConditional 156 157 148
+ BranchConditional 156 157 148
157: Label
Branch 149
149: Label
- 159: 8(fvec4) Load 158(bigColor3)
- 160: 8(fvec4) Load 10(color)
+ 159: 8(fvec4) Load 158(bigColor3)
+ 160: 8(fvec4) Load 10(color)
161: 8(fvec4) FAdd 160 159
- Store 10(color) 161
+ Store 10(color) 161
Branch 147
148: Label
- Store 163(i) 131
+ Store 163(i) 131
Branch 164
164: Label
- 167: 128(int) Load 163(i)
+ 167: 128(int) Load 163(i)
169: 17(bool) SLessThan 167 168
LoopMerge 165 None
- BranchConditional 169 166 165
+ BranchConditional 169 166 165
166: Label
- 170: 7(float) Load 98(d3)
- 171: 8(fvec4) Load 10(color)
+ 170: 7(float) Load 98(d3)
+ 171: 8(fvec4) Load 10(color)
172: 7(float) CompositeExtract 171 2
173: 7(float) FAdd 172 170
- 174: 8(fvec4) Load 10(color)
+ 174: 8(fvec4) Load 10(color)
175: 8(fvec4) CompositeInsert 173 174 2
- Store 10(color) 175
- 176: 128(int) Load 163(i)
+ Store 10(color) 175
+ 176: 128(int) Load 163(i)
177: 128(int) IAdd 176 145
- Store 163(i) 177
+ Store 163(i) 177
Branch 164
165: Label
- Store 178(i) 131
+ Store 178(i) 131
Branch 179
179: Label
- 182: 128(int) Load 178(i)
+ 182: 128(int) Load 178(i)
184: 17(bool) SLessThan 182 183
LoopMerge 180 None
- BranchConditional 184 181 180
+ BranchConditional 184 181 180
181: Label
- 185: 8(fvec4) Load 10(color)
+ 185: 8(fvec4) Load 10(color)
186: 7(float) CompositeExtract 185 2
188: 17(bool) FOrdLessThan 186 187
SelectionMerge 190 None
- BranchConditional 188 189 196
+ BranchConditional 188 189 196
189: Label
- 191: 8(fvec4) Load 10(color)
+ 191: 8(fvec4) Load 10(color)
192: 7(float) CompositeExtract 191 0
193: 7(float) FAdd 192 85
- 194: 8(fvec4) Load 10(color)
+ 194: 8(fvec4) Load 10(color)
195: 8(fvec4) CompositeInsert 193 194 0
- Store 10(color) 195
+ Store 10(color) 195
Branch 190
196: Label
- 197: 8(fvec4) Load 10(color)
+ 197: 8(fvec4) Load 10(color)
198: 7(float) CompositeExtract 197 1
199: 7(float) FAdd 198 85
- 200: 8(fvec4) Load 10(color)
+ 200: 8(fvec4) Load 10(color)
201: 8(fvec4) CompositeInsert 199 200 1
- Store 10(color) 201
+ Store 10(color) 201
Branch 190
190: Label
- 202: 8(fvec4) Load 10(color)
+ 202: 8(fvec4) Load 10(color)
203: 7(float) CompositeExtract 202 3
204: 17(bool) FOrdLessThan 203 187
SelectionMerge 206 None
- BranchConditional 204 205 206
+ BranchConditional 204 205 206
205: Label
- 207: 8(fvec4) Load 10(color)
+ 207: 8(fvec4) Load 10(color)
208: 7(float) CompositeExtract 207 2
- 209: 8(fvec4) Load 10(color)
+ 209: 8(fvec4) Load 10(color)
210: 7(float) CompositeExtract 209 1
211: 17(bool) FOrdGreaterThan 208 210
SelectionMerge 213 None
- BranchConditional 211 212 213
+ BranchConditional 211 212 213
212: Label
Branch 213
213: Label
Branch 206
206: Label
- 214: 128(int) Load 178(i)
+ 214: 128(int) Load 178(i)
215: 128(int) IAdd 214 145
- Store 178(i) 215
+ Store 178(i) 215
Branch 179
180: Label
- Store 216(i) 131
+ Store 216(i) 131
Branch 217
217: Label
- 220: 128(int) Load 216(i)
+ 220: 128(int) Load 216(i)
222: 17(bool) SLessThan 220 221
LoopMerge 218 None
- BranchConditional 222 219 218
+ BranchConditional 222 219 218
219: Label
- 223: 8(fvec4) Load 10(color)
+ 223: 8(fvec4) Load 10(color)
224: 7(float) CompositeExtract 223 2
225: 17(bool) FOrdLessThan 224 187
SelectionMerge 227 None
- BranchConditional 225 226 233
+ BranchConditional 225 226 233
226: Label
- 228: 8(fvec4) Load 10(color)
+ 228: 8(fvec4) Load 10(color)
229: 7(float) CompositeExtract 228 0
230: 7(float) FAdd 229 85
- 231: 8(fvec4) Load 10(color)
+ 231: 8(fvec4) Load 10(color)
232: 8(fvec4) CompositeInsert 230 231 0
- Store 10(color) 232
+ Store 10(color) 232
Branch 227
233: Label
- 234: 8(fvec4) Load 10(color)
+ 234: 8(fvec4) Load 10(color)
235: 7(float) CompositeExtract 234 1
236: 7(float) FAdd 235 85
- 237: 8(fvec4) Load 10(color)
+ 237: 8(fvec4) Load 10(color)
238: 8(fvec4) CompositeInsert 236 237 1
- Store 10(color) 238
+ Store 10(color) 238
Branch 227
227: Label
- 239: 128(int) Load 216(i)
+ 239: 128(int) Load 216(i)
240: 128(int) IAdd 239 145
- Store 216(i) 240
+ Store 216(i) 240
Branch 217
218: Label
- Store 241(i) 131
+ Store 241(i) 131
Branch 242
242: Label
- 245: 128(int) Load 241(i)
+ 245: 128(int) Load 241(i)
246: 17(bool) SLessThan 245 168
LoopMerge 243 None
- BranchConditional 246 244 243
+ BranchConditional 246 244 243
244: Label
- 247: 7(float) Load 98(d3)
- 248: 8(fvec4) Load 10(color)
+ 247: 7(float) Load 98(d3)
+ 248: 8(fvec4) Load 10(color)
249: 7(float) CompositeExtract 248 2
250: 7(float) FAdd 249 247
- 251: 8(fvec4) Load 10(color)
+ 251: 8(fvec4) Load 10(color)
252: 8(fvec4) CompositeInsert 250 251 2
- Store 10(color) 252
- 253: 8(fvec4) Load 10(color)
+ Store 10(color) 252
+ 253: 8(fvec4) Load 10(color)
254: 7(float) CompositeExtract 253 0
- 255: 7(float) Load 119(d4)
+ 255: 7(float) Load 119(d4)
256: 17(bool) FOrdLessThan 254 255
SelectionMerge 258 None
- BranchConditional 256 257 258
+ BranchConditional 256 257 258
257: Label
- 259: 128(int) Load 241(i)
+ 259: 128(int) Load 241(i)
260: 128(int) IAdd 259 145
- Store 241(i) 260
+ Store 241(i) 260
Branch 242
258: Label
- 262: 8(fvec4) Load 10(color)
+ 262: 8(fvec4) Load 10(color)
263: 7(float) CompositeExtract 262 3
264: 7(float) FAdd 263 85
- 265: 8(fvec4) Load 10(color)
+ 265: 8(fvec4) Load 10(color)
266: 8(fvec4) CompositeInsert 264 265 3
- Store 10(color) 266
- 267: 128(int) Load 241(i)
+ Store 10(color) 266
+ 267: 128(int) Load 241(i)
268: 128(int) IAdd 267 145
- Store 241(i) 268
+ Store 241(i) 268
Branch 242
243: Label
- Store 269(i) 131
+ Store 269(i) 131
Branch 270
270: Label
- 273: 128(int) Load 269(i)
+ 273: 128(int) Load 269(i)
274: 17(bool) SLessThan 273 168
LoopMerge 271 None
- BranchConditional 274 272 271
+ BranchConditional 274 272 271
272: Label
- 275: 7(float) Load 98(d3)
- 276: 8(fvec4) Load 10(color)
+ 275: 7(float) Load 98(d3)
+ 276: 8(fvec4) Load 10(color)
277: 7(float) CompositeExtract 276 2
278: 7(float) FAdd 277 275
- 279: 8(fvec4) Load 10(color)
+ 279: 8(fvec4) Load 10(color)
280: 8(fvec4) CompositeInsert 278 279 2
- Store 10(color) 280
- 281: 8(fvec4) Load 10(color)
+ Store 10(color) 280
+ 281: 8(fvec4) Load 10(color)
282: 7(float) CompositeExtract 281 0
- 283: 7(float) Load 119(d4)
+ 283: 7(float) Load 119(d4)
284: 17(bool) FOrdLessThan 282 283
SelectionMerge 286 None
- BranchConditional 284 285 286
+ BranchConditional 284 285 286
285: Label
Branch 271
286: Label
- 288: 8(fvec4) Load 10(color)
+ 288: 8(fvec4) Load 10(color)
289: 7(float) CompositeExtract 288 3
290: 7(float) FAdd 289 85
- 291: 8(fvec4) Load 10(color)
+ 291: 8(fvec4) Load 10(color)
292: 8(fvec4) CompositeInsert 290 291 3
- Store 10(color) 292
- 293: 128(int) Load 269(i)
+ Store 10(color) 292
+ 293: 128(int) Load 269(i)
294: 128(int) IAdd 293 145
- Store 269(i) 294
+ Store 269(i) 294
Branch 270
271: Label
Branch 295
@@ -545,53 +547,53 @@
Branch 299
299: Label
SelectionMerge 297 None
- BranchConditional 298 297 300
+ BranchConditional 298 297 300
300: Label
- 301: 8(fvec4) Load 10(color)
+ 301: 8(fvec4) Load 10(color)
302: 7(float) CompositeExtract 301 2
- 303: 7(float) Load 119(d4)
+ 303: 7(float) Load 119(d4)
304: 17(bool) FOrdLessThan 302 303
SelectionMerge 305 None
- BranchConditional 304 305 296
+ BranchConditional 304 305 296
305: Label
Branch 297
297: Label
- 307: 8(fvec4) Load 306(bigColor4)
- 308: 8(fvec4) Load 10(color)
+ 307: 8(fvec4) Load 306(bigColor4)
+ 308: 8(fvec4) Load 10(color)
309: 8(fvec4) FAdd 308 307
- Store 10(color) 309
- 310: 8(fvec4) Load 10(color)
+ Store 10(color) 309
+ 310: 8(fvec4) Load 10(color)
311: 7(float) CompositeExtract 310 0
- 312: 7(float) Load 119(d4)
+ 312: 7(float) Load 119(d4)
313: 17(bool) FOrdLessThan 311 312
SelectionMerge 315 None
- BranchConditional 313 314 315
+ BranchConditional 313 314 315
314: Label
Branch 295
315: Label
- 317: 8(fvec4) Load 10(color)
+ 317: 8(fvec4) Load 10(color)
318: 7(float) CompositeExtract 317 1
- 319: 7(float) Load 119(d4)
+ 319: 7(float) Load 119(d4)
320: 17(bool) FOrdLessThan 318 319
SelectionMerge 322 None
- BranchConditional 320 321 329
+ BranchConditional 320 321 329
321: Label
- 323: 7(float) Load 119(d4)
- 324: 8(fvec4) Load 10(color)
+ 323: 7(float) Load 119(d4)
+ 324: 8(fvec4) Load 10(color)
325: 7(float) CompositeExtract 324 1
326: 7(float) FAdd 325 323
- 327: 8(fvec4) Load 10(color)
+ 327: 8(fvec4) Load 10(color)
328: 8(fvec4) CompositeInsert 326 327 1
- Store 10(color) 328
+ Store 10(color) 328
Branch 322
329: Label
- 330: 7(float) Load 119(d4)
- 331: 8(fvec4) Load 10(color)
+ 330: 7(float) Load 119(d4)
+ 331: 8(fvec4) Load 10(color)
332: 7(float) CompositeExtract 331 0
333: 7(float) FAdd 332 330
- 334: 8(fvec4) Load 10(color)
+ 334: 8(fvec4) Load 10(color)
335: 8(fvec4) CompositeInsert 333 334 0
- Store 10(color) 335
+ Store 10(color) 335
Branch 322
322: Label
Branch 295
@@ -603,108 +605,108 @@
Branch 340
340: Label
SelectionMerge 338 None
- BranchConditional 339 338 341
+ BranchConditional 339 338 341
341: Label
- 342: 8(fvec4) Load 10(color)
+ 342: 8(fvec4) Load 10(color)
343: 7(float) CompositeExtract 342 0
- 345: 7(float) Load 344(d5)
+ 345: 7(float) Load 344(d5)
346: 17(bool) FOrdLessThan 343 345
SelectionMerge 347 None
- BranchConditional 346 347 337
+ BranchConditional 346 347 337
347: Label
Branch 338
338: Label
- 349: 8(fvec4) Load 348(bigColor5)
- 350: 8(fvec4) Load 10(color)
+ 349: 8(fvec4) Load 348(bigColor5)
+ 350: 8(fvec4) Load 10(color)
351: 8(fvec4) FAdd 350 349
- Store 10(color) 351
- 352: 8(fvec4) Load 10(color)
+ Store 10(color) 351
+ 352: 8(fvec4) Load 10(color)
353: 7(float) CompositeExtract 352 1
- 354: 7(float) Load 344(d5)
+ 354: 7(float) Load 344(d5)
355: 17(bool) FOrdLessThan 353 354
SelectionMerge 357 None
- BranchConditional 355 356 357
+ BranchConditional 355 356 357
356: Label
- 358: 7(float) Load 344(d5)
- 359: 8(fvec4) Load 10(color)
+ 358: 7(float) Load 344(d5)
+ 359: 8(fvec4) Load 10(color)
360: 7(float) CompositeExtract 359 1
361: 7(float) FAdd 360 358
- 362: 8(fvec4) Load 10(color)
+ 362: 8(fvec4) Load 10(color)
363: 8(fvec4) CompositeInsert 361 362 1
- Store 10(color) 363
+ Store 10(color) 363
Branch 357
357: Label
Branch 336
337: Label
- 364: 8(fvec4) Load 10(color)
+ 364: 8(fvec4) Load 10(color)
365: 7(float) CompositeExtract 364 0
- 367: 7(float) Load 366(d6)
+ 367: 7(float) Load 366(d6)
368: 17(bool) FOrdLessThan 365 367
SelectionMerge 370 None
- BranchConditional 368 369 382
+ BranchConditional 368 369 382
369: Label
Branch 371
371: Label
- 374: 8(fvec4) Load 10(color)
+ 374: 8(fvec4) Load 10(color)
375: 7(float) CompositeExtract 374 1
- 376: 7(float) Load 366(d6)
+ 376: 7(float) Load 366(d6)
377: 17(bool) FOrdLessThan 375 376
LoopMerge 372 None
- BranchConditional 377 373 372
+ BranchConditional 377 373 372
373: Label
- 379: 8(fvec4) Load 378(bigColor6)
- 380: 8(fvec4) Load 10(color)
+ 379: 8(fvec4) Load 378(bigColor6)
+ 380: 8(fvec4) Load 10(color)
381: 8(fvec4) FAdd 380 379
- Store 10(color) 381
+ Store 10(color) 381
Branch 371
372: Label
Branch 370
382: Label
Branch 383
383: Label
- 386: 8(fvec4) Load 10(color)
+ 386: 8(fvec4) Load 10(color)
387: 7(float) CompositeExtract 386 2
- 388: 7(float) Load 366(d6)
+ 388: 7(float) Load 366(d6)
389: 17(bool) FOrdLessThan 387 388
LoopMerge 384 None
- BranchConditional 389 385 384
+ BranchConditional 389 385 384
385: Label
- 390: 8(fvec4) Load 378(bigColor6)
+ 390: 8(fvec4) Load 378(bigColor6)
391: 7(float) CompositeExtract 390 2
- 392: 8(fvec4) Load 10(color)
+ 392: 8(fvec4) Load 10(color)
393: 7(float) CompositeExtract 392 2
394: 7(float) FAdd 393 391
- 395: 8(fvec4) Load 10(color)
+ 395: 8(fvec4) Load 10(color)
396: 8(fvec4) CompositeInsert 394 395 2
- Store 10(color) 396
+ Store 10(color) 396
Branch 383
384: Label
Branch 370
370: Label
- 397: 8(fvec4) Load 10(color)
+ 397: 8(fvec4) Load 10(color)
398: 7(float) CompositeExtract 397 0
- 399: 7(float) Load 366(d6)
+ 399: 7(float) Load 366(d6)
400: 17(bool) FOrdLessThan 398 399
SelectionMerge 402 None
- BranchConditional 400 401 419
+ BranchConditional 400 401 419
401: Label
Branch 403
403: Label
- 406: 8(fvec4) Load 10(color)
+ 406: 8(fvec4) Load 10(color)
407: 7(float) CompositeExtract 406 1
- 408: 7(float) Load 366(d6)
+ 408: 7(float) Load 366(d6)
409: 17(bool) FOrdLessThan 407 408
LoopMerge 404 None
- BranchConditional 409 405 404
+ BranchConditional 409 405 404
405: Label
- 410: 8(fvec4) Load 378(bigColor6)
- 411: 8(fvec4) Load 10(color)
+ 410: 8(fvec4) Load 378(bigColor6)
+ 411: 8(fvec4) Load 10(color)
412: 8(fvec4) FAdd 411 410
- Store 10(color) 412
- 414: 7(float) Load 413(d7)
+ Store 10(color) 412
+ 414: 7(float) Load 413(d7)
415: 17(bool) FOrdLessThan 414 85
SelectionMerge 417 None
- BranchConditional 415 416 417
+ BranchConditional 415 416 417
416: Label
Branch 404
417: Label
@@ -714,21 +716,21 @@
419: Label
Branch 420
420: Label
- 423: 8(fvec4) Load 10(color)
+ 423: 8(fvec4) Load 10(color)
424: 7(float) CompositeExtract 423 2
- 425: 7(float) Load 366(d6)
+ 425: 7(float) Load 366(d6)
426: 17(bool) FOrdLessThan 424 425
LoopMerge 421 None
- BranchConditional 426 422 421
+ BranchConditional 426 422 421
422: Label
- 427: 8(fvec4) Load 378(bigColor6)
+ 427: 8(fvec4) Load 378(bigColor6)
428: 7(float) CompositeExtract 427 2
- 429: 8(fvec4) Load 10(color)
+ 429: 8(fvec4) Load 10(color)
430: 7(float) CompositeExtract 429 2
431: 7(float) FAdd 430 428
- 432: 8(fvec4) Load 10(color)
+ 432: 8(fvec4) Load 10(color)
433: 8(fvec4) CompositeInsert 431 432 2
- Store 10(color) 433
+ Store 10(color) 433
Branch 420
421: Label
Branch 402
@@ -740,41 +742,41 @@
Branch 438
438: Label
SelectionMerge 436 None
- BranchConditional 437 436 439
+ BranchConditional 437 436 439
439: Label
SelectionMerge 440 None
- BranchConditional 18 440 435
+ BranchConditional 18 440 435
440: Label
Branch 436
436: Label
- 441: 7(float) Load 413(d7)
+ 441: 7(float) Load 413(d7)
443: 17(bool) FOrdLessThan 441 442
SelectionMerge 445 None
- BranchConditional 443 444 445
+ BranchConditional 443 444 445
444: Label
Branch 435
445: Label
- 448: 8(fvec4) Load 447(bigColor7)
- 449: 8(fvec4) Load 10(color)
+ 448: 8(fvec4) Load 447(bigColor7)
+ 449: 8(fvec4) Load 10(color)
450: 8(fvec4) FAdd 449 448
- Store 10(color) 450
- 451: 7(float) Load 413(d7)
+ Store 10(color) 450
+ 451: 7(float) Load 413(d7)
452: 17(bool) FOrdLessThan 451 85
SelectionMerge 454 None
- BranchConditional 452 453 454
+ BranchConditional 452 453 454
453: Label
- 455: 8(fvec4) Load 10(color)
+ 455: 8(fvec4) Load 10(color)
456: 7(float) CompositeExtract 455 2
457: 7(float) FAdd 456 85
- 458: 8(fvec4) Load 10(color)
+ 458: 8(fvec4) Load 10(color)
459: 8(fvec4) CompositeInsert 457 458 2
- Store 10(color) 459
+ Store 10(color) 459
Branch 435
454: Label
- 461: 8(fvec4) Load 12(BaseColor)
- 462: 8(fvec4) Load 10(color)
+ 461: 8(fvec4) Load 12(BaseColor)
+ 462: 8(fvec4) Load 10(color)
463: 8(fvec4) FAdd 462 461
- Store 10(color) 463
+ Store 10(color) 463
Branch 434
435: Label
Branch 464
@@ -784,102 +786,102 @@
Branch 468
468: Label
SelectionMerge 466 None
- BranchConditional 467 466 469
+ BranchConditional 467 466 469
469: Label
- 470: 8(fvec4) Load 10(color)
+ 470: 8(fvec4) Load 10(color)
471: 7(float) CompositeExtract 470 2
- 473: 7(float) Load 472(d8)
+ 473: 7(float) Load 472(d8)
474: 17(bool) FOrdLessThan 471 473
SelectionMerge 475 None
- BranchConditional 474 475 465
+ BranchConditional 474 475 465
475: Label
Branch 466
466: Label
- 476: 7(float) Load 472(d8)
+ 476: 7(float) Load 472(d8)
477: 17(bool) FOrdLessThan 476 442
SelectionMerge 479 None
- BranchConditional 477 478 479
+ BranchConditional 477 478 479
478: Label
Branch 465
479: Label
- 481: 8(fvec4) Load 447(bigColor7)
- 482: 8(fvec4) Load 10(color)
+ 481: 8(fvec4) Load 447(bigColor7)
+ 482: 8(fvec4) Load 10(color)
483: 8(fvec4) FAdd 482 481
- Store 10(color) 483
- 484: 7(float) Load 472(d8)
+ Store 10(color) 483
+ 484: 7(float) Load 472(d8)
485: 17(bool) FOrdLessThan 484 85
SelectionMerge 487 None
- BranchConditional 485 486 487
+ BranchConditional 485 486 487
486: Label
- 488: 8(fvec4) Load 10(color)
+ 488: 8(fvec4) Load 10(color)
489: 7(float) CompositeExtract 488 2
490: 7(float) FAdd 489 85
- 491: 8(fvec4) Load 10(color)
+ 491: 8(fvec4) Load 10(color)
492: 8(fvec4) CompositeInsert 490 491 2
- Store 10(color) 492
- 493: 7(float) Load 472(d8)
+ Store 10(color) 492
+ 493: 7(float) Load 472(d8)
495: 17(bool) FOrdLessThan 493 494
SelectionMerge 497 None
- BranchConditional 495 496 503
+ BranchConditional 495 496 503
496: Label
- 498: 8(fvec4) Load 10(color)
+ 498: 8(fvec4) Load 10(color)
499: 7(float) CompositeExtract 498 1
500: 7(float) FAdd 499 85
- 501: 8(fvec4) Load 10(color)
+ 501: 8(fvec4) Load 10(color)
502: 8(fvec4) CompositeInsert 500 501 1
- Store 10(color) 502
+ Store 10(color) 502
Branch 497
503: Label
- 504: 8(fvec4) Load 10(color)
+ 504: 8(fvec4) Load 10(color)
505: 7(float) CompositeExtract 504 0
506: 7(float) FAdd 505 85
- 507: 8(fvec4) Load 10(color)
+ 507: 8(fvec4) Load 10(color)
508: 8(fvec4) CompositeInsert 506 507 0
- Store 10(color) 508
+ Store 10(color) 508
Branch 497
497: Label
Branch 465
487: Label
- 510: 8(fvec4) Load 12(BaseColor)
- 511: 8(fvec4) Load 10(color)
+ 510: 8(fvec4) Load 12(BaseColor)
+ 511: 8(fvec4) Load 10(color)
512: 8(fvec4) FAdd 511 510
- Store 10(color) 512
+ Store 10(color) 512
Branch 464
465: Label
Branch 513
513: Label
- 516: 8(fvec4) Load 10(color)
+ 516: 8(fvec4) Load 10(color)
517: 7(float) CompositeExtract 516 3
- 519: 7(float) Load 518(d9)
+ 519: 7(float) Load 518(d9)
520: 17(bool) FOrdLessThan 517 519
LoopMerge 514 None
- BranchConditional 520 515 514
+ BranchConditional 520 515 514
515: Label
- 521: 7(float) Load 518(d9)
- 522: 7(float) Load 472(d8)
+ 521: 7(float) Load 518(d9)
+ 522: 7(float) Load 472(d8)
523: 17(bool) FOrdGreaterThan 521 522
SelectionMerge 525 None
- BranchConditional 523 524 525
+ BranchConditional 523 524 525
524: Label
- 526: 8(fvec4) Load 10(color)
+ 526: 8(fvec4) Load 10(color)
527: 7(float) CompositeExtract 526 0
- 528: 7(float) Load 413(d7)
+ 528: 7(float) Load 413(d7)
529: 17(bool) FOrdLessThanEqual 527 528
SelectionMerge 531 None
- BranchConditional 529 530 531
+ BranchConditional 529 530 531
530: Label
- 532: 8(fvec4) Load 10(color)
+ 532: 8(fvec4) Load 10(color)
533: 7(float) CompositeExtract 532 2
535: 17(bool) FOrdEqual 533 534
SelectionMerge 537 None
- BranchConditional 535 536 543
+ BranchConditional 535 536 543
536: Label
- 538: 8(fvec4) Load 10(color)
+ 538: 8(fvec4) Load 10(color)
539: 7(float) CompositeExtract 538 3
540: 7(float) FAdd 539 85
- 541: 8(fvec4) Load 10(color)
+ 541: 8(fvec4) Load 10(color)
542: 8(fvec4) CompositeInsert 540 541 3
- Store 10(color) 542
+ Store 10(color) 542
Branch 537
543: Label
Branch 514
@@ -892,180 +894,180 @@
514: Label
Branch 545
545: Label
- 548: 8(fvec4) Load 10(color)
+ 548: 8(fvec4) Load 10(color)
549: 7(float) CompositeExtract 548 2
- 551: 7(float) Load 550(d10)
+ 551: 7(float) Load 550(d10)
552: 17(bool) FOrdLessThan 549 551
LoopMerge 546 None
- BranchConditional 552 547 546
+ BranchConditional 552 547 546
547: Label
- 553: 8(fvec4) Load 10(color)
+ 553: 8(fvec4) Load 10(color)
554: 7(float) CompositeExtract 553 1
555: 7(float) FAdd 554 85
- 556: 8(fvec4) Load 10(color)
+ 556: 8(fvec4) Load 10(color)
557: 8(fvec4) CompositeInsert 555 556 1
- Store 10(color) 557
- 558: 8(fvec4) Load 10(color)
+ Store 10(color) 557
+ 558: 8(fvec4) Load 10(color)
559: 7(float) CompositeExtract 558 1
- 561: 7(float) Load 560(d11)
+ 561: 7(float) Load 560(d11)
562: 17(bool) FOrdLessThan 559 561
SelectionMerge 564 None
- BranchConditional 562 563 564
+ BranchConditional 562 563 564
563: Label
- 565: 8(fvec4) Load 10(color)
+ 565: 8(fvec4) Load 10(color)
566: 7(float) CompositeExtract 565 2
567: 7(float) FAdd 566 85
- 568: 8(fvec4) Load 10(color)
+ 568: 8(fvec4) Load 10(color)
569: 8(fvec4) CompositeInsert 567 568 2
- Store 10(color) 569
- 570: 8(fvec4) Load 10(color)
+ Store 10(color) 569
+ 570: 8(fvec4) Load 10(color)
571: 7(float) CompositeExtract 570 3
- 573: 7(float) Load 572(d12)
+ 573: 7(float) Load 572(d12)
574: 17(bool) FOrdLessThan 571 573
SelectionMerge 576 None
- BranchConditional 574 575 582
+ BranchConditional 574 575 582
575: Label
- 577: 8(fvec4) Load 10(color)
+ 577: 8(fvec4) Load 10(color)
578: 7(float) CompositeExtract 577 3
579: 7(float) FAdd 578 85
- 580: 8(fvec4) Load 10(color)
+ 580: 8(fvec4) Load 10(color)
581: 8(fvec4) CompositeInsert 579 580 3
- Store 10(color) 581
+ Store 10(color) 581
Branch 576
582: Label
- 583: 8(fvec4) Load 10(color)
+ 583: 8(fvec4) Load 10(color)
584: 7(float) CompositeExtract 583 0
585: 7(float) FAdd 584 85
- 586: 8(fvec4) Load 10(color)
+ 586: 8(fvec4) Load 10(color)
587: 8(fvec4) CompositeInsert 585 586 0
- Store 10(color) 587
+ Store 10(color) 587
Branch 576
576: Label
Branch 545
564: Label
- 589: 8(fvec4) Load 10(color)
+ 589: 8(fvec4) Load 10(color)
590: 8(fvec4) CompositeConstruct 85 85 85 85
591: 8(fvec4) FAdd 589 590
- Store 10(color) 591
+ Store 10(color) 591
Branch 546
546: Label
Branch 593
593: Label
- 596: 8(fvec4) Load 10(color)
+ 596: 8(fvec4) Load 10(color)
597: 7(float) CompositeExtract 596 0
599: 17(bool) FOrdLessThan 597 598
LoopMerge 594 None
- BranchConditional 599 595 594
+ BranchConditional 599 595 594
595: Label
- 601: 8(fvec4) Load 600(bigColor8)
- 602: 8(fvec4) Load 10(color)
+ 601: 8(fvec4) Load 600(bigColor8)
+ 602: 8(fvec4) Load 10(color)
603: 8(fvec4) FAdd 602 601
- Store 10(color) 603
- 604: 8(fvec4) Load 10(color)
+ Store 10(color) 603
+ 604: 8(fvec4) Load 10(color)
605: 7(float) CompositeExtract 604 2
- 606: 7(float) Load 472(d8)
+ 606: 7(float) Load 472(d8)
607: 17(bool) FOrdLessThan 605 606
SelectionMerge 609 None
- BranchConditional 607 608 609
+ BranchConditional 607 608 609
608: Label
- 610: 8(fvec4) Load 10(color)
+ 610: 8(fvec4) Load 10(color)
611: 7(float) CompositeExtract 610 3
- 612: 7(float) Load 366(d6)
+ 612: 7(float) Load 366(d6)
613: 17(bool) FOrdLessThan 611 612
SelectionMerge 615 None
- BranchConditional 613 614 615
+ BranchConditional 613 614 615
614: Label
Branch 593
615: Label
Branch 609
609: Label
- 617: 8(fvec4) Load 600(bigColor8)
+ 617: 8(fvec4) Load 600(bigColor8)
618: 7(float) CompositeExtract 617 0
- 619: 8(fvec4) Load 10(color)
+ 619: 8(fvec4) Load 10(color)
620: 7(float) CompositeExtract 619 1
621: 7(float) FAdd 620 618
- 622: 8(fvec4) Load 10(color)
+ 622: 8(fvec4) Load 10(color)
623: 8(fvec4) CompositeInsert 621 622 1
- Store 10(color) 623
+ Store 10(color) 623
Branch 593
594: Label
- 624: 8(fvec4) Load 10(color)
+ 624: 8(fvec4) Load 10(color)
625: 8(fvec4) CompositeConstruct 85 85 85 85
626: 8(fvec4) FAdd 624 625
- Store 10(color) 626
- 629: 8(fvec4) Load 10(color)
- Store 628(gl_FragColor) 629
+ Store 10(color) 626
+ 629: 8(fvec4) Load 10(color)
+ Store 628(gl_FragColor) 629
Branch 630
630: Label
- 633: 8(fvec4) Load 10(color)
+ 633: 8(fvec4) Load 10(color)
634: 7(float) CompositeExtract 633 0
- 636: 7(float) Load 635(d14)
+ 636: 7(float) Load 635(d14)
637: 17(bool) FOrdLessThan 634 636
LoopMerge 631 None
- BranchConditional 637 632 631
+ BranchConditional 637 632 631
632: Label
- 638: 8(fvec4) Load 10(color)
+ 638: 8(fvec4) Load 10(color)
639: 7(float) CompositeExtract 638 1
- 641: 7(float) Load 640(d15)
+ 641: 7(float) Load 640(d15)
642: 17(bool) FOrdLessThan 639 641
SelectionMerge 644 None
- BranchConditional 642 643 646
+ BranchConditional 642 643 646
643: Label
Branch 6
646: Label
- 647: 8(fvec4) Load 10(color)
+ 647: 8(fvec4) Load 10(color)
648: 8(fvec4) CompositeConstruct 85 85 85 85
649: 8(fvec4) FAdd 647 648
- Store 10(color) 649
+ Store 10(color) 649
Branch 644
644: Label
Branch 630
631: Label
- 650: 8(fvec4) Load 10(color)
+ 650: 8(fvec4) Load 10(color)
651: 8(fvec4) CompositeConstruct 85 85 85 85
652: 8(fvec4) FAdd 650 651
- Store 10(color) 652
+ Store 10(color) 652
Branch 653
653: Label
- 656: 8(fvec4) Load 10(color)
+ 656: 8(fvec4) Load 10(color)
657: 7(float) CompositeExtract 656 3
- 659: 7(float) Load 658(d16)
+ 659: 7(float) Load 658(d16)
660: 17(bool) FOrdLessThan 657 659
LoopMerge 654 None
- BranchConditional 660 655 654
+ BranchConditional 660 655 654
655: Label
- 661: 8(fvec4) Load 10(color)
+ 661: 8(fvec4) Load 10(color)
662: 7(float) CompositeExtract 661 3
663: 7(float) FAdd 662 85
- 664: 8(fvec4) Load 10(color)
+ 664: 8(fvec4) Load 10(color)
665: 8(fvec4) CompositeInsert 663 664 3
- Store 10(color) 665
+ Store 10(color) 665
Branch 653
654: Label
Branch 666
666: Label
- 669: 8(fvec4) Load 10(color)
+ 669: 8(fvec4) Load 10(color)
670: 7(float) CompositeExtract 669 3
- 671: 7(float) Load 93(d2)
+ 671: 7(float) Load 93(d2)
672: 17(bool) FOrdLessThan 670 671
- 673: 8(fvec4) Load 10(color)
+ 673: 8(fvec4) Load 10(color)
674: 7(float) CompositeExtract 673 1
- 675: 7(float) Load 98(d3)
+ 675: 7(float) Load 98(d3)
676: 17(bool) FOrdLessThan 674 675
677: 17(bool) LogicalAnd 672 676
LoopMerge 667 None
- BranchConditional 677 668 667
+ BranchConditional 677 668 667
668: Label
- 678: 8(fvec4) Load 102(bigColor1_2)
- 679: 8(fvec4) Load 10(color)
+ 678: 8(fvec4) Load 102(bigColor1_2)
+ 679: 8(fvec4) Load 10(color)
680: 8(fvec4) FAdd 679 678
- Store 10(color) 680
- 681: 8(fvec4) Load 10(color)
+ Store 10(color) 680
+ 681: 8(fvec4) Load 10(color)
682: 7(float) CompositeExtract 681 2
- 683: 7(float) Load 98(d3)
+ 683: 7(float) Load 98(d3)
684: 17(bool) FOrdLessThan 682 683
SelectionMerge 686 None
- BranchConditional 684 685 686
+ BranchConditional 684 685 686
685: Label
Branch 6
686: Label
@@ -1078,64 +1080,64 @@
Branch 692
692: Label
SelectionMerge 690 None
- BranchConditional 691 690 693
+ BranchConditional 691 690 693
693: Label
- 694: 8(fvec4) Load 10(color)
+ 694: 8(fvec4) Load 10(color)
695: 7(float) CompositeExtract 694 0
- 697: 7(float) Load 696(d17)
+ 697: 7(float) Load 696(d17)
698: 17(bool) FOrdLessThan 695 697
SelectionMerge 699 None
- BranchConditional 698 699 689
+ BranchConditional 698 699 689
699: Label
Branch 690
690: Label
- 700: 8(fvec4) Load 10(color)
+ 700: 8(fvec4) Load 10(color)
701: 7(float) CompositeExtract 700 1
- 703: 7(float) Load 702(d18)
+ 703: 7(float) Load 702(d18)
704: 17(bool) FOrdLessThan 701 703
SelectionMerge 706 None
- BranchConditional 704 705 706
+ BranchConditional 704 705 706
705: Label
Branch 6
706: Label
- 708: 8(fvec4) Load 10(color)
+ 708: 8(fvec4) Load 10(color)
709: 8(fvec4) CompositeConstruct 85 85 85 85
710: 8(fvec4) FAdd 708 709
- Store 10(color) 710
+ Store 10(color) 710
Branch 688
689: Label
Branch 711
711: Label
- 714: 8(fvec4) Load 10(color)
+ 714: 8(fvec4) Load 10(color)
715: 7(float) CompositeExtract 714 1
- 716: 7(float) Load 658(d16)
+ 716: 7(float) Load 658(d16)
717: 17(bool) FOrdLessThan 715 716
LoopMerge 712 None
- BranchConditional 717 713 712
+ BranchConditional 717 713 712
713: Label
- 718: 8(fvec4) Load 10(color)
+ 718: 8(fvec4) Load 10(color)
719: 7(float) CompositeExtract 718 3
- 720: 7(float) Load 658(d16)
+ 720: 7(float) Load 658(d16)
721: 17(bool) FOrdLessThan 719 720
SelectionMerge 723 None
- BranchConditional 721 722 725
+ BranchConditional 721 722 725
722: Label
Kill
725: Label
- 726: 8(fvec4) Load 10(color)
+ 726: 8(fvec4) Load 10(color)
727: 8(fvec4) CompositeConstruct 85 85 85 85
728: 8(fvec4) FAdd 726 727
- Store 10(color) 728
+ Store 10(color) 728
Branch 723
723: Label
Branch 711
712: Label
- 729: 8(fvec4) Load 10(color)
+ 729: 8(fvec4) Load 10(color)
730: 8(fvec4) CompositeConstruct 85 85 85 85
731: 8(fvec4) FAdd 729 730
- Store 10(color) 731
- 732: 8(fvec4) Load 10(color)
- Store 628(gl_FragColor) 732
+ Store 10(color) 731
+ 732: 8(fvec4) Load 10(color)
+ Store 628(gl_FragColor) 732
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.loopsArtificial.frag.out b/Test/baseResults/spv.loopsArtificial.frag.out
old mode 100644
new mode 100755
index caa7ae7..d9af6e9
--- a/Test/baseResults/spv.loopsArtificial.frag.out
+++ b/Test/baseResults/spv.loopsArtificial.frag.out
@@ -10,9 +10,11 @@
// Id's are bound by 196
Source GLSL 130
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 10 "color"
Name 12 "BaseColor"
@@ -63,120 +65,120 @@
Name 191 "d33"
Name 192 "d34"
Name 195 "Count"
- Decorate 12(BaseColor) Smooth
+ Decorate 12(BaseColor) Smooth
Decorate 149(gl_FragColor) BuiltIn FragColor
- Decorate 151(bigColor) NoStaticUse
- Decorate 152(bigColor1_1) NoStaticUse
- Decorate 153(bigColor1_2) NoStaticUse
- Decorate 154(bigColor1_3) NoStaticUse
- Decorate 155(bigColor2) NoStaticUse
- Decorate 156(bigColor3) NoStaticUse
- Decorate 157(bigColor5) NoStaticUse
- Decorate 158(bigColor6) NoStaticUse
- Decorate 159(bigColor7) NoStaticUse
- Decorate 160(bigColor8) NoStaticUse
- Decorate 161(d) NoStaticUse
- Decorate 162(d2) NoStaticUse
- Decorate 163(d3) NoStaticUse
- Decorate 164(d5) NoStaticUse
- Decorate 165(d6) NoStaticUse
- Decorate 166(d7) NoStaticUse
- Decorate 167(d8) NoStaticUse
- Decorate 168(d9) NoStaticUse
- Decorate 169(d10) NoStaticUse
- Decorate 170(d11) NoStaticUse
- Decorate 171(d12) NoStaticUse
- Decorate 172(d14) NoStaticUse
- Decorate 173(d15) NoStaticUse
- Decorate 174(d16) NoStaticUse
- Decorate 175(d17) NoStaticUse
- Decorate 176(d18) NoStaticUse
- Decorate 177(d19) NoStaticUse
- Decorate 178(d20) NoStaticUse
- Decorate 179(d21) NoStaticUse
- Decorate 180(d22) NoStaticUse
- Decorate 181(d23) NoStaticUse
- Decorate 182(d24) NoStaticUse
- Decorate 183(d25) NoStaticUse
- Decorate 184(d26) NoStaticUse
- Decorate 185(d27) NoStaticUse
- Decorate 186(d28) NoStaticUse
- Decorate 187(d29) NoStaticUse
- Decorate 188(d30) NoStaticUse
- Decorate 189(d31) NoStaticUse
- Decorate 190(d32) NoStaticUse
- Decorate 191(d33) NoStaticUse
- Decorate 192(d34) NoStaticUse
- Decorate 195(Count) NoStaticUse
+ Decorate 151(bigColor) NoStaticUse
+ Decorate 152(bigColor1_1) NoStaticUse
+ Decorate 153(bigColor1_2) NoStaticUse
+ Decorate 154(bigColor1_3) NoStaticUse
+ Decorate 155(bigColor2) NoStaticUse
+ Decorate 156(bigColor3) NoStaticUse
+ Decorate 157(bigColor5) NoStaticUse
+ Decorate 158(bigColor6) NoStaticUse
+ Decorate 159(bigColor7) NoStaticUse
+ Decorate 160(bigColor8) NoStaticUse
+ Decorate 161(d) NoStaticUse
+ Decorate 162(d2) NoStaticUse
+ Decorate 163(d3) NoStaticUse
+ Decorate 164(d5) NoStaticUse
+ Decorate 165(d6) NoStaticUse
+ Decorate 166(d7) NoStaticUse
+ Decorate 167(d8) NoStaticUse
+ Decorate 168(d9) NoStaticUse
+ Decorate 169(d10) NoStaticUse
+ Decorate 170(d11) NoStaticUse
+ Decorate 171(d12) NoStaticUse
+ Decorate 172(d14) NoStaticUse
+ Decorate 173(d15) NoStaticUse
+ Decorate 174(d16) NoStaticUse
+ Decorate 175(d17) NoStaticUse
+ Decorate 176(d18) NoStaticUse
+ Decorate 177(d19) NoStaticUse
+ Decorate 178(d20) NoStaticUse
+ Decorate 179(d21) NoStaticUse
+ Decorate 180(d22) NoStaticUse
+ Decorate 181(d23) NoStaticUse
+ Decorate 182(d24) NoStaticUse
+ Decorate 183(d25) NoStaticUse
+ Decorate 184(d26) NoStaticUse
+ Decorate 185(d27) NoStaticUse
+ Decorate 186(d28) NoStaticUse
+ Decorate 187(d29) NoStaticUse
+ Decorate 188(d30) NoStaticUse
+ Decorate 189(d31) NoStaticUse
+ Decorate 190(d32) NoStaticUse
+ Decorate 191(d33) NoStaticUse
+ Decorate 192(d34) NoStaticUse
+ Decorate 195(Count) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypePointer Function 8(fvec4)
11: TypePointer Input 8(fvec4)
- 12(BaseColor): 11(ptr) Variable Input
+ 12(BaseColor): 11(ptr) Variable Input
18: TypeBool
19: 18(bool) ConstantTrue
24: TypePointer UniformConstant 7(float)
- 25(d4): 24(ptr) Variable UniformConstant
+ 25(d4): 24(ptr) Variable UniformConstant
29: TypePointer UniformConstant 8(fvec4)
- 30(bigColor4): 29(ptr) Variable UniformConstant
+ 30(bigColor4): 29(ptr) Variable UniformConstant
40: 7(float) Constant 1073741824
54: 7(float) Constant 1065353216
58: 18(bool) ConstantFalse
- 84(d13): 24(ptr) Variable UniformConstant
+ 84(d13): 24(ptr) Variable UniformConstant
148: TypePointer Output 8(fvec4)
-149(gl_FragColor): 148(ptr) Variable Output
- 151(bigColor): 29(ptr) Variable UniformConstant
-152(bigColor1_1): 29(ptr) Variable UniformConstant
-153(bigColor1_2): 29(ptr) Variable UniformConstant
-154(bigColor1_3): 29(ptr) Variable UniformConstant
- 155(bigColor2): 29(ptr) Variable UniformConstant
- 156(bigColor3): 29(ptr) Variable UniformConstant
- 157(bigColor5): 29(ptr) Variable UniformConstant
- 158(bigColor6): 29(ptr) Variable UniformConstant
- 159(bigColor7): 29(ptr) Variable UniformConstant
- 160(bigColor8): 29(ptr) Variable UniformConstant
- 161(d): 24(ptr) Variable UniformConstant
- 162(d2): 24(ptr) Variable UniformConstant
- 163(d3): 24(ptr) Variable UniformConstant
- 164(d5): 24(ptr) Variable UniformConstant
- 165(d6): 24(ptr) Variable UniformConstant
- 166(d7): 24(ptr) Variable UniformConstant
- 167(d8): 24(ptr) Variable UniformConstant
- 168(d9): 24(ptr) Variable UniformConstant
- 169(d10): 24(ptr) Variable UniformConstant
- 170(d11): 24(ptr) Variable UniformConstant
- 171(d12): 24(ptr) Variable UniformConstant
- 172(d14): 24(ptr) Variable UniformConstant
- 173(d15): 24(ptr) Variable UniformConstant
- 174(d16): 24(ptr) Variable UniformConstant
- 175(d17): 24(ptr) Variable UniformConstant
- 176(d18): 24(ptr) Variable UniformConstant
- 177(d19): 24(ptr) Variable UniformConstant
- 178(d20): 24(ptr) Variable UniformConstant
- 179(d21): 24(ptr) Variable UniformConstant
- 180(d22): 24(ptr) Variable UniformConstant
- 181(d23): 24(ptr) Variable UniformConstant
- 182(d24): 24(ptr) Variable UniformConstant
- 183(d25): 24(ptr) Variable UniformConstant
- 184(d26): 24(ptr) Variable UniformConstant
- 185(d27): 24(ptr) Variable UniformConstant
- 186(d28): 24(ptr) Variable UniformConstant
- 187(d29): 24(ptr) Variable UniformConstant
- 188(d30): 24(ptr) Variable UniformConstant
- 189(d31): 24(ptr) Variable UniformConstant
- 190(d32): 24(ptr) Variable UniformConstant
- 191(d33): 24(ptr) Variable UniformConstant
- 192(d34): 24(ptr) Variable UniformConstant
+149(gl_FragColor): 148(ptr) Variable Output
+ 151(bigColor): 29(ptr) Variable UniformConstant
+152(bigColor1_1): 29(ptr) Variable UniformConstant
+153(bigColor1_2): 29(ptr) Variable UniformConstant
+154(bigColor1_3): 29(ptr) Variable UniformConstant
+ 155(bigColor2): 29(ptr) Variable UniformConstant
+ 156(bigColor3): 29(ptr) Variable UniformConstant
+ 157(bigColor5): 29(ptr) Variable UniformConstant
+ 158(bigColor6): 29(ptr) Variable UniformConstant
+ 159(bigColor7): 29(ptr) Variable UniformConstant
+ 160(bigColor8): 29(ptr) Variable UniformConstant
+ 161(d): 24(ptr) Variable UniformConstant
+ 162(d2): 24(ptr) Variable UniformConstant
+ 163(d3): 24(ptr) Variable UniformConstant
+ 164(d5): 24(ptr) Variable UniformConstant
+ 165(d6): 24(ptr) Variable UniformConstant
+ 166(d7): 24(ptr) Variable UniformConstant
+ 167(d8): 24(ptr) Variable UniformConstant
+ 168(d9): 24(ptr) Variable UniformConstant
+ 169(d10): 24(ptr) Variable UniformConstant
+ 170(d11): 24(ptr) Variable UniformConstant
+ 171(d12): 24(ptr) Variable UniformConstant
+ 172(d14): 24(ptr) Variable UniformConstant
+ 173(d15): 24(ptr) Variable UniformConstant
+ 174(d16): 24(ptr) Variable UniformConstant
+ 175(d17): 24(ptr) Variable UniformConstant
+ 176(d18): 24(ptr) Variable UniformConstant
+ 177(d19): 24(ptr) Variable UniformConstant
+ 178(d20): 24(ptr) Variable UniformConstant
+ 179(d21): 24(ptr) Variable UniformConstant
+ 180(d22): 24(ptr) Variable UniformConstant
+ 181(d23): 24(ptr) Variable UniformConstant
+ 182(d24): 24(ptr) Variable UniformConstant
+ 183(d25): 24(ptr) Variable UniformConstant
+ 184(d26): 24(ptr) Variable UniformConstant
+ 185(d27): 24(ptr) Variable UniformConstant
+ 186(d28): 24(ptr) Variable UniformConstant
+ 187(d29): 24(ptr) Variable UniformConstant
+ 188(d30): 24(ptr) Variable UniformConstant
+ 189(d31): 24(ptr) Variable UniformConstant
+ 190(d32): 24(ptr) Variable UniformConstant
+ 191(d33): 24(ptr) Variable UniformConstant
+ 192(d34): 24(ptr) Variable UniformConstant
193: TypeInt 32 1
194: TypePointer UniformConstant 193(int)
- 195(Count): 194(ptr) Variable UniformConstant
+ 195(Count): 194(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
- 10(color): 9(ptr) Variable Function
- 13: 8(fvec4) Load 12(BaseColor)
- Store 10(color) 13
+ 10(color): 9(ptr) Variable Function
+ 13: 8(fvec4) Load 12(BaseColor)
+ Store 10(color) 13
Branch 14
14: Label
17: 18(bool) Phi 19 5 58 50 58 65
@@ -184,173 +186,173 @@
Branch 20
20: Label
SelectionMerge 16 None
- BranchConditional 17 16 21
+ BranchConditional 17 16 21
21: Label
- 22: 8(fvec4) Load 10(color)
+ 22: 8(fvec4) Load 10(color)
23: 7(float) CompositeExtract 22 2
- 26: 7(float) Load 25(d4)
+ 26: 7(float) Load 25(d4)
27: 18(bool) FOrdLessThan 23 26
SelectionMerge 28 None
- BranchConditional 27 28 15
+ BranchConditional 27 28 15
28: Label
Branch 16
16: Label
- 31: 8(fvec4) Load 30(bigColor4)
- 32: 8(fvec4) Load 10(color)
+ 31: 8(fvec4) Load 30(bigColor4)
+ 32: 8(fvec4) Load 10(color)
33: 8(fvec4) FAdd 32 31
- Store 10(color) 33
- 34: 8(fvec4) Load 10(color)
+ Store 10(color) 33
+ 34: 8(fvec4) Load 10(color)
35: 7(float) CompositeExtract 34 0
- 36: 7(float) Load 25(d4)
+ 36: 7(float) Load 25(d4)
37: 18(bool) FOrdLessThan 35 36
SelectionMerge 39 None
- BranchConditional 37 38 39
+ BranchConditional 37 38 39
38: Label
- 41: 8(fvec4) Load 10(color)
+ 41: 8(fvec4) Load 10(color)
42: 7(float) CompositeExtract 41 2
43: 7(float) FAdd 42 40
- 44: 8(fvec4) Load 10(color)
+ 44: 8(fvec4) Load 10(color)
45: 8(fvec4) CompositeInsert 43 44 2
- Store 10(color) 45
- 46: 8(fvec4) Load 10(color)
+ Store 10(color) 45
+ 46: 8(fvec4) Load 10(color)
47: 7(float) CompositeExtract 46 2
- 48: 7(float) Load 25(d4)
+ 48: 7(float) Load 25(d4)
49: 18(bool) FOrdLessThan 47 48
SelectionMerge 51 None
- BranchConditional 49 50 51
+ BranchConditional 49 50 51
50: Label
- 52: 8(fvec4) Load 10(color)
+ 52: 8(fvec4) Load 10(color)
53: 7(float) CompositeExtract 52 0
55: 7(float) FAdd 53 54
- 56: 8(fvec4) Load 10(color)
+ 56: 8(fvec4) Load 10(color)
57: 8(fvec4) CompositeInsert 55 56 0
- Store 10(color) 57
+ Store 10(color) 57
Branch 14
51: Label
Branch 39
39: Label
- 60: 8(fvec4) Load 10(color)
+ 60: 8(fvec4) Load 10(color)
61: 7(float) CompositeExtract 60 1
- 62: 7(float) Load 25(d4)
+ 62: 7(float) Load 25(d4)
63: 18(bool) FOrdLessThan 61 62
SelectionMerge 65 None
- BranchConditional 63 64 72
+ BranchConditional 63 64 72
64: Label
- 66: 7(float) Load 25(d4)
- 67: 8(fvec4) Load 10(color)
+ 66: 7(float) Load 25(d4)
+ 67: 8(fvec4) Load 10(color)
68: 7(float) CompositeExtract 67 1
69: 7(float) FAdd 68 66
- 70: 8(fvec4) Load 10(color)
+ 70: 8(fvec4) Load 10(color)
71: 8(fvec4) CompositeInsert 69 70 1
- Store 10(color) 71
+ Store 10(color) 71
Branch 65
72: Label
- 73: 7(float) Load 25(d4)
- 74: 8(fvec4) Load 10(color)
+ 73: 7(float) Load 25(d4)
+ 74: 8(fvec4) Load 10(color)
75: 7(float) CompositeExtract 74 0
76: 7(float) FAdd 75 73
- 77: 8(fvec4) Load 10(color)
+ 77: 8(fvec4) Load 10(color)
78: 8(fvec4) CompositeInsert 76 77 0
- Store 10(color) 78
+ Store 10(color) 78
Branch 65
65: Label
Branch 14
15: Label
Branch 79
79: Label
- 82: 8(fvec4) Load 10(color)
+ 82: 8(fvec4) Load 10(color)
83: 7(float) CompositeExtract 82 3
- 85: 7(float) Load 84(d13)
+ 85: 7(float) Load 84(d13)
86: 18(bool) FOrdLessThan 83 85
LoopMerge 80 None
- BranchConditional 86 81 80
+ BranchConditional 86 81 80
81: Label
- 87: 8(fvec4) Load 10(color)
+ 87: 8(fvec4) Load 10(color)
88: 7(float) CompositeExtract 87 2
- 89: 7(float) Load 84(d13)
+ 89: 7(float) Load 84(d13)
90: 18(bool) FOrdLessThan 88 89
SelectionMerge 92 None
- BranchConditional 90 91 96
+ BranchConditional 90 91 96
91: Label
- 93: 8(fvec4) Load 10(color)
+ 93: 8(fvec4) Load 10(color)
94: 8(fvec4) CompositeConstruct 54 54 54 54
95: 8(fvec4) FAdd 93 94
- Store 10(color) 95
+ Store 10(color) 95
Branch 92
96: Label
- 97: 8(fvec4) Load 10(color)
+ 97: 8(fvec4) Load 10(color)
98: 8(fvec4) CompositeConstruct 54 54 54 54
99: 8(fvec4) FSub 97 98
- Store 10(color) 99
+ Store 10(color) 99
Branch 92
92: Label
- 100: 8(fvec4) Load 30(bigColor4)
- 101: 8(fvec4) Load 10(color)
+ 100: 8(fvec4) Load 30(bigColor4)
+ 101: 8(fvec4) Load 10(color)
102: 8(fvec4) FAdd 101 100
- Store 10(color) 102
- 103: 8(fvec4) Load 10(color)
+ Store 10(color) 102
+ 103: 8(fvec4) Load 10(color)
104: 7(float) CompositeExtract 103 0
- 105: 7(float) Load 25(d4)
+ 105: 7(float) Load 25(d4)
106: 18(bool) FOrdLessThan 104 105
SelectionMerge 108 None
- BranchConditional 106 107 108
+ BranchConditional 106 107 108
107: Label
- 109: 8(fvec4) Load 10(color)
+ 109: 8(fvec4) Load 10(color)
110: 7(float) CompositeExtract 109 2
111: 7(float) FAdd 110 40
- 112: 8(fvec4) Load 10(color)
+ 112: 8(fvec4) Load 10(color)
113: 8(fvec4) CompositeInsert 111 112 2
- Store 10(color) 113
- 114: 8(fvec4) Load 10(color)
+ Store 10(color) 113
+ 114: 8(fvec4) Load 10(color)
115: 7(float) CompositeExtract 114 2
- 116: 7(float) Load 25(d4)
+ 116: 7(float) Load 25(d4)
117: 18(bool) FOrdLessThan 115 116
SelectionMerge 119 None
- BranchConditional 117 118 119
+ BranchConditional 117 118 119
118: Label
- 120: 8(fvec4) Load 10(color)
+ 120: 8(fvec4) Load 10(color)
121: 7(float) CompositeExtract 120 0
122: 7(float) FAdd 121 54
- 123: 8(fvec4) Load 10(color)
+ 123: 8(fvec4) Load 10(color)
124: 8(fvec4) CompositeInsert 122 123 0
- Store 10(color) 124
+ Store 10(color) 124
Branch 79
119: Label
Branch 108
108: Label
- 126: 8(fvec4) Load 10(color)
+ 126: 8(fvec4) Load 10(color)
127: 7(float) CompositeExtract 126 1
- 128: 7(float) Load 25(d4)
+ 128: 7(float) Load 25(d4)
129: 18(bool) FOrdLessThan 127 128
SelectionMerge 131 None
- BranchConditional 129 130 138
+ BranchConditional 129 130 138
130: Label
- 132: 7(float) Load 25(d4)
- 133: 8(fvec4) Load 10(color)
+ 132: 7(float) Load 25(d4)
+ 133: 8(fvec4) Load 10(color)
134: 7(float) CompositeExtract 133 1
135: 7(float) FAdd 134 132
- 136: 8(fvec4) Load 10(color)
+ 136: 8(fvec4) Load 10(color)
137: 8(fvec4) CompositeInsert 135 136 1
- Store 10(color) 137
+ Store 10(color) 137
Branch 131
138: Label
- 139: 7(float) Load 25(d4)
- 140: 8(fvec4) Load 10(color)
+ 139: 7(float) Load 25(d4)
+ 140: 8(fvec4) Load 10(color)
141: 7(float) CompositeExtract 140 0
142: 7(float) FAdd 141 139
- 143: 8(fvec4) Load 10(color)
+ 143: 8(fvec4) Load 10(color)
144: 8(fvec4) CompositeInsert 142 143 0
- Store 10(color) 144
+ Store 10(color) 144
Branch 131
131: Label
Branch 79
80: Label
- 145: 8(fvec4) Load 10(color)
+ 145: 8(fvec4) Load 10(color)
146: 8(fvec4) CompositeConstruct 54 54 54 54
147: 8(fvec4) FAdd 145 146
- Store 10(color) 147
- 150: 8(fvec4) Load 10(color)
- Store 149(gl_FragColor) 150
+ Store 10(color) 147
+ 150: 8(fvec4) Load 10(color)
+ Store 149(gl_FragColor) 150
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.matFun.vert.out b/Test/baseResults/spv.matFun.vert.out
old mode 100644
new mode 100755
index cebf02a..4ba2e08
--- a/Test/baseResults/spv.matFun.vert.out
+++ b/Test/baseResults/spv.matFun.vert.out
@@ -8,9 +8,10 @@
// Id's are bound by 94
Source GLSL 130
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Vertex 4
+ EntryPoint Vertex 4 "main"
Name 4 "main"
Name 15 "xf(mf33;vf3;"
Name 13 "m"
@@ -32,9 +33,9 @@
Name 93 "gl_VertexID"
Decorate 70(gl_Position) BuiltIn Position
Decorate 93(gl_VertexID) BuiltIn VertexId
- Decorate 93(gl_VertexID) NoStaticUse
+ Decorate 93(gl_VertexID) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 3
9: TypeMatrix 8(fvec3) 3
@@ -54,37 +55,37 @@
47: 7(float) Constant 1065353216
48: 7(float) Constant 0
69: TypePointer Output 17(fvec4)
- 70(gl_Position): 69(ptr) Variable Output
+ 70(gl_Position): 69(ptr) Variable Output
71: TypePointer UniformConstant 18
- 72(m4): 71(ptr) Variable UniformConstant
+ 72(m4): 71(ptr) Variable UniformConstant
73: TypePointer Input 8(fvec3)
- 74(v3): 73(ptr) Variable Input
+ 74(v3): 73(ptr) Variable Input
80: TypePointer UniformConstant 9
- 81(m3): 80(ptr) Variable UniformConstant
+ 81(m3): 80(ptr) Variable UniformConstant
92: TypePointer Input 33(int)
- 93(gl_VertexID): 92(ptr) Variable Input
+ 93(gl_VertexID): 92(ptr) Variable Input
4(main): 2 Function None 3
5: Label
- 75(param): 19(ptr) Variable Function
- 77(param): 11(ptr) Variable Function
- 82(param): 10(ptr) Variable Function
- 84(param): 11(ptr) Variable Function
- 76: 18 Load 72(m4)
- Store 75(param) 76
- 78: 8(fvec3) Load 74(v3)
- Store 77(param) 78
+ 75(param): 19(ptr) Variable Function
+ 77(param): 11(ptr) Variable Function
+ 82(param): 10(ptr) Variable Function
+ 84(param): 11(ptr) Variable Function
+ 76: 18 Load 72(m4)
+ Store 75(param) 76
+ 78: 8(fvec3) Load 74(v3)
+ Store 77(param) 78
79: 8(fvec3) FunctionCall 27(mxv(mf44;vf3;) 75(param) 77(param)
- 83: 9 Load 81(m3)
- Store 82(param) 83
- 85: 8(fvec3) Load 74(v3)
- Store 84(param) 85
+ 83: 9 Load 81(m3)
+ Store 82(param) 83
+ 85: 8(fvec3) Load 74(v3)
+ Store 84(param) 85
86: 8(fvec3) FunctionCall 15(xf(mf33;vf3;) 82(param) 84(param)
87: 8(fvec3) FAdd 79 86
88: 7(float) CompositeExtract 87 0
89: 7(float) CompositeExtract 87 1
90: 7(float) CompositeExtract 87 2
91: 17(fvec4) CompositeConstruct 88 89 90 47
- Store 70(gl_Position) 91
+ Store 70(gl_Position) 91
Branch 6
6: Label
Return
@@ -93,8 +94,8 @@
13(m): 10(ptr) FunctionParameter
14(v): 11(ptr) FunctionParameter
16: Label
- 29: 8(fvec3) Load 14(v)
- 30: 9 Load 13(m)
+ 29: 8(fvec3) Load 14(v)
+ 30: 9 Load 13(m)
31: 8(fvec3) VectorTimesMatrix 29 30
ReturnValue 31
FunctionEnd
@@ -102,13 +103,13 @@
21(m): 19(ptr) FunctionParameter
23: Label
36: 35(ptr) AccessChain 21(m) 34
- 37: 17(fvec4) Load 36
+ 37: 17(fvec4) Load 36
38: 8(fvec3) VectorShuffle 37 37 0 1 2
40: 35(ptr) AccessChain 21(m) 39
- 41: 17(fvec4) Load 40
+ 41: 17(fvec4) Load 40
42: 8(fvec3) VectorShuffle 41 41 0 1 2
44: 35(ptr) AccessChain 21(m) 43
- 45: 17(fvec4) Load 44
+ 45: 17(fvec4) Load 44
46: 8(fvec3) VectorShuffle 45 45 0 1 2
49: 7(float) CompositeExtract 38 0
50: 7(float) CompositeExtract 38 1
@@ -129,10 +130,10 @@
25(m4): 19(ptr) FunctionParameter
26(v): 11(ptr) FunctionParameter
28: Label
- 64(param): 19(ptr) Variable Function
- 63: 8(fvec3) Load 26(v)
- 65: 18 Load 25(m4)
- Store 64(param) 65
+ 64(param): 19(ptr) Variable Function
+ 63: 8(fvec3) Load 26(v)
+ 65: 18 Load 25(m4)
+ Store 64(param) 65
66: 9 FunctionCall 22(Mat3(mf44;) 64(param)
67: 8(fvec3) VectorTimesMatrix 63 66
ReturnValue 67
diff --git a/Test/baseResults/spv.nonSquare.vert.out b/Test/baseResults/spv.nonSquare.vert.out
old mode 100644
new mode 100755
index 94fe8cb..fe27f56
--- a/Test/baseResults/spv.nonSquare.vert.out
+++ b/Test/baseResults/spv.nonSquare.vert.out
@@ -8,9 +8,10 @@
// Id's are bound by 91
Source GLSL 120
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Vertex 4
+ EntryPoint Vertex 4 "main"
Name 4 "main"
Name 10 "a"
Name 13 "v3"
@@ -20,25 +21,25 @@
Name 29 "gl_Position"
Name 56 "v4"
Decorate 29(gl_Position) BuiltIn Position
- Decorate 75 NoStaticUse
- Decorate 79 NoStaticUse
- Decorate 90 NoStaticUse
+ Decorate 75 NoStaticUse
+ Decorate 79 NoStaticUse
+ Decorate 90 NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 2
9: TypePointer Function 8(fvec2)
11: TypeVector 7(float) 3
12: TypePointer Input 11(fvec3)
- 13(v3): 12(ptr) Variable Input
+ 13(v3): 12(ptr) Variable Input
15: TypeMatrix 11(fvec3) 2
16: TypePointer Function 15
21: TypeMatrix 8(fvec2) 3
22: TypePointer UniformConstant 21
- 23(m32): 22(ptr) Variable UniformConstant
+ 23(m32): 22(ptr) Variable UniformConstant
27: TypeVector 7(float) 4
28: TypePointer Output 27(fvec4)
- 29(gl_Position): 28(ptr) Variable Output
+ 29(gl_Position): 28(ptr) Variable Output
32: TypeMatrix 11(fvec3) 3
36: 7(float) Constant 0
41: TypeMatrix 27(fvec4) 4
@@ -56,7 +57,7 @@
53: 27(fvec4) ConstantComposite 51 52 36 36
54: 41 ConstantComposite 44 47 50 53
55: TypePointer Input 27(fvec4)
- 56(v4): 55(ptr) Variable Input
+ 56(v4): 55(ptr) Variable Input
60: 7(float) Constant 1112014848
61: 7(float) Constant 1121714176
62: 7(float) Constant 1126825984
@@ -87,33 +88,33 @@
90: 80 ConstantComposite 83 85 86 89
4(main): 2 Function None 3
5: Label
- 10(a): 9(ptr) Variable Function
- 17(m23): 16(ptr) Variable Function
- 20(b): 9(ptr) Variable Function
- 14: 11(fvec3) Load 13(v3)
- 18: 15 Load 17(m23)
+ 10(a): 9(ptr) Variable Function
+ 17(m23): 16(ptr) Variable Function
+ 20(b): 9(ptr) Variable Function
+ 14: 11(fvec3) Load 13(v3)
+ 18: 15 Load 17(m23)
19: 8(fvec2) VectorTimesMatrix 14 18
- Store 10(a) 19
- 24: 21 Load 23(m32)
- 25: 11(fvec3) Load 13(v3)
+ Store 10(a) 19
+ 24: 21 Load 23(m32)
+ 25: 11(fvec3) Load 13(v3)
26: 8(fvec2) MatrixTimesVector 24 25
- Store 20(b) 26
- 30: 15 Load 17(m23)
- 31: 21 Load 23(m32)
+ Store 20(b) 26
+ 30: 15 Load 17(m23)
+ 31: 21 Load 23(m32)
33: 32 MatrixTimesMatrix 30 31
- 34: 11(fvec3) Load 13(v3)
+ 34: 11(fvec3) Load 13(v3)
35: 11(fvec3) MatrixTimesVector 33 34
37: 7(float) CompositeExtract 35 0
38: 7(float) CompositeExtract 35 1
39: 7(float) CompositeExtract 35 2
40: 27(fvec4) CompositeConstruct 37 38 39 36
- 57: 27(fvec4) Load 56(v4)
+ 57: 27(fvec4) Load 56(v4)
58: 27(fvec4) MatrixTimesVector 54 57
59: 27(fvec4) FAdd 40 58
65: 27(fvec4) FAdd 59 64
69: 27(fvec4) FAdd 65 68
74: 27(fvec4) FAdd 69 73
- Store 29(gl_Position) 74
+ Store 29(gl_Position) 74
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.precision.frag.out b/Test/baseResults/spv.precision.frag.out
old mode 100644
new mode 100755
index fdbe7e4..71f6e77
--- a/Test/baseResults/spv.precision.frag.out
+++ b/Test/baseResults/spv.precision.frag.out
@@ -8,9 +8,11 @@
// Id's are bound by 111
Source ESSL 300
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 13 "foo(vf3;"
Name 12 "mv3"
@@ -31,24 +33,20 @@
Name 72 "mediumfout"
Name 101 "ub2"
Name 102 "param"
- Decorate 24(highfin) PrecisionHigh
- Decorate 24(highfin) Smooth
- Decorate 37(sum) PrecisionLow
- Decorate 39(uniform_medium) PrecisionMedium
- Decorate 41(uniform_high) PrecisionHigh
- Decorate 47(uniform_low) PrecisionLow
- Decorate 52(arg1) PrecisionLow
- Decorate 54(arg2) PrecisionMedium
- Decorate 56(d) PrecisionLow
- Decorate 58(lowfin) PrecisionLow
- Decorate 58(lowfin) Smooth
- Decorate 60(mediumfin) PrecisionMedium
- Decorate 60(mediumfin) Smooth
- Decorate 64(global_highp) PrecisionHigh
- Decorate 68(local_highp) PrecisionHigh
- Decorate 72(mediumfout) PrecisionMedium
+ Decorate 24(highfin) Smooth
+ Decorate 37(sum) RelaxedPrecision
+ Decorate 39(uniform_medium) RelaxedPrecision
+ Decorate 47(uniform_low) RelaxedPrecision
+ Decorate 52(arg1) RelaxedPrecision
+ Decorate 54(arg2) RelaxedPrecision
+ Decorate 56(d) RelaxedPrecision
+ Decorate 58(lowfin) RelaxedPrecision
+ Decorate 58(lowfin) Smooth
+ Decorate 60(mediumfin) RelaxedPrecision
+ Decorate 60(mediumfin) Smooth
+ Decorate 72(mediumfout) RelaxedPrecision
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 3
9: TypePointer Function 8(fvec3)
@@ -60,102 +58,102 @@
18: TypeFunction 15(bool) 17(ptr)
22: TypeVector 7(float) 4
23: TypePointer Input 22(fvec4)
- 24(highfin): 23(ptr) Variable Input
+ 24(highfin): 23(ptr) Variable Input
29: 15(bool) ConstantFalse
30: 15(bool) ConstantTrue
31: 16(bvec2) ConstantComposite 29 30
35: TypeInt 32 1
36: TypePointer Function 35(int)
38: TypePointer UniformConstant 35(int)
-39(uniform_medium): 38(ptr) Variable UniformConstant
-41(uniform_high): 38(ptr) Variable UniformConstant
- 47(uniform_low): 38(ptr) Variable UniformConstant
+39(uniform_medium): 38(ptr) Variable UniformConstant
+41(uniform_high): 38(ptr) Variable UniformConstant
+ 47(uniform_low): 38(ptr) Variable UniformConstant
51: TypePointer Function 7(float)
53: 7(float) Constant 1078774989
55: 7(float) Constant 1232730691
57: TypePointer Input 7(float)
- 58(lowfin): 57(ptr) Variable Input
- 60(mediumfin): 57(ptr) Variable Input
+ 58(lowfin): 57(ptr) Variable Input
+ 60(mediumfin): 57(ptr) Variable Input
63: TypePointer PrivateGlobal 7(float)
-64(global_highp): 63(ptr) Variable PrivateGlobal
+64(global_highp): 63(ptr) Variable PrivateGlobal
67: TypePointer Function 22(fvec4)
71: TypePointer Output 22(fvec4)
- 72(mediumfout): 71(ptr) Variable Output
+ 72(mediumfout): 71(ptr) Variable Output
81: 35(int) Constant 4
83: TypeVector 35(int) 2
100: TypePointer UniformConstant 16(bvec2)
- 101(ub2): 100(ptr) Variable UniformConstant
+ 101(ub2): 100(ptr) Variable UniformConstant
108: 7(float) Constant 1065353216
4(main): 2 Function None 3
5: Label
- 37(sum): 36(ptr) Variable Function
- 52(arg1): 51(ptr) Variable Function
- 54(arg2): 51(ptr) Variable Function
- 56(d): 51(ptr) Variable Function
- 68(local_highp): 67(ptr) Variable Function
- 102(param): 17(ptr) Variable Function
- 40: 35(int) Load 39(uniform_medium)
- 42: 35(int) Load 41(uniform_high)
+ 37(sum): 36(ptr) Variable Function
+ 52(arg1): 51(ptr) Variable Function
+ 54(arg2): 51(ptr) Variable Function
+ 56(d): 51(ptr) Variable Function
+ 68(local_highp): 67(ptr) Variable Function
+ 102(param): 17(ptr) Variable Function
+ 40: 35(int) Load 39(uniform_medium)
+ 42: 35(int) Load 41(uniform_high)
43: 35(int) IAdd 40 42
- Store 37(sum) 43
- 44: 35(int) Load 41(uniform_high)
- 45: 35(int) Load 37(sum)
+ Store 37(sum) 43
+ 44: 35(int) Load 41(uniform_high)
+ 45: 35(int) Load 37(sum)
46: 35(int) IAdd 45 44
- Store 37(sum) 46
- 48: 35(int) Load 47(uniform_low)
- 49: 35(int) Load 37(sum)
+ Store 37(sum) 46
+ 48: 35(int) Load 47(uniform_low)
+ 49: 35(int) Load 37(sum)
50: 35(int) IAdd 49 48
- Store 37(sum) 50
- Store 52(arg1) 53
- Store 54(arg2) 55
- 59: 7(float) Load 58(lowfin)
- 61: 7(float) Load 60(mediumfin)
- 62: 7(float) ExtInst 1(GLSL.std.450) 59(distance) 59 61
- Store 56(d) 62
- 65: 22(fvec4) Load 24(highfin)
- 66: 7(float) ExtInst 1(GLSL.std.450) 58(length) 65
- Store 64(global_highp) 66
- 69: 7(float) Load 64(global_highp)
+ Store 37(sum) 50
+ Store 52(arg1) 53
+ Store 54(arg2) 55
+ 59: 7(float) Load 58(lowfin)
+ 61: 7(float) Load 60(mediumfin)
+ 62: 7(float) ExtInst 1(GLSL.std.450) 66(Distance) 59 61
+ Store 56(d) 62
+ 65: 22(fvec4) Load 24(highfin)
+ 66: 7(float) ExtInst 1(GLSL.std.450) 65(Length) 65
+ Store 64(global_highp) 66
+ 69: 7(float) Load 64(global_highp)
70: 22(fvec4) CompositeConstruct 69 69 69 69
- Store 68(local_highp) 70
- 73: 7(float) Load 56(d)
- 74: 7(float) ExtInst 1(GLSL.std.450) 10(sin) 73
+ Store 68(local_highp) 70
+ 73: 7(float) Load 56(d)
+ 74: 7(float) ExtInst 1(GLSL.std.450) 13(Sin) 73
75: 22(fvec4) CompositeConstruct 74 74 74 74
- 76: 7(float) Load 54(arg2)
+ 76: 7(float) Load 54(arg2)
77: 22(fvec4) CompositeConstruct 76 76 76 76
78: 22(fvec4) FAdd 75 77
- 79: 22(fvec4) Load 68(local_highp)
+ 79: 22(fvec4) Load 68(local_highp)
80: 22(fvec4) FAdd 78 79
- Store 72(mediumfout) 80
- 82: 35(int) Load 47(uniform_low)
+ Store 72(mediumfout) 80
+ 82: 35(int) Load 47(uniform_low)
84: 83(ivec2) CompositeConstruct 82 82
- 85: 35(int) Load 41(uniform_high)
+ 85: 35(int) Load 41(uniform_high)
86: 83(ivec2) CompositeConstruct 85 85
87: 83(ivec2) IMul 84 86
- 88: 35(int) Load 41(uniform_high)
+ 88: 35(int) Load 41(uniform_high)
89: 83(ivec2) CompositeConstruct 88 88
90: 83(ivec2) IAdd 87 89
91: 35(int) CompositeExtract 90 0
92: 35(int) IAdd 81 91
- 93: 35(int) Load 37(sum)
+ 93: 35(int) Load 37(sum)
94: 35(int) IAdd 93 92
- Store 37(sum) 94
- 95: 35(int) Load 37(sum)
+ Store 37(sum) 94
+ 95: 35(int) Load 37(sum)
96: 7(float) ConvertSToF 95
97: 22(fvec4) CompositeConstruct 96 96 96 96
- 98: 22(fvec4) Load 72(mediumfout)
+ 98: 22(fvec4) Load 72(mediumfout)
99: 22(fvec4) FAdd 98 97
- Store 72(mediumfout) 99
- 103: 16(bvec2) Load 101(ub2)
- Store 102(param) 103
+ Store 72(mediumfout) 99
+ 103: 16(bvec2) Load 101(ub2)
+ Store 102(param) 103
104: 15(bool) FunctionCall 20(boolfun(vb2;) 102(param)
SelectionMerge 106 None
- BranchConditional 104 105 106
+ BranchConditional 104 105 106
105: Label
- 107: 22(fvec4) Load 72(mediumfout)
+ 107: 22(fvec4) Load 72(mediumfout)
109: 22(fvec4) CompositeConstruct 108 108 108 108
110: 22(fvec4) FAdd 107 109
- Store 72(mediumfout) 110
+ Store 72(mediumfout) 110
Branch 106
106: Label
Branch 6
@@ -165,14 +163,14 @@
13(foo(vf3;): 10(fvec2) Function None 11
12(mv3): 9(ptr) FunctionParameter
14: Label
- 25: 22(fvec4) Load 24(highfin)
+ 25: 22(fvec4) Load 24(highfin)
26: 10(fvec2) VectorShuffle 25 25 0 1
ReturnValue 26
FunctionEnd
20(boolfun(vb2;): 15(bool) Function None 18
19(bv2): 17(ptr) FunctionParameter
21: Label
- 28: 16(bvec2) Load 19(bv2)
+ 28: 16(bvec2) Load 19(bv2)
32: 16(bvec2) IEqual 28 31
33: 15(bool) All 32
ReturnValue 33
diff --git a/Test/baseResults/spv.prepost.frag.out b/Test/baseResults/spv.prepost.frag.out
old mode 100644
new mode 100755
index e9ac5ca..5c85d5e
--- a/Test/baseResults/spv.prepost.frag.out
+++ b/Test/baseResults/spv.prepost.frag.out
@@ -8,9 +8,11 @@
// Id's are bound by 97
Source GLSL 140
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 9 "index"
Name 15 "s"
@@ -24,7 +26,7 @@
Name 93 "gl_FragColor"
Decorate 93(gl_FragColor) BuiltIn FragColor
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeInt 32 1
8: TypePointer Function 7(int)
10: 7(int) Constant 5
@@ -46,104 +48,104 @@
76: 11(float) Constant 1082130432
77: 72(fvec4) ConstantComposite 29 20 75 76
92: TypePointer Output 72(fvec4)
-93(gl_FragColor): 92(ptr) Variable Output
+93(gl_FragColor): 92(ptr) Variable Output
4(main): 2 Function None 3
5: Label
- 9(index): 8(ptr) Variable Function
- 17(str): 16(ptr) Variable Function
- 23(t): 21(ptr) Variable Function
- 51(x): 21(ptr) Variable Function
- 62(y): 21(ptr) Variable Function
- 67(z): 21(ptr) Variable Function
- 74(v): 73(ptr) Variable Function
- Store 9(index) 10
+ 9(index): 8(ptr) Variable Function
+ 17(str): 16(ptr) Variable Function
+ 23(t): 21(ptr) Variable Function
+ 51(x): 21(ptr) Variable Function
+ 62(y): 21(ptr) Variable Function
+ 67(z): 21(ptr) Variable Function
+ 74(v): 73(ptr) Variable Function
+ Store 9(index) 10
22: 21(ptr) AccessChain 17(str) 18 19
- Store 22 20
- 24: 7(int) Load 9(index)
+ Store 22 20
+ 24: 7(int) Load 9(index)
26: 7(int) ISub 24 25
- Store 9(index) 26
+ Store 9(index) 26
27: 21(ptr) AccessChain 17(str) 18 26
- 28: 11(float) Load 27
+ 28: 11(float) Load 27
30: 11(float) FAdd 28 29
- Store 27 30
- Store 23(t) 30
- 31: 11(float) Load 23(t)
+ Store 27 30
+ Store 23(t) 30
+ 31: 11(float) Load 23(t)
32: 21(ptr) AccessChain 17(str) 18 19
- 33: 11(float) Load 32
+ 33: 11(float) Load 32
34: 11(float) FAdd 33 31
35: 21(ptr) AccessChain 17(str) 18 19
- Store 35 34
+ Store 35 34
36: 21(ptr) AccessChain 17(str) 18 19
- 37: 11(float) Load 36
+ 37: 11(float) Load 36
38: 11(float) FSub 37 29
- Store 36 38
- Store 23(t) 37
- 39: 7(int) Load 9(index)
+ Store 36 38
+ Store 23(t) 37
+ 39: 7(int) Load 9(index)
40: 7(int) IAdd 39 25
- Store 9(index) 40
- 41: 11(float) Load 23(t)
+ Store 9(index) 40
+ 41: 11(float) Load 23(t)
42: 21(ptr) AccessChain 17(str) 18 39
- 43: 11(float) Load 42
+ 43: 11(float) Load 42
44: 11(float) FAdd 43 41
45: 21(ptr) AccessChain 17(str) 18 39
- Store 45 44
- 46: 7(int) Load 9(index)
+ Store 45 44
+ 46: 7(int) Load 9(index)
47: 7(int) ISub 46 25
- Store 9(index) 47
+ Store 9(index) 47
48: 21(ptr) AccessChain 17(str) 18 47
- 49: 11(float) Load 48
+ 49: 11(float) Load 48
50: 11(float) FSub 49 29
- Store 48 50
+ Store 48 50
52: 21(ptr) AccessChain 17(str) 18 19
- 53: 11(float) Load 52
- Store 51(x) 53
- 54: 11(float) Load 51(x)
+ 53: 11(float) Load 52
+ Store 51(x) 53
+ 54: 11(float) Load 51(x)
55: 11(float) FAdd 54 29
- Store 51(x) 55
- 56: 11(float) Load 51(x)
+ Store 51(x) 55
+ 56: 11(float) Load 51(x)
57: 11(float) FSub 56 29
- Store 51(x) 57
- 58: 11(float) Load 51(x)
+ Store 51(x) 57
+ 58: 11(float) Load 51(x)
59: 11(float) FAdd 58 29
- Store 51(x) 59
- 60: 11(float) Load 51(x)
+ Store 51(x) 59
+ 60: 11(float) Load 51(x)
61: 11(float) FSub 60 29
- Store 51(x) 61
- 63: 11(float) Load 51(x)
- 64: 11(float) Load 51(x)
+ Store 51(x) 61
+ 63: 11(float) Load 51(x)
+ 64: 11(float) Load 51(x)
65: 11(float) FAdd 64 29
- Store 51(x) 65
+ Store 51(x) 65
66: 11(float) FMul 63 65
- Store 62(y) 66
- 68: 11(float) Load 62(y)
- 69: 11(float) Load 51(x)
+ Store 62(y) 66
+ 68: 11(float) Load 62(y)
+ 69: 11(float) Load 51(x)
70: 11(float) FSub 69 29
- Store 51(x) 70
+ Store 51(x) 70
71: 11(float) FMul 68 69
- Store 67(z) 71
- Store 74(v) 77
- 78: 72(fvec4) Load 74(v)
+ Store 67(z) 71
+ Store 74(v) 77
+ 78: 72(fvec4) Load 74(v)
79: 11(float) CompositeExtract 78 2
80: 11(float) FSub 79 29
- 81: 72(fvec4) Load 74(v)
+ 81: 72(fvec4) Load 74(v)
82: 72(fvec4) CompositeInsert 80 81 2
- Store 74(v) 82
- 83: 72(fvec4) Load 74(v)
+ Store 74(v) 82
+ 83: 72(fvec4) Load 74(v)
84: 72(fvec4) CompositeInsert 79 83 1
- Store 74(v) 84
- 85: 72(fvec4) Load 74(v)
+ Store 74(v) 84
+ 85: 72(fvec4) Load 74(v)
86: 11(float) CompositeExtract 85 3
87: 11(float) FSub 86 29
- 88: 72(fvec4) Load 74(v)
+ 88: 72(fvec4) Load 74(v)
89: 72(fvec4) CompositeInsert 87 88 3
- Store 74(v) 89
- 90: 72(fvec4) Load 74(v)
+ Store 74(v) 89
+ 90: 72(fvec4) Load 74(v)
91: 72(fvec4) CompositeInsert 87 90 0
- Store 74(v) 91
- 94: 11(float) Load 67(z)
- 95: 72(fvec4) Load 74(v)
+ Store 74(v) 91
+ 94: 11(float) Load 67(z)
+ 95: 72(fvec4) Load 74(v)
96: 72(fvec4) VectorTimesScalar 95 94
- Store 93(gl_FragColor) 96
+ Store 93(gl_FragColor) 96
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.qualifiers.vert.out b/Test/baseResults/spv.qualifiers.vert.out
old mode 100644
new mode 100755
index df8063a..46d3b0e
--- a/Test/baseResults/spv.qualifiers.vert.out
+++ b/Test/baseResults/spv.qualifiers.vert.out
@@ -10,9 +10,10 @@
// Id's are bound by 26
Source GLSL 430
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Vertex 4
+ EntryPoint Vertex 4 "main"
Name 4 "main"
Name 10 "outVc"
Name 12 "inV"
@@ -22,43 +23,43 @@
Name 20 "outVcn"
Name 24 "gl_VertexID"
Name 25 "gl_InstanceID"
- Decorate 10(outVc) Smooth
- Decorate 14(outVs) Smooth
- Decorate 16(outVf) Flat
- Decorate 18(outVn) Noperspective
- Decorate 20(outVcn) Noperspective
+ Decorate 10(outVc) Smooth
+ Decorate 14(outVs) Smooth
+ Decorate 16(outVf) Flat
+ Decorate 18(outVn) Noperspective
+ Decorate 20(outVcn) Noperspective
Decorate 24(gl_VertexID) BuiltIn VertexId
- Decorate 24(gl_VertexID) NoStaticUse
+ Decorate 24(gl_VertexID) NoStaticUse
Decorate 25(gl_InstanceID) BuiltIn InstanceId
- Decorate 25(gl_InstanceID) NoStaticUse
+ Decorate 25(gl_InstanceID) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypePointer Output 8(fvec4)
- 10(outVc): 9(ptr) Variable Output
+ 10(outVc): 9(ptr) Variable Output
11: TypePointer Input 8(fvec4)
- 12(inV): 11(ptr) Variable Input
- 14(outVs): 9(ptr) Variable Output
- 16(outVf): 9(ptr) Variable Output
- 18(outVn): 9(ptr) Variable Output
- 20(outVcn): 9(ptr) Variable Output
+ 12(inV): 11(ptr) Variable Input
+ 14(outVs): 9(ptr) Variable Output
+ 16(outVf): 9(ptr) Variable Output
+ 18(outVn): 9(ptr) Variable Output
+ 20(outVcn): 9(ptr) Variable Output
22: TypeInt 32 1
23: TypePointer Input 22(int)
- 24(gl_VertexID): 23(ptr) Variable Input
-25(gl_InstanceID): 23(ptr) Variable Input
+ 24(gl_VertexID): 23(ptr) Variable Input
+25(gl_InstanceID): 23(ptr) Variable Input
4(main): 2 Function None 3
5: Label
- 13: 8(fvec4) Load 12(inV)
- Store 10(outVc) 13
- 15: 8(fvec4) Load 12(inV)
- Store 14(outVs) 15
- 17: 8(fvec4) Load 12(inV)
- Store 16(outVf) 17
- 19: 8(fvec4) Load 12(inV)
- Store 18(outVn) 19
- 21: 8(fvec4) Load 12(inV)
- Store 20(outVcn) 21
+ 13: 8(fvec4) Load 12(inV)
+ Store 10(outVc) 13
+ 15: 8(fvec4) Load 12(inV)
+ Store 14(outVs) 15
+ 17: 8(fvec4) Load 12(inV)
+ Store 16(outVf) 17
+ 19: 8(fvec4) Load 12(inV)
+ Store 18(outVn) 19
+ 21: 8(fvec4) Load 12(inV)
+ Store 20(outVcn) 21
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.set.vert.out b/Test/baseResults/spv.set.vert.out
old mode 100644
new mode 100755
index b968d67..396cfb3
--- a/Test/baseResults/spv.set.vert.out
+++ b/Test/baseResults/spv.set.vert.out
@@ -7,55 +7,57 @@
// Module Version 99
// Generated by (magic number): 51a00bb
-// Id's are bound by 25
+// Id's are bound by 26
Source GLSL 450
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Vertex 4
+ EntryPoint Vertex 4 "main"
Name 4 "main"
Name 10 "color"
Name 11 "setBuf"
MemberName 11(setBuf) 0 "color"
Name 13 "setBufInst"
- Name 21 "sampler"
- Name 23 "gl_VertexID"
- Name 24 "gl_InstanceID"
- Decorate 10(color) Smooth
- Decorate 11(setBuf) GLSLShared
- Decorate 11(setBuf) BufferBlock
+ Name 22 "sampler"
+ Name 24 "gl_VertexID"
+ Name 25 "gl_InstanceID"
+ Decorate 10(color) Smooth
+ Decorate 11(setBuf) GLSLShared
+ Decorate 11(setBuf) BufferBlock
Decorate 13(setBufInst) DescriptorSet 0
Decorate 13(setBufInst) Binding 8
- Decorate 21(sampler) DescriptorSet 4
- Decorate 21(sampler) Binding 7
- Decorate 21(sampler) NoStaticUse
- Decorate 23(gl_VertexID) BuiltIn VertexId
- Decorate 23(gl_VertexID) NoStaticUse
- Decorate 24(gl_InstanceID) BuiltIn InstanceId
- Decorate 24(gl_InstanceID) NoStaticUse
+ Decorate 22(sampler) DescriptorSet 4
+ Decorate 22(sampler) Binding 7
+ Decorate 22(sampler) NoStaticUse
+ Decorate 24(gl_VertexID) BuiltIn VertexId
+ Decorate 24(gl_VertexID) NoStaticUse
+ Decorate 25(gl_InstanceID) BuiltIn InstanceId
+ Decorate 25(gl_InstanceID) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypePointer Output 8(fvec4)
- 10(color): 9(ptr) Variable Output
+ 10(color): 9(ptr) Variable Output
11(setBuf): TypeStruct 8(fvec4)
12: TypePointer Uniform 11(setBuf)
- 13(setBufInst): 12(ptr) Variable Uniform
+ 13(setBufInst): 12(ptr) Variable Uniform
14: TypeInt 32 1
15: 14(int) Constant 0
16: TypePointer Uniform 8(fvec4)
- 19: TypeSampler7(float) 2D filter+texture
- 20: TypePointer UniformConstant 19
- 21(sampler): 20(ptr) Variable UniformConstant
- 22: TypePointer Input 14(int)
- 23(gl_VertexID): 22(ptr) Variable Input
-24(gl_InstanceID): 22(ptr) Variable Input
+ 19: TypeImage 7(float) 2D sampled format:Unknown
+ 20: TypeSampledImage 19
+ 21: TypePointer UniformConstant 20
+ 22(sampler): 21(ptr) Variable UniformConstant
+ 23: TypePointer Input 14(int)
+ 24(gl_VertexID): 23(ptr) Variable Input
+25(gl_InstanceID): 23(ptr) Variable Input
4(main): 2 Function None 3
5: Label
17: 16(ptr) AccessChain 13(setBufInst) 15
- 18: 8(fvec4) Load 17
- Store 10(color) 18
+ 18: 8(fvec4) Load 17
+ Store 10(color) 18
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.simpleFunctionCall.frag.out b/Test/baseResults/spv.simpleFunctionCall.frag.out
old mode 100644
new mode 100755
index 35c6dfb..5b4ecd0
--- a/Test/baseResults/spv.simpleFunctionCall.frag.out
+++ b/Test/baseResults/spv.simpleFunctionCall.frag.out
@@ -10,42 +10,44 @@
// Id's are bound by 23
Source GLSL 150
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 10 "foo("
Name 13 "BaseColor"
Name 17 "gl_FragColor"
Name 20 "bigColor"
Name 22 "d"
- Decorate 13(BaseColor) Smooth
+ Decorate 13(BaseColor) Smooth
Decorate 17(gl_FragColor) BuiltIn FragColor
- Decorate 20(bigColor) NoStaticUse
- Decorate 22(d) NoStaticUse
+ Decorate 20(bigColor) NoStaticUse
+ Decorate 22(d) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
- 9: TypeFunction 8(fvec4)
+ 9: TypeFunction 8(fvec4)
12: TypePointer Input 8(fvec4)
- 13(BaseColor): 12(ptr) Variable Input
+ 13(BaseColor): 12(ptr) Variable Input
16: TypePointer Output 8(fvec4)
-17(gl_FragColor): 16(ptr) Variable Output
+17(gl_FragColor): 16(ptr) Variable Output
19: TypePointer UniformConstant 8(fvec4)
- 20(bigColor): 19(ptr) Variable UniformConstant
+ 20(bigColor): 19(ptr) Variable UniformConstant
21: TypePointer UniformConstant 7(float)
- 22(d): 21(ptr) Variable UniformConstant
+ 22(d): 21(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
- 18: 8(fvec4) FunctionCall 10(foo()
- Store 17(gl_FragColor) 18
+ 18: 8(fvec4) FunctionCall 10(foo()
+ Store 17(gl_FragColor) 18
Branch 6
6: Label
Return
FunctionEnd
10(foo(): 8(fvec4) Function None 9
11: Label
- 14: 8(fvec4) Load 13(BaseColor)
+ 14: 8(fvec4) Load 13(BaseColor)
ReturnValue 14
FunctionEnd
diff --git a/Test/baseResults/spv.simpleMat.vert.out b/Test/baseResults/spv.simpleMat.vert.out
old mode 100644
new mode 100755
index 8b16d76..4cae545
--- a/Test/baseResults/spv.simpleMat.vert.out
+++ b/Test/baseResults/spv.simpleMat.vert.out
@@ -8,9 +8,10 @@
// Id's are bound by 44
Source GLSL 330
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Vertex 4
+ EntryPoint Vertex 4 "main"
Name 4 "main"
Name 10 "glPos"
Name 13 "mvp"
@@ -20,29 +21,29 @@
Name 35 "arraym"
Name 42 "gl_VertexID"
Name 43 "gl_InstanceID"
- Decorate 10(glPos) Smooth
- Decorate 20(f) Smooth
+ Decorate 10(glPos) Smooth
+ Decorate 20(f) Smooth
Decorate 42(gl_VertexID) BuiltIn VertexId
- Decorate 42(gl_VertexID) NoStaticUse
+ Decorate 42(gl_VertexID) NoStaticUse
Decorate 43(gl_InstanceID) BuiltIn InstanceId
- Decorate 43(gl_InstanceID) NoStaticUse
+ Decorate 43(gl_InstanceID) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypePointer Output 8(fvec4)
- 10(glPos): 9(ptr) Variable Output
+ 10(glPos): 9(ptr) Variable Output
11: TypeMatrix 8(fvec4) 4
12: TypePointer UniformConstant 11
- 13(mvp): 12(ptr) Variable UniformConstant
+ 13(mvp): 12(ptr) Variable UniformConstant
15: TypePointer Input 8(fvec4)
- 16(v): 15(ptr) Variable Input
+ 16(v): 15(ptr) Variable Input
19: TypePointer Output 7(float)
- 20(f): 19(ptr) Variable Output
+ 20(f): 19(ptr) Variable Output
21: TypeVector 7(float) 3
22: TypeMatrix 21(fvec3) 3
23: TypePointer Input 22
- 24(am3): 23(ptr) Variable Input
+ 24(am3): 23(ptr) Variable Input
25: TypeInt 32 1
26: 25(int) Constant 2
27: TypePointer Input 21(fvec3)
@@ -50,25 +51,25 @@
32: 31(int) Constant 3
33: TypeArray 11 32
34: TypePointer Input 33
- 35(arraym): 34(ptr) Variable Input
+ 35(arraym): 34(ptr) Variable Input
36: 25(int) Constant 1
41: TypePointer Input 25(int)
- 42(gl_VertexID): 41(ptr) Variable Input
-43(gl_InstanceID): 41(ptr) Variable Input
+ 42(gl_VertexID): 41(ptr) Variable Input
+43(gl_InstanceID): 41(ptr) Variable Input
4(main): 2 Function None 3
5: Label
- 14: 11 Load 13(mvp)
- 17: 8(fvec4) Load 16(v)
+ 14: 11 Load 13(mvp)
+ 17: 8(fvec4) Load 16(v)
18: 8(fvec4) MatrixTimesVector 14 17
- Store 10(glPos) 18
+ Store 10(glPos) 18
28: 27(ptr) AccessChain 24(am3) 26
- 29: 21(fvec3) Load 28
+ 29: 21(fvec3) Load 28
30: 7(float) CompositeExtract 29 1
37: 15(ptr) AccessChain 35(arraym) 36 26
- 38: 8(fvec4) Load 37
+ 38: 8(fvec4) Load 37
39: 7(float) CompositeExtract 38 3
40: 7(float) FAdd 30 39
- Store 20(f) 40
+ Store 20(f) 40
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.structAssignment.frag.out b/Test/baseResults/spv.structAssignment.frag.out
old mode 100644
new mode 100755
index d41f57b..4ae7be9
--- a/Test/baseResults/spv.structAssignment.frag.out
+++ b/Test/baseResults/spv.structAssignment.frag.out
@@ -7,12 +7,14 @@
// Module Version 99
// Generated by (magic number): 51a00bb
-// Id's are bound by 50
+// Id's are bound by 51
Source GLSL 130
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 9 "lunarStruct1"
MemberName 9(lunarStruct1) 0 "i"
@@ -30,66 +32,67 @@
Name 23 "locals2"
Name 28 "foo2"
Name 32 "gl_FragColor"
- Name 40 "sampler"
- Name 44 "coord"
- Name 49 "foo"
+ Name 41 "sampler"
+ Name 45 "coord"
+ Name 50 "foo"
Decorate 32(gl_FragColor) BuiltIn FragColor
- Decorate 44(coord) Smooth
- Decorate 49(foo) NoStaticUse
+ Decorate 45(coord) Smooth
+ Decorate 50(foo) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeInt 32 1
8: TypeFloat 32
9(lunarStruct1): TypeStruct 7(int) 8(float)
10(lunarStruct2): TypeStruct 7(int) 8(float) 9(lunarStruct1)
11(lunarStruct3): TypeStruct 10(lunarStruct2) 7(int) 8(float) 9(lunarStruct1)
12: TypePointer UniformConstant 11(lunarStruct3)
- 13(foo3): 12(ptr) Variable UniformConstant
+ 13(foo3): 12(ptr) Variable UniformConstant
14: 7(int) Constant 0
15: TypePointer UniformConstant 7(int)
18: TypeBool
22: TypePointer Function 10(lunarStruct2)
24: TypePointer UniformConstant 10(lunarStruct2)
- 28(foo2): 24(ptr) Variable UniformConstant
+ 28(foo2): 24(ptr) Variable UniformConstant
30: TypeVector 8(float) 4
31: TypePointer Output 30(fvec4)
-32(gl_FragColor): 31(ptr) Variable Output
+32(gl_FragColor): 31(ptr) Variable Output
33: 7(int) Constant 2
34: 7(int) Constant 1
35: TypePointer Function 8(float)
- 38: TypeSampler8(float) 2D filter+texture
- 39: TypePointer UniformConstant 38
- 40(sampler): 39(ptr) Variable UniformConstant
- 42: TypeVector 8(float) 2
- 43: TypePointer Input 42(fvec2)
- 44(coord): 43(ptr) Variable Input
- 48: TypePointer UniformConstant 9(lunarStruct1)
- 49(foo): 48(ptr) Variable UniformConstant
+ 38: TypeImage 8(float) 2D sampled format:Unknown
+ 39: TypeSampledImage 38
+ 40: TypePointer UniformConstant 39
+ 41(sampler): 40(ptr) Variable UniformConstant
+ 43: TypeVector 8(float) 2
+ 44: TypePointer Input 43(fvec2)
+ 45(coord): 44(ptr) Variable Input
+ 49: TypePointer UniformConstant 9(lunarStruct1)
+ 50(foo): 49(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
- 23(locals2): 22(ptr) Variable Function
+ 23(locals2): 22(ptr) Variable Function
16: 15(ptr) AccessChain 13(foo3) 14 14
- 17: 7(int) Load 16
+ 17: 7(int) Load 16
19: 18(bool) SGreaterThan 17 14
SelectionMerge 21 None
- BranchConditional 19 20 27
+ BranchConditional 19 20 27
20: Label
25: 24(ptr) AccessChain 13(foo3) 14
- 26:10(lunarStruct2) Load 25
- Store 23(locals2) 26
+ 26:10(lunarStruct2) Load 25
+ Store 23(locals2) 26
Branch 21
27: Label
- 29:10(lunarStruct2) Load 28(foo2)
- Store 23(locals2) 29
+ 29:10(lunarStruct2) Load 28(foo2)
+ Store 23(locals2) 29
Branch 21
21: Label
36: 35(ptr) AccessChain 23(locals2) 33 34
- 37: 8(float) Load 36
- 41: 38 Load 40(sampler)
- 45: 42(fvec2) Load 44(coord)
- 46: 30(fvec4) TextureSample 41 45
- 47: 30(fvec4) VectorTimesScalar 46 37
- Store 32(gl_FragColor) 47
+ 37: 8(float) Load 36
+ 42: 39 Load 41(sampler)
+ 46: 43(fvec2) Load 45(coord)
+ 47: 30(fvec4) ImageSampleImplicitLod 42 46
+ 48: 30(fvec4) VectorTimesScalar 47 37
+ Store 32(gl_FragColor) 48
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.structDeref.frag.out b/Test/baseResults/spv.structDeref.frag.out
old mode 100644
new mode 100755
index 840f08c..570a297
--- a/Test/baseResults/spv.structDeref.frag.out
+++ b/Test/baseResults/spv.structDeref.frag.out
@@ -7,12 +7,14 @@
// Module Version 99
// Generated by (magic number): 51a00bb
-// Id's are bound by 120
+// Id's are bound by 121
Source GLSL 130
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 9 "s0"
MemberName 9(s0) 0 "i"
@@ -42,13 +44,13 @@
Name 69 "foo0"
Name 84 "foo00"
Name 97 "gl_FragColor"
- Name 113 "sampler"
- Name 119 "foo2"
- Decorate 62(coord) Smooth
+ Name 114 "sampler"
+ Name 120 "foo2"
+ Decorate 62(coord) Smooth
Decorate 97(gl_FragColor) BuiltIn FragColor
- Decorate 119(foo2) NoStaticUse
+ Decorate 120(foo2) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeInt 32 1
8: TypeFloat 32
9(s0): TypeStruct 7(int)
@@ -59,7 +61,7 @@
14: TypeArray 11(s2) 13
15(s3): TypeStruct 14 7(int) 8(float) 10(s1)
16: TypePointer UniformConstant 15(s3)
- 17(foo3): 16(ptr) Variable UniformConstant
+ 17(foo3): 16(ptr) Variable UniformConstant
18: 7(int) Constant 0
19: 7(int) Constant 9
20: TypePointer UniformConstant 7(int)
@@ -82,109 +84,110 @@
46: TypePointer Function 45
48: 7(int) Constant 6
49: TypePointer UniformConstant 10(s1)
- 50(foo1): 49(ptr) Variable UniformConstant
+ 50(foo1): 49(ptr) Variable UniformConstant
53: TypePointer Function 9(s0)
55(s00): TypeStruct 9(s0)
56: TypePointer Function 55(s00)
58: 55(s00) ConstantComposite 34
60: TypeVector 8(float) 2
61: TypePointer Input 60(fvec2)
- 62(coord): 61(ptr) Variable Input
+ 62(coord): 61(ptr) Variable Input
68: TypePointer UniformConstant 9(s0)
- 69(foo0): 68(ptr) Variable UniformConstant
+ 69(foo0): 68(ptr) Variable UniformConstant
73: 8(float) Constant 1073741824
74: 8(float) Constant 1077936128
75: 8(float) Constant 1082130432
76: 8(float) Constant 1084227584
77: 39 ConstantComposite 42 30 73 74 75 76
83: TypePointer UniformConstant 55(s00)
- 84(foo00): 83(ptr) Variable UniformConstant
+ 84(foo00): 83(ptr) Variable UniformConstant
86: TypePointer Function 7(int)
89: 7(int) Constant 5
95: TypeVector 8(float) 4
96: TypePointer Output 95(fvec4)
-97(gl_FragColor): 96(ptr) Variable Output
+97(gl_FragColor): 96(ptr) Variable Output
104: 7(int) Constant 3
- 111: TypeSampler8(float) 2D filter+texture
- 112: TypePointer UniformConstant 111
- 113(sampler): 112(ptr) Variable UniformConstant
- 118: TypePointer UniformConstant 11(s2)
- 119(foo2): 118(ptr) Variable UniformConstant
+ 111: TypeImage 8(float) 2D sampled format:Unknown
+ 112: TypeSampledImage 111
+ 113: TypePointer UniformConstant 112
+ 114(sampler): 113(ptr) Variable UniformConstant
+ 119: TypePointer UniformConstant 11(s2)
+ 120(foo2): 119(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
- 28(locals2): 27(ptr) Variable Function
- 41(fArray): 40(ptr) Variable Function
-47(locals1Array): 46(ptr) Variable Function
- 54(locals0): 53(ptr) Variable Function
- 57(locals00): 56(ptr) Variable Function
+ 28(locals2): 27(ptr) Variable Function
+ 41(fArray): 40(ptr) Variable Function
+47(locals1Array): 46(ptr) Variable Function
+ 54(locals0): 53(ptr) Variable Function
+ 57(locals00): 56(ptr) Variable Function
21: 20(ptr) AccessChain 17(foo3) 18 19 18
- 22: 7(int) Load 21
+ 22: 7(int) Load 21
24: 23(bool) SGreaterThan 22 18
SelectionMerge 26 None
- BranchConditional 24 25 59
+ BranchConditional 24 25 59
25: Label
32: 31(ptr) AccessChain 28(locals2) 29
- Store 32 30
+ Store 32 30
37: 36(ptr) AccessChain 28(locals2) 33
- Store 37 35
- Store 41(fArray) 43
- 51: 10(s1) Load 50(foo1)
+ Store 37 35
+ Store 41(fArray) 43
+ 51: 10(s1) Load 50(foo1)
52: 36(ptr) AccessChain 47(locals1Array) 48
- Store 52 51
- Store 54(locals0) 34
- Store 57(locals00) 58
+ Store 52 51
+ Store 54(locals0) 34
+ Store 57(locals00) 58
Branch 26
59: Label
- 63: 60(fvec2) Load 62(coord)
+ 63: 60(fvec2) Load 62(coord)
64: 8(float) CompositeExtract 63 0
65: 31(ptr) AccessChain 28(locals2) 29
- Store 65 64
- 66: 60(fvec2) Load 62(coord)
+ Store 65 64
+ 66: 60(fvec2) Load 62(coord)
67: 8(float) CompositeExtract 66 1
- 70: 9(s0) Load 69(foo0)
+ 70: 9(s0) Load 69(foo0)
71: 10(s1) CompositeConstruct 29 67 70
72: 36(ptr) AccessChain 28(locals2) 33
- Store 72 71
- Store 41(fArray) 77
+ Store 72 71
+ Store 41(fArray) 77
78: 36(ptr) AccessChain 28(locals2) 33
- 79: 10(s1) Load 78
+ 79: 10(s1) Load 78
80: 36(ptr) AccessChain 47(locals1Array) 48
- Store 80 79
+ Store 80 79
81: 68(ptr) AccessChain 50(foo1) 33
- 82: 9(s0) Load 81
- Store 54(locals0) 82
- 85: 55(s00) Load 84(foo00)
- Store 57(locals00) 85
+ 82: 9(s0) Load 81
+ Store 54(locals0) 82
+ 85: 55(s00) Load 84(foo00)
+ Store 57(locals00) 85
Branch 26
26: Label
87: 86(ptr) AccessChain 54(locals0) 18
- 88: 7(int) Load 87
+ 88: 7(int) Load 87
90: 23(bool) SGreaterThan 88 89
SelectionMerge 92 None
- BranchConditional 90 91 92
+ BranchConditional 90 91 92
91: Label
93: 53(ptr) AccessChain 57(locals00) 18
- 94: 9(s0) Load 93
- Store 54(locals0) 94
+ 94: 9(s0) Load 93
+ Store 54(locals0) 94
Branch 92
92: Label
98: 86(ptr) AccessChain 54(locals0) 18
- 99: 7(int) Load 98
+ 99: 7(int) Load 98
100: 8(float) ConvertSToF 99
101: 31(ptr) AccessChain 47(locals1Array) 48 29
- 102: 8(float) Load 101
+ 102: 8(float) Load 101
103: 8(float) FAdd 100 102
105: 31(ptr) AccessChain 41(fArray) 104
- 106: 8(float) Load 105
+ 106: 8(float) Load 105
107: 8(float) FAdd 103 106
108: 31(ptr) AccessChain 28(locals2) 33 29
- 109: 8(float) Load 108
+ 109: 8(float) Load 108
110: 8(float) FAdd 107 109
- 114: 111 Load 113(sampler)
- 115: 60(fvec2) Load 62(coord)
- 116: 95(fvec4) TextureSample 114 115
- 117: 95(fvec4) VectorTimesScalar 116 110
- Store 97(gl_FragColor) 117
+ 115: 112 Load 114(sampler)
+ 116: 60(fvec2) Load 62(coord)
+ 117: 95(fvec4) ImageSampleImplicitLod 115 116
+ 118: 95(fvec4) VectorTimesScalar 117 110
+ Store 97(gl_FragColor) 118
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.structure.frag.out b/Test/baseResults/spv.structure.frag.out
old mode 100644
new mode 100755
index 3c1053e..8edff73
--- a/Test/baseResults/spv.structure.frag.out
+++ b/Test/baseResults/spv.structure.frag.out
@@ -7,12 +7,14 @@
// Module Version 99
// Generated by (magic number): 51a00bb
-// Id's are bound by 61
+// Id's are bound by 62
Source GLSL 130
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 9 "scale"
Name 19 "lunarStruct1"
@@ -25,14 +27,14 @@
MemberName 22(lunarStruct2) 2 "s1_1"
Name 25 "foo2"
Name 47 "gl_FragColor"
- Name 51 "sampler"
- Name 55 "coord"
- Name 60 "foo"
+ Name 52 "sampler"
+ Name 56 "coord"
+ Name 61 "foo"
Decorate 47(gl_FragColor) BuiltIn FragColor
- Decorate 55(coord) Smooth
- Decorate 60(foo) NoStaticUse
+ Decorate 56(coord) Smooth
+ Decorate 61(foo) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypePointer Function 7(float)
10: 7(float) Constant 0
@@ -50,7 +52,7 @@
22(lunarStruct2): TypeStruct 14 7(float) 21
23: TypeArray 22(lunarStruct2) 13
24: TypePointer UniformConstant 23
- 25(foo2): 24(ptr) Variable UniformConstant
+ 25(foo2): 24(ptr) Variable UniformConstant
26: 11(int) Constant 3
27: 11(int) Constant 0
28: 11(int) Constant 4
@@ -61,42 +63,43 @@
42: 11(int) Constant 1
43: TypePointer UniformConstant 7(float)
46: TypePointer Output 17(fvec4)
-47(gl_FragColor): 46(ptr) Variable Output
- 49: TypeSampler7(float) 2D filter+texture
- 50: TypePointer UniformConstant 49
- 51(sampler): 50(ptr) Variable UniformConstant
- 53: TypeVector 7(float) 2
- 54: TypePointer Input 53(fvec2)
- 55(coord): 54(ptr) Variable Input
- 59: TypePointer UniformConstant 19(lunarStruct1)
- 60(foo): 59(ptr) Variable UniformConstant
+47(gl_FragColor): 46(ptr) Variable Output
+ 49: TypeImage 7(float) 2D sampled format:Unknown
+ 50: TypeSampledImage 49
+ 51: TypePointer UniformConstant 50
+ 52(sampler): 51(ptr) Variable UniformConstant
+ 54: TypeVector 7(float) 2
+ 55: TypePointer Input 54(fvec2)
+ 56(coord): 55(ptr) Variable Input
+ 60: TypePointer UniformConstant 19(lunarStruct1)
+ 61(foo): 60(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
- 9(scale): 8(ptr) Variable Function
- Store 9(scale) 10
+ 9(scale): 8(ptr) Variable Function
+ Store 9(scale) 10
30: 29(ptr) AccessChain 25(foo2) 26 27 28
- 31: 11(int) Load 30
+ 31: 11(int) Load 30
33: 32(bool) SGreaterThan 31 27
SelectionMerge 35 None
- BranchConditional 33 34 41
+ BranchConditional 33 34 41
34: Label
38: 37(ptr) AccessChain 25(foo2) 26 36 36 36 26
- 39: 17(fvec4) Load 38
+ 39: 17(fvec4) Load 38
40: 7(float) CompositeExtract 39 0
- Store 9(scale) 40
+ Store 9(scale) 40
Branch 35
41: Label
44: 43(ptr) AccessChain 25(foo2) 26 36 36 42 26
- 45: 7(float) Load 44
- Store 9(scale) 45
+ 45: 7(float) Load 44
+ Store 9(scale) 45
Branch 35
35: Label
- 48: 7(float) Load 9(scale)
- 52: 49 Load 51(sampler)
- 56: 53(fvec2) Load 55(coord)
- 57: 17(fvec4) TextureSample 52 56
- 58: 17(fvec4) VectorTimesScalar 57 48
- Store 47(gl_FragColor) 58
+ 48: 7(float) Load 9(scale)
+ 53: 50 Load 52(sampler)
+ 57: 54(fvec2) Load 56(coord)
+ 58: 17(fvec4) ImageSampleImplicitLod 53 57
+ 59: 17(fvec4) VectorTimesScalar 58 48
+ Store 47(gl_FragColor) 59
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.switch.frag.out b/Test/baseResults/spv.switch.frag.out
old mode 100644
new mode 100755
index 8280626..cd03936
--- a/Test/baseResults/spv.switch.frag.out
+++ b/Test/baseResults/spv.switch.frag.out
@@ -13,9 +13,11 @@
// Id's are bound by 261
Source ESSL 310
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 16 "foo1(vf4;vf4;i1;"
Name 13 "v1"
@@ -40,18 +42,18 @@
Name 239 "param"
Name 241 "param"
Name 243 "param"
- Decorate 59(local) PrecisionMedium
- Decorate 61(c) PrecisionMedium
- Decorate 72(f) PrecisionMedium
- Decorate 74(x) PrecisionMedium
- Decorate 74(x) Smooth
- Decorate 128(d) PrecisionMedium
- Decorate 154(i) PrecisionMedium
- Decorate 172(j) PrecisionMedium
- Decorate 222(color) PrecisionMedium
- Decorate 228(v) PrecisionMedium
+ Decorate 59(local) RelaxedPrecision
+ Decorate 61(c) RelaxedPrecision
+ Decorate 72(f) RelaxedPrecision
+ Decorate 74(x) RelaxedPrecision
+ Decorate 74(x) Smooth
+ Decorate 128(d) RelaxedPrecision
+ Decorate 154(i) RelaxedPrecision
+ Decorate 172(j) RelaxedPrecision
+ Decorate 222(color) RelaxedPrecision
+ Decorate 228(v) RelaxedPrecision
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypePointer Function 8(fvec4)
@@ -63,12 +65,12 @@
48: 7(float) Constant 1065353216
49: 8(fvec4) ConstantComposite 48 48 48 48
60: TypePointer UniformConstant 10(int)
- 61(c): 60(ptr) Variable UniformConstant
+ 61(c): 60(ptr) Variable UniformConstant
64: 10(int) Constant 1
71: TypePointer Function 7(float)
73: TypePointer Input 7(float)
- 74(x): 73(ptr) Variable Input
- 128(d): 60(ptr) Variable UniformConstant
+ 74(x): 73(ptr) Variable Input
+ 128(d): 60(ptr) Variable UniformConstant
155: 10(int) Constant 0
160: 10(int) Constant 10
161: TypeBool
@@ -77,253 +79,253 @@
183: 7(float) Constant 1120429670
203: 7(float) Constant 1079739679
221: TypePointer Output 7(float)
- 222(color): 221(ptr) Variable Output
+ 222(color): 221(ptr) Variable Output
227: TypePointer UniformConstant 8(fvec4)
- 228(v): 227(ptr) Variable UniformConstant
+ 228(v): 227(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
- 59(local): 11(ptr) Variable Function
- 72(f): 71(ptr) Variable Function
- 154(i): 11(ptr) Variable Function
- 172(j): 11(ptr) Variable Function
- 229(param): 9(ptr) Variable Function
- 231(param): 9(ptr) Variable Function
- 233(param): 11(ptr) Variable Function
- 239(param): 9(ptr) Variable Function
- 241(param): 9(ptr) Variable Function
- 243(param): 11(ptr) Variable Function
- 62: 10(int) Load 61(c)
- Store 59(local) 62
- 63: 10(int) Load 59(local)
+ 59(local): 11(ptr) Variable Function
+ 72(f): 71(ptr) Variable Function
+ 154(i): 11(ptr) Variable Function
+ 172(j): 11(ptr) Variable Function
+ 229(param): 9(ptr) Variable Function
+ 231(param): 9(ptr) Variable Function
+ 233(param): 11(ptr) Variable Function
+ 239(param): 9(ptr) Variable Function
+ 241(param): 9(ptr) Variable Function
+ 243(param): 11(ptr) Variable Function
+ 62: 10(int) Load 61(c)
+ Store 59(local) 62
+ 63: 10(int) Load 59(local)
65: 10(int) IAdd 63 64
- Store 59(local) 65
- 66: 10(int) Load 61(c)
+ Store 59(local) 65
+ 66: 10(int) Load 61(c)
SelectionMerge 70 None
Switch 66 69
case 1: 67
case 2: 68
67: Label
- 75: 7(float) Load 74(x)
- 76: 7(float) ExtInst 1(GLSL.std.450) 10(sin) 75
- Store 72(f) 76
+ 75: 7(float) Load 74(x)
+ 76: 7(float) ExtInst 1(GLSL.std.450) 13(Sin) 75
+ Store 72(f) 76
Branch 70
68: Label
- 78: 7(float) Load 74(x)
- 79: 7(float) ExtInst 1(GLSL.std.450) 11(cos) 78
- Store 72(f) 79
+ 78: 7(float) Load 74(x)
+ 79: 7(float) ExtInst 1(GLSL.std.450) 14(Cos) 78
+ Store 72(f) 79
Branch 70
69: Label
- 81: 7(float) Load 74(x)
- 82: 7(float) ExtInst 1(GLSL.std.450) 12(tan) 81
- Store 72(f) 82
+ 81: 7(float) Load 74(x)
+ 82: 7(float) ExtInst 1(GLSL.std.450) 15(Tan) 81
+ Store 72(f) 82
Branch 70
70: Label
- 84: 10(int) Load 61(c)
+ 84: 10(int) Load 61(c)
SelectionMerge 88 None
Switch 84 87
case 1: 85
case 2: 86
85: Label
- 89: 7(float) Load 74(x)
- 90: 7(float) ExtInst 1(GLSL.std.450) 10(sin) 89
- 91: 7(float) Load 72(f)
+ 89: 7(float) Load 74(x)
+ 90: 7(float) ExtInst 1(GLSL.std.450) 13(Sin) 89
+ 91: 7(float) Load 72(f)
92: 7(float) FAdd 91 90
- Store 72(f) 92
+ Store 72(f) 92
Branch 86
86: Label
- 93: 7(float) Load 74(x)
- 94: 7(float) ExtInst 1(GLSL.std.450) 11(cos) 93
- 95: 7(float) Load 72(f)
+ 93: 7(float) Load 74(x)
+ 94: 7(float) ExtInst 1(GLSL.std.450) 14(Cos) 93
+ 95: 7(float) Load 72(f)
96: 7(float) FAdd 95 94
- Store 72(f) 96
+ Store 72(f) 96
Branch 88
87: Label
- 98: 7(float) Load 74(x)
- 99: 7(float) ExtInst 1(GLSL.std.450) 12(tan) 98
- 100: 7(float) Load 72(f)
+ 98: 7(float) Load 74(x)
+ 99: 7(float) ExtInst 1(GLSL.std.450) 15(Tan) 98
+ 100: 7(float) Load 72(f)
101: 7(float) FAdd 100 99
- Store 72(f) 101
+ Store 72(f) 101
Branch 88
88: Label
- 103: 10(int) Load 61(c)
+ 103: 10(int) Load 61(c)
SelectionMerge 106 None
Switch 103 106
case 1: 104
case 2: 105
104: Label
- 107: 7(float) Load 74(x)
- 108: 7(float) ExtInst 1(GLSL.std.450) 10(sin) 107
- 109: 7(float) Load 72(f)
+ 107: 7(float) Load 74(x)
+ 108: 7(float) ExtInst 1(GLSL.std.450) 13(Sin) 107
+ 109: 7(float) Load 72(f)
110: 7(float) FAdd 109 108
- Store 72(f) 110
+ Store 72(f) 110
Branch 106
105: Label
- 112: 7(float) Load 74(x)
- 113: 7(float) ExtInst 1(GLSL.std.450) 11(cos) 112
- 114: 7(float) Load 72(f)
+ 112: 7(float) Load 74(x)
+ 113: 7(float) ExtInst 1(GLSL.std.450) 14(Cos) 112
+ 114: 7(float) Load 72(f)
115: 7(float) FAdd 114 113
- Store 72(f) 115
+ Store 72(f) 115
Branch 106
106: Label
- 118: 10(int) Load 61(c)
+ 118: 10(int) Load 61(c)
SelectionMerge 122 None
Switch 118 121
case 1: 119
case 2: 120
119: Label
- 123: 7(float) Load 74(x)
- 124: 7(float) ExtInst 1(GLSL.std.450) 10(sin) 123
- 125: 7(float) Load 72(f)
+ 123: 7(float) Load 74(x)
+ 124: 7(float) ExtInst 1(GLSL.std.450) 13(Sin) 123
+ 125: 7(float) Load 72(f)
126: 7(float) FAdd 125 124
- Store 72(f) 126
+ Store 72(f) 126
Branch 122
120: Label
- 129: 10(int) Load 128(d)
+ 129: 10(int) Load 128(d)
SelectionMerge 132 None
Switch 129 132
case 1: 130
case 2: 131
130: Label
- 133: 7(float) Load 74(x)
- 134: 7(float) Load 74(x)
+ 133: 7(float) Load 74(x)
+ 134: 7(float) Load 74(x)
135: 7(float) FMul 133 134
- 136: 7(float) Load 74(x)
+ 136: 7(float) Load 74(x)
137: 7(float) FMul 135 136
- 138: 7(float) Load 72(f)
+ 138: 7(float) Load 72(f)
139: 7(float) FAdd 138 137
- Store 72(f) 139
+ Store 72(f) 139
Branch 132
131: Label
- 141: 7(float) Load 74(x)
- 142: 7(float) Load 74(x)
+ 141: 7(float) Load 74(x)
+ 142: 7(float) Load 74(x)
143: 7(float) FMul 141 142
- 144: 7(float) Load 72(f)
+ 144: 7(float) Load 72(f)
145: 7(float) FAdd 144 143
- Store 72(f) 145
+ Store 72(f) 145
Branch 132
132: Label
Branch 122
121: Label
- 149: 7(float) Load 74(x)
- 150: 7(float) ExtInst 1(GLSL.std.450) 12(tan) 149
- 151: 7(float) Load 72(f)
+ 149: 7(float) Load 74(x)
+ 150: 7(float) ExtInst 1(GLSL.std.450) 15(Tan) 149
+ 151: 7(float) Load 72(f)
152: 7(float) FAdd 151 150
- Store 72(f) 152
+ Store 72(f) 152
Branch 122
122: Label
- Store 154(i) 155
+ Store 154(i) 155
Branch 156
156: Label
- 159: 10(int) Load 154(i)
+ 159: 10(int) Load 154(i)
162: 161(bool) SLessThan 159 160
LoopMerge 157 None
- BranchConditional 162 158 157
+ BranchConditional 162 158 157
158: Label
- 163: 10(int) Load 61(c)
+ 163: 10(int) Load 61(c)
SelectionMerge 167 None
Switch 163 166
case 1: 164
case 2: 165
164: Label
- 168: 7(float) Load 74(x)
- 169: 7(float) ExtInst 1(GLSL.std.450) 10(sin) 168
- 170: 7(float) Load 72(f)
+ 168: 7(float) Load 74(x)
+ 169: 7(float) ExtInst 1(GLSL.std.450) 13(Sin) 168
+ 170: 7(float) Load 72(f)
171: 7(float) FAdd 170 169
- Store 72(f) 171
- Store 172(j) 173
+ Store 72(f) 171
+ Store 172(j) 173
Branch 174
174: Label
- 177: 10(int) Load 172(j)
+ 177: 10(int) Load 172(j)
179: 161(bool) SLessThan 177 178
LoopMerge 175 None
- BranchConditional 179 176 175
+ BranchConditional 179 176 175
176: Label
- 180: 7(float) Load 72(f)
+ 180: 7(float) Load 72(f)
181: 7(float) FAdd 180 48
- Store 72(f) 181
- 182: 7(float) Load 72(f)
+ Store 72(f) 181
+ 182: 7(float) Load 72(f)
184: 161(bool) FOrdLessThan 182 183
SelectionMerge 186 None
- BranchConditional 184 185 186
+ BranchConditional 184 185 186
185: Label
Branch 175
186: Label
- 188: 10(int) Load 172(j)
+ 188: 10(int) Load 172(j)
189: 10(int) IAdd 188 64
- Store 172(j) 189
+ Store 172(j) 189
Branch 174
175: Label
Branch 167
165: Label
- 191: 7(float) Load 74(x)
- 192: 7(float) ExtInst 1(GLSL.std.450) 11(cos) 191
- 193: 7(float) Load 72(f)
+ 191: 7(float) Load 74(x)
+ 192: 7(float) ExtInst 1(GLSL.std.450) 14(Cos) 191
+ 193: 7(float) Load 72(f)
194: 7(float) FAdd 193 192
- Store 72(f) 194
+ Store 72(f) 194
Branch 167
166: Label
- 197: 7(float) Load 74(x)
- 198: 7(float) ExtInst 1(GLSL.std.450) 12(tan) 197
- 199: 7(float) Load 72(f)
+ 197: 7(float) Load 74(x)
+ 198: 7(float) ExtInst 1(GLSL.std.450) 15(Tan) 197
+ 199: 7(float) Load 72(f)
200: 7(float) FAdd 199 198
- Store 72(f) 200
+ Store 72(f) 200
Branch 167
167: Label
- 202: 7(float) Load 72(f)
+ 202: 7(float) Load 72(f)
204: 161(bool) FOrdLessThan 202 203
SelectionMerge 206 None
- BranchConditional 204 205 206
+ BranchConditional 204 205 206
205: Label
Branch 157
206: Label
- 208: 10(int) Load 154(i)
+ 208: 10(int) Load 154(i)
209: 10(int) IAdd 208 64
- Store 154(i) 209
+ Store 154(i) 209
Branch 156
157: Label
- 210: 10(int) Load 61(c)
+ 210: 10(int) Load 61(c)
SelectionMerge 213 None
Switch 210 213
case 1: 211
case 2: 212
211: Label
- 214: 7(float) Load 74(x)
- 215: 7(float) ExtInst 1(GLSL.std.450) 10(sin) 214
- 216: 7(float) Load 72(f)
+ 214: 7(float) Load 74(x)
+ 215: 7(float) ExtInst 1(GLSL.std.450) 13(Sin) 214
+ 216: 7(float) Load 72(f)
217: 7(float) FAdd 216 215
- Store 72(f) 217
+ Store 72(f) 217
Branch 213
212: Label
Branch 213
213: Label
- 223: 7(float) Load 72(f)
- 224: 10(int) Load 59(local)
+ 223: 7(float) Load 72(f)
+ 224: 10(int) Load 59(local)
225: 7(float) ConvertSToF 224
226: 7(float) FAdd 223 225
- Store 222(color) 226
- 230: 8(fvec4) Load 228(v)
- Store 229(param) 230
- 232: 8(fvec4) Load 228(v)
- Store 231(param) 232
- 234: 10(int) Load 61(c)
- Store 233(param) 234
+ Store 222(color) 226
+ 230: 8(fvec4) Load 228(v)
+ Store 229(param) 230
+ 232: 8(fvec4) Load 228(v)
+ Store 231(param) 232
+ 234: 10(int) Load 61(c)
+ Store 233(param) 234
235: 8(fvec4) FunctionCall 16(foo1(vf4;vf4;i1;) 229(param) 231(param) 233(param)
236: 7(float) CompositeExtract 235 1
- 237: 7(float) Load 222(color)
+ 237: 7(float) Load 222(color)
238: 7(float) FAdd 237 236
- Store 222(color) 238
- 240: 8(fvec4) Load 228(v)
- Store 239(param) 240
- 242: 8(fvec4) Load 228(v)
- Store 241(param) 242
- 244: 10(int) Load 61(c)
- Store 243(param) 244
+ Store 222(color) 238
+ 240: 8(fvec4) Load 228(v)
+ Store 239(param) 240
+ 242: 8(fvec4) Load 228(v)
+ Store 241(param) 242
+ 244: 10(int) Load 61(c)
+ Store 243(param) 244
245: 8(fvec4) FunctionCall 21(foo2(vf4;vf4;i1;) 239(param) 241(param) 243(param)
246: 7(float) CompositeExtract 245 2
- 247: 7(float) Load 222(color)
+ 247: 7(float) Load 222(color)
248: 7(float) FAdd 247 246
- Store 222(color) 248
- 249: 10(int) Load 61(c)
+ Store 222(color) 248
+ 249: 10(int) Load 61(c)
SelectionMerge 252 None
Switch 249 251
case 0: 250
@@ -332,9 +334,9 @@
251: Label
Branch 252
252: Label
- 256: 10(int) Load 61(c)
+ 256: 10(int) Load 61(c)
SelectionMerge 258 None
- Switch 256 257
+ Switch 256 257
257: Label
Branch 258
258: Label
@@ -347,7 +349,7 @@
14(v2): 9(ptr) FunctionParameter
15(i1): 11(ptr) FunctionParameter
17: Label
- 23: 10(int) Load 15(i1)
+ 23: 10(int) Load 15(i1)
SelectionMerge 27 None
Switch 23 27
case 0: 24
@@ -355,14 +357,14 @@
case 1: 25
case 3: 26
24: Label
- 28: 8(fvec4) Load 13(v1)
+ 28: 8(fvec4) Load 13(v1)
ReturnValue 28
25: Label
- 30: 8(fvec4) Load 14(v2)
+ 30: 8(fvec4) Load 14(v2)
ReturnValue 30
26: Label
- 32: 8(fvec4) Load 13(v1)
- 33: 8(fvec4) Load 14(v2)
+ 32: 8(fvec4) Load 13(v1)
+ 33: 8(fvec4) Load 14(v2)
34: 8(fvec4) FMul 32 33
ReturnValue 34
27: Label
@@ -373,7 +375,7 @@
19(v2): 9(ptr) FunctionParameter
20(i1): 11(ptr) FunctionParameter
22: Label
- 40: 10(int) Load 20(i1)
+ 40: 10(int) Load 20(i1)
SelectionMerge 45 None
Switch 40 45
case 0: 41
@@ -381,16 +383,16 @@
case 1: 43
case 3: 44
41: Label
- 46: 8(fvec4) Load 18(v1)
+ 46: 8(fvec4) Load 18(v1)
ReturnValue 46
42: Label
ReturnValue 49
43: Label
- 51: 8(fvec4) Load 19(v2)
+ 51: 8(fvec4) Load 19(v2)
ReturnValue 51
44: Label
- 53: 8(fvec4) Load 18(v1)
- 54: 8(fvec4) Load 19(v2)
+ 53: 8(fvec4) Load 18(v1)
+ 54: 8(fvec4) Load 19(v2)
55: 8(fvec4) FMul 53 54
ReturnValue 55
45: Label
diff --git a/Test/baseResults/spv.swizzle.frag.out b/Test/baseResults/spv.swizzle.frag.out
old mode 100644
new mode 100755
index e39c88c..5d5c3b0
--- a/Test/baseResults/spv.swizzle.frag.out
+++ b/Test/baseResults/spv.swizzle.frag.out
@@ -8,9 +8,11 @@
// Id's are bound by 112
Source GLSL 110
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 9 "blendscale"
Name 13 "w"
@@ -26,26 +28,26 @@
Name 82 "c"
Name 84 "rep"
Name 111 "blend"
- Decorate 30(t) Smooth
+ Decorate 30(t) Smooth
Decorate 70(gl_FragColor) BuiltIn FragColor
- Decorate 111(blend) NoStaticUse
+ Decorate 111(blend) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypePointer Function 7(float)
10: 7(float) Constant 1071971828
11: TypeVector 7(float) 4
12: TypePointer Function 11(fvec4)
14: TypePointer UniformConstant 11(fvec4)
- 15(u): 14(ptr) Variable UniformConstant
+ 15(u): 14(ptr) Variable UniformConstant
28: TypeVector 7(float) 2
29: TypePointer Input 28(fvec2)
- 30(t): 29(ptr) Variable Input
+ 30(t): 29(ptr) Variable Input
54: TypeBool
55: TypePointer UniformConstant 54(bool)
- 56(p): 55(ptr) Variable UniformConstant
+ 56(p): 55(ptr) Variable UniformConstant
69: TypePointer Output 11(fvec4)
-70(gl_FragColor): 69(ptr) Variable Output
+70(gl_FragColor): 69(ptr) Variable Output
81: TypePointer Function 28(fvec2)
85: 7(float) Constant 0
86: 7(float) Constant 1065353216
@@ -53,123 +55,123 @@
93: 7(float) Constant 3212836864
104: 7(float) Constant 1079613850
110: TypePointer UniformConstant 7(float)
- 111(blend): 110(ptr) Variable UniformConstant
+ 111(blend): 110(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
- 9(blendscale): 8(ptr) Variable Function
- 13(w): 12(ptr) Variable Function
- 17(w_dep): 12(ptr) Variable Function
- 19(w_reorder): 12(ptr) Variable Function
- 21(w2): 12(ptr) Variable Function
- 23(w_flow): 12(ptr) Variable Function
- 49(w_undef): 12(ptr) Variable Function
- 82(c): 81(ptr) Variable Function
- 84(rep): 12(ptr) Variable Function
- Store 9(blendscale) 10
- 16: 11(fvec4) Load 15(u)
- Store 13(w) 16
- 18: 11(fvec4) Load 15(u)
- Store 17(w_dep) 18
- 20: 11(fvec4) Load 15(u)
- Store 19(w_reorder) 20
- 22: 11(fvec4) Load 15(u)
- Store 21(w2) 22
- 24: 11(fvec4) Load 15(u)
- Store 23(w_flow) 24
- 25: 7(float) Load 9(blendscale)
- 26: 11(fvec4) Load 19(w_reorder)
+ 9(blendscale): 8(ptr) Variable Function
+ 13(w): 12(ptr) Variable Function
+ 17(w_dep): 12(ptr) Variable Function
+ 19(w_reorder): 12(ptr) Variable Function
+ 21(w2): 12(ptr) Variable Function
+ 23(w_flow): 12(ptr) Variable Function
+ 49(w_undef): 12(ptr) Variable Function
+ 82(c): 81(ptr) Variable Function
+ 84(rep): 12(ptr) Variable Function
+ Store 9(blendscale) 10
+ 16: 11(fvec4) Load 15(u)
+ Store 13(w) 16
+ 18: 11(fvec4) Load 15(u)
+ Store 17(w_dep) 18
+ 20: 11(fvec4) Load 15(u)
+ Store 19(w_reorder) 20
+ 22: 11(fvec4) Load 15(u)
+ Store 21(w2) 22
+ 24: 11(fvec4) Load 15(u)
+ Store 23(w_flow) 24
+ 25: 7(float) Load 9(blendscale)
+ 26: 11(fvec4) Load 19(w_reorder)
27: 11(fvec4) CompositeInsert 25 26 2
- Store 19(w_reorder) 27
- 31: 28(fvec2) Load 30(t)
- 32: 11(fvec4) Load 13(w)
+ Store 19(w_reorder) 27
+ 31: 28(fvec2) Load 30(t)
+ 32: 11(fvec4) Load 13(w)
33: 11(fvec4) VectorShuffle 32 31 0 5 2 4
- Store 13(w) 33
- 34: 7(float) Load 9(blendscale)
- 35: 11(fvec4) Load 19(w_reorder)
+ Store 13(w) 33
+ 34: 7(float) Load 9(blendscale)
+ 35: 11(fvec4) Load 19(w_reorder)
36: 11(fvec4) CompositeInsert 34 35 0
- Store 19(w_reorder) 36
- 37: 11(fvec4) Load 15(u)
+ Store 19(w_reorder) 36
+ 37: 11(fvec4) Load 15(u)
38: 11(fvec4) VectorShuffle 37 37 2 3 0 1
- Store 21(w2) 38
- 39: 7(float) Load 9(blendscale)
- 40: 11(fvec4) Load 19(w_reorder)
+ Store 21(w2) 38
+ 39: 7(float) Load 9(blendscale)
+ 40: 11(fvec4) Load 19(w_reorder)
41: 11(fvec4) CompositeInsert 39 40 1
- Store 19(w_reorder) 41
- 42: 11(fvec4) Load 21(w2)
+ Store 19(w_reorder) 41
+ 42: 11(fvec4) Load 21(w2)
43: 28(fvec2) VectorShuffle 42 42 0 2
- 44: 11(fvec4) Load 17(w_dep)
+ 44: 11(fvec4) Load 17(w_dep)
45: 11(fvec4) VectorShuffle 44 43 4 5 2 3
- Store 17(w_dep) 45
- 46: 28(fvec2) Load 30(t)
- 47: 11(fvec4) Load 17(w_dep)
+ Store 17(w_dep) 45
+ 46: 28(fvec2) Load 30(t)
+ 47: 11(fvec4) Load 17(w_dep)
48: 11(fvec4) VectorShuffle 47 46 0 1 4 5
- Store 17(w_dep) 48
- 50: 11(fvec4) Load 15(u)
+ Store 17(w_dep) 48
+ 50: 11(fvec4) Load 15(u)
51: 28(fvec2) VectorShuffle 50 50 2 3
- 52: 11(fvec4) Load 49(w_undef)
+ 52: 11(fvec4) Load 49(w_undef)
53: 11(fvec4) VectorShuffle 52 51 4 5 2 3
- Store 49(w_undef) 53
- 57: 54(bool) Load 56(p)
+ Store 49(w_undef) 53
+ 57: 54(bool) Load 56(p)
SelectionMerge 59 None
- BranchConditional 57 58 64
+ BranchConditional 57 58 64
58: Label
- 60: 28(fvec2) Load 30(t)
+ 60: 28(fvec2) Load 30(t)
61: 7(float) CompositeExtract 60 0
- 62: 11(fvec4) Load 23(w_flow)
+ 62: 11(fvec4) Load 23(w_flow)
63: 11(fvec4) CompositeInsert 61 62 0
- Store 23(w_flow) 63
+ Store 23(w_flow) 63
Branch 59
64: Label
- 65: 28(fvec2) Load 30(t)
+ 65: 28(fvec2) Load 30(t)
66: 7(float) CompositeExtract 65 1
- 67: 11(fvec4) Load 23(w_flow)
+ 67: 11(fvec4) Load 23(w_flow)
68: 11(fvec4) CompositeInsert 66 67 0
- Store 23(w_flow) 68
+ Store 23(w_flow) 68
Branch 59
59: Label
- 71: 11(fvec4) Load 19(w_reorder)
- 72: 11(fvec4) Load 49(w_undef)
- 73: 11(fvec4) Load 13(w)
- 74: 11(fvec4) Load 21(w2)
+ 71: 11(fvec4) Load 19(w_reorder)
+ 72: 11(fvec4) Load 49(w_undef)
+ 73: 11(fvec4) Load 13(w)
+ 74: 11(fvec4) Load 21(w2)
75: 11(fvec4) FMul 73 74
- 76: 11(fvec4) Load 17(w_dep)
+ 76: 11(fvec4) Load 17(w_dep)
77: 11(fvec4) FMul 75 76
- 78: 11(fvec4) Load 23(w_flow)
+ 78: 11(fvec4) Load 23(w_flow)
79: 11(fvec4) FMul 77 78
- 80: 11(fvec4) ExtInst 1(GLSL.std.450) 36(mix) 71 72 79
- Store 70(gl_FragColor) 80
- 83: 28(fvec2) Load 30(t)
- Store 82(c) 83
- Store 84(rep) 87
- 88: 28(fvec2) Load 82(c)
+ 80: 11(fvec4) ExtInst 1(GLSL.std.450) 46(Mix) 71 72 79
+ Store 70(gl_FragColor) 80
+ 83: 28(fvec2) Load 30(t)
+ Store 82(c) 83
+ Store 84(rep) 87
+ 88: 28(fvec2) Load 82(c)
89: 7(float) CompositeExtract 88 0
90: 54(bool) FOrdLessThan 89 85
SelectionMerge 92 None
- BranchConditional 90 91 92
+ BranchConditional 90 91 92
91: Label
- 94: 28(fvec2) Load 82(c)
+ 94: 28(fvec2) Load 82(c)
95: 7(float) CompositeExtract 94 0
96: 7(float) FMul 95 93
- 97: 28(fvec2) Load 82(c)
+ 97: 28(fvec2) Load 82(c)
98: 28(fvec2) CompositeInsert 96 97 0
- Store 82(c) 98
+ Store 82(c) 98
Branch 92
92: Label
- 99: 28(fvec2) Load 82(c)
+ 99: 28(fvec2) Load 82(c)
100: 7(float) CompositeExtract 99 0
101: 54(bool) FOrdLessThanEqual 100 86
SelectionMerge 103 None
- BranchConditional 101 102 103
+ BranchConditional 101 102 103
102: Label
- 105: 11(fvec4) Load 84(rep)
+ 105: 11(fvec4) Load 84(rep)
106: 11(fvec4) CompositeInsert 104 105 0
- Store 84(rep) 106
+ Store 84(rep) 106
Branch 103
103: Label
- 107: 11(fvec4) Load 84(rep)
- 108: 11(fvec4) Load 70(gl_FragColor)
+ 107: 11(fvec4) Load 84(rep)
+ 108: 11(fvec4) Load 70(gl_FragColor)
109: 11(fvec4) FAdd 108 107
- Store 70(gl_FragColor) 109
+ Store 70(gl_FragColor) 109
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.test.frag.out b/Test/baseResults/spv.test.frag.out
old mode 100644
new mode 100755
index 6176f3c..58bed1d
--- a/Test/baseResults/spv.test.frag.out
+++ b/Test/baseResults/spv.test.frag.out
@@ -5,82 +5,86 @@
// Module Version 99
// Generated by (magic number): 51a00bb
-// Id's are bound by 54
+// Id's are bound by 56
Source GLSL 110
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 9 "blendscale"
Name 13 "v"
- Name 16 "texSampler2D"
- Name 20 "t"
- Name 23 "scale"
- Name 30 "w"
- Name 33 "texSampler3D"
- Name 37 "coords"
- Name 43 "gl_FragColor"
- Name 46 "u"
- Name 49 "blend"
- Decorate 20(t) Smooth
- Decorate 37(coords) Smooth
- Decorate 43(gl_FragColor) BuiltIn FragColor
+ Name 17 "texSampler2D"
+ Name 21 "t"
+ Name 24 "scale"
+ Name 31 "w"
+ Name 35 "texSampler3D"
+ Name 39 "coords"
+ Name 45 "gl_FragColor"
+ Name 48 "u"
+ Name 51 "blend"
+ Decorate 21(t) Smooth
+ Decorate 39(coords) Smooth
+ Decorate 45(gl_FragColor) BuiltIn FragColor
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypePointer Function 7(float)
10: 7(float) Constant 1071971828
11: TypeVector 7(float) 4
12: TypePointer Function 11(fvec4)
- 14: TypeSampler7(float) 2D filter+texture
- 15: TypePointer UniformConstant 14
-16(texSampler2D): 15(ptr) Variable UniformConstant
- 18: TypeVector 7(float) 2
- 19: TypePointer Input 18(fvec2)
- 20(t): 19(ptr) Variable Input
- 22: TypePointer UniformConstant 18(fvec2)
- 23(scale): 22(ptr) Variable UniformConstant
- 31: TypeSampler7(float) 3D filter+texture
- 32: TypePointer UniformConstant 31
-33(texSampler3D): 32(ptr) Variable UniformConstant
- 35: TypeVector 7(float) 3
- 36: TypePointer Input 35(fvec3)
- 37(coords): 36(ptr) Variable Input
- 42: TypePointer Output 11(fvec4)
-43(gl_FragColor): 42(ptr) Variable Output
- 45: TypePointer UniformConstant 11(fvec4)
- 46(u): 45(ptr) Variable UniformConstant
- 48: TypePointer UniformConstant 7(float)
- 49(blend): 48(ptr) Variable UniformConstant
+ 14: TypeImage 7(float) 2D sampled format:Unknown
+ 15: TypeSampledImage 14
+ 16: TypePointer UniformConstant 15
+17(texSampler2D): 16(ptr) Variable UniformConstant
+ 19: TypeVector 7(float) 2
+ 20: TypePointer Input 19(fvec2)
+ 21(t): 20(ptr) Variable Input
+ 23: TypePointer UniformConstant 19(fvec2)
+ 24(scale): 23(ptr) Variable UniformConstant
+ 32: TypeImage 7(float) 3D sampled format:Unknown
+ 33: TypeSampledImage 32
+ 34: TypePointer UniformConstant 33
+35(texSampler3D): 34(ptr) Variable UniformConstant
+ 37: TypeVector 7(float) 3
+ 38: TypePointer Input 37(fvec3)
+ 39(coords): 38(ptr) Variable Input
+ 44: TypePointer Output 11(fvec4)
+45(gl_FragColor): 44(ptr) Variable Output
+ 47: TypePointer UniformConstant 11(fvec4)
+ 48(u): 47(ptr) Variable UniformConstant
+ 50: TypePointer UniformConstant 7(float)
+ 51(blend): 50(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
- 9(blendscale): 8(ptr) Variable Function
- 13(v): 12(ptr) Variable Function
- 30(w): 12(ptr) Variable Function
- Store 9(blendscale) 10
- 17: 14 Load 16(texSampler2D)
- 21: 18(fvec2) Load 20(t)
- 24: 18(fvec2) Load 23(scale)
- 25: 18(fvec2) FAdd 21 24
- 26: 18(fvec2) Load 23(scale)
- 27: 18(fvec2) FDiv 25 26
- 28: 11(fvec4) TextureSample 17 27
- 29: 11(fvec4) VectorShuffle 28 28 3 2 1 0
- Store 13(v) 29
- 34: 31 Load 33(texSampler3D)
- 38: 35(fvec3) Load 37(coords)
- 39: 11(fvec4) TextureSample 34 38
- 40: 11(fvec4) Load 13(v)
- 41: 11(fvec4) FAdd 39 40
- Store 30(w) 41
- 44: 11(fvec4) Load 30(w)
- 47: 11(fvec4) Load 46(u)
- 50: 7(float) Load 49(blend)
- 51: 7(float) Load 9(blendscale)
- 52: 7(float) FMul 50 51
- 53: 11(fvec4) ExtInst 1(GLSL.std.450) 36(mix) 44 47 52
- Store 43(gl_FragColor) 53
+ 9(blendscale): 8(ptr) Variable Function
+ 13(v): 12(ptr) Variable Function
+ 31(w): 12(ptr) Variable Function
+ Store 9(blendscale) 10
+ 18: 15 Load 17(texSampler2D)
+ 22: 19(fvec2) Load 21(t)
+ 25: 19(fvec2) Load 24(scale)
+ 26: 19(fvec2) FAdd 22 25
+ 27: 19(fvec2) Load 24(scale)
+ 28: 19(fvec2) FDiv 26 27
+ 29: 11(fvec4) ImageSampleImplicitLod 18 28
+ 30: 11(fvec4) VectorShuffle 29 29 3 2 1 0
+ Store 13(v) 30
+ 36: 33 Load 35(texSampler3D)
+ 40: 37(fvec3) Load 39(coords)
+ 41: 11(fvec4) ImageSampleImplicitLod 36 40
+ 42: 11(fvec4) Load 13(v)
+ 43: 11(fvec4) FAdd 41 42
+ Store 31(w) 43
+ 46: 11(fvec4) Load 31(w)
+ 49: 11(fvec4) Load 48(u)
+ 52: 7(float) Load 51(blend)
+ 53: 7(float) Load 9(blendscale)
+ 54: 7(float) FMul 52 53
+ 55: 11(fvec4) ExtInst 1(GLSL.std.450) 46(Mix) 46 49 54
+ Store 45(gl_FragColor) 55
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.texture.vert.out b/Test/baseResults/spv.texture.vert.out
old mode 100644
new mode 100755
index cf62bc1..0cc4d52
--- a/Test/baseResults/spv.texture.vert.out
+++ b/Test/baseResults/spv.texture.vert.out
@@ -5,32 +5,33 @@
// Module Version 99
// Generated by (magic number): 51a00bb
-// Id's are bound by 132
+// Id's are bound by 142
Source GLSL 130
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Vertex 4
+ EntryPoint Vertex 4 "main"
Name 4 "main"
Name 9 "lod"
Name 11 "coords1D"
Name 15 "coords3D"
Name 21 "coords4D"
Name 24 "color"
- Name 29 "texSampler1D"
- Name 39 "coords2D"
- Name 53 "texSampler2D"
- Name 74 "texSampler3D"
- Name 89 "texSamplerCube"
- Name 98 "shadowSampler1D"
- Name 107 "shadowSampler2D"
- Name 127 "gl_Position"
- Name 131 "gl_VertexID"
- Decorate 127(gl_Position) BuiltIn Position
- Decorate 131(gl_VertexID) BuiltIn VertexId
- Decorate 131(gl_VertexID) NoStaticUse
+ Name 30 "texSampler1D"
+ Name 40 "coords2D"
+ Name 55 "texSampler2D"
+ Name 77 "texSampler3D"
+ Name 93 "texSamplerCube"
+ Name 103 "shadowSampler1D"
+ Name 114 "shadowSampler2D"
+ Name 137 "gl_Position"
+ Name 141 "gl_VertexID"
+ Decorate 137(gl_Position) BuiltIn Position
+ Decorate 141(gl_VertexID) BuiltIn VertexId
+ Decorate 141(gl_VertexID) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypePointer Function 7(float)
10: 7(float) Constant 1077936128
@@ -46,137 +47,147 @@
23: 19(fvec4) ConstantComposite 12 16 17 22
25: 7(float) Constant 0
26: 19(fvec4) ConstantComposite 25 25 25 25
- 27: TypeSampler7(float) 1D filter+texture
- 28: TypePointer UniformConstant 27
-29(texSampler1D): 28(ptr) Variable UniformConstant
- 37: TypeVector 7(float) 2
- 38: TypePointer Input 37(fvec2)
- 39(coords2D): 38(ptr) Variable Input
- 51: TypeSampler7(float) 2D filter+texture
- 52: TypePointer UniformConstant 51
-53(texSampler2D): 52(ptr) Variable UniformConstant
- 72: TypeSampler7(float) 3D filter+texture
- 73: TypePointer UniformConstant 72
-74(texSampler3D): 73(ptr) Variable UniformConstant
- 87: TypeSampler7(float) Cube filter+texture
- 88: TypePointer UniformConstant 87
-89(texSamplerCube): 88(ptr) Variable UniformConstant
- 96: TypeSampler7(float) 1D filter+texture depth
- 97: TypePointer UniformConstant 96
-98(shadowSampler1D): 97(ptr) Variable UniformConstant
- 105: TypeSampler7(float) 2D filter+texture depth
- 106: TypePointer UniformConstant 105
-107(shadowSampler2D): 106(ptr) Variable UniformConstant
- 126: TypePointer Output 19(fvec4)
-127(gl_Position): 126(ptr) Variable Output
- 129: TypeInt 32 1
- 130: TypePointer Input 129(int)
-131(gl_VertexID): 130(ptr) Variable Input
+ 27: TypeImage 7(float) 1D sampled format:Unknown
+ 28: TypeSampledImage 27
+ 29: TypePointer UniformConstant 28
+30(texSampler1D): 29(ptr) Variable UniformConstant
+ 38: TypeVector 7(float) 2
+ 39: TypePointer Input 38(fvec2)
+ 40(coords2D): 39(ptr) Variable Input
+ 52: TypeImage 7(float) 2D sampled format:Unknown
+ 53: TypeSampledImage 52
+ 54: TypePointer UniformConstant 53
+55(texSampler2D): 54(ptr) Variable UniformConstant
+ 74: TypeImage 7(float) 3D sampled format:Unknown
+ 75: TypeSampledImage 74
+ 76: TypePointer UniformConstant 75
+77(texSampler3D): 76(ptr) Variable UniformConstant
+ 90: TypeImage 7(float) Cube sampled format:Unknown
+ 91: TypeSampledImage 90
+ 92: TypePointer UniformConstant 91
+93(texSamplerCube): 92(ptr) Variable UniformConstant
+ 100: TypeImage 7(float) 1D depth sampled format:Unknown
+ 101: TypeSampledImage 100
+ 102: TypePointer UniformConstant 101
+103(shadowSampler1D): 102(ptr) Variable UniformConstant
+ 111: TypeImage 7(float) 2D depth sampled format:Unknown
+ 112: TypeSampledImage 111
+ 113: TypePointer UniformConstant 112
+114(shadowSampler2D): 113(ptr) Variable UniformConstant
+ 136: TypePointer Output 19(fvec4)
+137(gl_Position): 136(ptr) Variable Output
+ 139: TypeInt 32 1
+ 140: TypePointer Input 139(int)
+141(gl_VertexID): 140(ptr) Variable Input
4(main): 2 Function None 3
5: Label
- 9(lod): 8(ptr) Variable Function
- 11(coords1D): 8(ptr) Variable Function
- 15(coords3D): 14(ptr) Variable Function
- 21(coords4D): 20(ptr) Variable Function
- 24(color): 20(ptr) Variable Function
- Store 9(lod) 10
- Store 11(coords1D) 12
- Store 15(coords3D) 18
- Store 21(coords4D) 23
- Store 24(color) 26
- 30: 27 Load 29(texSampler1D)
- 31: 7(float) Load 11(coords1D)
- 32: 7(float) Load 9(lod)
- 33: 19(fvec4) TextureSampleLod 30 31 32
- 34: 19(fvec4) Load 24(color)
- 35: 19(fvec4) FAdd 34 33
- Store 24(color) 35
- 36: 27 Load 29(texSampler1D)
- 40: 37(fvec2) Load 39(coords2D)
- 41: 7(float) Load 9(lod)
- 42: 19(fvec4) TextureSampleProjLod 36 40 41
- 43: 19(fvec4) Load 24(color)
- 44: 19(fvec4) FAdd 43 42
- Store 24(color) 44
- 45: 27 Load 29(texSampler1D)
- 46: 19(fvec4) Load 21(coords4D)
- 47: 7(float) Load 9(lod)
- 48: 19(fvec4) TextureSampleProjLod 45 46 47
- 49: 19(fvec4) Load 24(color)
- 50: 19(fvec4) FAdd 49 48
- Store 24(color) 50
- 54: 51 Load 53(texSampler2D)
- 55: 37(fvec2) Load 39(coords2D)
- 56: 7(float) Load 9(lod)
- 57: 19(fvec4) TextureSampleLod 54 55 56
- 58: 19(fvec4) Load 24(color)
- 59: 19(fvec4) FAdd 58 57
- Store 24(color) 59
- 60: 51 Load 53(texSampler2D)
- 61: 13(fvec3) Load 15(coords3D)
- 62: 7(float) Load 9(lod)
- 63: 19(fvec4) TextureSampleProjLod 60 61 62
- 64: 19(fvec4) Load 24(color)
- 65: 19(fvec4) FAdd 64 63
- Store 24(color) 65
- 66: 51 Load 53(texSampler2D)
- 67: 19(fvec4) Load 21(coords4D)
- 68: 7(float) Load 9(lod)
- 69: 19(fvec4) TextureSampleProjLod 66 67 68
- 70: 19(fvec4) Load 24(color)
- 71: 19(fvec4) FAdd 70 69
- Store 24(color) 71
- 75: 72 Load 74(texSampler3D)
- 76: 13(fvec3) Load 15(coords3D)
- 77: 7(float) Load 9(lod)
- 78: 19(fvec4) TextureSampleLod 75 76 77
- 79: 19(fvec4) Load 24(color)
- 80: 19(fvec4) FAdd 79 78
- Store 24(color) 80
- 81: 72 Load 74(texSampler3D)
- 82: 19(fvec4) Load 21(coords4D)
- 83: 7(float) Load 9(lod)
- 84: 19(fvec4) TextureSampleProjLod 81 82 83
- 85: 19(fvec4) Load 24(color)
- 86: 19(fvec4) FAdd 85 84
- Store 24(color) 86
- 90: 87 Load 89(texSamplerCube)
- 91: 13(fvec3) Load 15(coords3D)
- 92: 7(float) Load 9(lod)
- 93: 19(fvec4) TextureSampleLod 90 91 92
- 94: 19(fvec4) Load 24(color)
- 95: 19(fvec4) FAdd 94 93
- Store 24(color) 95
- 99: 96 Load 98(shadowSampler1D)
- 100: 13(fvec3) Load 15(coords3D)
- 101: 7(float) Load 9(lod)
- 102: 19(fvec4) TextureSampleLod 99 100 101
- 103: 19(fvec4) Load 24(color)
- 104: 19(fvec4) FAdd 103 102
- Store 24(color) 104
- 108: 105 Load 107(shadowSampler2D)
- 109: 13(fvec3) Load 15(coords3D)
- 110: 7(float) Load 9(lod)
- 111: 19(fvec4) TextureSampleLod 108 109 110
- 112: 19(fvec4) Load 24(color)
- 113: 19(fvec4) FAdd 112 111
- Store 24(color) 113
- 114: 96 Load 98(shadowSampler1D)
- 115: 19(fvec4) Load 21(coords4D)
- 116: 7(float) Load 9(lod)
- 117: 19(fvec4) TextureSampleProjLod 114 115 116
- 118: 19(fvec4) Load 24(color)
- 119: 19(fvec4) FAdd 118 117
- Store 24(color) 119
- 120: 105 Load 107(shadowSampler2D)
- 121: 19(fvec4) Load 21(coords4D)
- 122: 7(float) Load 9(lod)
- 123: 19(fvec4) TextureSampleProjLod 120 121 122
- 124: 19(fvec4) Load 24(color)
- 125: 19(fvec4) FAdd 124 123
- Store 24(color) 125
- 128: 19(fvec4) Load 24(color)
- Store 127(gl_Position) 128
+ 9(lod): 8(ptr) Variable Function
+ 11(coords1D): 8(ptr) Variable Function
+ 15(coords3D): 14(ptr) Variable Function
+ 21(coords4D): 20(ptr) Variable Function
+ 24(color): 20(ptr) Variable Function
+ Store 9(lod) 10
+ Store 11(coords1D) 12
+ Store 15(coords3D) 18
+ Store 21(coords4D) 23
+ Store 24(color) 26
+ 31: 28 Load 30(texSampler1D)
+ 32: 7(float) Load 11(coords1D)
+ 33: 7(float) Load 9(lod)
+ 34: 19(fvec4) ImageSampleExplicitLod 31 32 33
+ 35: 19(fvec4) Load 24(color)
+ 36: 19(fvec4) FAdd 35 34
+ Store 24(color) 36
+ 37: 28 Load 30(texSampler1D)
+ 41: 38(fvec2) Load 40(coords2D)
+ 42: 7(float) Load 9(lod)
+ 43: 19(fvec4) ImageSampleProjExplicitLod 37 41 42
+ 44: 19(fvec4) Load 24(color)
+ 45: 19(fvec4) FAdd 44 43
+ Store 24(color) 45
+ 46: 28 Load 30(texSampler1D)
+ 47: 19(fvec4) Load 21(coords4D)
+ 48: 7(float) Load 9(lod)
+ 49: 19(fvec4) ImageSampleProjExplicitLod 46 47 48
+ 50: 19(fvec4) Load 24(color)
+ 51: 19(fvec4) FAdd 50 49
+ Store 24(color) 51
+ 56: 53 Load 55(texSampler2D)
+ 57: 38(fvec2) Load 40(coords2D)
+ 58: 7(float) Load 9(lod)
+ 59: 19(fvec4) ImageSampleExplicitLod 56 57 58
+ 60: 19(fvec4) Load 24(color)
+ 61: 19(fvec4) FAdd 60 59
+ Store 24(color) 61
+ 62: 53 Load 55(texSampler2D)
+ 63: 13(fvec3) Load 15(coords3D)
+ 64: 7(float) Load 9(lod)
+ 65: 19(fvec4) ImageSampleProjExplicitLod 62 63 64
+ 66: 19(fvec4) Load 24(color)
+ 67: 19(fvec4) FAdd 66 65
+ Store 24(color) 67
+ 68: 53 Load 55(texSampler2D)
+ 69: 19(fvec4) Load 21(coords4D)
+ 70: 7(float) Load 9(lod)
+ 71: 19(fvec4) ImageSampleProjExplicitLod 68 69 70
+ 72: 19(fvec4) Load 24(color)
+ 73: 19(fvec4) FAdd 72 71
+ Store 24(color) 73
+ 78: 75 Load 77(texSampler3D)
+ 79: 13(fvec3) Load 15(coords3D)
+ 80: 7(float) Load 9(lod)
+ 81: 19(fvec4) ImageSampleExplicitLod 78 79 80
+ 82: 19(fvec4) Load 24(color)
+ 83: 19(fvec4) FAdd 82 81
+ Store 24(color) 83
+ 84: 75 Load 77(texSampler3D)
+ 85: 19(fvec4) Load 21(coords4D)
+ 86: 7(float) Load 9(lod)
+ 87: 19(fvec4) ImageSampleProjExplicitLod 84 85 86
+ 88: 19(fvec4) Load 24(color)
+ 89: 19(fvec4) FAdd 88 87
+ Store 24(color) 89
+ 94: 91 Load 93(texSamplerCube)
+ 95: 13(fvec3) Load 15(coords3D)
+ 96: 7(float) Load 9(lod)
+ 97: 19(fvec4) ImageSampleExplicitLod 94 95 96
+ 98: 19(fvec4) Load 24(color)
+ 99: 19(fvec4) FAdd 98 97
+ Store 24(color) 99
+ 104: 101 Load 103(shadowSampler1D)
+ 105: 13(fvec3) Load 15(coords3D)
+ 106: 7(float) Load 9(lod)
+ 107: 7(float) CompositeExtract 105 2
+ 108: 19(fvec4) ImageSampleDrefExplicitLod 104 105 107 106
+ 109: 19(fvec4) Load 24(color)
+ 110: 19(fvec4) FAdd 109 108
+ Store 24(color) 110
+ 115: 112 Load 114(shadowSampler2D)
+ 116: 13(fvec3) Load 15(coords3D)
+ 117: 7(float) Load 9(lod)
+ 118: 7(float) CompositeExtract 116 2
+ 119: 19(fvec4) ImageSampleDrefExplicitLod 115 116 118 117
+ 120: 19(fvec4) Load 24(color)
+ 121: 19(fvec4) FAdd 120 119
+ Store 24(color) 121
+ 122: 101 Load 103(shadowSampler1D)
+ 123: 19(fvec4) Load 21(coords4D)
+ 124: 7(float) Load 9(lod)
+ 125: 7(float) CompositeExtract 123 3
+ 126: 19(fvec4) ImageSampleProjDrefExplicitLod 122 123 125 124
+ 127: 19(fvec4) Load 24(color)
+ 128: 19(fvec4) FAdd 127 126
+ Store 24(color) 128
+ 129: 112 Load 114(shadowSampler2D)
+ 130: 19(fvec4) Load 21(coords4D)
+ 131: 7(float) Load 9(lod)
+ 132: 7(float) CompositeExtract 130 3
+ 133: 19(fvec4) ImageSampleProjDrefExplicitLod 129 130 132 131
+ 134: 19(fvec4) Load 24(color)
+ 135: 19(fvec4) FAdd 134 133
+ Store 24(color) 135
+ 138: 19(fvec4) Load 24(color)
+ Store 137(gl_Position) 138
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.types.frag.out b/Test/baseResults/spv.types.frag.out
old mode 100644
new mode 100755
index f2718e7..8b97d73
--- a/Test/baseResults/spv.types.frag.out
+++ b/Test/baseResults/spv.types.frag.out
@@ -8,9 +8,11 @@
// Id's are bound by 264
Source GLSL 130
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 9 "b"
Name 11 "u_b"
@@ -49,295 +51,295 @@
Name 162 "u_f4"
Name 165 "i_f4"
Name 169 "gl_FragColor"
- Decorate 95(i_i) Flat
- Decorate 105(i_i2) Flat
- Decorate 115(i_i3) Flat
- Decorate 125(i_i4) Flat
- Decorate 135(i_f) Smooth
- Decorate 145(i_f2) Smooth
- Decorate 155(i_f3) Smooth
- Decorate 165(i_f4) Smooth
+ Decorate 95(i_i) Flat
+ Decorate 105(i_i2) Flat
+ Decorate 115(i_i3) Flat
+ Decorate 125(i_i4) Flat
+ Decorate 135(i_f) Smooth
+ Decorate 145(i_f2) Smooth
+ Decorate 155(i_f3) Smooth
+ Decorate 165(i_f4) Smooth
Decorate 169(gl_FragColor) BuiltIn FragColor
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeBool
8: TypePointer Function 7(bool)
10: TypePointer UniformConstant 7(bool)
- 11(u_b): 10(ptr) Variable UniformConstant
- 13(i_b): 10(ptr) Variable UniformConstant
+ 11(u_b): 10(ptr) Variable UniformConstant
+ 13(i_b): 10(ptr) Variable UniformConstant
16: TypeVector 7(bool) 2
17: TypePointer Function 16(bvec2)
19: TypePointer UniformConstant 16(bvec2)
- 20(u_b2): 19(ptr) Variable UniformConstant
- 23(i_b2): 19(ptr) Variable UniformConstant
+ 20(u_b2): 19(ptr) Variable UniformConstant
+ 23(i_b2): 19(ptr) Variable UniformConstant
34: TypeVector 7(bool) 3
35: TypePointer Function 34(bvec3)
37: TypePointer UniformConstant 34(bvec3)
- 38(u_b3): 37(ptr) Variable UniformConstant
- 41(i_b3): 37(ptr) Variable UniformConstant
+ 38(u_b3): 37(ptr) Variable UniformConstant
+ 41(i_b3): 37(ptr) Variable UniformConstant
58: TypeVector 7(bool) 4
59: TypePointer Function 58(bvec4)
61: TypePointer UniformConstant 58(bvec4)
- 62(u_b4): 61(ptr) Variable UniformConstant
- 65(i_b4): 61(ptr) Variable UniformConstant
+ 62(u_b4): 61(ptr) Variable UniformConstant
+ 65(i_b4): 61(ptr) Variable UniformConstant
88: TypeInt 32 1
89: TypePointer Function 88(int)
91: TypePointer UniformConstant 88(int)
- 92(u_i): 91(ptr) Variable UniformConstant
+ 92(u_i): 91(ptr) Variable UniformConstant
94: TypePointer Input 88(int)
- 95(i_i): 94(ptr) Variable Input
+ 95(i_i): 94(ptr) Variable Input
98: TypeVector 88(int) 2
99: TypePointer Function 98(ivec2)
101: TypePointer UniformConstant 98(ivec2)
- 102(u_i2): 101(ptr) Variable UniformConstant
+ 102(u_i2): 101(ptr) Variable UniformConstant
104: TypePointer Input 98(ivec2)
- 105(i_i2): 104(ptr) Variable Input
+ 105(i_i2): 104(ptr) Variable Input
108: TypeVector 88(int) 3
109: TypePointer Function 108(ivec3)
111: TypePointer UniformConstant 108(ivec3)
- 112(u_i3): 111(ptr) Variable UniformConstant
+ 112(u_i3): 111(ptr) Variable UniformConstant
114: TypePointer Input 108(ivec3)
- 115(i_i3): 114(ptr) Variable Input
+ 115(i_i3): 114(ptr) Variable Input
118: TypeVector 88(int) 4
119: TypePointer Function 118(ivec4)
121: TypePointer UniformConstant 118(ivec4)
- 122(u_i4): 121(ptr) Variable UniformConstant
+ 122(u_i4): 121(ptr) Variable UniformConstant
124: TypePointer Input 118(ivec4)
- 125(i_i4): 124(ptr) Variable Input
+ 125(i_i4): 124(ptr) Variable Input
128: TypeFloat 32
129: TypePointer Function 128(float)
131: TypePointer UniformConstant 128(float)
- 132(u_f): 131(ptr) Variable UniformConstant
+ 132(u_f): 131(ptr) Variable UniformConstant
134: TypePointer Input 128(float)
- 135(i_f): 134(ptr) Variable Input
+ 135(i_f): 134(ptr) Variable Input
138: TypeVector 128(float) 2
139: TypePointer Function 138(fvec2)
141: TypePointer UniformConstant 138(fvec2)
- 142(u_f2): 141(ptr) Variable UniformConstant
+ 142(u_f2): 141(ptr) Variable UniformConstant
144: TypePointer Input 138(fvec2)
- 145(i_f2): 144(ptr) Variable Input
+ 145(i_f2): 144(ptr) Variable Input
148: TypeVector 128(float) 3
149: TypePointer Function 148(fvec3)
151: TypePointer UniformConstant 148(fvec3)
- 152(u_f3): 151(ptr) Variable UniformConstant
+ 152(u_f3): 151(ptr) Variable UniformConstant
154: TypePointer Input 148(fvec3)
- 155(i_f3): 154(ptr) Variable Input
+ 155(i_f3): 154(ptr) Variable Input
158: TypeVector 128(float) 4
159: TypePointer Function 158(fvec4)
161: TypePointer UniformConstant 158(fvec4)
- 162(u_f4): 161(ptr) Variable UniformConstant
+ 162(u_f4): 161(ptr) Variable UniformConstant
164: TypePointer Input 158(fvec4)
- 165(i_f4): 164(ptr) Variable Input
+ 165(i_f4): 164(ptr) Variable Input
168: TypePointer Output 158(fvec4)
-169(gl_FragColor): 168(ptr) Variable Output
+169(gl_FragColor): 168(ptr) Variable Output
261: 128(float) Constant 1065353216
262: 158(fvec4) ConstantComposite 261 261 261 261
4(main): 2 Function None 3
5: Label
- 9(b): 8(ptr) Variable Function
- 18(b2): 17(ptr) Variable Function
- 36(b3): 35(ptr) Variable Function
- 60(b4): 59(ptr) Variable Function
- 90(i): 89(ptr) Variable Function
- 100(i2): 99(ptr) Variable Function
- 110(i3): 109(ptr) Variable Function
- 120(i4): 119(ptr) Variable Function
- 130(f): 129(ptr) Variable Function
- 140(f2): 139(ptr) Variable Function
- 150(f3): 149(ptr) Variable Function
- 160(f4): 159(ptr) Variable Function
- 170: 159(ptr) Variable Function
- 12: 7(bool) Load 11(u_b)
- 14: 7(bool) Load 13(i_b)
+ 9(b): 8(ptr) Variable Function
+ 18(b2): 17(ptr) Variable Function
+ 36(b3): 35(ptr) Variable Function
+ 60(b4): 59(ptr) Variable Function
+ 90(i): 89(ptr) Variable Function
+ 100(i2): 99(ptr) Variable Function
+ 110(i3): 109(ptr) Variable Function
+ 120(i4): 119(ptr) Variable Function
+ 130(f): 129(ptr) Variable Function
+ 140(f2): 139(ptr) Variable Function
+ 150(f3): 149(ptr) Variable Function
+ 160(f4): 159(ptr) Variable Function
+ 170: 159(ptr) Variable Function
+ 12: 7(bool) Load 11(u_b)
+ 14: 7(bool) Load 13(i_b)
15: 7(bool) LogicalAnd 12 14
- Store 9(b) 15
- 21: 16(bvec2) Load 20(u_b2)
+ Store 9(b) 15
+ 21: 16(bvec2) Load 20(u_b2)
22: 7(bool) CompositeExtract 21 0
- 24: 16(bvec2) Load 23(i_b2)
+ 24: 16(bvec2) Load 23(i_b2)
25: 7(bool) CompositeExtract 24 0
26: 7(bool) LogicalAnd 22 25
- 27: 16(bvec2) Load 20(u_b2)
+ 27: 16(bvec2) Load 20(u_b2)
28: 7(bool) CompositeExtract 27 1
29: 7(bool) LogicalAnd 26 28
- 30: 16(bvec2) Load 23(i_b2)
+ 30: 16(bvec2) Load 23(i_b2)
31: 7(bool) CompositeExtract 30 1
32: 7(bool) LogicalAnd 29 31
33: 16(bvec2) CompositeConstruct 32 32
- Store 18(b2) 33
- 39: 34(bvec3) Load 38(u_b3)
+ Store 18(b2) 33
+ 39: 34(bvec3) Load 38(u_b3)
40: 7(bool) CompositeExtract 39 0
- 42: 34(bvec3) Load 41(i_b3)
+ 42: 34(bvec3) Load 41(i_b3)
43: 7(bool) CompositeExtract 42 0
44: 7(bool) LogicalAnd 40 43
- 45: 34(bvec3) Load 38(u_b3)
+ 45: 34(bvec3) Load 38(u_b3)
46: 7(bool) CompositeExtract 45 1
47: 7(bool) LogicalAnd 44 46
- 48: 34(bvec3) Load 41(i_b3)
+ 48: 34(bvec3) Load 41(i_b3)
49: 7(bool) CompositeExtract 48 1
50: 7(bool) LogicalAnd 47 49
- 51: 34(bvec3) Load 38(u_b3)
+ 51: 34(bvec3) Load 38(u_b3)
52: 7(bool) CompositeExtract 51 2
53: 7(bool) LogicalAnd 50 52
- 54: 34(bvec3) Load 41(i_b3)
+ 54: 34(bvec3) Load 41(i_b3)
55: 7(bool) CompositeExtract 54 2
56: 7(bool) LogicalAnd 53 55
57: 34(bvec3) CompositeConstruct 56 56 56
- Store 36(b3) 57
- 63: 58(bvec4) Load 62(u_b4)
+ Store 36(b3) 57
+ 63: 58(bvec4) Load 62(u_b4)
64: 7(bool) CompositeExtract 63 0
- 66: 58(bvec4) Load 65(i_b4)
+ 66: 58(bvec4) Load 65(i_b4)
67: 7(bool) CompositeExtract 66 0
68: 7(bool) LogicalAnd 64 67
- 69: 58(bvec4) Load 62(u_b4)
+ 69: 58(bvec4) Load 62(u_b4)
70: 7(bool) CompositeExtract 69 1
71: 7(bool) LogicalAnd 68 70
- 72: 58(bvec4) Load 65(i_b4)
+ 72: 58(bvec4) Load 65(i_b4)
73: 7(bool) CompositeExtract 72 1
74: 7(bool) LogicalAnd 71 73
- 75: 58(bvec4) Load 62(u_b4)
+ 75: 58(bvec4) Load 62(u_b4)
76: 7(bool) CompositeExtract 75 2
77: 7(bool) LogicalAnd 74 76
- 78: 58(bvec4) Load 65(i_b4)
+ 78: 58(bvec4) Load 65(i_b4)
79: 7(bool) CompositeExtract 78 2
80: 7(bool) LogicalAnd 77 79
- 81: 58(bvec4) Load 62(u_b4)
+ 81: 58(bvec4) Load 62(u_b4)
82: 7(bool) CompositeExtract 81 3
83: 7(bool) LogicalAnd 80 82
- 84: 58(bvec4) Load 65(i_b4)
+ 84: 58(bvec4) Load 65(i_b4)
85: 7(bool) CompositeExtract 84 3
86: 7(bool) LogicalAnd 83 85
87: 58(bvec4) CompositeConstruct 86 86 86 86
- Store 60(b4) 87
- 93: 88(int) Load 92(u_i)
- 96: 88(int) Load 95(i_i)
+ Store 60(b4) 87
+ 93: 88(int) Load 92(u_i)
+ 96: 88(int) Load 95(i_i)
97: 88(int) IAdd 93 96
- Store 90(i) 97
- 103: 98(ivec2) Load 102(u_i2)
- 106: 98(ivec2) Load 105(i_i2)
+ Store 90(i) 97
+ 103: 98(ivec2) Load 102(u_i2)
+ 106: 98(ivec2) Load 105(i_i2)
107: 98(ivec2) IAdd 103 106
- Store 100(i2) 107
- 113: 108(ivec3) Load 112(u_i3)
- 116: 108(ivec3) Load 115(i_i3)
+ Store 100(i2) 107
+ 113: 108(ivec3) Load 112(u_i3)
+ 116: 108(ivec3) Load 115(i_i3)
117: 108(ivec3) IAdd 113 116
- Store 110(i3) 117
- 123: 118(ivec4) Load 122(u_i4)
- 126: 118(ivec4) Load 125(i_i4)
+ Store 110(i3) 117
+ 123: 118(ivec4) Load 122(u_i4)
+ 126: 118(ivec4) Load 125(i_i4)
127: 118(ivec4) IAdd 123 126
- Store 120(i4) 127
- 133: 128(float) Load 132(u_f)
- 136: 128(float) Load 135(i_f)
+ Store 120(i4) 127
+ 133: 128(float) Load 132(u_f)
+ 136: 128(float) Load 135(i_f)
137: 128(float) FAdd 133 136
- Store 130(f) 137
- 143: 138(fvec2) Load 142(u_f2)
- 146: 138(fvec2) Load 145(i_f2)
+ Store 130(f) 137
+ 143: 138(fvec2) Load 142(u_f2)
+ 146: 138(fvec2) Load 145(i_f2)
147: 138(fvec2) FAdd 143 146
- Store 140(f2) 147
- 153: 148(fvec3) Load 152(u_f3)
- 156: 148(fvec3) Load 155(i_f3)
+ Store 140(f2) 147
+ 153: 148(fvec3) Load 152(u_f3)
+ 156: 148(fvec3) Load 155(i_f3)
157: 148(fvec3) FAdd 153 156
- Store 150(f3) 157
- 163: 158(fvec4) Load 162(u_f4)
- 166: 158(fvec4) Load 165(i_f4)
+ Store 150(f3) 157
+ 163: 158(fvec4) Load 162(u_f4)
+ 166: 158(fvec4) Load 165(i_f4)
167: 158(fvec4) FAdd 163 166
- Store 160(f4) 167
- 171: 7(bool) Load 9(b)
- 172: 16(bvec2) Load 18(b2)
+ Store 160(f4) 167
+ 171: 7(bool) Load 9(b)
+ 172: 16(bvec2) Load 18(b2)
173: 7(bool) CompositeExtract 172 0
174: 7(bool) LogicalOr 171 173
- 175: 16(bvec2) Load 18(b2)
+ 175: 16(bvec2) Load 18(b2)
176: 7(bool) CompositeExtract 175 1
177: 7(bool) LogicalOr 174 176
- 178: 34(bvec3) Load 36(b3)
+ 178: 34(bvec3) Load 36(b3)
179: 7(bool) CompositeExtract 178 0
180: 7(bool) LogicalOr 177 179
- 181: 34(bvec3) Load 36(b3)
+ 181: 34(bvec3) Load 36(b3)
182: 7(bool) CompositeExtract 181 1
183: 7(bool) LogicalOr 180 182
- 184: 34(bvec3) Load 36(b3)
+ 184: 34(bvec3) Load 36(b3)
185: 7(bool) CompositeExtract 184 2
186: 7(bool) LogicalOr 183 185
- 187: 58(bvec4) Load 60(b4)
+ 187: 58(bvec4) Load 60(b4)
188: 7(bool) CompositeExtract 187 0
189: 7(bool) LogicalOr 186 188
- 190: 58(bvec4) Load 60(b4)
+ 190: 58(bvec4) Load 60(b4)
191: 7(bool) CompositeExtract 190 1
192: 7(bool) LogicalOr 189 191
- 193: 58(bvec4) Load 60(b4)
+ 193: 58(bvec4) Load 60(b4)
194: 7(bool) CompositeExtract 193 2
195: 7(bool) LogicalOr 192 194
- 196: 58(bvec4) Load 60(b4)
+ 196: 58(bvec4) Load 60(b4)
197: 7(bool) CompositeExtract 196 3
198: 7(bool) LogicalOr 195 197
SelectionMerge 200 None
- BranchConditional 198 199 260
+ BranchConditional 198 199 260
199: Label
- 201: 88(int) Load 90(i)
- 202: 98(ivec2) Load 100(i2)
+ 201: 88(int) Load 90(i)
+ 202: 98(ivec2) Load 100(i2)
203: 88(int) CompositeExtract 202 0
204: 88(int) IAdd 201 203
- 205: 98(ivec2) Load 100(i2)
+ 205: 98(ivec2) Load 100(i2)
206: 88(int) CompositeExtract 205 1
207: 88(int) IAdd 204 206
- 208: 108(ivec3) Load 110(i3)
+ 208: 108(ivec3) Load 110(i3)
209: 88(int) CompositeExtract 208 0
210: 88(int) IAdd 207 209
- 211: 108(ivec3) Load 110(i3)
+ 211: 108(ivec3) Load 110(i3)
212: 88(int) CompositeExtract 211 1
213: 88(int) IAdd 210 212
- 214: 108(ivec3) Load 110(i3)
+ 214: 108(ivec3) Load 110(i3)
215: 88(int) CompositeExtract 214 2
216: 88(int) IAdd 213 215
- 217: 118(ivec4) Load 120(i4)
+ 217: 118(ivec4) Load 120(i4)
218: 88(int) CompositeExtract 217 0
219: 88(int) IAdd 216 218
- 220: 118(ivec4) Load 120(i4)
+ 220: 118(ivec4) Load 120(i4)
221: 88(int) CompositeExtract 220 1
222: 88(int) IAdd 219 221
- 223: 118(ivec4) Load 120(i4)
+ 223: 118(ivec4) Load 120(i4)
224: 88(int) CompositeExtract 223 2
225: 88(int) IAdd 222 224
- 226: 118(ivec4) Load 120(i4)
+ 226: 118(ivec4) Load 120(i4)
227: 88(int) CompositeExtract 226 3
228: 88(int) IAdd 225 227
229: 128(float) ConvertSToF 228
- 230: 128(float) Load 130(f)
+ 230: 128(float) Load 130(f)
231: 128(float) FAdd 229 230
- 232: 138(fvec2) Load 140(f2)
+ 232: 138(fvec2) Load 140(f2)
233: 128(float) CompositeExtract 232 0
234: 128(float) FAdd 231 233
- 235: 138(fvec2) Load 140(f2)
+ 235: 138(fvec2) Load 140(f2)
236: 128(float) CompositeExtract 235 1
237: 128(float) FAdd 234 236
- 238: 148(fvec3) Load 150(f3)
+ 238: 148(fvec3) Load 150(f3)
239: 128(float) CompositeExtract 238 0
240: 128(float) FAdd 237 239
- 241: 148(fvec3) Load 150(f3)
+ 241: 148(fvec3) Load 150(f3)
242: 128(float) CompositeExtract 241 1
243: 128(float) FAdd 240 242
- 244: 148(fvec3) Load 150(f3)
+ 244: 148(fvec3) Load 150(f3)
245: 128(float) CompositeExtract 244 2
246: 128(float) FAdd 243 245
- 247: 158(fvec4) Load 160(f4)
+ 247: 158(fvec4) Load 160(f4)
248: 128(float) CompositeExtract 247 0
249: 128(float) FAdd 246 248
- 250: 158(fvec4) Load 160(f4)
+ 250: 158(fvec4) Load 160(f4)
251: 128(float) CompositeExtract 250 1
252: 128(float) FAdd 249 251
- 253: 158(fvec4) Load 160(f4)
+ 253: 158(fvec4) Load 160(f4)
254: 128(float) CompositeExtract 253 2
255: 128(float) FAdd 252 254
- 256: 158(fvec4) Load 160(f4)
+ 256: 158(fvec4) Load 160(f4)
257: 128(float) CompositeExtract 256 3
258: 128(float) FAdd 255 257
259: 158(fvec4) CompositeConstruct 258 258 258 258
- Store 170 259
+ Store 170 259
Branch 200
260: Label
- Store 170 262
+ Store 170 262
Branch 200
200: Label
- 263: 158(fvec4) Load 170
- Store 169(gl_FragColor) 263
+ 263: 158(fvec4) Load 170
+ Store 169(gl_FragColor) 263
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.uint.frag.out b/Test/baseResults/spv.uint.frag.out
old mode 100644
new mode 100755
index e7294a0..4a839ca
--- a/Test/baseResults/spv.uint.frag.out
+++ b/Test/baseResults/spv.uint.frag.out
@@ -5,12 +5,14 @@
// Module Version 99
// Generated by (magic number): 51a00bb
-// Id's are bound by 206
+// Id's are bound by 207
Source ESSL 300
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 9 "count"
Name 13 "u"
@@ -20,47 +22,47 @@
Name 58 "shiftediu"
Name 59 "shifteduu"
Name 67 "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"
- Decorate 9(count) PrecisionMedium
- Decorate 13(u) PrecisionMedium
- Decorate 16(t) PrecisionMedium
- Decorate 16(t) Flat
- Decorate 54(shiftedii) PrecisionMedium
- Decorate 56(shiftedui) PrecisionMedium
- Decorate 58(shiftediu) PrecisionMedium
- Decorate 59(shifteduu) PrecisionMedium
- Decorate 67(c) PrecisionMedium
- Decorate 70(usampler) PrecisionMedium
- Decorate 75(tc) PrecisionMedium
- Decorate 75(tc) Smooth
- Decorate 108(af) PrecisionMedium
- Decorate 116(ai) PrecisionMedium
- Decorate 151(mask1) PrecisionMedium
- Decorate 153(mask2) PrecisionMedium
- Decorate 155(mask3) PrecisionMedium
- Decorate 159(mask4) PrecisionMedium
- Decorate 199(f) PrecisionMedium
- Decorate 199(f) Smooth
- Decorate 199(f) NoStaticUse
- Decorate 201(v) PrecisionMedium
- Decorate 201(v) NoStaticUse
- Decorate 203(i) PrecisionMedium
- Decorate 203(i) NoStaticUse
- Decorate 205(b) NoStaticUse
+ Name 71 "usampler"
+ Name 76 "tc"
+ Name 109 "af"
+ Name 113 "ab"
+ Name 117 "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 9(count) RelaxedPrecision
+ Decorate 13(u) RelaxedPrecision
+ Decorate 16(t) RelaxedPrecision
+ Decorate 16(t) Flat
+ Decorate 54(shiftedii) RelaxedPrecision
+ Decorate 56(shiftedui) RelaxedPrecision
+ Decorate 58(shiftediu) RelaxedPrecision
+ Decorate 59(shifteduu) RelaxedPrecision
+ Decorate 67(c) RelaxedPrecision
+ Decorate 71(usampler) RelaxedPrecision
+ Decorate 76(tc) RelaxedPrecision
+ Decorate 76(tc) Smooth
+ Decorate 109(af) RelaxedPrecision
+ Decorate 117(ai) RelaxedPrecision
+ Decorate 152(mask1) RelaxedPrecision
+ Decorate 154(mask2) RelaxedPrecision
+ Decorate 156(mask3) RelaxedPrecision
+ Decorate 160(mask4) RelaxedPrecision
+ Decorate 200(f) RelaxedPrecision
+ Decorate 200(f) Smooth
+ Decorate 200(f) NoStaticUse
+ Decorate 202(v) RelaxedPrecision
+ Decorate 202(v) NoStaticUse
+ Decorate 204(i) RelaxedPrecision
+ Decorate 204(i) NoStaticUse
+ Decorate 206(b) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeInt 32 1
8: TypePointer Function 7(int)
10: 7(int) Constant 1
@@ -68,7 +70,7 @@
12: TypePointer Function 11(int)
14: TypeVector 11(int) 2
15: TypePointer Input 14(ivec2)
- 16(t): 15(ptr) Variable Input
+ 16(t): 15(ptr) Variable Input
19: 11(int) Constant 3
21: TypeBool
22: 21(bool) ConstantTrue
@@ -83,271 +85,272 @@
57: 11(int) Constant 4194303
65: TypeVector 11(int) 4
66: TypePointer Output 65(ivec4)
- 67(c): 66(ptr) Variable Output
- 68: TypeSampler11(int) 2D filter+texture
- 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: 11(int) Constant 4
- 107: TypePointer Function 72(float)
- 111: TypePointer Function 21(bool)
- 114: 11(int) Constant 0
- 122: 11(int) Constant 1
- 133: 7(int) Constant 17
- 138: 7(int) Constant 19
- 143: 7(int) Constant 23
- 148: 7(int) Constant 27
- 152: 11(int) Constant 161
- 154: 11(int) Constant 2576
- 157: 7(int) Constant 4
- 160: 11(int) Constant 2737
- 198: TypePointer Input 72(float)
- 199(f): 198(ptr) Variable Input
- 200: TypePointer UniformConstant 65(ivec4)
- 201(v): 200(ptr) Variable UniformConstant
- 202: TypePointer UniformConstant 7(int)
- 203(i): 202(ptr) Variable UniformConstant
- 204: TypePointer UniformConstant 21(bool)
- 205(b): 204(ptr) Variable UniformConstant
+ 67(c): 66(ptr) Variable Output
+ 68: TypeImage 11(int) 2D sampled format:Unknown
+ 69: TypeSampledImage 68
+ 70: TypePointer UniformConstant 69
+ 71(usampler): 70(ptr) Variable UniformConstant
+ 73: TypeFloat 32
+ 74: TypeVector 73(float) 2
+ 75: TypePointer Input 74(fvec2)
+ 76(tc): 75(ptr) Variable Input
+ 86: 73(float) Constant 1065353216
+ 98: 73(float) Constant 1073741824
+ 99: 74(fvec2) ConstantComposite 98 98
+ 104: 11(int) Constant 4
+ 108: TypePointer Function 73(float)
+ 112: TypePointer Function 21(bool)
+ 115: 11(int) Constant 0
+ 123: 11(int) Constant 1
+ 134: 7(int) Constant 17
+ 139: 7(int) Constant 19
+ 144: 7(int) Constant 23
+ 149: 7(int) Constant 27
+ 153: 11(int) Constant 161
+ 155: 11(int) Constant 2576
+ 158: 7(int) Constant 4
+ 161: 11(int) Constant 2737
+ 199: TypePointer Input 73(float)
+ 200(f): 199(ptr) Variable Input
+ 201: TypePointer UniformConstant 65(ivec4)
+ 202(v): 201(ptr) Variable UniformConstant
+ 203: TypePointer UniformConstant 7(int)
+ 204(i): 203(ptr) Variable UniformConstant
+ 205: TypePointer UniformConstant 21(bool)
+ 206(b): 205(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
- 9(count): 8(ptr) Variable Function
- 13(u): 12(ptr) Variable Function
- 54(shiftedii): 8(ptr) Variable Function
- 56(shiftedui): 12(ptr) Variable Function
- 58(shiftediu): 8(ptr) Variable Function
- 59(shifteduu): 12(ptr) Variable Function
- 108(af): 107(ptr) Variable Function
- 112(ab): 111(ptr) Variable Function
- 116(ai): 8(ptr) Variable Function
- 151(mask1): 12(ptr) Variable Function
- 153(mask2): 12(ptr) Variable Function
- 155(mask3): 12(ptr) Variable Function
- 159(mask4): 12(ptr) Variable Function
- Store 9(count) 10
- 17: 14(ivec2) Load 16(t)
+ 9(count): 8(ptr) Variable Function
+ 13(u): 12(ptr) Variable Function
+ 54(shiftedii): 8(ptr) Variable Function
+ 56(shiftedui): 12(ptr) Variable Function
+ 58(shiftediu): 8(ptr) Variable Function
+ 59(shifteduu): 12(ptr) Variable Function
+ 109(af): 108(ptr) Variable Function
+ 113(ab): 112(ptr) Variable Function
+ 117(ai): 8(ptr) Variable Function
+ 152(mask1): 12(ptr) Variable Function
+ 154(mask2): 12(ptr) Variable Function
+ 156(mask3): 12(ptr) Variable Function
+ 160(mask4): 12(ptr) Variable Function
+ Store 9(count) 10
+ 17: 14(ivec2) Load 16(t)
18: 11(int) CompositeExtract 17 1
20: 11(int) IAdd 18 19
- Store 13(u) 20
+ Store 13(u) 20
SelectionMerge 24 None
- BranchConditional 22 23 24
+ BranchConditional 22 23 24
23: Label
- 26: 7(int) Load 9(count)
+ 26: 7(int) Load 9(count)
27: 7(int) IMul 26 25
- Store 9(count) 27
+ Store 9(count) 27
Branch 24
24: Label
SelectionMerge 29 None
- BranchConditional 22 28 29
+ BranchConditional 22 28 29
28: Label
- 31: 7(int) Load 9(count)
+ 31: 7(int) Load 9(count)
32: 7(int) IMul 31 30
- Store 9(count) 32
+ Store 9(count) 32
Branch 29
29: Label
SelectionMerge 35 None
- BranchConditional 33 34 35
+ BranchConditional 33 34 35
34: Label
- 37: 7(int) Load 9(count)
+ 37: 7(int) Load 9(count)
38: 7(int) IMul 37 36
- Store 9(count) 38
+ Store 9(count) 38
Branch 35
35: Label
SelectionMerge 40 None
- BranchConditional 22 39 40
+ BranchConditional 22 39 40
39: Label
- 42: 7(int) Load 9(count)
+ 42: 7(int) Load 9(count)
43: 7(int) IMul 42 41
- Store 9(count) 43
+ Store 9(count) 43
Branch 40
40: Label
SelectionMerge 45 None
- BranchConditional 22 44 45
+ BranchConditional 22 44 45
44: Label
- 47: 7(int) Load 9(count)
+ 47: 7(int) Load 9(count)
48: 7(int) IMul 47 46
- Store 9(count) 48
+ Store 9(count) 48
Branch 45
45: Label
SelectionMerge 50 None
- BranchConditional 33 49 50
+ BranchConditional 33 49 50
49: Label
- 52: 7(int) Load 9(count)
+ 52: 7(int) Load 9(count)
53: 7(int) IMul 52 51
- Store 9(count) 53
+ Store 9(count) 53
Branch 50
50: Label
- Store 54(shiftedii) 55
- Store 56(shiftedui) 57
- Store 58(shiftediu) 55
- Store 59(shifteduu) 57
- 60: 7(int) Load 54(shiftedii)
- 61: 7(int) Load 58(shiftediu)
+ Store 54(shiftedii) 55
+ Store 56(shiftedui) 57
+ Store 58(shiftediu) 55
+ Store 59(shifteduu) 57
+ 60: 7(int) Load 54(shiftedii)
+ 61: 7(int) Load 58(shiftediu)
62: 21(bool) IEqual 60 61
SelectionMerge 64 None
- BranchConditional 62 63 64
+ BranchConditional 62 63 64
63: Label
- 71: 68 Load 70(usampler)
- 76: 73(fvec2) Load 75(tc)
- 77: 65(ivec4) TextureSample 71 76
- Store 67(c) 77
+ 72: 69 Load 71(usampler)
+ 77: 74(fvec2) Load 76(tc)
+ 78: 65(ivec4) ImageSampleImplicitLod 72 77
+ Store 67(c) 78
Branch 64
64: Label
- 78: 11(int) Load 56(shiftedui)
- 79: 11(int) Load 59(shifteduu)
- 80: 21(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: 65(ivec4) TextureSample 83 87
- Store 67(c) 88
- Branch 82
- 82: Label
- 89: 7(int) Load 54(shiftedii)
- 90: 11(int) Load 56(shiftedui)
- 91: 7(int) Bitcast 90
- 92: 21(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: 65(ivec4) TextureSample 95 99
- Store 67(c) 100
- Branch 94
- 94: Label
- 101: 14(ivec2) Load 16(t)
- 102: 11(int) CompositeExtract 101 0
- 104: 21(bool) UGreaterThan 102 103
- SelectionMerge 106 None
- BranchConditional 104 105 106
- 105: Label
- 109: 11(int) Load 13(u)
- 110: 72(float) ConvertUToF 109
- Store 108(af) 110
- 113: 11(int) Load 13(u)
- 115: 21(bool) INotEqual 113 114
- Store 112(ab) 115
- 117: 11(int) Load 13(u)
- 118: 7(int) Bitcast 117
- Store 116(ai) 118
- 119: 72(float) Load 108(af)
- 120: 11(int) ConvertFToU 119
- 121: 21(bool) Load 112(ab)
- 123: 11(int) Select 121 122 114
- 124: 7(int) Load 116(ai)
- 125: 11(int) Bitcast 124
- 126: 7(int) Load 9(count)
- 127: 11(int) Bitcast 126
- 128: 65(ivec4) CompositeConstruct 120 123 125 127
- 129: 65(ivec4) Load 67(c)
- 130: 65(ivec4) IAdd 129 128
- Store 67(c) 130
- Branch 106
- 106: Label
- SelectionMerge 132 None
- BranchConditional 22 131 132
- 131: Label
- 134: 7(int) Load 9(count)
- 135: 7(int) IMul 134 133
- Store 9(count) 135
- Branch 132
- 132: Label
- SelectionMerge 137 None
- BranchConditional 33 136 137
- 136: Label
- 139: 7(int) Load 9(count)
- 140: 7(int) IMul 139 138
- Store 9(count) 140
- Branch 137
- 137: Label
- SelectionMerge 142 None
- BranchConditional 22 141 142
- 141: Label
- 144: 7(int) Load 9(count)
- 145: 7(int) IMul 144 143
- Store 9(count) 145
- Branch 142
- 142: Label
- SelectionMerge 147 None
- BranchConditional 22 146 147
- 146: Label
- 149: 7(int) Load 9(count)
- 150: 7(int) IMul 149 148
- Store 9(count) 150
- Branch 147
- 147: Label
- Store 151(mask1) 152
- Store 153(mask2) 154
- 156: 11(int) Load 151(mask1)
- 158: 11(int) ShiftLeftLogical 156 157
- Store 155(mask3) 158
- Store 159(mask4) 160
- 161: 11(int) Load 155(mask3)
- 162: 11(int) Load 153(mask2)
- 163: 21(bool) IEqual 161 162
- SelectionMerge 165 None
- BranchConditional 163 164 165
- 164: Label
- 166: 7(int) Load 9(count)
- 167: 7(int) IMul 166 25
- Store 9(count) 167
- Branch 165
- 165: Label
- 168: 11(int) Load 155(mask3)
- 169: 11(int) Load 151(mask1)
- 170: 11(int) BitwiseAnd 168 169
- 171: 21(bool) INotEqual 170 114
- SelectionMerge 173 None
- BranchConditional 171 172 173
- 172: Label
- 174: 7(int) Load 9(count)
- 175: 7(int) IMul 174 30
- Store 9(count) 175
- Branch 173
- 173: Label
- 176: 11(int) Load 151(mask1)
- 177: 11(int) Load 155(mask3)
- 178: 11(int) BitwiseOr 176 177
- 179: 11(int) Load 159(mask4)
- 180: 21(bool) IEqual 178 179
- SelectionMerge 182 None
- BranchConditional 180 181 182
- 181: Label
- 183: 7(int) Load 9(count)
- 184: 7(int) IMul 183 36
- Store 9(count) 184
- Branch 182
- 182: Label
- 185: 11(int) Load 151(mask1)
- 186: 11(int) Load 159(mask4)
- 187: 11(int) BitwiseXor 185 186
- 188: 21(bool) IEqual 187 154
- SelectionMerge 190 None
- BranchConditional 188 189 190
- 189: Label
- 191: 7(int) Load 9(count)
- 192: 7(int) IMul 191 41
- Store 9(count) 192
- Branch 190
- 190: Label
- 193: 7(int) Load 9(count)
- 194: 11(int) Bitcast 193
- 195: 65(ivec4) CompositeConstruct 194 194 194 194
- 196: 65(ivec4) Load 67(c)
- 197: 65(ivec4) IAdd 196 195
- Store 67(c) 197
+ 79: 11(int) Load 56(shiftedui)
+ 80: 11(int) Load 59(shifteduu)
+ 81: 21(bool) IEqual 79 80
+ SelectionMerge 83 None
+ BranchConditional 81 82 83
+ 82: Label
+ 84: 69 Load 71(usampler)
+ 85: 74(fvec2) Load 76(tc)
+ 87: 74(fvec2) CompositeConstruct 86 86
+ 88: 74(fvec2) FAdd 85 87
+ 89: 65(ivec4) ImageSampleImplicitLod 84 88
+ Store 67(c) 89
+ Branch 83
+ 83: Label
+ 90: 7(int) Load 54(shiftedii)
+ 91: 11(int) Load 56(shiftedui)
+ 92: 7(int) Bitcast 91
+ 93: 21(bool) IEqual 90 92
+ SelectionMerge 95 None
+ BranchConditional 93 94 95
+ 94: Label
+ 96: 69 Load 71(usampler)
+ 97: 74(fvec2) Load 76(tc)
+ 100: 74(fvec2) FSub 97 99
+ 101: 65(ivec4) ImageSampleImplicitLod 96 100
+ Store 67(c) 101
+ Branch 95
+ 95: Label
+ 102: 14(ivec2) Load 16(t)
+ 103: 11(int) CompositeExtract 102 0
+ 105: 21(bool) UGreaterThan 103 104
+ SelectionMerge 107 None
+ BranchConditional 105 106 107
+ 106: Label
+ 110: 11(int) Load 13(u)
+ 111: 73(float) ConvertUToF 110
+ Store 109(af) 111
+ 114: 11(int) Load 13(u)
+ 116: 21(bool) INotEqual 114 115
+ Store 113(ab) 116
+ 118: 11(int) Load 13(u)
+ 119: 7(int) Bitcast 118
+ Store 117(ai) 119
+ 120: 73(float) Load 109(af)
+ 121: 11(int) ConvertFToU 120
+ 122: 21(bool) Load 113(ab)
+ 124: 11(int) Select 122 123 115
+ 125: 7(int) Load 117(ai)
+ 126: 11(int) Bitcast 125
+ 127: 7(int) Load 9(count)
+ 128: 11(int) Bitcast 127
+ 129: 65(ivec4) CompositeConstruct 121 124 126 128
+ 130: 65(ivec4) Load 67(c)
+ 131: 65(ivec4) IAdd 130 129
+ Store 67(c) 131
+ Branch 107
+ 107: Label
+ SelectionMerge 133 None
+ BranchConditional 22 132 133
+ 132: Label
+ 135: 7(int) Load 9(count)
+ 136: 7(int) IMul 135 134
+ Store 9(count) 136
+ Branch 133
+ 133: Label
+ SelectionMerge 138 None
+ BranchConditional 33 137 138
+ 137: Label
+ 140: 7(int) Load 9(count)
+ 141: 7(int) IMul 140 139
+ Store 9(count) 141
+ Branch 138
+ 138: Label
+ SelectionMerge 143 None
+ BranchConditional 22 142 143
+ 142: Label
+ 145: 7(int) Load 9(count)
+ 146: 7(int) IMul 145 144
+ Store 9(count) 146
+ Branch 143
+ 143: Label
+ SelectionMerge 148 None
+ BranchConditional 22 147 148
+ 147: Label
+ 150: 7(int) Load 9(count)
+ 151: 7(int) IMul 150 149
+ Store 9(count) 151
+ Branch 148
+ 148: Label
+ Store 152(mask1) 153
+ Store 154(mask2) 155
+ 157: 11(int) Load 152(mask1)
+ 159: 11(int) ShiftLeftLogical 157 158
+ Store 156(mask3) 159
+ Store 160(mask4) 161
+ 162: 11(int) Load 156(mask3)
+ 163: 11(int) Load 154(mask2)
+ 164: 21(bool) IEqual 162 163
+ SelectionMerge 166 None
+ BranchConditional 164 165 166
+ 165: Label
+ 167: 7(int) Load 9(count)
+ 168: 7(int) IMul 167 25
+ Store 9(count) 168
+ Branch 166
+ 166: Label
+ 169: 11(int) Load 156(mask3)
+ 170: 11(int) Load 152(mask1)
+ 171: 11(int) BitwiseAnd 169 170
+ 172: 21(bool) INotEqual 171 115
+ SelectionMerge 174 None
+ BranchConditional 172 173 174
+ 173: Label
+ 175: 7(int) Load 9(count)
+ 176: 7(int) IMul 175 30
+ Store 9(count) 176
+ Branch 174
+ 174: Label
+ 177: 11(int) Load 152(mask1)
+ 178: 11(int) Load 156(mask3)
+ 179: 11(int) BitwiseOr 177 178
+ 180: 11(int) Load 160(mask4)
+ 181: 21(bool) IEqual 179 180
+ SelectionMerge 183 None
+ BranchConditional 181 182 183
+ 182: Label
+ 184: 7(int) Load 9(count)
+ 185: 7(int) IMul 184 36
+ Store 9(count) 185
+ Branch 183
+ 183: Label
+ 186: 11(int) Load 152(mask1)
+ 187: 11(int) Load 160(mask4)
+ 188: 11(int) BitwiseXor 186 187
+ 189: 21(bool) IEqual 188 155
+ SelectionMerge 191 None
+ BranchConditional 189 190 191
+ 190: Label
+ 192: 7(int) Load 9(count)
+ 193: 7(int) IMul 192 41
+ Store 9(count) 193
+ Branch 191
+ 191: Label
+ 194: 7(int) Load 9(count)
+ 195: 11(int) Bitcast 194
+ 196: 65(ivec4) CompositeConstruct 195 195 195 195
+ 197: 65(ivec4) Load 67(c)
+ 198: 65(ivec4) IAdd 197 196
+ Store 67(c) 198
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.uniformArray.frag.out b/Test/baseResults/spv.uniformArray.frag.out
old mode 100644
new mode 100755
index dc3ae72..d2f7910
--- a/Test/baseResults/spv.uniformArray.frag.out
+++ b/Test/baseResults/spv.uniformArray.frag.out
@@ -5,23 +5,25 @@
// Module Version 99
// Generated by (magic number): 51a00bb
-// Id's are bound by 52
+// Id's are bound by 53
Source GLSL 130
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 10 "texColor"
Name 15 "color"
Name 26 "inColor"
Name 36 "alpha"
Name 47 "gl_FragColor"
- Name 51 "texSampler2D"
+ Name 52 "texSampler2D"
Decorate 47(gl_FragColor) BuiltIn FragColor
- Decorate 51(texSampler2D) NoStaticUse
+ Decorate 52(texSampler2D) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypePointer Function 8(fvec4)
@@ -29,50 +31,51 @@
12: 11(int) Constant 6
13: TypeArray 8(fvec4) 12
14: TypePointer UniformConstant 13
- 15(color): 14(ptr) Variable UniformConstant
+ 15(color): 14(ptr) Variable UniformConstant
16: TypeInt 32 1
17: 16(int) Constant 1
18: TypePointer UniformConstant 8(fvec4)
24: TypeVector 7(float) 3
25: TypePointer UniformConstant 24(fvec3)
- 26(inColor): 25(ptr) Variable UniformConstant
+ 26(inColor): 25(ptr) Variable UniformConstant
33: 11(int) Constant 16
34: TypeArray 7(float) 33
35: TypePointer UniformConstant 34
- 36(alpha): 35(ptr) Variable UniformConstant
+ 36(alpha): 35(ptr) Variable UniformConstant
37: 16(int) Constant 12
38: TypePointer UniformConstant 7(float)
46: TypePointer Output 8(fvec4)
-47(gl_FragColor): 46(ptr) Variable Output
- 49: TypeSampler7(float) 2D filter+texture
- 50: TypePointer UniformConstant 49
-51(texSampler2D): 50(ptr) Variable UniformConstant
+47(gl_FragColor): 46(ptr) Variable Output
+ 49: TypeImage 7(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
- 10(texColor): 9(ptr) Variable Function
+ 10(texColor): 9(ptr) Variable Function
19: 18(ptr) AccessChain 15(color) 17
- 20: 8(fvec4) Load 19
+ 20: 8(fvec4) Load 19
21: 18(ptr) AccessChain 15(color) 17
- 22: 8(fvec4) Load 21
+ 22: 8(fvec4) Load 21
23: 8(fvec4) FAdd 20 22
- Store 10(texColor) 23
- 27: 24(fvec3) Load 26(inColor)
- 28: 8(fvec4) Load 10(texColor)
+ Store 10(texColor) 23
+ 27: 24(fvec3) Load 26(inColor)
+ 28: 8(fvec4) Load 10(texColor)
29: 24(fvec3) VectorShuffle 28 28 0 1 2
30: 24(fvec3) FAdd 29 27
- 31: 8(fvec4) Load 10(texColor)
+ 31: 8(fvec4) Load 10(texColor)
32: 8(fvec4) VectorShuffle 31 30 4 5 6 3
- Store 10(texColor) 32
+ Store 10(texColor) 32
39: 38(ptr) AccessChain 36(alpha) 37
- 40: 7(float) Load 39
- 41: 8(fvec4) Load 10(texColor)
+ 40: 7(float) Load 39
+ 41: 8(fvec4) Load 10(texColor)
42: 7(float) CompositeExtract 41 3
43: 7(float) FAdd 42 40
- 44: 8(fvec4) Load 10(texColor)
+ 44: 8(fvec4) Load 10(texColor)
45: 8(fvec4) CompositeInsert 43 44 3
- Store 10(texColor) 45
- 48: 8(fvec4) Load 10(texColor)
- Store 47(gl_FragColor) 48
+ Store 10(texColor) 45
+ 48: 8(fvec4) Load 10(texColor)
+ Store 47(gl_FragColor) 48
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.variableArrayIndex.frag.out b/Test/baseResults/spv.variableArrayIndex.frag.out
old mode 100644
new mode 100755
index 7dc740a..5931d59
--- a/Test/baseResults/spv.variableArrayIndex.frag.out
+++ b/Test/baseResults/spv.variableArrayIndex.frag.out
@@ -7,12 +7,14 @@
// Module Version 99
// Generated by (magic number): 51a00bb
-// Id's are bound by 93
+// Id's are bound by 94
Source GLSL 130
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 9 "iLocal"
Name 11 "Count"
@@ -33,17 +35,17 @@
Name 35 "foo2"
Name 37 "foo"
Name 55 "gl_FragColor"
- Name 59 "sampler"
- Name 63 "coord"
- Name 69 "constructed"
+ Name 60 "sampler"
+ Name 64 "coord"
+ Name 70 "constructed"
Decorate 55(gl_FragColor) BuiltIn FragColor
- Decorate 63(coord) Smooth
+ Decorate 64(coord) Smooth
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeInt 32 1
8: TypePointer Function 7(int)
10: TypePointer UniformConstant 7(int)
- 11(Count): 10(ptr) Variable UniformConstant
+ 11(Count): 10(ptr) Variable UniformConstant
13: TypeFloat 32
14(lunarStruct1): TypeStruct 7(int) 13(float)
15(lunarStruct2): TypeStruct 7(int) 13(float) 14(lunarStruct1)
@@ -52,7 +54,7 @@
18: TypeArray 15(lunarStruct2) 17
19(lunarStruct3): TypeStruct 18 7(int) 13(float) 14(lunarStruct1)
20: TypePointer UniformConstant 19(lunarStruct3)
- 21(foo3): 20(ptr) Variable UniformConstant
+ 21(foo3): 20(ptr) Variable UniformConstant
22: 7(int) Constant 0
23: 7(int) Constant 1
26: TypeBool
@@ -60,85 +62,86 @@
32: 16(int) Constant 5
33: TypeArray 15(lunarStruct2) 32
34: TypePointer UniformConstant 33
- 35(foo2): 34(ptr) Variable UniformConstant
+ 35(foo2): 34(ptr) Variable UniformConstant
36: TypePointer UniformConstant 14(lunarStruct1)
- 37(foo): 36(ptr) Variable UniformConstant
+ 37(foo): 36(ptr) Variable UniformConstant
42: 7(int) Constant 2
47: TypePointer UniformConstant 13(float)
53: TypeVector 13(float) 4
54: TypePointer Output 53(fvec4)
-55(gl_FragColor): 54(ptr) Variable Output
- 57: TypeSampler13(float) 2D filter+texture
- 58: TypePointer UniformConstant 57
- 59(sampler): 58(ptr) Variable UniformConstant
- 61: TypeVector 13(float) 2
- 62: TypePointer Input 61(fvec2)
- 63(coord): 62(ptr) Variable Input
- 67: TypeArray 61(fvec2) 17
- 68: TypePointer Function 67
- 73: 13(float) Constant 1065353216
- 74: 13(float) Constant 1073741824
- 75: 61(fvec2) ConstantComposite 73 74
- 79: TypePointer Function 61(fvec2)
+55(gl_FragColor): 54(ptr) Variable Output
+ 57: TypeImage 13(float) 2D sampled format:Unknown
+ 58: TypeSampledImage 57
+ 59: TypePointer UniformConstant 58
+ 60(sampler): 59(ptr) Variable UniformConstant
+ 62: TypeVector 13(float) 2
+ 63: TypePointer Input 62(fvec2)
+ 64(coord): 63(ptr) Variable Input
+ 68: TypeArray 62(fvec2) 17
+ 69: TypePointer Function 68
+ 74: 13(float) Constant 1065353216
+ 75: 13(float) Constant 1073741824
+ 76: 62(fvec2) ConstantComposite 74 75
+ 80: TypePointer Function 62(fvec2)
4(main): 2 Function None 3
5: Label
- 9(iLocal): 8(ptr) Variable Function
- 31(scale): 30(ptr) Variable Function
- 69(constructed): 68(ptr) Variable Function
- 12: 7(int) Load 11(Count)
- Store 9(iLocal) 12
+ 9(iLocal): 8(ptr) Variable Function
+ 31(scale): 30(ptr) Variable Function
+ 70(constructed): 69(ptr) Variable Function
+ 12: 7(int) Load 11(Count)
+ Store 9(iLocal) 12
24: 10(ptr) AccessChain 21(foo3) 22 23 22
- 25: 7(int) Load 24
+ 25: 7(int) Load 24
27: 26(bool) SGreaterThan 25 22
SelectionMerge 29 None
- BranchConditional 27 28 50
+ BranchConditional 27 28 50
28: Label
38: 10(ptr) AccessChain 37(foo) 22
- 39: 7(int) Load 38
+ 39: 7(int) Load 38
40: 10(ptr) AccessChain 21(foo3) 22 39 22
- 41: 7(int) Load 40
+ 41: 7(int) Load 40
43: 7(int) IAdd 41 42
- 44: 7(int) Load 9(iLocal)
+ 44: 7(int) Load 9(iLocal)
45: 7(int) IAdd 44 23
- Store 9(iLocal) 45
+ Store 9(iLocal) 45
46: 7(int) IAdd 43 45
48: 47(ptr) AccessChain 35(foo2) 46 42 23
- 49: 13(float) Load 48
- Store 31(scale) 49
+ 49: 13(float) Load 48
+ Store 31(scale) 49
Branch 29
50: Label
51: 47(ptr) AccessChain 21(foo3) 22 22 42 23
- 52: 13(float) Load 51
- Store 31(scale) 52
+ 52: 13(float) Load 51
+ Store 31(scale) 52
Branch 29
29: Label
- 56: 13(float) Load 31(scale)
- 60: 57 Load 59(sampler)
- 64: 61(fvec2) Load 63(coord)
- 65: 53(fvec4) TextureSample 60 64
- 66: 53(fvec4) VectorTimesScalar 65 56
- Store 55(gl_FragColor) 66
- 70: 61(fvec2) Load 63(coord)
- 71: 13(float) Load 31(scale)
- 72: 61(fvec2) CompositeConstruct 71 71
- 76: 67 CompositeConstruct 70 72 75
- Store 69(constructed) 76
- 77: 10(ptr) AccessChain 37(foo) 22
- 78: 7(int) Load 77
- 80: 79(ptr) AccessChain 69(constructed) 78
- 81: 61(fvec2) Load 80
- 82: 10(ptr) AccessChain 37(foo) 22
- 83: 7(int) Load 82
- 84: 79(ptr) AccessChain 69(constructed) 83
- 85: 61(fvec2) Load 84
- 86: 13(float) CompositeExtract 81 0
- 87: 13(float) CompositeExtract 81 1
- 88: 13(float) CompositeExtract 85 0
- 89: 13(float) CompositeExtract 85 1
- 90: 53(fvec4) CompositeConstruct 86 87 88 89
- 91: 53(fvec4) Load 55(gl_FragColor)
- 92: 53(fvec4) FAdd 91 90
- Store 55(gl_FragColor) 92
+ 56: 13(float) Load 31(scale)
+ 61: 58 Load 60(sampler)
+ 65: 62(fvec2) Load 64(coord)
+ 66: 53(fvec4) ImageSampleImplicitLod 61 65
+ 67: 53(fvec4) VectorTimesScalar 66 56
+ Store 55(gl_FragColor) 67
+ 71: 62(fvec2) Load 64(coord)
+ 72: 13(float) Load 31(scale)
+ 73: 62(fvec2) CompositeConstruct 72 72
+ 77: 68 CompositeConstruct 71 73 76
+ Store 70(constructed) 77
+ 78: 10(ptr) AccessChain 37(foo) 22
+ 79: 7(int) Load 78
+ 81: 80(ptr) AccessChain 70(constructed) 79
+ 82: 62(fvec2) Load 81
+ 83: 10(ptr) AccessChain 37(foo) 22
+ 84: 7(int) Load 83
+ 85: 80(ptr) AccessChain 70(constructed) 84
+ 86: 62(fvec2) Load 85
+ 87: 13(float) CompositeExtract 82 0
+ 88: 13(float) CompositeExtract 82 1
+ 89: 13(float) CompositeExtract 86 0
+ 90: 13(float) CompositeExtract 86 1
+ 91: 53(fvec4) CompositeConstruct 87 88 89 90
+ 92: 53(fvec4) Load 55(gl_FragColor)
+ 93: 53(fvec4) FAdd 92 91
+ Store 55(gl_FragColor) 93
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.varyingArray.frag.out b/Test/baseResults/spv.varyingArray.frag.out
old mode 100644
new mode 100755
index 0f20e66..848470f
--- a/Test/baseResults/spv.varyingArray.frag.out
+++ b/Test/baseResults/spv.varyingArray.frag.out
@@ -10,87 +10,90 @@
// Module Version 99
// Generated by (magic number): 51a00bb
-// Id's are bound by 61
+// Id's are bound by 62
Source GLSL 130
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 10 "texColor"
- Name 13 "texSampler2D"
- Name 19 "gl_TexCoord"
- Name 34 "color"
- Name 39 "alpha"
- Name 44 "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
+ Name 14 "texSampler2D"
+ Name 20 "gl_TexCoord"
+ Name 35 "color"
+ Name 40 "alpha"
+ Name 45 "gl_FragColor"
+ Name 49 "foo"
+ Decorate 20(gl_TexCoord) Smooth
+ Decorate 35(color) Smooth
+ Decorate 40(alpha) Smooth
+ Decorate 45(gl_FragColor) BuiltIn FragColor
+ Decorate 49(foo) Smooth
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypePointer Function 8(fvec4)
- 11: TypeSampler7(float) 2D filter+texture
- 12: TypePointer UniformConstant 11
-13(texSampler2D): 12(ptr) Variable UniformConstant
- 15: TypeInt 32 0
- 16: 15(int) Constant 6
- 17: TypeArray 8(fvec4) 16
- 18: TypePointer Input 17
- 19(gl_TexCoord): 18(ptr) Variable Input
- 20: TypeInt 32 1
- 21: 20(int) Constant 4
- 22: TypePointer Input 8(fvec4)
- 25: 20(int) Constant 5
- 29: TypeVector 7(float) 2
- 34(color): 22(ptr) Variable Input
- 38: TypePointer Input 7(float)
- 39(alpha): 38(ptr) Variable Input
- 43: TypePointer Output 8(fvec4)
-44(gl_FragColor): 43(ptr) Variable Output
- 45: 15(int) Constant 3
- 46: TypeArray 8(fvec4) 45
- 47: TypePointer Input 46
- 48(foo): 47(ptr) Variable Input
- 49: 20(int) Constant 1
- 52: 20(int) Constant 0
+ 11: TypeImage 7(float) 2D sampled format:Unknown
+ 12: TypeSampledImage 11
+ 13: TypePointer UniformConstant 12
+14(texSampler2D): 13(ptr) Variable UniformConstant
+ 16: TypeInt 32 0
+ 17: 16(int) Constant 6
+ 18: TypeArray 8(fvec4) 17
+ 19: TypePointer Input 18
+ 20(gl_TexCoord): 19(ptr) Variable Input
+ 21: TypeInt 32 1
+ 22: 21(int) Constant 4
+ 23: TypePointer Input 8(fvec4)
+ 26: 21(int) Constant 5
+ 30: TypeVector 7(float) 2
+ 35(color): 23(ptr) Variable Input
+ 39: TypePointer Input 7(float)
+ 40(alpha): 39(ptr) Variable Input
+ 44: TypePointer Output 8(fvec4)
+45(gl_FragColor): 44(ptr) Variable Output
+ 46: 16(int) Constant 3
+ 47: TypeArray 8(fvec4) 46
+ 48: TypePointer Input 47
+ 49(foo): 48(ptr) Variable Input
+ 50: 21(int) Constant 1
+ 53: 21(int) Constant 0
4(main): 2 Function None 3
5: Label
- 10(texColor): 9(ptr) Variable Function
- 14: 11 Load 13(texSampler2D)
- 23: 22(ptr) AccessChain 19(gl_TexCoord) 21
- 24: 8(fvec4) Load 23
- 26: 22(ptr) AccessChain 19(gl_TexCoord) 25
- 27: 8(fvec4) Load 26
- 28: 8(fvec4) FAdd 24 27
- 30: 7(float) CompositeExtract 28 0
- 31: 7(float) CompositeExtract 28 1
- 32: 29(fvec2) CompositeConstruct 30 31
- 33: 8(fvec4) TextureSample 14 32
- Store 10(texColor) 33
- 35: 8(fvec4) Load 34(color)
- 36: 8(fvec4) Load 10(texColor)
- 37: 8(fvec4) FAdd 36 35
- Store 10(texColor) 37
- 40: 7(float) Load 39(alpha)
- 41: 8(fvec4) Load 10(texColor)
- 42: 8(fvec4) CompositeInsert 40 41 3
- Store 10(texColor) 42
- 50: 22(ptr) AccessChain 48(foo) 49
- 51: 8(fvec4) Load 50
- 53: 22(ptr) AccessChain 19(gl_TexCoord) 52
- 54: 8(fvec4) Load 53
- 55: 8(fvec4) FAdd 51 54
- 56: 22(ptr) AccessChain 19(gl_TexCoord) 21
- 57: 8(fvec4) Load 56
- 58: 8(fvec4) FAdd 55 57
- 59: 8(fvec4) Load 10(texColor)
- 60: 8(fvec4) FAdd 58 59
- Store 44(gl_FragColor) 60
+ 10(texColor): 9(ptr) Variable Function
+ 15: 12 Load 14(texSampler2D)
+ 24: 23(ptr) AccessChain 20(gl_TexCoord) 22
+ 25: 8(fvec4) Load 24
+ 27: 23(ptr) AccessChain 20(gl_TexCoord) 26
+ 28: 8(fvec4) Load 27
+ 29: 8(fvec4) FAdd 25 28
+ 31: 7(float) CompositeExtract 29 0
+ 32: 7(float) CompositeExtract 29 1
+ 33: 30(fvec2) CompositeConstruct 31 32
+ 34: 8(fvec4) ImageSampleImplicitLod 15 33
+ Store 10(texColor) 34
+ 36: 8(fvec4) Load 35(color)
+ 37: 8(fvec4) Load 10(texColor)
+ 38: 8(fvec4) FAdd 37 36
+ Store 10(texColor) 38
+ 41: 7(float) Load 40(alpha)
+ 42: 8(fvec4) Load 10(texColor)
+ 43: 8(fvec4) CompositeInsert 41 42 3
+ Store 10(texColor) 43
+ 51: 23(ptr) AccessChain 49(foo) 50
+ 52: 8(fvec4) Load 51
+ 54: 23(ptr) AccessChain 20(gl_TexCoord) 53
+ 55: 8(fvec4) Load 54
+ 56: 8(fvec4) FAdd 52 55
+ 57: 23(ptr) AccessChain 20(gl_TexCoord) 22
+ 58: 8(fvec4) Load 57
+ 59: 8(fvec4) FAdd 56 58
+ 60: 8(fvec4) Load 10(texColor)
+ 61: 8(fvec4) FAdd 59 60
+ Store 45(gl_FragColor) 61
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.varyingArrayIndirect.frag.out b/Test/baseResults/spv.varyingArrayIndirect.frag.out
old mode 100644
new mode 100755
index 54c3763..9dfe588
--- a/Test/baseResults/spv.varyingArrayIndirect.frag.out
+++ b/Test/baseResults/spv.varyingArrayIndirect.frag.out
@@ -10,97 +10,100 @@
// Module Version 99
// Generated by (magic number): 51a00bb
-// Id's are bound by 69
+// Id's are bound by 70
Source GLSL 130
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 10 "texColor"
- Name 13 "texSampler2D"
- Name 19 "userIn"
- Name 22 "b"
- Name 30 "gl_TexCoord"
- 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 14 "texSampler2D"
+ Name 20 "userIn"
+ Name 23 "b"
+ Name 31 "gl_TexCoord"
+ Name 32 "a"
+ Name 46 "color"
+ Name 51 "alpha"
+ Name 56 "gl_FragColor"
+ Decorate 20(userIn) Smooth
+ Decorate 31(gl_TexCoord) Smooth
+ Decorate 46(color) Smooth
+ Decorate 51(alpha) Smooth
+ Decorate 56(gl_FragColor) BuiltIn FragColor
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypePointer Function 8(fvec4)
- 11: TypeSampler7(float) 2D filter+texture
- 12: TypePointer UniformConstant 11
-13(texSampler2D): 12(ptr) Variable UniformConstant
- 15: TypeInt 32 0
- 16: 15(int) Constant 2
- 17: TypeArray 8(fvec4) 16
- 18: TypePointer Input 17
- 19(userIn): 18(ptr) Variable Input
- 20: TypeInt 32 1
- 21: TypePointer UniformConstant 20(int)
- 22(b): 21(ptr) Variable UniformConstant
- 24: TypePointer Input 8(fvec4)
- 27: 15(int) Constant 6
- 28: TypeArray 8(fvec4) 27
- 29: TypePointer Input 28
- 30(gl_TexCoord): 29(ptr) Variable Input
- 31(a): 21(ptr) Variable UniformConstant
- 36: 20(int) Constant 5
- 40: TypeVector 7(float) 2
- 45(color): 24(ptr) Variable Input
- 49: TypePointer Input 7(float)
- 50(alpha): 49(ptr) Variable Input
- 54: TypePointer Output 8(fvec4)
-55(gl_FragColor): 54(ptr) Variable Output
- 56: 20(int) Constant 0
+ 11: TypeImage 7(float) 2D sampled format:Unknown
+ 12: TypeSampledImage 11
+ 13: TypePointer UniformConstant 12
+14(texSampler2D): 13(ptr) Variable UniformConstant
+ 16: TypeInt 32 0
+ 17: 16(int) Constant 2
+ 18: TypeArray 8(fvec4) 17
+ 19: TypePointer Input 18
+ 20(userIn): 19(ptr) Variable Input
+ 21: TypeInt 32 1
+ 22: TypePointer UniformConstant 21(int)
+ 23(b): 22(ptr) Variable UniformConstant
+ 25: TypePointer Input 8(fvec4)
+ 28: 16(int) Constant 6
+ 29: TypeArray 8(fvec4) 28
+ 30: TypePointer Input 29
+ 31(gl_TexCoord): 30(ptr) Variable Input
+ 32(a): 22(ptr) Variable UniformConstant
+ 37: 21(int) Constant 5
+ 41: TypeVector 7(float) 2
+ 46(color): 25(ptr) Variable Input
+ 50: TypePointer Input 7(float)
+ 51(alpha): 50(ptr) Variable Input
+ 55: TypePointer Output 8(fvec4)
+56(gl_FragColor): 55(ptr) Variable Output
+ 57: 21(int) Constant 0
4(main): 2 Function None 3
5: Label
- 10(texColor): 9(ptr) Variable Function
- 14: 11 Load 13(texSampler2D)
- 23: 20(int) Load 22(b)
- 25: 24(ptr) AccessChain 19(userIn) 23
- 26: 8(fvec4) Load 25
- 32: 20(int) Load 31(a)
- 33: 24(ptr) AccessChain 30(gl_TexCoord) 32
- 34: 8(fvec4) Load 33
- 35: 8(fvec4) FAdd 26 34
- 37: 24(ptr) AccessChain 30(gl_TexCoord) 36
- 38: 8(fvec4) Load 37
- 39: 8(fvec4) FAdd 35 38
- 41: 7(float) CompositeExtract 39 0
- 42: 7(float) CompositeExtract 39 1
- 43: 40(fvec2) CompositeConstruct 41 42
- 44: 8(fvec4) TextureSample 14 43
- Store 10(texColor) 44
- 46: 8(fvec4) Load 45(color)
- 47: 8(fvec4) Load 10(texColor)
- 48: 8(fvec4) FAdd 47 46
- Store 10(texColor) 48
- 51: 7(float) Load 50(alpha)
- 52: 8(fvec4) Load 10(texColor)
- 53: 8(fvec4) CompositeInsert 51 52 3
- Store 10(texColor) 53
- 57: 24(ptr) AccessChain 30(gl_TexCoord) 56
- 58: 8(fvec4) Load 57
- 59: 20(int) Load 22(b)
- 60: 24(ptr) AccessChain 30(gl_TexCoord) 59
- 61: 8(fvec4) Load 60
- 62: 8(fvec4) FAdd 58 61
- 63: 8(fvec4) Load 10(texColor)
- 64: 8(fvec4) FAdd 62 63
- 65: 20(int) Load 31(a)
- 66: 24(ptr) AccessChain 19(userIn) 65
- 67: 8(fvec4) Load 66
- 68: 8(fvec4) FAdd 64 67
- Store 55(gl_FragColor) 68
+ 10(texColor): 9(ptr) Variable Function
+ 15: 12 Load 14(texSampler2D)
+ 24: 21(int) Load 23(b)
+ 26: 25(ptr) AccessChain 20(userIn) 24
+ 27: 8(fvec4) Load 26
+ 33: 21(int) Load 32(a)
+ 34: 25(ptr) AccessChain 31(gl_TexCoord) 33
+ 35: 8(fvec4) Load 34
+ 36: 8(fvec4) FAdd 27 35
+ 38: 25(ptr) AccessChain 31(gl_TexCoord) 37
+ 39: 8(fvec4) Load 38
+ 40: 8(fvec4) FAdd 36 39
+ 42: 7(float) CompositeExtract 40 0
+ 43: 7(float) CompositeExtract 40 1
+ 44: 41(fvec2) CompositeConstruct 42 43
+ 45: 8(fvec4) ImageSampleImplicitLod 15 44
+ Store 10(texColor) 45
+ 47: 8(fvec4) Load 46(color)
+ 48: 8(fvec4) Load 10(texColor)
+ 49: 8(fvec4) FAdd 48 47
+ Store 10(texColor) 49
+ 52: 7(float) Load 51(alpha)
+ 53: 8(fvec4) Load 10(texColor)
+ 54: 8(fvec4) CompositeInsert 52 53 3
+ Store 10(texColor) 54
+ 58: 25(ptr) AccessChain 31(gl_TexCoord) 57
+ 59: 8(fvec4) Load 58
+ 60: 21(int) Load 23(b)
+ 61: 25(ptr) AccessChain 31(gl_TexCoord) 60
+ 62: 8(fvec4) Load 61
+ 63: 8(fvec4) FAdd 59 62
+ 64: 8(fvec4) Load 10(texColor)
+ 65: 8(fvec4) FAdd 63 64
+ 66: 21(int) Load 32(a)
+ 67: 25(ptr) AccessChain 20(userIn) 66
+ 68: 8(fvec4) Load 67
+ 69: 8(fvec4) FAdd 65 68
+ Store 56(gl_FragColor) 69
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.voidFunction.frag.out b/Test/baseResults/spv.voidFunction.frag.out
old mode 100644
new mode 100755
index cad7fe7..6e288de
--- a/Test/baseResults/spv.voidFunction.frag.out
+++ b/Test/baseResults/spv.voidFunction.frag.out
@@ -8,9 +8,11 @@
// Id's are bound by 43
Source GLSL 120
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 7 "foo("
Name 9 "foo2("
@@ -21,58 +23,58 @@
Name 40 "BaseColor"
Name 42 "d"
Decorate 36(gl_FragColor) BuiltIn FragColor
- Decorate 40(BaseColor) Smooth
- Decorate 40(BaseColor) NoStaticUse
- Decorate 42(d) NoStaticUse
+ Decorate 40(BaseColor) Smooth
+ Decorate 40(BaseColor) NoStaticUse
+ Decorate 42(d) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
11: TypeFloat 32
12: TypePointer PrivateGlobal 11(float)
- 13(bar): 12(ptr) Variable PrivateGlobal
+ 13(bar): 12(ptr) Variable PrivateGlobal
14: 11(float) Constant 1073741824
16: 11(float) Constant 1065353216
21: TypeVector 11(float) 4
22: TypePointer Function 21(fvec4)
24: TypePointer UniformConstant 21(fvec4)
- 25(bigColor): 24(ptr) Variable UniformConstant
+ 25(bigColor): 24(ptr) Variable UniformConstant
35: TypePointer Output 21(fvec4)
-36(gl_FragColor): 35(ptr) Variable Output
+36(gl_FragColor): 35(ptr) Variable Output
39: TypePointer Input 21(fvec4)
- 40(BaseColor): 39(ptr) Variable Input
+ 40(BaseColor): 39(ptr) Variable Input
41: TypePointer UniformConstant 11(float)
- 42(d): 41(ptr) Variable UniformConstant
+ 42(d): 41(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
- 23(outColor): 22(ptr) Variable Function
- Store 13(bar) 14
- 26: 21(fvec4) Load 25(bigColor)
- Store 23(outColor) 26
- 27: 2 FunctionCall 7(foo()
- 28: 2 FunctionCall 9(foo2()
- 29: 11(float) Load 13(bar)
- 30: 21(fvec4) Load 23(outColor)
+ 23(outColor): 22(ptr) Variable Function
+ Store 13(bar) 14
+ 26: 21(fvec4) Load 25(bigColor)
+ Store 23(outColor) 26
+ 27: 2 FunctionCall 7(foo()
+ 28: 2 FunctionCall 9(foo2()
+ 29: 11(float) Load 13(bar)
+ 30: 21(fvec4) Load 23(outColor)
31: 11(float) CompositeExtract 30 0
32: 11(float) FAdd 31 29
- 33: 21(fvec4) Load 23(outColor)
+ 33: 21(fvec4) Load 23(outColor)
34: 21(fvec4) CompositeInsert 32 33 0
- Store 23(outColor) 34
- 37: 21(fvec4) Load 23(outColor)
- Store 36(gl_FragColor) 37
+ Store 23(outColor) 34
+ 37: 21(fvec4) Load 23(outColor)
+ Store 36(gl_FragColor) 37
Branch 6
6: Label
Return
FunctionEnd
7(foo(): 2 Function None 3
8: Label
- 15: 11(float) Load 13(bar)
+ 15: 11(float) Load 13(bar)
17: 11(float) FAdd 15 16
- Store 13(bar) 17
+ Store 13(bar) 17
Return
FunctionEnd
9(foo2(): 2 Function None 3
10: Label
- 19: 11(float) Load 13(bar)
+ 19: 11(float) Load 13(bar)
20: 11(float) FAdd 19 16
- Store 13(bar) 20
+ Store 13(bar) 20
Return
FunctionEnd
diff --git a/Test/baseResults/spv.while-continue-break.vert.out b/Test/baseResults/spv.while-continue-break.vert.out
old mode 100644
new mode 100755
index 6d8aaf2..1dba3c8
--- a/Test/baseResults/spv.while-continue-break.vert.out
+++ b/Test/baseResults/spv.while-continue-break.vert.out
@@ -8,9 +8,10 @@
// Id's are bound by 43
Source ESSL 300
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Vertex 4
+ EntryPoint Vertex 4 "main"
Name 4 "main"
Name 9 "i"
Name 18 "A"
@@ -19,19 +20,12 @@
Name 38 "D"
Name 41 "gl_VertexID"
Name 42 "gl_InstanceID"
- Decorate 9(i) PrecisionHigh
- Decorate 18(A) PrecisionHigh
- Decorate 26(B) PrecisionHigh
- Decorate 28(C) PrecisionHigh
- Decorate 38(D) PrecisionHigh
- Decorate 41(gl_VertexID) PrecisionHigh
Decorate 41(gl_VertexID) BuiltIn VertexId
- Decorate 41(gl_VertexID) NoStaticUse
- Decorate 42(gl_InstanceID) PrecisionHigh
+ Decorate 41(gl_VertexID) NoStaticUse
Decorate 42(gl_InstanceID) BuiltIn InstanceId
- Decorate 42(gl_InstanceID) NoStaticUse
+ Decorate 42(gl_InstanceID) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeInt 32 1
8: TypePointer Function 7(int)
10: 7(int) Constant 0
@@ -42,54 +36,54 @@
30: 7(int) Constant 5
39: 7(int) Constant 3
40: TypePointer Input 7(int)
- 41(gl_VertexID): 40(ptr) Variable Input
-42(gl_InstanceID): 40(ptr) Variable Input
+ 41(gl_VertexID): 40(ptr) Variable Input
+42(gl_InstanceID): 40(ptr) Variable Input
4(main): 2 Function None 3
5: Label
- 9(i): 8(ptr) Variable Function
- 18(A): 8(ptr) Variable Function
- 26(B): 8(ptr) Variable Function
- 28(C): 8(ptr) Variable Function
- 38(D): 8(ptr) Variable Function
- Store 9(i) 10
+ 9(i): 8(ptr) Variable Function
+ 18(A): 8(ptr) Variable Function
+ 26(B): 8(ptr) Variable Function
+ 28(C): 8(ptr) Variable Function
+ 38(D): 8(ptr) Variable Function
+ Store 9(i) 10
Branch 11
11: Label
- 14: 7(int) Load 9(i)
+ 14: 7(int) Load 9(i)
17: 16(bool) SLessThan 14 15
LoopMerge 12 None
- BranchConditional 17 13 12
+ BranchConditional 17 13 12
13: Label
- Store 18(A) 19
- 20: 7(int) Load 9(i)
+ Store 18(A) 19
+ 20: 7(int) Load 9(i)
22: 7(int) SMod 20 21
23: 16(bool) IEqual 22 10
SelectionMerge 25 None
- BranchConditional 23 24 25
+ BranchConditional 23 24 25
24: Label
- Store 26(B) 21
+ Store 26(B) 21
Branch 11
27: Label
- Store 28(C) 21
+ Store 28(C) 21
Branch 25
25: Label
- 29: 7(int) Load 9(i)
+ 29: 7(int) Load 9(i)
31: 7(int) SMod 29 30
32: 16(bool) IEqual 31 10
SelectionMerge 34 None
- BranchConditional 32 33 34
+ BranchConditional 32 33 34
33: Label
- Store 26(B) 21
+ Store 26(B) 21
Branch 12
35: Label
- Store 28(C) 21
+ Store 28(C) 21
Branch 34
34: Label
- 36: 7(int) Load 9(i)
+ 36: 7(int) Load 9(i)
37: 7(int) IAdd 36 19
- Store 9(i) 37
+ Store 9(i) 37
Branch 11
12: Label
- Store 38(D) 39
+ Store 38(D) 39
Branch 6
6: Label
Return
diff --git a/Test/baseResults/spv.while-simple.vert.out b/Test/baseResults/spv.while-simple.vert.out
old mode 100644
new mode 100755
index 3641f82..b896e9f
--- a/Test/baseResults/spv.while-simple.vert.out
+++ b/Test/baseResults/spv.while-simple.vert.out
@@ -8,22 +8,20 @@
// Id's are bound by 24
Source ESSL 300
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Vertex 4
+ EntryPoint Vertex 4 "main"
Name 4 "main"
Name 9 "i"
Name 22 "gl_VertexID"
Name 23 "gl_InstanceID"
- Decorate 9(i) PrecisionHigh
- Decorate 22(gl_VertexID) PrecisionHigh
Decorate 22(gl_VertexID) BuiltIn VertexId
- Decorate 22(gl_VertexID) NoStaticUse
- Decorate 23(gl_InstanceID) PrecisionHigh
+ Decorate 22(gl_VertexID) NoStaticUse
Decorate 23(gl_InstanceID) BuiltIn InstanceId
- Decorate 23(gl_InstanceID) NoStaticUse
+ Decorate 23(gl_InstanceID) NoStaticUse
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeInt 32 1
8: TypePointer Function 7(int)
10: 7(int) Constant 0
@@ -31,22 +29,22 @@
16: TypeBool
19: 7(int) Constant 1
21: TypePointer Input 7(int)
- 22(gl_VertexID): 21(ptr) Variable Input
-23(gl_InstanceID): 21(ptr) Variable Input
+ 22(gl_VertexID): 21(ptr) Variable Input
+23(gl_InstanceID): 21(ptr) Variable Input
4(main): 2 Function None 3
5: Label
- 9(i): 8(ptr) Variable Function
- Store 9(i) 10
+ 9(i): 8(ptr) Variable Function
+ Store 9(i) 10
Branch 11
11: Label
- 14: 7(int) Load 9(i)
+ 14: 7(int) Load 9(i)
17: 16(bool) SLessThan 14 15
LoopMerge 12 None
- BranchConditional 17 13 12
+ BranchConditional 17 13 12
13: Label
- 18: 7(int) Load 9(i)
+ 18: 7(int) Load 9(i)
20: 7(int) IAdd 18 19
- Store 9(i) 20
+ Store 9(i) 20
Branch 11
12: Label
Branch 6
diff --git a/Test/baseResults/spv.whileLoop.frag.out b/Test/baseResults/spv.whileLoop.frag.out
old mode 100644
new mode 100755
index 5d82ee8..bb7d913
--- a/Test/baseResults/spv.whileLoop.frag.out
+++ b/Test/baseResults/spv.whileLoop.frag.out
@@ -8,53 +8,55 @@
// Id's are bound by 32
Source GLSL 110
+ Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4
+ EntryPoint Fragment 4 "main"
+ ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 10 "color"
Name 12 "BaseColor"
Name 20 "d"
Name 25 "bigColor"
Name 30 "gl_FragColor"
- Decorate 12(BaseColor) Smooth
+ Decorate 12(BaseColor) Smooth
Decorate 30(gl_FragColor) BuiltIn FragColor
2: TypeVoid
- 3: TypeFunction 2
+ 3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 4
9: TypePointer Function 8(fvec4)
11: TypePointer Input 8(fvec4)
- 12(BaseColor): 11(ptr) Variable Input
+ 12(BaseColor): 11(ptr) Variable Input
19: TypePointer UniformConstant 7(float)
- 20(d): 19(ptr) Variable UniformConstant
+ 20(d): 19(ptr) Variable UniformConstant
22: TypeBool
24: TypePointer UniformConstant 8(fvec4)
- 25(bigColor): 24(ptr) Variable UniformConstant
+ 25(bigColor): 24(ptr) Variable UniformConstant
29: TypePointer Output 8(fvec4)
-30(gl_FragColor): 29(ptr) Variable Output
+30(gl_FragColor): 29(ptr) Variable Output
4(main): 2 Function None 3
5: Label
- 10(color): 9(ptr) Variable Function
- 13: 8(fvec4) Load 12(BaseColor)
- Store 10(color) 13
+ 10(color): 9(ptr) Variable Function
+ 13: 8(fvec4) Load 12(BaseColor)
+ Store 10(color) 13
Branch 14
14: Label
- 17: 8(fvec4) Load 10(color)
+ 17: 8(fvec4) Load 10(color)
18: 7(float) CompositeExtract 17 0
- 21: 7(float) Load 20(d)
+ 21: 7(float) Load 20(d)
23: 22(bool) FOrdLessThan 18 21
LoopMerge 15 None
- BranchConditional 23 16 15
+ BranchConditional 23 16 15
16: Label
- 26: 8(fvec4) Load 25(bigColor)
- 27: 8(fvec4) Load 10(color)
+ 26: 8(fvec4) Load 25(bigColor)
+ 27: 8(fvec4) Load 10(color)
28: 8(fvec4) FAdd 27 26
- Store 10(color) 28
+ Store 10(color) 28
Branch 14
15: Label
- 31: 8(fvec4) Load 10(color)
- Store 30(gl_FragColor) 31
+ 31: 8(fvec4) Load 10(color)
+ Store 30(gl_FragColor) 31
Branch 6
6: Label
Return
diff --git a/glslang/Include/revision.h b/glslang/Include/revision.h
index e28220d..7ee1297 100644
--- a/glslang/Include/revision.h
+++ b/glslang/Include/revision.h
@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run).
-#define GLSLANG_REVISION "2.3.703"
+#define GLSLANG_REVISION "2.3.704"
#define GLSLANG_DATE "06-Aug-2015"