Commit 70e057a4 by John Kessenich

Merge branch GitHub 'master' into GitLab master

parents 3863412e 863aa667
...@@ -2954,7 +2954,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: ...@@ -2954,7 +2954,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
spv::Op opCode = spv::OpNop; spv::Op opCode = spv::OpNop;
int libCall = -1; int libCall = -1;
int consumedOperands = operands.size(); size_t consumedOperands = operands.size();
spv::Id typeId0 = 0; spv::Id typeId0 = 0;
if (consumedOperands > 0) if (consumedOperands > 0)
typeId0 = builder.getTypeId(operands[0]); typeId0 = builder.getTypeId(operands[0]);
......
...@@ -1365,7 +1365,7 @@ Id Builder::createTextureQueryCall(Op opCode, const TextureParameters& parameter ...@@ -1365,7 +1365,7 @@ Id Builder::createTextureQueryCall(Op opCode, const TextureParameters& parameter
case OpImageQuerySize: case OpImageQuerySize:
case OpImageQuerySizeLod: case OpImageQuerySizeLod:
{ {
int numComponents; int numComponents = 0;
switch (getTypeDimensionality(getImageType(parameters.sampler))) { switch (getTypeDimensionality(getImageType(parameters.sampler))) {
case Dim1D: case Dim1D:
case DimBuffer: case DimBuffer:
......
// Copyright (c) 2014-2015 The Khronos Group Inc. // Copyright (c) 2014-2015 The Khronos Group Inc.
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and/or associated documentation files (the "Materials"), // of this software and/or associated documentation files (the "Materials"),
// to deal in the Materials without restriction, including without limitation // to deal in the Materials without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense, // the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Materials, and to permit persons to whom the // and/or sell copies of the Materials, and to permit persons to whom the
// Materials are furnished to do so, subject to the following conditions: // Materials are furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in // The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Materials. // all copies or substantial portions of the Materials.
// //
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS // MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND // STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ // HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
// //
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS // FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
// IN THE MATERIALS. // IN THE MATERIALS.
// This header is automatically generated by the same tool that creates // This header is automatically generated by the same tool that creates
// the Binary Section of the SPIR-V specification. // the Binary Section of the SPIR-V specification.
// Enumeration tokens for SPIR-V, in various styles: // Enumeration tokens for SPIR-V, in various styles:
// C, C++, C++11, JSON, Lua, Python // C, C++, C++11, JSON, Lua, Python
// //
// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL // - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL
// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL // - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL
// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL // - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL
// - Lua will use tables, e.g.: spv.SourceLanguage.GLSL // - Lua will use tables, e.g.: spv.SourceLanguage.GLSL
// - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL'] // - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL']
// //
// Some tokens act like mask values, which can be OR'd together, // Some tokens act like mask values, which can be OR'd together,
// while others are mutually exclusive. The mask-like ones have // while others are mutually exclusive. The mask-like ones have
// "Mask" in their name, and a parallel enum that has the shift // "Mask" in their name, and a parallel enum that has the shift
// amount (1 << x) for each corresponding enumerant. // amount (1 << x) for each corresponding enumerant.
#ifndef spirv_H #ifndef spirv_H
#define spirv_H #define spirv_H
namespace spv { namespace spv {
typedef unsigned int Id; typedef unsigned int Id;
#define SPV_VERSION 10000 #define SPV_VERSION 10000
#define SPV_REVISION 2 #define SPV_REVISION 2
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 = 2; static const unsigned int Revision = 2;
static const unsigned int OpCodeMask = 0xffff; static const unsigned int OpCodeMask = 0xffff;
static const unsigned int WordCountShift = 16; static const unsigned int WordCountShift = 16;
enum SourceLanguage { enum SourceLanguage {
SourceLanguageUnknown = 0, SourceLanguageUnknown = 0,
SourceLanguageESSL = 1, SourceLanguageESSL = 1,
SourceLanguageGLSL = 2, SourceLanguageGLSL = 2,
SourceLanguageOpenCL_C = 3, SourceLanguageOpenCL_C = 3,
SourceLanguageOpenCL_CPP = 4, SourceLanguageOpenCL_CPP = 4,
}; };
enum ExecutionModel { enum ExecutionModel {
ExecutionModelVertex = 0, ExecutionModelVertex = 0,
ExecutionModelTessellationControl = 1, ExecutionModelTessellationControl = 1,
ExecutionModelTessellationEvaluation = 2, ExecutionModelTessellationEvaluation = 2,
ExecutionModelGeometry = 3, ExecutionModelGeometry = 3,
ExecutionModelFragment = 4, ExecutionModelFragment = 4,
ExecutionModelGLCompute = 5, ExecutionModelGLCompute = 5,
ExecutionModelKernel = 6, ExecutionModelKernel = 6,
}; };
enum AddressingModel { enum AddressingModel {
AddressingModelLogical = 0, AddressingModelLogical = 0,
AddressingModelPhysical32 = 1, AddressingModelPhysical32 = 1,
AddressingModelPhysical64 = 2, AddressingModelPhysical64 = 2,
}; };
enum MemoryModel { enum MemoryModel {
MemoryModelSimple = 0, MemoryModelSimple = 0,
MemoryModelGLSL450 = 1, MemoryModelGLSL450 = 1,
MemoryModelOpenCL = 2, MemoryModelOpenCL = 2,
}; };
enum ExecutionMode { enum ExecutionMode {
ExecutionModeInvocations = 0, ExecutionModeInvocations = 0,
ExecutionModeSpacingEqual = 1, ExecutionModeSpacingEqual = 1,
ExecutionModeSpacingFractionalEven = 2, ExecutionModeSpacingFractionalEven = 2,
ExecutionModeSpacingFractionalOdd = 3, ExecutionModeSpacingFractionalOdd = 3,
ExecutionModeVertexOrderCw = 4, ExecutionModeVertexOrderCw = 4,
ExecutionModeVertexOrderCcw = 5, ExecutionModeVertexOrderCcw = 5,
ExecutionModePixelCenterInteger = 6, ExecutionModePixelCenterInteger = 6,
ExecutionModeOriginUpperLeft = 7, ExecutionModeOriginUpperLeft = 7,
ExecutionModeOriginLowerLeft = 8, ExecutionModeOriginLowerLeft = 8,
ExecutionModeEarlyFragmentTests = 9, ExecutionModeEarlyFragmentTests = 9,
ExecutionModePointMode = 10, ExecutionModePointMode = 10,
ExecutionModeXfb = 11, ExecutionModeXfb = 11,
ExecutionModeDepthReplacing = 12, ExecutionModeDepthReplacing = 12,
ExecutionModeDepthGreater = 14, ExecutionModeDepthGreater = 14,
ExecutionModeDepthLess = 15, ExecutionModeDepthLess = 15,
ExecutionModeDepthUnchanged = 16, ExecutionModeDepthUnchanged = 16,
ExecutionModeLocalSize = 17, ExecutionModeLocalSize = 17,
ExecutionModeLocalSizeHint = 18, ExecutionModeLocalSizeHint = 18,
ExecutionModeInputPoints = 19, ExecutionModeInputPoints = 19,
ExecutionModeInputLines = 20, ExecutionModeInputLines = 20,
ExecutionModeInputLinesAdjacency = 21, ExecutionModeInputLinesAdjacency = 21,
ExecutionModeTriangles = 22, ExecutionModeTriangles = 22,
ExecutionModeInputTrianglesAdjacency = 23, ExecutionModeInputTrianglesAdjacency = 23,
ExecutionModeQuads = 24, ExecutionModeQuads = 24,
ExecutionModeIsolines = 25, ExecutionModeIsolines = 25,
ExecutionModeOutputVertices = 26, ExecutionModeOutputVertices = 26,
ExecutionModeOutputPoints = 27, ExecutionModeOutputPoints = 27,
ExecutionModeOutputLineStrip = 28, ExecutionModeOutputLineStrip = 28,
ExecutionModeOutputTriangleStrip = 29, ExecutionModeOutputTriangleStrip = 29,
ExecutionModeVecTypeHint = 30, ExecutionModeVecTypeHint = 30,
ExecutionModeContractionOff = 31, ExecutionModeContractionOff = 31,
}; };
enum StorageClass { enum StorageClass {
StorageClassUniformConstant = 0, StorageClassUniformConstant = 0,
StorageClassInput = 1, StorageClassInput = 1,
StorageClassUniform = 2, StorageClassUniform = 2,
StorageClassOutput = 3, StorageClassOutput = 3,
StorageClassWorkgroup = 4, StorageClassWorkgroup = 4,
StorageClassCrossWorkgroup = 5, StorageClassCrossWorkgroup = 5,
StorageClassPrivate = 6, StorageClassPrivate = 6,
StorageClassFunction = 7, StorageClassFunction = 7,
StorageClassGeneric = 8, StorageClassGeneric = 8,
StorageClassPushConstant = 9, StorageClassPushConstant = 9,
StorageClassAtomicCounter = 10, StorageClassAtomicCounter = 10,
StorageClassImage = 11, StorageClassImage = 11,
}; };
enum Dim { enum Dim {
Dim1D = 0, Dim1D = 0,
Dim2D = 1, Dim2D = 1,
Dim3D = 2, Dim3D = 2,
DimCube = 3, DimCube = 3,
DimRect = 4, DimRect = 4,
DimBuffer = 5, DimBuffer = 5,
DimSubpassData = 6, DimSubpassData = 6,
}; };
enum SamplerAddressingMode { enum SamplerAddressingMode {
SamplerAddressingModeNone = 0, SamplerAddressingModeNone = 0,
SamplerAddressingModeClampToEdge = 1, SamplerAddressingModeClampToEdge = 1,
SamplerAddressingModeClamp = 2, SamplerAddressingModeClamp = 2,
SamplerAddressingModeRepeat = 3, SamplerAddressingModeRepeat = 3,
SamplerAddressingModeRepeatMirrored = 4, SamplerAddressingModeRepeatMirrored = 4,
}; };
enum SamplerFilterMode { enum SamplerFilterMode {
SamplerFilterModeNearest = 0, SamplerFilterModeNearest = 0,
SamplerFilterModeLinear = 1, SamplerFilterModeLinear = 1,
}; };
enum ImageFormat { enum ImageFormat {
ImageFormatUnknown = 0, ImageFormatUnknown = 0,
ImageFormatRgba32f = 1, ImageFormatRgba32f = 1,
ImageFormatRgba16f = 2, ImageFormatRgba16f = 2,
ImageFormatR32f = 3, ImageFormatR32f = 3,
ImageFormatRgba8 = 4, ImageFormatRgba8 = 4,
ImageFormatRgba8Snorm = 5, ImageFormatRgba8Snorm = 5,
ImageFormatRg32f = 6, ImageFormatRg32f = 6,
ImageFormatRg16f = 7, ImageFormatRg16f = 7,
ImageFormatR11fG11fB10f = 8, ImageFormatR11fG11fB10f = 8,
ImageFormatR16f = 9, ImageFormatR16f = 9,
ImageFormatRgba16 = 10, ImageFormatRgba16 = 10,
ImageFormatRgb10A2 = 11, ImageFormatRgb10A2 = 11,
ImageFormatRg16 = 12, ImageFormatRg16 = 12,
ImageFormatRg8 = 13, ImageFormatRg8 = 13,
ImageFormatR16 = 14, ImageFormatR16 = 14,
ImageFormatR8 = 15, ImageFormatR8 = 15,
ImageFormatRgba16Snorm = 16, ImageFormatRgba16Snorm = 16,
ImageFormatRg16Snorm = 17, ImageFormatRg16Snorm = 17,
ImageFormatRg8Snorm = 18, ImageFormatRg8Snorm = 18,
ImageFormatR16Snorm = 19, ImageFormatR16Snorm = 19,
ImageFormatR8Snorm = 20, ImageFormatR8Snorm = 20,
ImageFormatRgba32i = 21, ImageFormatRgba32i = 21,
ImageFormatRgba16i = 22, ImageFormatRgba16i = 22,
ImageFormatRgba8i = 23, ImageFormatRgba8i = 23,
ImageFormatR32i = 24, ImageFormatR32i = 24,
ImageFormatRg32i = 25, ImageFormatRg32i = 25,
ImageFormatRg16i = 26, ImageFormatRg16i = 26,
ImageFormatRg8i = 27, ImageFormatRg8i = 27,
ImageFormatR16i = 28, ImageFormatR16i = 28,
ImageFormatR8i = 29, ImageFormatR8i = 29,
ImageFormatRgba32ui = 30, ImageFormatRgba32ui = 30,
ImageFormatRgba16ui = 31, ImageFormatRgba16ui = 31,
ImageFormatRgba8ui = 32, ImageFormatRgba8ui = 32,
ImageFormatR32ui = 33, ImageFormatR32ui = 33,
ImageFormatRgb10a2ui = 34, ImageFormatRgb10a2ui = 34,
ImageFormatRg32ui = 35, ImageFormatRg32ui = 35,
ImageFormatRg16ui = 36, ImageFormatRg16ui = 36,
ImageFormatRg8ui = 37, ImageFormatRg8ui = 37,
ImageFormatR16ui = 38, ImageFormatR16ui = 38,
ImageFormatR8ui = 39, ImageFormatR8ui = 39,
}; };
enum ImageChannelOrder { enum ImageChannelOrder {
ImageChannelOrderR = 0, ImageChannelOrderR = 0,
ImageChannelOrderA = 1, ImageChannelOrderA = 1,
ImageChannelOrderRG = 2, ImageChannelOrderRG = 2,
ImageChannelOrderRA = 3, ImageChannelOrderRA = 3,
ImageChannelOrderRGB = 4, ImageChannelOrderRGB = 4,
ImageChannelOrderRGBA = 5, ImageChannelOrderRGBA = 5,
ImageChannelOrderBGRA = 6, ImageChannelOrderBGRA = 6,
ImageChannelOrderARGB = 7, ImageChannelOrderARGB = 7,
ImageChannelOrderIntensity = 8, ImageChannelOrderIntensity = 8,
ImageChannelOrderLuminance = 9, ImageChannelOrderLuminance = 9,
ImageChannelOrderRx = 10, ImageChannelOrderRx = 10,
ImageChannelOrderRGx = 11, ImageChannelOrderRGx = 11,
ImageChannelOrderRGBx = 12, ImageChannelOrderRGBx = 12,
ImageChannelOrderDepth = 13, ImageChannelOrderDepth = 13,
ImageChannelOrderDepthStencil = 14, ImageChannelOrderDepthStencil = 14,
ImageChannelOrdersRGB = 15, ImageChannelOrdersRGB = 15,
ImageChannelOrdersRGBx = 16, ImageChannelOrdersRGBx = 16,
ImageChannelOrdersRGBA = 17, ImageChannelOrdersRGBA = 17,
ImageChannelOrdersBGRA = 18, ImageChannelOrdersBGRA = 18,
}; };
enum ImageChannelDataType { enum ImageChannelDataType {
ImageChannelDataTypeSnormInt8 = 0, ImageChannelDataTypeSnormInt8 = 0,
ImageChannelDataTypeSnormInt16 = 1, ImageChannelDataTypeSnormInt16 = 1,
ImageChannelDataTypeUnormInt8 = 2, ImageChannelDataTypeUnormInt8 = 2,
ImageChannelDataTypeUnormInt16 = 3, ImageChannelDataTypeUnormInt16 = 3,
ImageChannelDataTypeUnormShort565 = 4, ImageChannelDataTypeUnormShort565 = 4,
ImageChannelDataTypeUnormShort555 = 5, ImageChannelDataTypeUnormShort555 = 5,
ImageChannelDataTypeUnormInt101010 = 6, ImageChannelDataTypeUnormInt101010 = 6,
ImageChannelDataTypeSignedInt8 = 7, ImageChannelDataTypeSignedInt8 = 7,
ImageChannelDataTypeSignedInt16 = 8, ImageChannelDataTypeSignedInt16 = 8,
ImageChannelDataTypeSignedInt32 = 9, ImageChannelDataTypeSignedInt32 = 9,
ImageChannelDataTypeUnsignedInt8 = 10, ImageChannelDataTypeUnsignedInt8 = 10,
ImageChannelDataTypeUnsignedInt16 = 11, ImageChannelDataTypeUnsignedInt16 = 11,
ImageChannelDataTypeUnsignedInt32 = 12, ImageChannelDataTypeUnsignedInt32 = 12,
ImageChannelDataTypeHalfFloat = 13, ImageChannelDataTypeHalfFloat = 13,
ImageChannelDataTypeFloat = 14, ImageChannelDataTypeFloat = 14,
ImageChannelDataTypeUnormInt24 = 15, ImageChannelDataTypeUnormInt24 = 15,
ImageChannelDataTypeUnormInt101010_2 = 16, ImageChannelDataTypeUnormInt101010_2 = 16,
}; };
enum ImageOperandsShift { enum ImageOperandsShift {
ImageOperandsBiasShift = 0, ImageOperandsBiasShift = 0,
ImageOperandsLodShift = 1, ImageOperandsLodShift = 1,
ImageOperandsGradShift = 2, ImageOperandsGradShift = 2,
ImageOperandsConstOffsetShift = 3, ImageOperandsConstOffsetShift = 3,
ImageOperandsOffsetShift = 4, ImageOperandsOffsetShift = 4,
ImageOperandsConstOffsetsShift = 5, ImageOperandsConstOffsetsShift = 5,
ImageOperandsSampleShift = 6, ImageOperandsSampleShift = 6,
ImageOperandsMinLodShift = 7, ImageOperandsMinLodShift = 7,
}; };
enum ImageOperandsMask { enum ImageOperandsMask {
ImageOperandsMaskNone = 0, ImageOperandsMaskNone = 0,
ImageOperandsBiasMask = 0x00000001, ImageOperandsBiasMask = 0x00000001,
ImageOperandsLodMask = 0x00000002, ImageOperandsLodMask = 0x00000002,
ImageOperandsGradMask = 0x00000004, ImageOperandsGradMask = 0x00000004,
ImageOperandsConstOffsetMask = 0x00000008, ImageOperandsConstOffsetMask = 0x00000008,
ImageOperandsOffsetMask = 0x00000010, ImageOperandsOffsetMask = 0x00000010,
ImageOperandsConstOffsetsMask = 0x00000020, ImageOperandsConstOffsetsMask = 0x00000020,
ImageOperandsSampleMask = 0x00000040, ImageOperandsSampleMask = 0x00000040,
ImageOperandsMinLodMask = 0x00000080, ImageOperandsMinLodMask = 0x00000080,
}; };
enum FPFastMathModeShift { enum FPFastMathModeShift {
FPFastMathModeNotNaNShift = 0, FPFastMathModeNotNaNShift = 0,
FPFastMathModeNotInfShift = 1, FPFastMathModeNotInfShift = 1,
FPFastMathModeNSZShift = 2, FPFastMathModeNSZShift = 2,
FPFastMathModeAllowRecipShift = 3, FPFastMathModeAllowRecipShift = 3,
FPFastMathModeFastShift = 4, FPFastMathModeFastShift = 4,
}; };
enum FPFastMathModeMask { enum FPFastMathModeMask {
FPFastMathModeMaskNone = 0, FPFastMathModeMaskNone = 0,
FPFastMathModeNotNaNMask = 0x00000001, FPFastMathModeNotNaNMask = 0x00000001,
FPFastMathModeNotInfMask = 0x00000002, FPFastMathModeNotInfMask = 0x00000002,
FPFastMathModeNSZMask = 0x00000004, FPFastMathModeNSZMask = 0x00000004,
FPFastMathModeAllowRecipMask = 0x00000008, FPFastMathModeAllowRecipMask = 0x00000008,
FPFastMathModeFastMask = 0x00000010, FPFastMathModeFastMask = 0x00000010,
}; };
enum FPRoundingMode { enum FPRoundingMode {
FPRoundingModeRTE = 0, FPRoundingModeRTE = 0,
FPRoundingModeRTZ = 1, FPRoundingModeRTZ = 1,
FPRoundingModeRTP = 2, FPRoundingModeRTP = 2,
FPRoundingModeRTN = 3, FPRoundingModeRTN = 3,
}; };
enum LinkageType { enum LinkageType {
LinkageTypeExport = 0, LinkageTypeExport = 0,
LinkageTypeImport = 1, LinkageTypeImport = 1,
}; };
enum AccessQualifier { enum AccessQualifier {
AccessQualifierReadOnly = 0, AccessQualifierReadOnly = 0,
AccessQualifierWriteOnly = 1, AccessQualifierWriteOnly = 1,
AccessQualifierReadWrite = 2, AccessQualifierReadWrite = 2,
}; };
enum FunctionParameterAttribute { enum FunctionParameterAttribute {
FunctionParameterAttributeZext = 0, FunctionParameterAttributeZext = 0,
FunctionParameterAttributeSext = 1, FunctionParameterAttributeSext = 1,
FunctionParameterAttributeByVal = 2, FunctionParameterAttributeByVal = 2,
FunctionParameterAttributeSret = 3, FunctionParameterAttributeSret = 3,
FunctionParameterAttributeNoAlias = 4, FunctionParameterAttributeNoAlias = 4,
FunctionParameterAttributeNoCapture = 5, FunctionParameterAttributeNoCapture = 5,
FunctionParameterAttributeNoWrite = 6, FunctionParameterAttributeNoWrite = 6,
FunctionParameterAttributeNoReadWrite = 7, FunctionParameterAttributeNoReadWrite = 7,
}; };
enum Decoration { enum Decoration {
DecorationRelaxedPrecision = 0, DecorationRelaxedPrecision = 0,
DecorationSpecId = 1, DecorationSpecId = 1,
DecorationBlock = 2, DecorationBlock = 2,
DecorationBufferBlock = 3, DecorationBufferBlock = 3,
DecorationRowMajor = 4, DecorationRowMajor = 4,
DecorationColMajor = 5, DecorationColMajor = 5,
DecorationArrayStride = 6, DecorationArrayStride = 6,
DecorationMatrixStride = 7, DecorationMatrixStride = 7,
DecorationGLSLShared = 8, DecorationGLSLShared = 8,
DecorationGLSLPacked = 9, DecorationGLSLPacked = 9,
DecorationCPacked = 10, DecorationCPacked = 10,
DecorationBuiltIn = 11, DecorationBuiltIn = 11,
DecorationNoPerspective = 13, DecorationNoPerspective = 13,
DecorationFlat = 14, DecorationFlat = 14,
DecorationPatch = 15, DecorationPatch = 15,
DecorationCentroid = 16, DecorationCentroid = 16,
DecorationSample = 17, DecorationSample = 17,
DecorationInvariant = 18, DecorationInvariant = 18,
DecorationRestrict = 19, DecorationRestrict = 19,
DecorationAliased = 20, DecorationAliased = 20,
DecorationVolatile = 21, DecorationVolatile = 21,
DecorationConstant = 22, DecorationConstant = 22,
DecorationCoherent = 23, DecorationCoherent = 23,
DecorationNonWritable = 24, DecorationNonWritable = 24,
DecorationNonReadable = 25, DecorationNonReadable = 25,
DecorationUniform = 26, DecorationUniform = 26,
DecorationSaturatedConversion = 28, DecorationSaturatedConversion = 28,
DecorationStream = 29, DecorationStream = 29,
DecorationLocation = 30, DecorationLocation = 30,
DecorationComponent = 31, DecorationComponent = 31,
DecorationIndex = 32, DecorationIndex = 32,
DecorationBinding = 33, DecorationBinding = 33,
DecorationDescriptorSet = 34, DecorationDescriptorSet = 34,
DecorationOffset = 35, DecorationOffset = 35,
DecorationXfbBuffer = 36, DecorationXfbBuffer = 36,
DecorationXfbStride = 37, DecorationXfbStride = 37,
DecorationFuncParamAttr = 38, DecorationFuncParamAttr = 38,
DecorationFPRoundingMode = 39, DecorationFPRoundingMode = 39,
DecorationFPFastMathMode = 40, DecorationFPFastMathMode = 40,
DecorationLinkageAttributes = 41, DecorationLinkageAttributes = 41,
DecorationNoContraction = 42, DecorationNoContraction = 42,
DecorationInputAttachmentIndex = 43, DecorationInputAttachmentIndex = 43,
DecorationAlignment = 44, DecorationAlignment = 44,
}; };
enum BuiltIn { enum BuiltIn {
BuiltInPosition = 0, BuiltInPosition = 0,
BuiltInPointSize = 1, BuiltInPointSize = 1,
BuiltInClipDistance = 3, BuiltInClipDistance = 3,
BuiltInCullDistance = 4, BuiltInCullDistance = 4,
BuiltInVertexId = 5, BuiltInVertexId = 5,
BuiltInInstanceId = 6, BuiltInInstanceId = 6,
BuiltInPrimitiveId = 7, BuiltInPrimitiveId = 7,
BuiltInInvocationId = 8, BuiltInInvocationId = 8,
BuiltInLayer = 9, BuiltInLayer = 9,
BuiltInViewportIndex = 10, BuiltInViewportIndex = 10,
BuiltInTessLevelOuter = 11, BuiltInTessLevelOuter = 11,
BuiltInTessLevelInner = 12, BuiltInTessLevelInner = 12,
BuiltInTessCoord = 13, BuiltInTessCoord = 13,
BuiltInPatchVertices = 14, BuiltInPatchVertices = 14,
BuiltInFragCoord = 15, BuiltInFragCoord = 15,
BuiltInPointCoord = 16, BuiltInPointCoord = 16,
BuiltInFrontFacing = 17, BuiltInFrontFacing = 17,
BuiltInSampleId = 18, BuiltInSampleId = 18,
BuiltInSamplePosition = 19, BuiltInSamplePosition = 19,
BuiltInSampleMask = 20, BuiltInSampleMask = 20,
BuiltInFragDepth = 22, BuiltInFragDepth = 22,
BuiltInHelperInvocation = 23, BuiltInHelperInvocation = 23,
BuiltInNumWorkgroups = 24, BuiltInNumWorkgroups = 24,
BuiltInWorkgroupSize = 25, BuiltInWorkgroupSize = 25,
BuiltInWorkgroupId = 26, BuiltInWorkgroupId = 26,
BuiltInLocalInvocationId = 27, BuiltInLocalInvocationId = 27,
BuiltInGlobalInvocationId = 28, BuiltInGlobalInvocationId = 28,
BuiltInLocalInvocationIndex = 29, BuiltInLocalInvocationIndex = 29,
BuiltInWorkDim = 30, BuiltInWorkDim = 30,
BuiltInGlobalSize = 31, BuiltInGlobalSize = 31,
BuiltInEnqueuedWorkgroupSize = 32, BuiltInEnqueuedWorkgroupSize = 32,
BuiltInGlobalOffset = 33, BuiltInGlobalOffset = 33,
BuiltInGlobalLinearId = 34, BuiltInGlobalLinearId = 34,
BuiltInSubgroupSize = 36, BuiltInSubgroupSize = 36,
BuiltInSubgroupMaxSize = 37, BuiltInSubgroupMaxSize = 37,
BuiltInNumSubgroups = 38, BuiltInNumSubgroups = 38,
BuiltInNumEnqueuedSubgroups = 39, BuiltInNumEnqueuedSubgroups = 39,
BuiltInSubgroupId = 40, BuiltInSubgroupId = 40,
BuiltInSubgroupLocalInvocationId = 41, BuiltInSubgroupLocalInvocationId = 41,
BuiltInVertexIndex = 42, BuiltInVertexIndex = 42,
BuiltInInstanceIndex = 43, BuiltInInstanceIndex = 43,
}; };
enum SelectionControlShift { enum SelectionControlShift {
SelectionControlFlattenShift = 0, SelectionControlFlattenShift = 0,
SelectionControlDontFlattenShift = 1, SelectionControlDontFlattenShift = 1,
}; };
enum SelectionControlMask { enum SelectionControlMask {
SelectionControlMaskNone = 0, SelectionControlMaskNone = 0,
SelectionControlFlattenMask = 0x00000001, SelectionControlFlattenMask = 0x00000001,
SelectionControlDontFlattenMask = 0x00000002, SelectionControlDontFlattenMask = 0x00000002,
}; };
enum LoopControlShift { enum LoopControlShift {
LoopControlUnrollShift = 0, LoopControlUnrollShift = 0,
LoopControlDontUnrollShift = 1, LoopControlDontUnrollShift = 1,
}; };
enum LoopControlMask { enum LoopControlMask {
LoopControlMaskNone = 0, LoopControlMaskNone = 0,
LoopControlUnrollMask = 0x00000001, LoopControlUnrollMask = 0x00000001,
LoopControlDontUnrollMask = 0x00000002, LoopControlDontUnrollMask = 0x00000002,
}; };
enum FunctionControlShift { enum FunctionControlShift {
FunctionControlInlineShift = 0, FunctionControlInlineShift = 0,
FunctionControlDontInlineShift = 1, FunctionControlDontInlineShift = 1,
FunctionControlPureShift = 2, FunctionControlPureShift = 2,
FunctionControlConstShift = 3, FunctionControlConstShift = 3,
}; };
enum FunctionControlMask { enum FunctionControlMask {
FunctionControlMaskNone = 0, FunctionControlMaskNone = 0,
FunctionControlInlineMask = 0x00000001, FunctionControlInlineMask = 0x00000001,
FunctionControlDontInlineMask = 0x00000002, FunctionControlDontInlineMask = 0x00000002,
FunctionControlPureMask = 0x00000004, FunctionControlPureMask = 0x00000004,
FunctionControlConstMask = 0x00000008, FunctionControlConstMask = 0x00000008,
}; };
enum MemorySemanticsShift { enum MemorySemanticsShift {
MemorySemanticsAcquireShift = 1, MemorySemanticsAcquireShift = 1,
MemorySemanticsReleaseShift = 2, MemorySemanticsReleaseShift = 2,
MemorySemanticsAcquireReleaseShift = 3, MemorySemanticsAcquireReleaseShift = 3,
MemorySemanticsSequentiallyConsistentShift = 4, MemorySemanticsSequentiallyConsistentShift = 4,
MemorySemanticsUniformMemoryShift = 6, MemorySemanticsUniformMemoryShift = 6,
MemorySemanticsSubgroupMemoryShift = 7, MemorySemanticsSubgroupMemoryShift = 7,
MemorySemanticsWorkgroupMemoryShift = 8, MemorySemanticsWorkgroupMemoryShift = 8,
MemorySemanticsCrossWorkgroupMemoryShift = 9, MemorySemanticsCrossWorkgroupMemoryShift = 9,
MemorySemanticsAtomicCounterMemoryShift = 10, MemorySemanticsAtomicCounterMemoryShift = 10,
MemorySemanticsImageMemoryShift = 11, MemorySemanticsImageMemoryShift = 11,
}; };
enum MemorySemanticsMask { enum MemorySemanticsMask {
MemorySemanticsMaskNone = 0, MemorySemanticsMaskNone = 0,
MemorySemanticsAcquireMask = 0x00000002, MemorySemanticsAcquireMask = 0x00000002,
MemorySemanticsReleaseMask = 0x00000004, MemorySemanticsReleaseMask = 0x00000004,
MemorySemanticsAcquireReleaseMask = 0x00000008, MemorySemanticsAcquireReleaseMask = 0x00000008,
MemorySemanticsSequentiallyConsistentMask = 0x00000010, MemorySemanticsSequentiallyConsistentMask = 0x00000010,
MemorySemanticsUniformMemoryMask = 0x00000040, MemorySemanticsUniformMemoryMask = 0x00000040,
MemorySemanticsSubgroupMemoryMask = 0x00000080, MemorySemanticsSubgroupMemoryMask = 0x00000080,
MemorySemanticsWorkgroupMemoryMask = 0x00000100, MemorySemanticsWorkgroupMemoryMask = 0x00000100,
MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200, MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200,
MemorySemanticsAtomicCounterMemoryMask = 0x00000400, MemorySemanticsAtomicCounterMemoryMask = 0x00000400,
MemorySemanticsImageMemoryMask = 0x00000800, MemorySemanticsImageMemoryMask = 0x00000800,
}; };
enum MemoryAccessShift { enum MemoryAccessShift {
MemoryAccessVolatileShift = 0, MemoryAccessVolatileShift = 0,
MemoryAccessAlignedShift = 1, MemoryAccessAlignedShift = 1,
MemoryAccessNontemporalShift = 2, MemoryAccessNontemporalShift = 2,
}; };
enum MemoryAccessMask { enum MemoryAccessMask {
MemoryAccessMaskNone = 0, MemoryAccessMaskNone = 0,
MemoryAccessVolatileMask = 0x00000001, MemoryAccessVolatileMask = 0x00000001,
MemoryAccessAlignedMask = 0x00000002, MemoryAccessAlignedMask = 0x00000002,
MemoryAccessNontemporalMask = 0x00000004, MemoryAccessNontemporalMask = 0x00000004,
}; };
enum Scope { enum Scope {
ScopeCrossDevice = 0, ScopeCrossDevice = 0,
ScopeDevice = 1, ScopeDevice = 1,
ScopeWorkgroup = 2, ScopeWorkgroup = 2,
ScopeSubgroup = 3, ScopeSubgroup = 3,
ScopeInvocation = 4, ScopeInvocation = 4,
}; };
enum GroupOperation { enum GroupOperation {
GroupOperationReduce = 0, GroupOperationReduce = 0,
GroupOperationInclusiveScan = 1, GroupOperationInclusiveScan = 1,
GroupOperationExclusiveScan = 2, GroupOperationExclusiveScan = 2,
}; };
enum KernelEnqueueFlags { enum KernelEnqueueFlags {
KernelEnqueueFlagsNoWait = 0, KernelEnqueueFlagsNoWait = 0,
KernelEnqueueFlagsWaitKernel = 1, KernelEnqueueFlagsWaitKernel = 1,
KernelEnqueueFlagsWaitWorkGroup = 2, KernelEnqueueFlagsWaitWorkGroup = 2,
}; };
enum KernelProfilingInfoShift { enum KernelProfilingInfoShift {
KernelProfilingInfoCmdExecTimeShift = 0, KernelProfilingInfoCmdExecTimeShift = 0,
}; };
enum KernelProfilingInfoMask { enum KernelProfilingInfoMask {
KernelProfilingInfoMaskNone = 0, KernelProfilingInfoMaskNone = 0,
KernelProfilingInfoCmdExecTimeMask = 0x00000001, KernelProfilingInfoCmdExecTimeMask = 0x00000001,
}; };
enum Capability { enum Capability {
CapabilityMatrix = 0, CapabilityMatrix = 0,
CapabilityShader = 1, CapabilityShader = 1,
CapabilityGeometry = 2, CapabilityGeometry = 2,
CapabilityTessellation = 3, CapabilityTessellation = 3,
CapabilityAddresses = 4, CapabilityAddresses = 4,
CapabilityLinkage = 5, CapabilityLinkage = 5,
CapabilityKernel = 6, CapabilityKernel = 6,
CapabilityVector16 = 7, CapabilityVector16 = 7,
CapabilityFloat16Buffer = 8, CapabilityFloat16Buffer = 8,
CapabilityFloat16 = 9, CapabilityFloat16 = 9,
CapabilityFloat64 = 10, CapabilityFloat64 = 10,
CapabilityInt64 = 11, CapabilityInt64 = 11,
CapabilityInt64Atomics = 12, CapabilityInt64Atomics = 12,
CapabilityImageBasic = 13, CapabilityImageBasic = 13,
CapabilityImageReadWrite = 14, CapabilityImageReadWrite = 14,
CapabilityImageMipmap = 15, CapabilityImageMipmap = 15,
CapabilityPipes = 17, CapabilityPipes = 17,
CapabilityGroups = 18, CapabilityGroups = 18,
CapabilityDeviceEnqueue = 19, CapabilityDeviceEnqueue = 19,
CapabilityLiteralSampler = 20, CapabilityLiteralSampler = 20,
CapabilityAtomicStorage = 21, CapabilityAtomicStorage = 21,
CapabilityInt16 = 22, CapabilityInt16 = 22,
CapabilityTessellationPointSize = 23, CapabilityTessellationPointSize = 23,
CapabilityGeometryPointSize = 24, CapabilityGeometryPointSize = 24,
CapabilityImageGatherExtended = 25, CapabilityImageGatherExtended = 25,
CapabilityStorageImageMultisample = 27, CapabilityStorageImageMultisample = 27,
CapabilityUniformBufferArrayDynamicIndexing = 28, CapabilityUniformBufferArrayDynamicIndexing = 28,
CapabilitySampledImageArrayDynamicIndexing = 29, CapabilitySampledImageArrayDynamicIndexing = 29,
CapabilityStorageBufferArrayDynamicIndexing = 30, CapabilityStorageBufferArrayDynamicIndexing = 30,
CapabilityStorageImageArrayDynamicIndexing = 31, CapabilityStorageImageArrayDynamicIndexing = 31,
CapabilityClipDistance = 32, CapabilityClipDistance = 32,
CapabilityCullDistance = 33, CapabilityCullDistance = 33,
CapabilityImageCubeArray = 34, CapabilityImageCubeArray = 34,
CapabilitySampleRateShading = 35, CapabilitySampleRateShading = 35,
CapabilityImageRect = 36, CapabilityImageRect = 36,
CapabilitySampledRect = 37, CapabilitySampledRect = 37,
CapabilityGenericPointer = 38, CapabilityGenericPointer = 38,
CapabilityInt8 = 39, CapabilityInt8 = 39,
CapabilityInputAttachment = 40, CapabilityInputAttachment = 40,
CapabilitySparseResidency = 41, CapabilitySparseResidency = 41,
CapabilityMinLod = 42, CapabilityMinLod = 42,
CapabilitySampled1D = 43, CapabilitySampled1D = 43,
CapabilityImage1D = 44, CapabilityImage1D = 44,
CapabilitySampledCubeArray = 45, CapabilitySampledCubeArray = 45,
CapabilitySampledBuffer = 46, CapabilitySampledBuffer = 46,
CapabilityImageBuffer = 47, CapabilityImageBuffer = 47,
CapabilityImageMSArray = 48, CapabilityImageMSArray = 48,
CapabilityStorageImageExtendedFormats = 49, CapabilityStorageImageExtendedFormats = 49,
CapabilityImageQuery = 50, CapabilityImageQuery = 50,
CapabilityDerivativeControl = 51, CapabilityDerivativeControl = 51,
CapabilityInterpolationFunction = 52, CapabilityInterpolationFunction = 52,
CapabilityTransformFeedback = 53, CapabilityTransformFeedback = 53,
CapabilityGeometryStreams = 54, CapabilityGeometryStreams = 54,
CapabilityStorageImageReadWithoutFormat = 55, CapabilityStorageImageReadWithoutFormat = 55,
CapabilityStorageImageWriteWithoutFormat = 56, CapabilityStorageImageWriteWithoutFormat = 56,
}; };
enum Op { enum Op {
OpNop = 0, OpNop = 0,
OpUndef = 1, OpUndef = 1,
OpSourceContinued = 2, OpSourceContinued = 2,
OpSource = 3, OpSource = 3,
OpSourceExtension = 4, OpSourceExtension = 4,
OpName = 5, OpName = 5,
OpMemberName = 6, OpMemberName = 6,
OpString = 7, OpString = 7,
OpLine = 8, OpLine = 8,
OpExtension = 10, OpExtension = 10,
OpExtInstImport = 11, OpExtInstImport = 11,
OpExtInst = 12, OpExtInst = 12,
OpMemoryModel = 14, OpMemoryModel = 14,
OpEntryPoint = 15, OpEntryPoint = 15,
OpExecutionMode = 16, OpExecutionMode = 16,
OpCapability = 17, OpCapability = 17,
OpTypeVoid = 19, OpTypeVoid = 19,
OpTypeBool = 20, OpTypeBool = 20,
OpTypeInt = 21, OpTypeInt = 21,
OpTypeFloat = 22, OpTypeFloat = 22,
OpTypeVector = 23, OpTypeVector = 23,
OpTypeMatrix = 24, OpTypeMatrix = 24,
OpTypeImage = 25, OpTypeImage = 25,
OpTypeSampler = 26, OpTypeSampler = 26,
OpTypeSampledImage = 27, OpTypeSampledImage = 27,
OpTypeArray = 28, OpTypeArray = 28,
OpTypeRuntimeArray = 29, OpTypeRuntimeArray = 29,
OpTypeStruct = 30, OpTypeStruct = 30,
OpTypeOpaque = 31, OpTypeOpaque = 31,
OpTypePointer = 32, OpTypePointer = 32,
OpTypeFunction = 33, OpTypeFunction = 33,
OpTypeEvent = 34, OpTypeEvent = 34,
OpTypeDeviceEvent = 35, OpTypeDeviceEvent = 35,
OpTypeReserveId = 36, OpTypeReserveId = 36,
OpTypeQueue = 37, OpTypeQueue = 37,
OpTypePipe = 38, OpTypePipe = 38,
OpTypeForwardPointer = 39, OpTypeForwardPointer = 39,
OpConstantTrue = 41, OpConstantTrue = 41,
OpConstantFalse = 42, OpConstantFalse = 42,
OpConstant = 43, OpConstant = 43,
OpConstantComposite = 44, OpConstantComposite = 44,
OpConstantSampler = 45, OpConstantSampler = 45,
OpConstantNull = 46, OpConstantNull = 46,
OpSpecConstantTrue = 48, OpSpecConstantTrue = 48,
OpSpecConstantFalse = 49, OpSpecConstantFalse = 49,
OpSpecConstant = 50, OpSpecConstant = 50,
OpSpecConstantComposite = 51, OpSpecConstantComposite = 51,
OpSpecConstantOp = 52, OpSpecConstantOp = 52,
OpFunction = 54, OpFunction = 54,
OpFunctionParameter = 55, OpFunctionParameter = 55,
OpFunctionEnd = 56, OpFunctionEnd = 56,
OpFunctionCall = 57, OpFunctionCall = 57,
OpVariable = 59, OpVariable = 59,
OpImageTexelPointer = 60, OpImageTexelPointer = 60,
OpLoad = 61, OpLoad = 61,
OpStore = 62, OpStore = 62,
OpCopyMemory = 63, OpCopyMemory = 63,
OpCopyMemorySized = 64, OpCopyMemorySized = 64,
OpAccessChain = 65, OpAccessChain = 65,
OpInBoundsAccessChain = 66, OpInBoundsAccessChain = 66,
OpPtrAccessChain = 67, OpPtrAccessChain = 67,
OpArrayLength = 68, OpArrayLength = 68,
OpGenericPtrMemSemantics = 69, OpGenericPtrMemSemantics = 69,
OpInBoundsPtrAccessChain = 70, OpInBoundsPtrAccessChain = 70,
OpDecorate = 71, OpDecorate = 71,
OpMemberDecorate = 72, OpMemberDecorate = 72,
OpDecorationGroup = 73, OpDecorationGroup = 73,
OpGroupDecorate = 74, OpGroupDecorate = 74,
OpGroupMemberDecorate = 75, OpGroupMemberDecorate = 75,
OpVectorExtractDynamic = 77, OpVectorExtractDynamic = 77,
OpVectorInsertDynamic = 78, OpVectorInsertDynamic = 78,
OpVectorShuffle = 79, OpVectorShuffle = 79,
OpCompositeConstruct = 80, OpCompositeConstruct = 80,
OpCompositeExtract = 81, OpCompositeExtract = 81,
OpCompositeInsert = 82, OpCompositeInsert = 82,
OpCopyObject = 83, OpCopyObject = 83,
OpTranspose = 84, OpTranspose = 84,
OpSampledImage = 86, OpSampledImage = 86,
OpImageSampleImplicitLod = 87, OpImageSampleImplicitLod = 87,
OpImageSampleExplicitLod = 88, OpImageSampleExplicitLod = 88,
OpImageSampleDrefImplicitLod = 89, OpImageSampleDrefImplicitLod = 89,
OpImageSampleDrefExplicitLod = 90, OpImageSampleDrefExplicitLod = 90,
OpImageSampleProjImplicitLod = 91, OpImageSampleProjImplicitLod = 91,
OpImageSampleProjExplicitLod = 92, OpImageSampleProjExplicitLod = 92,
OpImageSampleProjDrefImplicitLod = 93, OpImageSampleProjDrefImplicitLod = 93,
OpImageSampleProjDrefExplicitLod = 94, OpImageSampleProjDrefExplicitLod = 94,
OpImageFetch = 95, OpImageFetch = 95,
OpImageGather = 96, OpImageGather = 96,
OpImageDrefGather = 97, OpImageDrefGather = 97,
OpImageRead = 98, OpImageRead = 98,
OpImageWrite = 99, OpImageWrite = 99,
OpImage = 100, OpImage = 100,
OpImageQueryFormat = 101, OpImageQueryFormat = 101,
OpImageQueryOrder = 102, OpImageQueryOrder = 102,
OpImageQuerySizeLod = 103, OpImageQuerySizeLod = 103,
OpImageQuerySize = 104, OpImageQuerySize = 104,
OpImageQueryLod = 105, OpImageQueryLod = 105,
OpImageQueryLevels = 106, OpImageQueryLevels = 106,
OpImageQuerySamples = 107, OpImageQuerySamples = 107,
OpConvertFToU = 109, OpConvertFToU = 109,
OpConvertFToS = 110, OpConvertFToS = 110,
OpConvertSToF = 111, OpConvertSToF = 111,
OpConvertUToF = 112, OpConvertUToF = 112,
OpUConvert = 113, OpUConvert = 113,
OpSConvert = 114, OpSConvert = 114,
OpFConvert = 115, OpFConvert = 115,
OpQuantizeToF16 = 116, OpQuantizeToF16 = 116,
OpConvertPtrToU = 117, OpConvertPtrToU = 117,
OpSatConvertSToU = 118, OpSatConvertSToU = 118,
OpSatConvertUToS = 119, OpSatConvertUToS = 119,
OpConvertUToPtr = 120, OpConvertUToPtr = 120,
OpPtrCastToGeneric = 121, OpPtrCastToGeneric = 121,
OpGenericCastToPtr = 122, OpGenericCastToPtr = 122,
OpGenericCastToPtrExplicit = 123, OpGenericCastToPtrExplicit = 123,
OpBitcast = 124, OpBitcast = 124,
OpSNegate = 126, OpSNegate = 126,
OpFNegate = 127, OpFNegate = 127,
OpIAdd = 128, OpIAdd = 128,
OpFAdd = 129, OpFAdd = 129,
OpISub = 130, OpISub = 130,
OpFSub = 131, OpFSub = 131,
OpIMul = 132, OpIMul = 132,
OpFMul = 133, OpFMul = 133,
OpUDiv = 134, OpUDiv = 134,
OpSDiv = 135, OpSDiv = 135,
OpFDiv = 136, OpFDiv = 136,
OpUMod = 137, OpUMod = 137,
OpSRem = 138, OpSRem = 138,
OpSMod = 139, OpSMod = 139,
OpFRem = 140, OpFRem = 140,
OpFMod = 141, OpFMod = 141,
OpVectorTimesScalar = 142, OpVectorTimesScalar = 142,
OpMatrixTimesScalar = 143, OpMatrixTimesScalar = 143,
OpVectorTimesMatrix = 144, OpVectorTimesMatrix = 144,
OpMatrixTimesVector = 145, OpMatrixTimesVector = 145,
OpMatrixTimesMatrix = 146, OpMatrixTimesMatrix = 146,
OpOuterProduct = 147, OpOuterProduct = 147,
OpDot = 148, OpDot = 148,
OpIAddCarry = 149, OpIAddCarry = 149,
OpISubBorrow = 150, OpISubBorrow = 150,
OpUMulExtended = 151, OpUMulExtended = 151,
OpSMulExtended = 152, OpSMulExtended = 152,
OpAny = 154, OpAny = 154,
OpAll = 155, OpAll = 155,
OpIsNan = 156, OpIsNan = 156,
OpIsInf = 157, OpIsInf = 157,
OpIsFinite = 158, OpIsFinite = 158,
OpIsNormal = 159, OpIsNormal = 159,
OpSignBitSet = 160, OpSignBitSet = 160,
OpLessOrGreater = 161, OpLessOrGreater = 161,
OpOrdered = 162, OpOrdered = 162,
OpUnordered = 163, OpUnordered = 163,
OpLogicalEqual = 164, OpLogicalEqual = 164,
OpLogicalNotEqual = 165, OpLogicalNotEqual = 165,
OpLogicalOr = 166, OpLogicalOr = 166,
OpLogicalAnd = 167, OpLogicalAnd = 167,
OpLogicalNot = 168, OpLogicalNot = 168,
OpSelect = 169, OpSelect = 169,
OpIEqual = 170, OpIEqual = 170,
OpINotEqual = 171, OpINotEqual = 171,
OpUGreaterThan = 172, OpUGreaterThan = 172,
OpSGreaterThan = 173, OpSGreaterThan = 173,
OpUGreaterThanEqual = 174, OpUGreaterThanEqual = 174,
OpSGreaterThanEqual = 175, OpSGreaterThanEqual = 175,
OpULessThan = 176, OpULessThan = 176,
OpSLessThan = 177, OpSLessThan = 177,
OpULessThanEqual = 178, OpULessThanEqual = 178,
OpSLessThanEqual = 179, OpSLessThanEqual = 179,
OpFOrdEqual = 180, OpFOrdEqual = 180,
OpFUnordEqual = 181, OpFUnordEqual = 181,
OpFOrdNotEqual = 182, OpFOrdNotEqual = 182,
OpFUnordNotEqual = 183, OpFUnordNotEqual = 183,
OpFOrdLessThan = 184, OpFOrdLessThan = 184,
OpFUnordLessThan = 185, OpFUnordLessThan = 185,
OpFOrdGreaterThan = 186, OpFOrdGreaterThan = 186,
OpFUnordGreaterThan = 187, OpFUnordGreaterThan = 187,
OpFOrdLessThanEqual = 188, OpFOrdLessThanEqual = 188,
OpFUnordLessThanEqual = 189, OpFUnordLessThanEqual = 189,
OpFOrdGreaterThanEqual = 190, OpFOrdGreaterThanEqual = 190,
OpFUnordGreaterThanEqual = 191, OpFUnordGreaterThanEqual = 191,
OpShiftRightLogical = 194, OpShiftRightLogical = 194,
OpShiftRightArithmetic = 195, OpShiftRightArithmetic = 195,
OpShiftLeftLogical = 196, OpShiftLeftLogical = 196,
OpBitwiseOr = 197, OpBitwiseOr = 197,
OpBitwiseXor = 198, OpBitwiseXor = 198,
OpBitwiseAnd = 199, OpBitwiseAnd = 199,
OpNot = 200, OpNot = 200,
OpBitFieldInsert = 201, OpBitFieldInsert = 201,
OpBitFieldSExtract = 202, OpBitFieldSExtract = 202,
OpBitFieldUExtract = 203, OpBitFieldUExtract = 203,
OpBitReverse = 204, OpBitReverse = 204,
OpBitCount = 205, OpBitCount = 205,
OpDPdx = 207, OpDPdx = 207,
OpDPdy = 208, OpDPdy = 208,
OpFwidth = 209, OpFwidth = 209,
OpDPdxFine = 210, OpDPdxFine = 210,
OpDPdyFine = 211, OpDPdyFine = 211,
OpFwidthFine = 212, OpFwidthFine = 212,
OpDPdxCoarse = 213, OpDPdxCoarse = 213,
OpDPdyCoarse = 214, OpDPdyCoarse = 214,
OpFwidthCoarse = 215, OpFwidthCoarse = 215,
OpEmitVertex = 218, OpEmitVertex = 218,
OpEndPrimitive = 219, OpEndPrimitive = 219,
OpEmitStreamVertex = 220, OpEmitStreamVertex = 220,
OpEndStreamPrimitive = 221, OpEndStreamPrimitive = 221,
OpControlBarrier = 224, OpControlBarrier = 224,
OpMemoryBarrier = 225, OpMemoryBarrier = 225,
OpAtomicLoad = 227, OpAtomicLoad = 227,
OpAtomicStore = 228, OpAtomicStore = 228,
OpAtomicExchange = 229, OpAtomicExchange = 229,
OpAtomicCompareExchange = 230, OpAtomicCompareExchange = 230,
OpAtomicCompareExchangeWeak = 231, OpAtomicCompareExchangeWeak = 231,
OpAtomicIIncrement = 232, OpAtomicIIncrement = 232,
OpAtomicIDecrement = 233, OpAtomicIDecrement = 233,
OpAtomicIAdd = 234, OpAtomicIAdd = 234,
OpAtomicISub = 235, OpAtomicISub = 235,
OpAtomicSMin = 236, OpAtomicSMin = 236,
OpAtomicUMin = 237, OpAtomicUMin = 237,
OpAtomicSMax = 238, OpAtomicSMax = 238,
OpAtomicUMax = 239, OpAtomicUMax = 239,
OpAtomicAnd = 240, OpAtomicAnd = 240,
OpAtomicOr = 241, OpAtomicOr = 241,
OpAtomicXor = 242, OpAtomicXor = 242,
OpPhi = 245, OpPhi = 245,
OpLoopMerge = 246, OpLoopMerge = 246,
OpSelectionMerge = 247, OpSelectionMerge = 247,
OpLabel = 248, OpLabel = 248,
OpBranch = 249, OpBranch = 249,
OpBranchConditional = 250, OpBranchConditional = 250,
OpSwitch = 251, OpSwitch = 251,
OpKill = 252, OpKill = 252,
OpReturn = 253, OpReturn = 253,
OpReturnValue = 254, OpReturnValue = 254,
OpUnreachable = 255, OpUnreachable = 255,
OpLifetimeStart = 256, OpLifetimeStart = 256,
OpLifetimeStop = 257, OpLifetimeStop = 257,
OpGroupAsyncCopy = 259, OpGroupAsyncCopy = 259,
OpGroupWaitEvents = 260, OpGroupWaitEvents = 260,
OpGroupAll = 261, OpGroupAll = 261,
OpGroupAny = 262, OpGroupAny = 262,
OpGroupBroadcast = 263, OpGroupBroadcast = 263,
OpGroupIAdd = 264, OpGroupIAdd = 264,
OpGroupFAdd = 265, OpGroupFAdd = 265,
OpGroupFMin = 266, OpGroupFMin = 266,
OpGroupUMin = 267, OpGroupUMin = 267,
OpGroupSMin = 268, OpGroupSMin = 268,
OpGroupFMax = 269, OpGroupFMax = 269,
OpGroupUMax = 270, OpGroupUMax = 270,
OpGroupSMax = 271, OpGroupSMax = 271,
OpReadPipe = 274, OpReadPipe = 274,
OpWritePipe = 275, OpWritePipe = 275,
OpReservedReadPipe = 276, OpReservedReadPipe = 276,
OpReservedWritePipe = 277, OpReservedWritePipe = 277,
OpReserveReadPipePackets = 278, OpReserveReadPipePackets = 278,
OpReserveWritePipePackets = 279, OpReserveWritePipePackets = 279,
OpCommitReadPipe = 280, OpCommitReadPipe = 280,
OpCommitWritePipe = 281, OpCommitWritePipe = 281,
OpIsValidReserveId = 282, OpIsValidReserveId = 282,
OpGetNumPipePackets = 283, OpGetNumPipePackets = 283,
OpGetMaxPipePackets = 284, OpGetMaxPipePackets = 284,
OpGroupReserveReadPipePackets = 285, OpGroupReserveReadPipePackets = 285,
OpGroupReserveWritePipePackets = 286, OpGroupReserveWritePipePackets = 286,
OpGroupCommitReadPipe = 287, OpGroupCommitReadPipe = 287,
OpGroupCommitWritePipe = 288, OpGroupCommitWritePipe = 288,
OpEnqueueMarker = 291, OpEnqueueMarker = 291,
OpEnqueueKernel = 292, OpEnqueueKernel = 292,
OpGetKernelNDrangeSubGroupCount = 293, OpGetKernelNDrangeSubGroupCount = 293,
OpGetKernelNDrangeMaxSubGroupSize = 294, OpGetKernelNDrangeMaxSubGroupSize = 294,
OpGetKernelWorkGroupSize = 295, OpGetKernelWorkGroupSize = 295,
OpGetKernelPreferredWorkGroupSizeMultiple = 296, OpGetKernelPreferredWorkGroupSizeMultiple = 296,
OpRetainEvent = 297, OpRetainEvent = 297,
OpReleaseEvent = 298, OpReleaseEvent = 298,
OpCreateUserEvent = 299, OpCreateUserEvent = 299,
OpIsValidEvent = 300, OpIsValidEvent = 300,
OpSetUserEventStatus = 301, OpSetUserEventStatus = 301,
OpCaptureEventProfilingInfo = 302, OpCaptureEventProfilingInfo = 302,
OpGetDefaultQueue = 303, OpGetDefaultQueue = 303,
OpBuildNDRange = 304, OpBuildNDRange = 304,
OpImageSparseSampleImplicitLod = 305, OpImageSparseSampleImplicitLod = 305,
OpImageSparseSampleExplicitLod = 306, OpImageSparseSampleExplicitLod = 306,
OpImageSparseSampleDrefImplicitLod = 307, OpImageSparseSampleDrefImplicitLod = 307,
OpImageSparseSampleDrefExplicitLod = 308, OpImageSparseSampleDrefExplicitLod = 308,
OpImageSparseSampleProjImplicitLod = 309, OpImageSparseSampleProjImplicitLod = 309,
OpImageSparseSampleProjExplicitLod = 310, OpImageSparseSampleProjExplicitLod = 310,
OpImageSparseSampleProjDrefImplicitLod = 311, OpImageSparseSampleProjDrefImplicitLod = 311,
OpImageSparseSampleProjDrefExplicitLod = 312, OpImageSparseSampleProjDrefExplicitLod = 312,
OpImageSparseFetch = 313, OpImageSparseFetch = 313,
OpImageSparseGather = 314, OpImageSparseGather = 314,
OpImageSparseDrefGather = 315, OpImageSparseDrefGather = 315,
OpImageSparseTexelsResident = 316, OpImageSparseTexelsResident = 316,
OpNoLine = 317, OpNoLine = 317,
OpAtomicFlagTestAndSet = 318, OpAtomicFlagTestAndSet = 318,
OpAtomicFlagClear = 319, OpAtomicFlagClear = 319,
}; };
// Overload operator| for mask bit combining // Overload operator| for mask bit combining
inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); } inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); }
inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); } inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); }
inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); } inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); }
inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); } inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); }
inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); } inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); }
inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); } inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); }
inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); } inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); }
inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); } inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); }
} // end namespace spv } // end namespace spv
#endif // #ifndef spirv_H #endif // #ifndef spirv_H
...@@ -85,7 +85,7 @@ Uniform block reflection: ...@@ -85,7 +85,7 @@ Uniform block reflection:
nameless: offset -1, type ffffffff, size 496, index -1 nameless: offset -1, type ffffffff, size 496, index -1
named: offset -1, type ffffffff, size 304, index -1 named: offset -1, type ffffffff, size 304, index -1
c_nameless: offset -1, type ffffffff, size 112, index -1 c_nameless: offset -1, type ffffffff, size 112, index -1
nested: offset -1, type ffffffff, size 28, index -1 nested: offset -1, type ffffffff, size 32, index -1
abl[0]: offset -1, type ffffffff, size 4, index -1 abl[0]: offset -1, type ffffffff, size 4, index -1
abl[1]: offset -1, type ffffffff, size 4, index -1 abl[1]: offset -1, type ffffffff, size 4, index -1
abl[2]: offset -1, type ffffffff, size 4, index -1 abl[2]: offset -1, type ffffffff, size 4, index -1
......
...@@ -309,7 +309,7 @@ struct str_hash ...@@ -309,7 +309,7 @@ struct str_hash
unsigned long hash = 5381; unsigned long hash = 5381;
int c; int c;
while ((c = *str++)) while ((c = *str++) != 0)
hash = ((hash << 5) + hash) + c; hash = ((hash << 5) + hash) + c;
return hash; return hash;
......
...@@ -959,6 +959,11 @@ int TIntermediate::getBaseAlignment(const TType& type, int& size, int& stride, b ...@@ -959,6 +959,11 @@ int TIntermediate::getBaseAlignment(const TType& type, int& size, int& stride, b
size += memberSize; size += memberSize;
} }
// The structure may have padding at the end; the base offset of
// the member following the sub-structure is rounded up to the next
// multiple of the base alignment of the structure.
RoundToPow2(size, maxAlignment);
return maxAlignment; return maxAlignment;
} }
...@@ -982,7 +987,7 @@ int TIntermediate::getBaseAlignment(const TType& type, int& size, int& stride, b ...@@ -982,7 +987,7 @@ int TIntermediate::getBaseAlignment(const TType& type, int& size, int& stride, b
// rules 5 and 7 // rules 5 and 7
if (type.isMatrix()) { if (type.isMatrix()) {
// rule 5: deref to row, not to column, meaning the size of vector is num columns instead of num rows // rule 5: deref to row, not to column, meaning the size of vector is num columns instead of num rows
TType derefType(type, 0, type.getQualifier().layoutMatrix == ElmRowMajor); TType derefType(type, 0, rowMajor);
alignment = getBaseAlignment(derefType, size, dummyStride, std140, rowMajor); alignment = getBaseAlignment(derefType, size, dummyStride, std140, rowMajor);
if (std140) if (std140)
......
...@@ -195,7 +195,7 @@ int TPpContext::ReadToken(TokenStream *pTok, TPpToken *ppToken) ...@@ -195,7 +195,7 @@ int TPpContext::ReadToken(TokenStream *pTok, TPpToken *ppToken)
case PpAtomConstUint: case PpAtomConstUint:
len = 0; len = 0;
ch = lReadByte(pTok); ch = lReadByte(pTok);
while (ch != 0) { while (ch != 0 && ch != EndOfInput) {
if (len < MaxTokenLength) { if (len < MaxTokenLength) {
tokenText[len] = (char)ch; tokenText[len] = (char)ch;
len++; len++;
...@@ -215,12 +215,10 @@ int TPpContext::ReadToken(TokenStream *pTok, TPpToken *ppToken) ...@@ -215,12 +215,10 @@ int TPpContext::ReadToken(TokenStream *pTok, TPpToken *ppToken)
break; break;
case PpAtomConstFloat: case PpAtomConstFloat:
case PpAtomConstDouble: case PpAtomConstDouble:
strcpy(ppToken->name, tokenText);
ppToken->dval = atof(ppToken->name); ppToken->dval = atof(ppToken->name);
break; break;
case PpAtomConstInt: case PpAtomConstInt:
case PpAtomConstUint: case PpAtomConstUint:
strcpy(ppToken->name, tokenText);
if (len > 0 && tokenText[0] == '0') { if (len > 0 && tokenText[0] == '0') {
if (len > 1 && (tokenText[1] == 'x' || tokenText[1] == 'X')) if (len > 1 && (tokenText[1] == 'x' || tokenText[1] == 'X'))
ppToken->ival = strtol(ppToken->name, 0, 16); ppToken->ival = strtol(ppToken->name, 0, 16);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment