SPV: Implement Vulkan 1.1 features and extensions.

This commit is contained in:
John Kessenich
2018-03-06 16:12:04 -07:00
parent b2ae1d0521
commit 66011cb2c2
121 changed files with 51726 additions and 7500 deletions

1018
SPIRV/GlslangToSpv.cpp Executable file → Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -256,7 +256,7 @@ namespace spv {
spv::Id spirvbin_t::localId(spv::Id id, spv::Id newId)
{
assert(id != spv::NoResult && newId != spv::NoResult);
//assert(id != spv::NoResult && newId != spv::NoResult);
if (id > bound()) {
error(std::string("ID out of range: ") + std::to_string(id));

View File

@@ -46,9 +46,7 @@
#include "SpvBuilder.h"
#ifdef AMD_EXTENSIONS
#include "hex_float.h"
#endif
#include "hex_float.h"
#ifndef _WIN32
#include <cstdio>
@@ -194,6 +192,9 @@ Id Builder::makeIntegerType(int width, bool hasSign)
// deal with capabilities
switch (width) {
case 8:
addCapability(CapabilityInt8);
break;
case 16:
addCapability(CapabilityInt16);
break;
@@ -819,7 +820,6 @@ Id Builder::makeDoubleConstant(double d, bool specConstant)
return c->getResultId();
}
#ifdef AMD_EXTENSIONS
Id Builder::makeFloat16Constant(float f16, bool specConstant)
{
Op opcode = specConstant ? OpSpecConstant : OpConstant;
@@ -847,7 +847,6 @@ Id Builder::makeFloat16Constant(float f16, bool specConstant)
return c->getResultId();
}
#endif
Id Builder::findCompositeConstant(Op typeClass, const std::vector<Id>& comps)
{

View File

@@ -1,6 +1,7 @@
//
// Copyright (C) 2014-2015 LunarG, Inc.
// Copyright (C) 2015-2016 Google, Inc.
// Copyright (C) 2017 ARM Limited.
//
// All rights reserved.
//
@@ -66,6 +67,8 @@ public:
static const int maxMatrixSize = 4;
unsigned int getSpvVersion() const { return spvVersion; }
void setSource(spv::SourceLanguage lang, int version)
{
source = lang;
@@ -212,19 +215,17 @@ public:
// For making new constants (will return old constant if the requested one was already made).
Id makeBoolConstant(bool b, bool specConstant = false);
Id makeInt8Constant(int i, bool specConstant = false) { return makeIntConstant(makeIntType(8), (unsigned)i, specConstant); }
Id makeUint8Constant(unsigned u, bool specConstant = false) { return makeIntConstant(makeUintType(8), u, specConstant); }
Id makeInt16Constant(int i, bool specConstant = false) { return makeIntConstant(makeIntType(16), (unsigned)i, specConstant); }
Id makeUint16Constant(unsigned u, bool specConstant = false) { return makeIntConstant(makeUintType(16), u, specConstant); }
Id makeIntConstant(int i, bool specConstant = false) { return makeIntConstant(makeIntType(32), (unsigned)i, specConstant); }
Id makeUintConstant(unsigned u, bool specConstant = false) { return makeIntConstant(makeUintType(32), u, specConstant); }
Id makeInt64Constant(long long i, bool specConstant = false) { return makeInt64Constant(makeIntType(64), (unsigned long long)i, specConstant); }
Id makeUint64Constant(unsigned long long u, bool specConstant = false) { return makeInt64Constant(makeUintType(64), u, specConstant); }
#ifdef AMD_EXTENSIONS
Id makeInt16Constant(short i, bool specConstant = false) { return makeIntConstant(makeIntType(16), (unsigned)((unsigned short)i), specConstant); }
Id makeUint16Constant(unsigned short u, bool specConstant = false) { return makeIntConstant(makeUintType(16), (unsigned)u, specConstant); }
#endif
Id makeFloatConstant(float f, bool specConstant = false);
Id makeDoubleConstant(double d, bool specConstant = false);
#ifdef AMD_EXTENSIONS
Id makeFloat16Constant(float f16, bool specConstant = false);
#endif
// Turn the array of constants into a proper spv constant of the requested type.
Id makeCompositeConstant(Id type, const std::vector<Id>& comps, bool specConst = false);
@@ -331,7 +332,7 @@ public:
// Generally, the type of 'scalar' does not need to be the same type as the components in 'vector'.
// The type of the created vector is a vector of components of the same type as the scalar.
//
// Note: One of the arguments will change, with the result coming back that way rather than
// Note: One of the arguments will change, with the result coming back that way rather than
// through the return value.
void promoteScalar(Decoration precision, Id& left, Id& right);

View File

@@ -54,6 +54,7 @@ namespace spv {
#ifdef AMD_EXTENSIONS
#include "GLSL.ext.AMD.h"
#endif
#ifdef NV_EXTENSIONS
#include "GLSL.ext.NV.h"
#endif
@@ -80,12 +81,15 @@ static void Kill(std::ostream& out, const char* message)
// used to identify the extended instruction library imported when printing
enum ExtInstSet {
GLSL450Inst,
#ifdef AMD_EXTENSIONS
GLSLextAMDInst,
#endif
#ifdef NV_EXTENSIONS
GLSLextNVInst,
#endif
OpenCLExtInst,
};
@@ -653,7 +657,6 @@ static const char* GLSLextAMDGetDebugNames(const char* name, unsigned entrypoint
}
#endif
#ifdef NV_EXTENSIONS
static const char* GLSLextNVGetDebugNames(const char* name, unsigned entrypoint)
{

222
SPIRV/doc.cpp Executable file → Normal file
View File

@@ -725,7 +725,7 @@ const char* ScopeString(int mem)
}
}
const int GroupOperationCeiling = 3;
const int GroupOperationCeiling = 4;
const char* GroupOperationString(int gop)
{
@@ -735,6 +735,7 @@ const char* GroupOperationString(int gop)
case 0: return "Reduce";
case 1: return "InclusiveScan";
case 2: return "ExclusiveScan";
case 3: return "ClusteredReduce";
case GroupOperationCeiling:
default: return "Bad";
@@ -833,6 +834,14 @@ const char* CapabilityString(int info)
case 55: return "StorageImageReadWithoutFormat";
case 56: return "StorageImageWriteWithoutFormat";
case 57: return "MultiViewport";
case 61: return "GroupNonUniform";
case 62: return "GroupNonUniformVote";
case 63: return "GroupNonUniformArithmetic";
case 64: return "GroupNonUniformBallot";
case 65: return "GroupNonUniformShuffle";
case 66: return "GroupNonUniformShuffleRelative";
case 67: return "GroupNonUniformClustered";
case 68: return "GroupNonUniformQuad";
case 4423: return "SubgroupBallotKHR";
case 4427: return "DrawParameters";
@@ -1200,6 +1209,41 @@ const char* OpcodeString(int op)
case OpModuleProcessed: return "OpModuleProcessed";
case 333: return "OpGroupNonUniformElect";
case 334: return "OpGroupNonUniformAll";
case 335: return "OpGroupNonUniformAny";
case 336: return "OpGroupNonUniformAllEqual";
case 337: return "OpGroupNonUniformBroadcast";
case 338: return "OpGroupNonUniformBroadcastFirst";
case 339: return "OpGroupNonUniformBallot";
case 340: return "OpGroupNonUniformInverseBallot";
case 341: return "OpGroupNonUniformBallotBitExtract";
case 342: return "OpGroupNonUniformBallotBitCount";
case 343: return "OpGroupNonUniformBallotFindLSB";
case 344: return "OpGroupNonUniformBallotFindMSB";
case 345: return "OpGroupNonUniformShuffle";
case 346: return "OpGroupNonUniformShuffleXor";
case 347: return "OpGroupNonUniformShuffleUp";
case 348: return "OpGroupNonUniformShuffleDown";
case 349: return "OpGroupNonUniformIAdd";
case 350: return "OpGroupNonUniformFAdd";
case 351: return "OpGroupNonUniformIMul";
case 352: return "OpGroupNonUniformFMul";
case 353: return "OpGroupNonUniformSMin";
case 354: return "OpGroupNonUniformUMin";
case 355: return "OpGroupNonUniformFMin";
case 356: return "OpGroupNonUniformSMax";
case 357: return "OpGroupNonUniformUMax";
case 358: return "OpGroupNonUniformFMax";
case 359: return "OpGroupNonUniformBitwiseAnd";
case 360: return "OpGroupNonUniformBitwiseOr";
case 361: return "OpGroupNonUniformBitwiseXor";
case 362: return "OpGroupNonUniformLogicalAnd";
case 363: return "OpGroupNonUniformLogicalOr";
case 364: return "OpGroupNonUniformLogicalXor";
case 365: return "OpGroupNonUniformQuadBroadcast";
case 366: return "OpGroupNonUniformQuadSwap";
case 4421: return "OpSubgroupBallotKHR";
case 4422: return "OpSubgroupFirstInvocationKHR";
case 4428: return "OpSubgroupAllKHR";
@@ -2823,6 +2867,182 @@ void Parameterize()
InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Wait Events'");
InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Ret Event'");
InstructionDesc[OpGroupNonUniformElect].capabilities.push_back(CapabilityGroupNonUniform);
InstructionDesc[OpGroupNonUniformElect].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformAll].capabilities.push_back(CapabilityGroupNonUniformVote);
InstructionDesc[OpGroupNonUniformAll].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformAll].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformAny].capabilities.push_back(CapabilityGroupNonUniformVote);
InstructionDesc[OpGroupNonUniformAny].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformAny].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformAllEqual].capabilities.push_back(CapabilityGroupNonUniformVote);
InstructionDesc[OpGroupNonUniformAllEqual].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformAllEqual].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformBroadcast].capabilities.push_back(CapabilityGroupNonUniformBallot);
InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandId, "ID");
InstructionDesc[OpGroupNonUniformBroadcastFirst].capabilities.push_back(CapabilityGroupNonUniformBallot);
InstructionDesc[OpGroupNonUniformBroadcastFirst].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformBroadcastFirst].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformBallot].capabilities.push_back(CapabilityGroupNonUniformBallot);
InstructionDesc[OpGroupNonUniformBallot].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformBallot].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformInverseBallot].capabilities.push_back(CapabilityGroupNonUniformBallot);
InstructionDesc[OpGroupNonUniformInverseBallot].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformInverseBallot].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformBallotBitExtract].capabilities.push_back(CapabilityGroupNonUniformBallot);
InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandId, "Bit");
InstructionDesc[OpGroupNonUniformBallotBitCount].capabilities.push_back(CapabilityGroupNonUniformBallot);
InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformBallotFindLSB].capabilities.push_back(CapabilityGroupNonUniformBallot);
InstructionDesc[OpGroupNonUniformBallotFindLSB].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformBallotFindLSB].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformBallotFindMSB].capabilities.push_back(CapabilityGroupNonUniformBallot);
InstructionDesc[OpGroupNonUniformBallotFindMSB].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformBallotFindMSB].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformShuffle].capabilities.push_back(CapabilityGroupNonUniformShuffle);
InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandId, "'Id'");
InstructionDesc[OpGroupNonUniformShuffleXor].capabilities.push_back(CapabilityGroupNonUniformShuffle);
InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandId, "Mask");
InstructionDesc[OpGroupNonUniformShuffleUp].capabilities.push_back(CapabilityGroupNonUniformShuffleRelative);
InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandId, "Offset");
InstructionDesc[OpGroupNonUniformShuffleDown].capabilities.push_back(CapabilityGroupNonUniformShuffleRelative);
InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandId, "Offset");
InstructionDesc[OpGroupNonUniformIAdd].capabilities.push_back(CapabilityGroupNonUniformArithmetic);
InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandId, "'ClusterSize'", true);
InstructionDesc[OpGroupNonUniformFAdd].capabilities.push_back(CapabilityGroupNonUniformArithmetic);
InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandId, "'ClusterSize'", true);
InstructionDesc[OpGroupNonUniformIMul].capabilities.push_back(CapabilityGroupNonUniformArithmetic);
InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandId, "'ClusterSize'", true);
InstructionDesc[OpGroupNonUniformFMul].capabilities.push_back(CapabilityGroupNonUniformArithmetic);
InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandId, "'ClusterSize'", true);
InstructionDesc[OpGroupNonUniformSMin].capabilities.push_back(CapabilityGroupNonUniformArithmetic);
InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandId, "'ClusterSize'", true);
InstructionDesc[OpGroupNonUniformUMin].capabilities.push_back(CapabilityGroupNonUniformArithmetic);
InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandId, "'ClusterSize'", true);
InstructionDesc[OpGroupNonUniformFMin].capabilities.push_back(CapabilityGroupNonUniformArithmetic);
InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandId, "'ClusterSize'", true);
InstructionDesc[OpGroupNonUniformSMax].capabilities.push_back(CapabilityGroupNonUniformArithmetic);
InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandId, "'ClusterSize'", true);
InstructionDesc[OpGroupNonUniformUMax].capabilities.push_back(CapabilityGroupNonUniformArithmetic);
InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandId, "'ClusterSize'", true);
InstructionDesc[OpGroupNonUniformFMax].capabilities.push_back(CapabilityGroupNonUniformArithmetic);
InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandId, "'ClusterSize'", true);
InstructionDesc[OpGroupNonUniformBitwiseAnd].capabilities.push_back(CapabilityGroupNonUniformArithmetic);
InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandId, "'ClusterSize'", true);
InstructionDesc[OpGroupNonUniformBitwiseOr].capabilities.push_back(CapabilityGroupNonUniformArithmetic);
InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandId, "'ClusterSize'", true);
InstructionDesc[OpGroupNonUniformBitwiseXor].capabilities.push_back(CapabilityGroupNonUniformArithmetic);
InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandId, "'ClusterSize'", true);
InstructionDesc[OpGroupNonUniformLogicalAnd].capabilities.push_back(CapabilityGroupNonUniformArithmetic);
InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandId, "'ClusterSize'", true);
InstructionDesc[OpGroupNonUniformLogicalOr].capabilities.push_back(CapabilityGroupNonUniformArithmetic);
InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandId, "'ClusterSize'", true);
InstructionDesc[OpGroupNonUniformLogicalXor].capabilities.push_back(CapabilityGroupNonUniformArithmetic);
InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandGroupOperation, "'Operation'");
InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandId, "'ClusterSize'", true);
InstructionDesc[OpGroupNonUniformQuadBroadcast].capabilities.push_back(CapabilityGroupNonUniformQuad);
InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandId, "'Id'");
InstructionDesc[OpGroupNonUniformQuadSwap].capabilities.push_back(CapabilityGroupNonUniformQuad);
InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandId, "X");
InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandLiteralNumber, "'Direction'");
InstructionDesc[OpSubgroupBallotKHR].operands.push(OperandId, "'Predicate'");
InstructionDesc[OpSubgroupFirstInvocationKHR].operands.push(OperandId, "'Value'");

View File

@@ -46,12 +46,12 @@ namespace spv {
typedef unsigned int Id;
#define SPV_VERSION 0x10200
#define SPV_REVISION 3
#define SPV_VERSION 0x10300
#define SPV_REVISION 1
static const unsigned int MagicNumber = 0x07230203;
static const unsigned int Version = 0x00010200;
static const unsigned int Revision = 3;
static const unsigned int Version = 0x00010300;
static const unsigned int Revision = 1;
static const unsigned int OpCodeMask = 0xffff;
static const unsigned int WordCountShift = 16;
@@ -440,10 +440,15 @@ enum BuiltIn {
BuiltInSubgroupLocalInvocationId = 41,
BuiltInVertexIndex = 42,
BuiltInInstanceIndex = 43,
BuiltInSubgroupEqMask = 4416,
BuiltInSubgroupEqMaskKHR = 4416,
BuiltInSubgroupGeMask = 4417,
BuiltInSubgroupGeMaskKHR = 4417,
BuiltInSubgroupGtMask = 4418,
BuiltInSubgroupGtMaskKHR = 4418,
BuiltInSubgroupLeMask = 4419,
BuiltInSubgroupLeMaskKHR = 4419,
BuiltInSubgroupLtMask = 4420,
BuiltInSubgroupLtMaskKHR = 4420,
BuiltInBaseVertex = 4424,
BuiltInBaseInstance = 4425,
@@ -566,6 +571,7 @@ enum GroupOperation {
GroupOperationReduce = 0,
GroupOperationInclusiveScan = 1,
GroupOperationExclusiveScan = 2,
GroupOperationClusteredReduce = 3,
GroupOperationMax = 0x7fffffff,
};
@@ -646,6 +652,14 @@ enum Capability {
CapabilitySubgroupDispatch = 58,
CapabilityNamedBarrier = 59,
CapabilityPipeStorage = 60,
CapabilityGroupNonUniform = 61,
CapabilityGroupNonUniformVote = 62,
CapabilityGroupNonUniformArithmetic = 63,
CapabilityGroupNonUniformBallot = 64,
CapabilityGroupNonUniformShuffle = 65,
CapabilityGroupNonUniformShuffleRelative = 66,
CapabilityGroupNonUniformClustered = 67,
CapabilityGroupNonUniformQuad = 68,
CapabilitySubgroupBallotKHR = 4423,
CapabilityDrawParameters = 4427,
CapabilitySubgroupVoteKHR = 4431,
@@ -987,6 +1001,40 @@ enum Op {
OpModuleProcessed = 330,
OpExecutionModeId = 331,
OpDecorateId = 332,
OpGroupNonUniformElect = 333,
OpGroupNonUniformAll = 334,
OpGroupNonUniformAny = 335,
OpGroupNonUniformAllEqual = 336,
OpGroupNonUniformBroadcast = 337,
OpGroupNonUniformBroadcastFirst = 338,
OpGroupNonUniformBallot = 339,
OpGroupNonUniformInverseBallot = 340,
OpGroupNonUniformBallotBitExtract = 341,
OpGroupNonUniformBallotBitCount = 342,
OpGroupNonUniformBallotFindLSB = 343,
OpGroupNonUniformBallotFindMSB = 344,
OpGroupNonUniformShuffle = 345,
OpGroupNonUniformShuffleXor = 346,
OpGroupNonUniformShuffleUp = 347,
OpGroupNonUniformShuffleDown = 348,
OpGroupNonUniformIAdd = 349,
OpGroupNonUniformFAdd = 350,
OpGroupNonUniformIMul = 351,
OpGroupNonUniformFMul = 352,
OpGroupNonUniformSMin = 353,
OpGroupNonUniformUMin = 354,
OpGroupNonUniformFMin = 355,
OpGroupNonUniformSMax = 356,
OpGroupNonUniformUMax = 357,
OpGroupNonUniformFMax = 358,
OpGroupNonUniformBitwiseAnd = 359,
OpGroupNonUniformBitwiseOr = 360,
OpGroupNonUniformBitwiseXor = 361,
OpGroupNonUniformLogicalAnd = 362,
OpGroupNonUniformLogicalOr = 363,
OpGroupNonUniformLogicalXor = 364,
OpGroupNonUniformQuadBroadcast = 365,
OpGroupNonUniformQuadSwap = 366,
OpSubgroupBallotKHR = 4421,
OpSubgroupFirstInvocationKHR = 4422,
OpSubgroupAllKHR = 4428,