Build: Switch to Rev. 6 of headers, removing "BadValue" enum stuff.
Note: Technically, this is glslang's modified private copy of official headers. Official headers will appear in other places, like https://github.com/KhronosGroup/SPIRV-Headers.
This commit is contained in:
parent
efb89a3d2e
commit
4016e38bea
@ -301,7 +301,7 @@ spv::Decoration TranslateBlockDecoration(const glslang::TType& type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (spv::Decoration)spv::BadValue;
|
return spv::DecorationMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Translate glslang type to SPIR-V memory decorations.
|
// Translate glslang type to SPIR-V memory decorations.
|
||||||
@ -330,12 +330,12 @@ spv::Decoration TranslateLayoutDecoration(const glslang::TType& type, glslang::T
|
|||||||
return spv::DecorationColMajor;
|
return spv::DecorationColMajor;
|
||||||
default:
|
default:
|
||||||
// opaque layouts don't need a majorness
|
// opaque layouts don't need a majorness
|
||||||
return (spv::Decoration)spv::BadValue;
|
return spv::DecorationMax;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch (type.getBasicType()) {
|
switch (type.getBasicType()) {
|
||||||
default:
|
default:
|
||||||
return (spv::Decoration)spv::BadValue;
|
return spv::DecorationMax;
|
||||||
break;
|
break;
|
||||||
case glslang::EbtBlock:
|
case glslang::EbtBlock:
|
||||||
switch (type.getQualifier().storage) {
|
switch (type.getQualifier().storage) {
|
||||||
@ -345,38 +345,38 @@ spv::Decoration TranslateLayoutDecoration(const glslang::TType& type, glslang::T
|
|||||||
case glslang::ElpShared: return spv::DecorationGLSLShared;
|
case glslang::ElpShared: return spv::DecorationGLSLShared;
|
||||||
case glslang::ElpPacked: return spv::DecorationGLSLPacked;
|
case glslang::ElpPacked: return spv::DecorationGLSLPacked;
|
||||||
default:
|
default:
|
||||||
return (spv::Decoration)spv::BadValue;
|
return spv::DecorationMax;
|
||||||
}
|
}
|
||||||
case glslang::EvqVaryingIn:
|
case glslang::EvqVaryingIn:
|
||||||
case glslang::EvqVaryingOut:
|
case glslang::EvqVaryingOut:
|
||||||
assert(type.getQualifier().layoutPacking == glslang::ElpNone);
|
assert(type.getQualifier().layoutPacking == glslang::ElpNone);
|
||||||
return (spv::Decoration)spv::BadValue;
|
return spv::DecorationMax;
|
||||||
default:
|
default:
|
||||||
assert(0);
|
assert(0);
|
||||||
return (spv::Decoration)spv::BadValue;
|
return spv::DecorationMax;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Translate glslang type to SPIR-V interpolation decorations.
|
// Translate glslang type to SPIR-V interpolation decorations.
|
||||||
// Returns spv::Decoration(spv::BadValue) when no decoration
|
// Returns spv::DecorationMax when no decoration
|
||||||
// should be applied.
|
// should be applied.
|
||||||
spv::Decoration TranslateInterpolationDecoration(const glslang::TQualifier& qualifier)
|
spv::Decoration TranslateInterpolationDecoration(const glslang::TQualifier& qualifier)
|
||||||
{
|
{
|
||||||
if (qualifier.smooth)
|
if (qualifier.smooth)
|
||||||
// Smooth decoration doesn't exist in SPIR-V 1.0
|
// Smooth decoration doesn't exist in SPIR-V 1.0
|
||||||
return (spv::Decoration)spv::BadValue;
|
return spv::DecorationMax;
|
||||||
else if (qualifier.nopersp)
|
else if (qualifier.nopersp)
|
||||||
return spv::DecorationNoPerspective;
|
return spv::DecorationNoPerspective;
|
||||||
else if (qualifier.flat)
|
else if (qualifier.flat)
|
||||||
return spv::DecorationFlat;
|
return spv::DecorationFlat;
|
||||||
else
|
else
|
||||||
return (spv::Decoration)spv::BadValue;
|
return spv::DecorationMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Translate glslang type to SPIR-V auxiliary storage decorations.
|
// Translate glslang type to SPIR-V auxiliary storage decorations.
|
||||||
// Returns spv::Decoration(spv::BadValue) when no decoration
|
// Returns spv::DecorationMax when no decoration
|
||||||
// should be applied.
|
// should be applied.
|
||||||
spv::Decoration TGlslangToSpvTraverser::TranslateAuxiliaryStorageDecoration(const glslang::TQualifier& qualifier)
|
spv::Decoration TGlslangToSpvTraverser::TranslateAuxiliaryStorageDecoration(const glslang::TQualifier& qualifier)
|
||||||
{
|
{
|
||||||
@ -388,7 +388,7 @@ spv::Decoration TGlslangToSpvTraverser::TranslateAuxiliaryStorageDecoration(cons
|
|||||||
builder.addCapability(spv::CapabilitySampleRateShading);
|
builder.addCapability(spv::CapabilitySampleRateShading);
|
||||||
return spv::DecorationSample;
|
return spv::DecorationSample;
|
||||||
} else
|
} else
|
||||||
return (spv::Decoration)spv::BadValue;
|
return spv::DecorationMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If glslang type is invariant, return SPIR-V invariant decoration.
|
// If glslang type is invariant, return SPIR-V invariant decoration.
|
||||||
@ -397,7 +397,7 @@ spv::Decoration TranslateInvariantDecoration(const glslang::TQualifier& qualifie
|
|||||||
if (qualifier.invariant)
|
if (qualifier.invariant)
|
||||||
return spv::DecorationInvariant;
|
return spv::DecorationInvariant;
|
||||||
else
|
else
|
||||||
return (spv::Decoration)spv::BadValue;
|
return spv::DecorationMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If glslang type is noContraction, return SPIR-V NoContraction decoration.
|
// If glslang type is noContraction, return SPIR-V NoContraction decoration.
|
||||||
@ -406,7 +406,7 @@ spv::Decoration TranslateNoContractionDecoration(const glslang::TQualifier& qual
|
|||||||
if (qualifier.noContraction)
|
if (qualifier.noContraction)
|
||||||
return spv::DecorationNoContraction;
|
return spv::DecorationNoContraction;
|
||||||
else
|
else
|
||||||
return (spv::Decoration)spv::BadValue;
|
return spv::DecorationMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Translate a glslang built-in variable to a SPIR-V built in decoration. Also generate
|
// Translate a glslang built-in variable to a SPIR-V built in decoration. Also generate
|
||||||
@ -480,7 +480,7 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
|
|||||||
case glslang::EbvDrawId:
|
case glslang::EbvDrawId:
|
||||||
// TODO: Add SPIR-V builtin ID.
|
// TODO: Add SPIR-V builtin ID.
|
||||||
logger->missingFunctionality("shader draw parameters");
|
logger->missingFunctionality("shader draw parameters");
|
||||||
return (spv::BuiltIn)spv::BadValue;
|
return spv::BuiltInMax;
|
||||||
case glslang::EbvPrimitiveId: return spv::BuiltInPrimitiveId;
|
case glslang::EbvPrimitiveId: return spv::BuiltInPrimitiveId;
|
||||||
case glslang::EbvInvocationId: return spv::BuiltInInvocationId;
|
case glslang::EbvInvocationId: return spv::BuiltInInvocationId;
|
||||||
case glslang::EbvTessLevelInner: return spv::BuiltInTessLevelInner;
|
case glslang::EbvTessLevelInner: return spv::BuiltInTessLevelInner;
|
||||||
@ -507,8 +507,8 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
|
|||||||
case glslang::EbvSubGroupLtMask:
|
case glslang::EbvSubGroupLtMask:
|
||||||
// TODO: Add SPIR-V builtin ID.
|
// TODO: Add SPIR-V builtin ID.
|
||||||
logger->missingFunctionality("shader ballot");
|
logger->missingFunctionality("shader ballot");
|
||||||
return (spv::BuiltIn)spv::BadValue;
|
return spv::BuiltInMax;
|
||||||
default: return (spv::BuiltIn)spv::BadValue;
|
default: return spv::BuiltInMax;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -596,7 +596,7 @@ spv::ImageFormat TGlslangToSpvTraverser::TranslateImageFormat(const glslang::TTy
|
|||||||
case glslang::ElfRg8ui: return spv::ImageFormatRg8ui;
|
case glslang::ElfRg8ui: return spv::ImageFormatRg8ui;
|
||||||
case glslang::ElfR16ui: return spv::ImageFormatR16ui;
|
case glslang::ElfR16ui: return spv::ImageFormatR16ui;
|
||||||
case glslang::ElfR8ui: return spv::ImageFormatR8ui;
|
case glslang::ElfR8ui: return spv::ImageFormatR8ui;
|
||||||
default: return (spv::ImageFormat)spv::BadValue;
|
default: return spv::ImageFormatMax;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -705,26 +705,26 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* gls
|
|||||||
case glslang::ElgTriangles: mode = spv::ExecutionModeTriangles; break;
|
case glslang::ElgTriangles: mode = spv::ExecutionModeTriangles; break;
|
||||||
case glslang::ElgQuads: mode = spv::ExecutionModeQuads; break;
|
case glslang::ElgQuads: mode = spv::ExecutionModeQuads; break;
|
||||||
case glslang::ElgIsolines: mode = spv::ExecutionModeIsolines; break;
|
case glslang::ElgIsolines: mode = spv::ExecutionModeIsolines; break;
|
||||||
default: mode = spv::BadValue; break;
|
default: mode = spv::ExecutionModeMax; break;
|
||||||
}
|
}
|
||||||
if (mode != spv::BadValue)
|
if (mode != spv::ExecutionModeMax)
|
||||||
builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
|
builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
|
||||||
|
|
||||||
switch (glslangIntermediate->getVertexSpacing()) {
|
switch (glslangIntermediate->getVertexSpacing()) {
|
||||||
case glslang::EvsEqual: mode = spv::ExecutionModeSpacingEqual; break;
|
case glslang::EvsEqual: mode = spv::ExecutionModeSpacingEqual; break;
|
||||||
case glslang::EvsFractionalEven: mode = spv::ExecutionModeSpacingFractionalEven; break;
|
case glslang::EvsFractionalEven: mode = spv::ExecutionModeSpacingFractionalEven; break;
|
||||||
case glslang::EvsFractionalOdd: mode = spv::ExecutionModeSpacingFractionalOdd; break;
|
case glslang::EvsFractionalOdd: mode = spv::ExecutionModeSpacingFractionalOdd; break;
|
||||||
default: mode = spv::BadValue; break;
|
default: mode = spv::ExecutionModeMax; break;
|
||||||
}
|
}
|
||||||
if (mode != spv::BadValue)
|
if (mode != spv::ExecutionModeMax)
|
||||||
builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
|
builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
|
||||||
|
|
||||||
switch (glslangIntermediate->getVertexOrder()) {
|
switch (glslangIntermediate->getVertexOrder()) {
|
||||||
case glslang::EvoCw: mode = spv::ExecutionModeVertexOrderCw; break;
|
case glslang::EvoCw: mode = spv::ExecutionModeVertexOrderCw; break;
|
||||||
case glslang::EvoCcw: mode = spv::ExecutionModeVertexOrderCcw; break;
|
case glslang::EvoCcw: mode = spv::ExecutionModeVertexOrderCcw; break;
|
||||||
default: mode = spv::BadValue; break;
|
default: mode = spv::ExecutionModeMax; break;
|
||||||
}
|
}
|
||||||
if (mode != spv::BadValue)
|
if (mode != spv::ExecutionModeMax)
|
||||||
builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
|
builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
|
||||||
|
|
||||||
if (glslangIntermediate->getPointMode())
|
if (glslangIntermediate->getPointMode())
|
||||||
@ -739,9 +739,9 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* gls
|
|||||||
case glslang::ElgLinesAdjacency: mode = spv::ExecutionModeInputLinesAdjacency; break;
|
case glslang::ElgLinesAdjacency: mode = spv::ExecutionModeInputLinesAdjacency; break;
|
||||||
case glslang::ElgTriangles: mode = spv::ExecutionModeTriangles; break;
|
case glslang::ElgTriangles: mode = spv::ExecutionModeTriangles; break;
|
||||||
case glslang::ElgTrianglesAdjacency: mode = spv::ExecutionModeInputTrianglesAdjacency; break;
|
case glslang::ElgTrianglesAdjacency: mode = spv::ExecutionModeInputTrianglesAdjacency; break;
|
||||||
default: mode = spv::BadValue; break;
|
default: mode = spv::ExecutionModeMax; break;
|
||||||
}
|
}
|
||||||
if (mode != spv::BadValue)
|
if (mode != spv::ExecutionModeMax)
|
||||||
builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
|
builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
|
||||||
|
|
||||||
builder.addExecutionMode(shaderEntry, spv::ExecutionModeInvocations, glslangIntermediate->getInvocations());
|
builder.addExecutionMode(shaderEntry, spv::ExecutionModeInvocations, glslangIntermediate->getInvocations());
|
||||||
@ -750,9 +750,9 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* gls
|
|||||||
case glslang::ElgPoints: mode = spv::ExecutionModeOutputPoints; break;
|
case glslang::ElgPoints: mode = spv::ExecutionModeOutputPoints; break;
|
||||||
case glslang::ElgLineStrip: mode = spv::ExecutionModeOutputLineStrip; break;
|
case glslang::ElgLineStrip: mode = spv::ExecutionModeOutputLineStrip; break;
|
||||||
case glslang::ElgTriangleStrip: mode = spv::ExecutionModeOutputTriangleStrip; break;
|
case glslang::ElgTriangleStrip: mode = spv::ExecutionModeOutputTriangleStrip; break;
|
||||||
default: mode = spv::BadValue; break;
|
default: mode = spv::ExecutionModeMax; break;
|
||||||
}
|
}
|
||||||
if (mode != spv::BadValue)
|
if (mode != spv::ExecutionModeMax)
|
||||||
builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
|
builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
|
||||||
builder.addExecutionMode(shaderEntry, spv::ExecutionModeOutputVertices, glslangIntermediate->getVertices());
|
builder.addExecutionMode(shaderEntry, spv::ExecutionModeOutputVertices, glslangIntermediate->getVertices());
|
||||||
break;
|
break;
|
||||||
@ -773,9 +773,9 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* gls
|
|||||||
switch(glslangIntermediate->getDepth()) {
|
switch(glslangIntermediate->getDepth()) {
|
||||||
case glslang::EldGreater: mode = spv::ExecutionModeDepthGreater; break;
|
case glslang::EldGreater: mode = spv::ExecutionModeDepthGreater; break;
|
||||||
case glslang::EldLess: mode = spv::ExecutionModeDepthLess; break;
|
case glslang::EldLess: mode = spv::ExecutionModeDepthLess; break;
|
||||||
default: mode = spv::BadValue; break;
|
default: mode = spv::ExecutionModeMax; break;
|
||||||
}
|
}
|
||||||
if (mode != spv::BadValue)
|
if (mode != spv::ExecutionModeMax)
|
||||||
builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
|
builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
|
||||||
|
|
||||||
if (glslangIntermediate->getDepth() != glslang::EldUnchanged && glslangIntermediate->isDepthReplacing())
|
if (glslangIntermediate->getDepth() != glslang::EldUnchanged && glslangIntermediate->isDepthReplacing())
|
||||||
@ -2070,7 +2070,7 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
|
|||||||
|
|
||||||
// built-in variable decorations
|
// built-in variable decorations
|
||||||
spv::BuiltIn builtIn = TranslateBuiltInDecoration(glslangMember.getQualifier().builtIn, true);
|
spv::BuiltIn builtIn = TranslateBuiltInDecoration(glslangMember.getQualifier().builtIn, true);
|
||||||
if (builtIn != spv::BadValue)
|
if (builtIn != spv::BuiltInMax)
|
||||||
addMemberDecoration(spvType, member, spv::DecorationBuiltIn, (int)builtIn);
|
addMemberDecoration(spvType, member, spv::DecorationBuiltIn, (int)builtIn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4122,7 +4122,7 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
|
|||||||
|
|
||||||
// built-in variable decorations
|
// built-in variable decorations
|
||||||
spv::BuiltIn builtIn = TranslateBuiltInDecoration(symbol->getQualifier().builtIn, false);
|
spv::BuiltIn builtIn = TranslateBuiltInDecoration(symbol->getQualifier().builtIn, false);
|
||||||
if (builtIn != spv::BadValue)
|
if (builtIn != spv::BuiltInMax)
|
||||||
addDecoration(id, spv::DecorationBuiltIn, (int)builtIn);
|
addDecoration(id, spv::DecorationBuiltIn, (int)builtIn);
|
||||||
|
|
||||||
return id;
|
return id;
|
||||||
@ -4131,28 +4131,28 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
|
|||||||
// If 'dec' is valid, add no-operand decoration to an object
|
// If 'dec' is valid, add no-operand decoration to an object
|
||||||
void TGlslangToSpvTraverser::addDecoration(spv::Id id, spv::Decoration dec)
|
void TGlslangToSpvTraverser::addDecoration(spv::Id id, spv::Decoration dec)
|
||||||
{
|
{
|
||||||
if (dec != spv::BadValue)
|
if (dec != spv::DecorationMax)
|
||||||
builder.addDecoration(id, dec);
|
builder.addDecoration(id, dec);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If 'dec' is valid, add a one-operand decoration to an object
|
// If 'dec' is valid, add a one-operand decoration to an object
|
||||||
void TGlslangToSpvTraverser::addDecoration(spv::Id id, spv::Decoration dec, unsigned value)
|
void TGlslangToSpvTraverser::addDecoration(spv::Id id, spv::Decoration dec, unsigned value)
|
||||||
{
|
{
|
||||||
if (dec != spv::BadValue)
|
if (dec != spv::DecorationMax)
|
||||||
builder.addDecoration(id, dec, value);
|
builder.addDecoration(id, dec, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If 'dec' is valid, add a no-operand decoration to a struct member
|
// If 'dec' is valid, add a no-operand decoration to a struct member
|
||||||
void TGlslangToSpvTraverser::addMemberDecoration(spv::Id id, int member, spv::Decoration dec)
|
void TGlslangToSpvTraverser::addMemberDecoration(spv::Id id, int member, spv::Decoration dec)
|
||||||
{
|
{
|
||||||
if (dec != spv::BadValue)
|
if (dec != spv::DecorationMax)
|
||||||
builder.addMemberDecoration(id, (unsigned)member, dec);
|
builder.addMemberDecoration(id, (unsigned)member, dec);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If 'dec' is valid, add a one-operand decoration to a struct member
|
// If 'dec' is valid, add a one-operand decoration to a struct member
|
||||||
void TGlslangToSpvTraverser::addMemberDecoration(spv::Id id, int member, spv::Decoration dec, unsigned value)
|
void TGlslangToSpvTraverser::addMemberDecoration(spv::Id id, int member, spv::Decoration dec, unsigned value)
|
||||||
{
|
{
|
||||||
if (dec != spv::BadValue)
|
if (dec != spv::DecorationMax)
|
||||||
builder.addMemberDecoration(id, (unsigned)member, dec, value);
|
builder.addMemberDecoration(id, (unsigned)member, dec, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -907,7 +907,7 @@ void Builder::addLine(Id target, Id fileName, int lineNum, int column)
|
|||||||
|
|
||||||
void Builder::addDecoration(Id id, Decoration decoration, int num)
|
void Builder::addDecoration(Id id, Decoration decoration, int num)
|
||||||
{
|
{
|
||||||
if (decoration == (spv::Decoration)spv::BadValue)
|
if (decoration == spv::DecorationMax)
|
||||||
return;
|
return;
|
||||||
Instruction* dec = new Instruction(OpDecorate);
|
Instruction* dec = new Instruction(OpDecorate);
|
||||||
dec->addIdOperand(id);
|
dec->addIdOperand(id);
|
||||||
|
@ -47,11 +47,11 @@ namespace spv {
|
|||||||
typedef unsigned int Id;
|
typedef unsigned int Id;
|
||||||
|
|
||||||
#define SPV_VERSION 0x10000
|
#define SPV_VERSION 0x10000
|
||||||
#define SPV_REVISION 3
|
#define SPV_REVISION 6
|
||||||
|
|
||||||
static const unsigned int MagicNumber = 0x07230203;
|
static const unsigned int MagicNumber = 0x07230203;
|
||||||
static const unsigned int Version = 0x00010000;
|
static const unsigned int Version = 0x00010000;
|
||||||
static const unsigned int Revision = 3;
|
static const unsigned int Revision = 6;
|
||||||
static const unsigned int OpCodeMask = 0xffff;
|
static const unsigned int OpCodeMask = 0xffff;
|
||||||
static const unsigned int WordCountShift = 16;
|
static const unsigned int WordCountShift = 16;
|
||||||
|
|
||||||
@ -62,6 +62,7 @@ enum SourceLanguage {
|
|||||||
SourceLanguageOpenCL_C = 3,
|
SourceLanguageOpenCL_C = 3,
|
||||||
SourceLanguageOpenCL_CPP = 4,
|
SourceLanguageOpenCL_CPP = 4,
|
||||||
SourceLanguageHLSL = 5,
|
SourceLanguageHLSL = 5,
|
||||||
|
SourceLanguageMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ExecutionModel {
|
enum ExecutionModel {
|
||||||
@ -72,18 +73,21 @@ enum ExecutionModel {
|
|||||||
ExecutionModelFragment = 4,
|
ExecutionModelFragment = 4,
|
||||||
ExecutionModelGLCompute = 5,
|
ExecutionModelGLCompute = 5,
|
||||||
ExecutionModelKernel = 6,
|
ExecutionModelKernel = 6,
|
||||||
|
ExecutionModelMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum AddressingModel {
|
enum AddressingModel {
|
||||||
AddressingModelLogical = 0,
|
AddressingModelLogical = 0,
|
||||||
AddressingModelPhysical32 = 1,
|
AddressingModelPhysical32 = 1,
|
||||||
AddressingModelPhysical64 = 2,
|
AddressingModelPhysical64 = 2,
|
||||||
|
AddressingModelMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum MemoryModel {
|
enum MemoryModel {
|
||||||
MemoryModelSimple = 0,
|
MemoryModelSimple = 0,
|
||||||
MemoryModelGLSL450 = 1,
|
MemoryModelGLSL450 = 1,
|
||||||
MemoryModelOpenCL = 2,
|
MemoryModelOpenCL = 2,
|
||||||
|
MemoryModelMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ExecutionMode {
|
enum ExecutionMode {
|
||||||
@ -118,6 +122,7 @@ enum ExecutionMode {
|
|||||||
ExecutionModeOutputTriangleStrip = 29,
|
ExecutionModeOutputTriangleStrip = 29,
|
||||||
ExecutionModeVecTypeHint = 30,
|
ExecutionModeVecTypeHint = 30,
|
||||||
ExecutionModeContractionOff = 31,
|
ExecutionModeContractionOff = 31,
|
||||||
|
ExecutionModeMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum StorageClass {
|
enum StorageClass {
|
||||||
@ -133,6 +138,7 @@ enum StorageClass {
|
|||||||
StorageClassPushConstant = 9,
|
StorageClassPushConstant = 9,
|
||||||
StorageClassAtomicCounter = 10,
|
StorageClassAtomicCounter = 10,
|
||||||
StorageClassImage = 11,
|
StorageClassImage = 11,
|
||||||
|
StorageClassMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Dim {
|
enum Dim {
|
||||||
@ -143,6 +149,7 @@ enum Dim {
|
|||||||
DimRect = 4,
|
DimRect = 4,
|
||||||
DimBuffer = 5,
|
DimBuffer = 5,
|
||||||
DimSubpassData = 6,
|
DimSubpassData = 6,
|
||||||
|
DimMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum SamplerAddressingMode {
|
enum SamplerAddressingMode {
|
||||||
@ -151,11 +158,13 @@ enum SamplerAddressingMode {
|
|||||||
SamplerAddressingModeClamp = 2,
|
SamplerAddressingModeClamp = 2,
|
||||||
SamplerAddressingModeRepeat = 3,
|
SamplerAddressingModeRepeat = 3,
|
||||||
SamplerAddressingModeRepeatMirrored = 4,
|
SamplerAddressingModeRepeatMirrored = 4,
|
||||||
|
SamplerAddressingModeMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum SamplerFilterMode {
|
enum SamplerFilterMode {
|
||||||
SamplerFilterModeNearest = 0,
|
SamplerFilterModeNearest = 0,
|
||||||
SamplerFilterModeLinear = 1,
|
SamplerFilterModeLinear = 1,
|
||||||
|
SamplerFilterModeMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ImageFormat {
|
enum ImageFormat {
|
||||||
@ -199,6 +208,7 @@ enum ImageFormat {
|
|||||||
ImageFormatRg8ui = 37,
|
ImageFormatRg8ui = 37,
|
||||||
ImageFormatR16ui = 38,
|
ImageFormatR16ui = 38,
|
||||||
ImageFormatR8ui = 39,
|
ImageFormatR8ui = 39,
|
||||||
|
ImageFormatMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ImageChannelOrder {
|
enum ImageChannelOrder {
|
||||||
@ -221,6 +231,8 @@ enum ImageChannelOrder {
|
|||||||
ImageChannelOrdersRGBx = 16,
|
ImageChannelOrdersRGBx = 16,
|
||||||
ImageChannelOrdersRGBA = 17,
|
ImageChannelOrdersRGBA = 17,
|
||||||
ImageChannelOrdersBGRA = 18,
|
ImageChannelOrdersBGRA = 18,
|
||||||
|
ImageChannelOrderABGR = 19,
|
||||||
|
ImageChannelOrderMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ImageChannelDataType {
|
enum ImageChannelDataType {
|
||||||
@ -241,6 +253,7 @@ enum ImageChannelDataType {
|
|||||||
ImageChannelDataTypeFloat = 14,
|
ImageChannelDataTypeFloat = 14,
|
||||||
ImageChannelDataTypeUnormInt24 = 15,
|
ImageChannelDataTypeUnormInt24 = 15,
|
||||||
ImageChannelDataTypeUnormInt101010_2 = 16,
|
ImageChannelDataTypeUnormInt101010_2 = 16,
|
||||||
|
ImageChannelDataTypeMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ImageOperandsShift {
|
enum ImageOperandsShift {
|
||||||
@ -252,6 +265,7 @@ enum ImageOperandsShift {
|
|||||||
ImageOperandsConstOffsetsShift = 5,
|
ImageOperandsConstOffsetsShift = 5,
|
||||||
ImageOperandsSampleShift = 6,
|
ImageOperandsSampleShift = 6,
|
||||||
ImageOperandsMinLodShift = 7,
|
ImageOperandsMinLodShift = 7,
|
||||||
|
ImageOperandsMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ImageOperandsMask {
|
enum ImageOperandsMask {
|
||||||
@ -272,6 +286,7 @@ enum FPFastMathModeShift {
|
|||||||
FPFastMathModeNSZShift = 2,
|
FPFastMathModeNSZShift = 2,
|
||||||
FPFastMathModeAllowRecipShift = 3,
|
FPFastMathModeAllowRecipShift = 3,
|
||||||
FPFastMathModeFastShift = 4,
|
FPFastMathModeFastShift = 4,
|
||||||
|
FPFastMathModeMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum FPFastMathModeMask {
|
enum FPFastMathModeMask {
|
||||||
@ -288,17 +303,20 @@ enum FPRoundingMode {
|
|||||||
FPRoundingModeRTZ = 1,
|
FPRoundingModeRTZ = 1,
|
||||||
FPRoundingModeRTP = 2,
|
FPRoundingModeRTP = 2,
|
||||||
FPRoundingModeRTN = 3,
|
FPRoundingModeRTN = 3,
|
||||||
|
FPRoundingModeMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum LinkageType {
|
enum LinkageType {
|
||||||
LinkageTypeExport = 0,
|
LinkageTypeExport = 0,
|
||||||
LinkageTypeImport = 1,
|
LinkageTypeImport = 1,
|
||||||
|
LinkageTypeMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum AccessQualifier {
|
enum AccessQualifier {
|
||||||
AccessQualifierReadOnly = 0,
|
AccessQualifierReadOnly = 0,
|
||||||
AccessQualifierWriteOnly = 1,
|
AccessQualifierWriteOnly = 1,
|
||||||
AccessQualifierReadWrite = 2,
|
AccessQualifierReadWrite = 2,
|
||||||
|
AccessQualifierMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum FunctionParameterAttribute {
|
enum FunctionParameterAttribute {
|
||||||
@ -310,6 +328,7 @@ enum FunctionParameterAttribute {
|
|||||||
FunctionParameterAttributeNoCapture = 5,
|
FunctionParameterAttributeNoCapture = 5,
|
||||||
FunctionParameterAttributeNoWrite = 6,
|
FunctionParameterAttributeNoWrite = 6,
|
||||||
FunctionParameterAttributeNoReadWrite = 7,
|
FunctionParameterAttributeNoReadWrite = 7,
|
||||||
|
FunctionParameterAttributeMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Decoration {
|
enum Decoration {
|
||||||
@ -356,6 +375,7 @@ enum Decoration {
|
|||||||
DecorationNoContraction = 42,
|
DecorationNoContraction = 42,
|
||||||
DecorationInputAttachmentIndex = 43,
|
DecorationInputAttachmentIndex = 43,
|
||||||
DecorationAlignment = 44,
|
DecorationAlignment = 44,
|
||||||
|
DecorationMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum BuiltIn {
|
enum BuiltIn {
|
||||||
@ -400,11 +420,13 @@ enum BuiltIn {
|
|||||||
BuiltInSubgroupLocalInvocationId = 41,
|
BuiltInSubgroupLocalInvocationId = 41,
|
||||||
BuiltInVertexIndex = 42,
|
BuiltInVertexIndex = 42,
|
||||||
BuiltInInstanceIndex = 43,
|
BuiltInInstanceIndex = 43,
|
||||||
|
BuiltInMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum SelectionControlShift {
|
enum SelectionControlShift {
|
||||||
SelectionControlFlattenShift = 0,
|
SelectionControlFlattenShift = 0,
|
||||||
SelectionControlDontFlattenShift = 1,
|
SelectionControlDontFlattenShift = 1,
|
||||||
|
SelectionControlMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum SelectionControlMask {
|
enum SelectionControlMask {
|
||||||
@ -416,6 +438,7 @@ enum SelectionControlMask {
|
|||||||
enum LoopControlShift {
|
enum LoopControlShift {
|
||||||
LoopControlUnrollShift = 0,
|
LoopControlUnrollShift = 0,
|
||||||
LoopControlDontUnrollShift = 1,
|
LoopControlDontUnrollShift = 1,
|
||||||
|
LoopControlMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum LoopControlMask {
|
enum LoopControlMask {
|
||||||
@ -429,6 +452,7 @@ enum FunctionControlShift {
|
|||||||
FunctionControlDontInlineShift = 1,
|
FunctionControlDontInlineShift = 1,
|
||||||
FunctionControlPureShift = 2,
|
FunctionControlPureShift = 2,
|
||||||
FunctionControlConstShift = 3,
|
FunctionControlConstShift = 3,
|
||||||
|
FunctionControlMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum FunctionControlMask {
|
enum FunctionControlMask {
|
||||||
@ -450,6 +474,7 @@ enum MemorySemanticsShift {
|
|||||||
MemorySemanticsCrossWorkgroupMemoryShift = 9,
|
MemorySemanticsCrossWorkgroupMemoryShift = 9,
|
||||||
MemorySemanticsAtomicCounterMemoryShift = 10,
|
MemorySemanticsAtomicCounterMemoryShift = 10,
|
||||||
MemorySemanticsImageMemoryShift = 11,
|
MemorySemanticsImageMemoryShift = 11,
|
||||||
|
MemorySemanticsMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum MemorySemanticsMask {
|
enum MemorySemanticsMask {
|
||||||
@ -470,6 +495,7 @@ enum MemoryAccessShift {
|
|||||||
MemoryAccessVolatileShift = 0,
|
MemoryAccessVolatileShift = 0,
|
||||||
MemoryAccessAlignedShift = 1,
|
MemoryAccessAlignedShift = 1,
|
||||||
MemoryAccessNontemporalShift = 2,
|
MemoryAccessNontemporalShift = 2,
|
||||||
|
MemoryAccessMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum MemoryAccessMask {
|
enum MemoryAccessMask {
|
||||||
@ -485,22 +511,26 @@ enum Scope {
|
|||||||
ScopeWorkgroup = 2,
|
ScopeWorkgroup = 2,
|
||||||
ScopeSubgroup = 3,
|
ScopeSubgroup = 3,
|
||||||
ScopeInvocation = 4,
|
ScopeInvocation = 4,
|
||||||
|
ScopeMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum GroupOperation {
|
enum GroupOperation {
|
||||||
GroupOperationReduce = 0,
|
GroupOperationReduce = 0,
|
||||||
GroupOperationInclusiveScan = 1,
|
GroupOperationInclusiveScan = 1,
|
||||||
GroupOperationExclusiveScan = 2,
|
GroupOperationExclusiveScan = 2,
|
||||||
|
GroupOperationMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum KernelEnqueueFlags {
|
enum KernelEnqueueFlags {
|
||||||
KernelEnqueueFlagsNoWait = 0,
|
KernelEnqueueFlagsNoWait = 0,
|
||||||
KernelEnqueueFlagsWaitKernel = 1,
|
KernelEnqueueFlagsWaitKernel = 1,
|
||||||
KernelEnqueueFlagsWaitWorkGroup = 2,
|
KernelEnqueueFlagsWaitWorkGroup = 2,
|
||||||
|
KernelEnqueueFlagsMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum KernelProfilingInfoShift {
|
enum KernelProfilingInfoShift {
|
||||||
KernelProfilingInfoCmdExecTimeShift = 0,
|
KernelProfilingInfoCmdExecTimeShift = 0,
|
||||||
|
KernelProfilingInfoMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum KernelProfilingInfoMask {
|
enum KernelProfilingInfoMask {
|
||||||
@ -565,6 +595,7 @@ enum Capability {
|
|||||||
CapabilityStorageImageReadWithoutFormat = 55,
|
CapabilityStorageImageReadWithoutFormat = 55,
|
||||||
CapabilityStorageImageWriteWithoutFormat = 56,
|
CapabilityStorageImageWriteWithoutFormat = 56,
|
||||||
CapabilityMultiViewport = 57,
|
CapabilityMultiViewport = 57,
|
||||||
|
CapabilityMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Op {
|
enum Op {
|
||||||
@ -862,6 +893,7 @@ enum Op {
|
|||||||
OpAtomicFlagTestAndSet = 318,
|
OpAtomicFlagTestAndSet = 318,
|
||||||
OpAtomicFlagClear = 319,
|
OpAtomicFlagClear = 319,
|
||||||
OpImageSparseRead = 320,
|
OpImageSparseRead = 320,
|
||||||
|
OpMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Overload operator| for mask bit combining
|
// Overload operator| for mask bit combining
|
||||||
@ -878,3 +910,4 @@ inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfil
|
|||||||
} // end namespace spv
|
} // end namespace spv
|
||||||
|
|
||||||
#endif // #ifndef spirv_HPP
|
#endif // #ifndef spirv_HPP
|
||||||
|
|
||||||
|
@ -64,8 +64,7 @@ class Module;
|
|||||||
const Id NoResult = 0;
|
const Id NoResult = 0;
|
||||||
const Id NoType = 0;
|
const Id NoType = 0;
|
||||||
|
|
||||||
const unsigned int BadValue = 0xFFFFFFFF;
|
const Decoration NoPrecision = DecorationMax;
|
||||||
const Decoration NoPrecision = (Decoration)BadValue;
|
|
||||||
const MemorySemanticsMask MemorySemanticsAllMemory =
|
const MemorySemanticsMask MemorySemanticsAllMemory =
|
||||||
(MemorySemanticsMask)(MemorySemanticsSequentiallyConsistentMask |
|
(MemorySemanticsMask)(MemorySemanticsSequentiallyConsistentMask |
|
||||||
MemorySemanticsUniformMemoryMask |
|
MemorySemanticsUniformMemoryMask |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user