Merge branch 'update-header-to-rev31' into 'master'

Update external headers to rev 31

See merge request !3
This commit is contained in:
Kenneth Benzie 2015-08-18 05:34:27 -04:00
commit 67b649fa01
14 changed files with 1039 additions and 2132 deletions

130
external/include/headers/GLSL.std.450.h vendored Normal file
View File

@ -0,0 +1,130 @@
/*
** Copyright (c) 2014-2015 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a copy
** of this software and/or associated documentation files (the "Materials"),
** to deal in the Materials without restriction, including without limitation
** the rights to use, copy, modify, merge, publish, distribute, sublicense,
** 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:
**
** The above copyright notice and this permission notice shall be included in
** all copies or substantial portions of the Materials.
**
** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
**
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
** 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
** IN THE MATERIALS.
*/
#ifndef GLSLstd450_H
#define GLSLstd450_H
const int GLSLstd450Version = 99;
const int GLSLstd450Revision = 2;
enum GLSLstd450 {
GLSLstd450Bad = 0, // Don't use
GLSLstd450Round = 1,
GLSLstd450RoundEven = 2,
GLSLstd450Trunc = 3,
GLSLstd450FAbs = 4,
GLSLstd450SAbs = 5,
GLSLstd450FSign = 6,
GLSLstd450SSign = 7,
GLSLstd450Floor = 8,
GLSLstd450Ceil = 9,
GLSLstd450Fract = 10,
GLSLstd450Radians = 11,
GLSLstd450Degrees = 12,
GLSLstd450Sin = 13,
GLSLstd450Cos = 14,
GLSLstd450Tan = 15,
GLSLstd450Asin = 16,
GLSLstd450Acos = 17,
GLSLstd450Atan = 18,
GLSLstd450Sinh = 19,
GLSLstd450Cosh = 20,
GLSLstd450Tanh = 21,
GLSLstd450Asinh = 22,
GLSLstd450Acosh = 23,
GLSLstd450Atanh = 24,
GLSLstd450Atan2 = 25,
GLSLstd450Pow = 26,
GLSLstd450Exp = 27,
GLSLstd450Log = 28,
GLSLstd450Exp2 = 29,
GLSLstd450Log2 = 30,
GLSLstd450Sqrt = 31,
GLSLstd450InverseSqrt = 32,
GLSLstd450Determinant = 33,
GLSLstd450MatrixInverse = 34,
GLSLstd450Modf = 35, // second operand needs an OpVariable to write to
GLSLstd450ModfStruct = 36, // no OpVariable operand
GLSLstd450FMin = 37,
GLSLstd450UMin = 38,
GLSLstd450SMin = 39,
GLSLstd450FMax = 40,
GLSLstd450UMax = 41,
GLSLstd450SMax = 42,
GLSLstd450FClamp = 43,
GLSLstd450UClamp = 44,
GLSLstd450SClamp = 45,
GLSLstd450Mix = 46,
GLSLstd450Step = 47,
GLSLstd450SmoothStep = 48,
GLSLstd450Fma = 49,
GLSLstd450Frexp = 50, // second operand needs an OpVariable to write to
GLSLstd450FrexpStruct = 51, // no OpVariable operand
GLSLstd450Ldexp = 52,
GLSLstd450PackSnorm4x8 = 53,
GLSLstd450PackUnorm4x8 = 54,
GLSLstd450PackSnorm2x16 = 55,
GLSLstd450PackUnorm2x16 = 56,
GLSLstd450PackHalf2x16 = 57,
GLSLstd450PackDouble2x32 = 58,
GLSLstd450UnpackSnorm2x16 = 59,
GLSLstd450UnpackUnorm2x16 = 60,
GLSLstd450UnpackHalf2x16 = 61,
GLSLstd450UnpackSnorm4x8 = 62,
GLSLstd450UnpackUnorm4x8 = 63,
GLSLstd450UnpackDouble2x32 = 64,
GLSLstd450Length = 65,
GLSLstd450Distance = 66,
GLSLstd450Cross = 67,
GLSLstd450Normalize = 68,
GLSLstd450FaceForward = 69,
GLSLstd450Reflect = 70,
GLSLstd450Refract = 71,
GLSLstd450FindILSB = 72,
GLSLstd450FindSMSB = 73,
GLSLstd450FindUMSB = 74,
GLSLstd450InterpolateAtCentroid = 75,
GLSLstd450InterpolateAtSample = 76,
GLSLstd450InterpolateAtOffset = 77,
GLSLstd450AddCarry = 78, // These three should move to the core instruction set
GLSLstd450SubBorrow = 79,
GLSLstd450MulExtended = 80,
GLSLstd450Count
};
#endif // #ifndef GLSLstd450_H

View File

@ -1,213 +0,0 @@
/*
** Copyright (c) 2015 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a copy
** of this software and/or associated documentation files (the "Materials"),
** to deal in the Materials without restriction, including without limitation
** the rights to use, copy, modify, merge, publish, distribute, sublicense,
** 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:
**
** The above copyright notice and this permission notice shall be included in
** all copies or substantial portions of the Materials.
**
** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
**
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
** 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
** IN THE MATERIALS.
*/
//
// Author: John Kessenich, LunarG
//
namespace GLSL_STD_450 {
enum Entrypoints {
Round = 0,
RoundEven = 1,
Trunc = 2,
Abs = 3,
Sign = 4,
Floor = 5,
Ceil = 6,
Fract = 7,
Radians = 8,
Degrees = 9,
Sin = 10,
Cos = 11,
Tan = 12,
Asin = 13,
Acos = 14,
Atan = 15,
Sinh = 16,
Cosh = 17,
Tanh = 18,
Asinh = 19,
Acosh = 20,
Atanh = 21,
Atan2 = 22,
Pow = 23,
Exp = 24,
Log = 25,
Exp2 = 26,
Log2 = 27,
Sqrt = 28,
InverseSqrt = 29,
Determinant = 30,
MatrixInverse = 31,
Modf = 32, // second argument needs the OpVariable = , not an OpLoad
Min = 33,
Max = 34,
Clamp = 35,
Mix = 36,
Step = 37,
SmoothStep = 38,
FloatBitsToInt = 39,
FloatBitsToUint = 40,
IntBitsToFloat = 41,
UintBitsToFloat = 42,
Fma = 43,
Frexp = 44,
Ldexp = 45,
PackSnorm4x8 = 46,
PackUnorm4x8 = 47,
PackSnorm2x16 = 48,
PackUnorm2x16 = 49,
PackHalf2x16 = 50,
PackDouble2x32 = 51,
UnpackSnorm2x16 = 52,
UnpackUnorm2x16 = 53,
UnpackHalf2x16 = 54,
UnpackSnorm4x8 = 55,
UnpackUnorm4x8 = 56,
UnpackDouble2x32 = 57,
Length = 58,
Distance = 59,
Cross = 60,
Normalize = 61,
Ftransform = 62,
FaceForward = 63,
Reflect = 64,
Refract = 65,
UaddCarry = 66,
UsubBorrow = 67,
UmulExtended = 68,
ImulExtended = 69,
BitfieldExtract = 70,
BitfieldInsert = 71,
BitfieldReverse = 72,
BitCount = 73,
FindLSB = 74,
FindMSB = 75,
InterpolateAtCentroid = 76,
InterpolateAtSample = 77,
InterpolateAtOffset = 78,
Count
};
inline void GetDebugNames(const char** names)
{
for (int i = 0; i < Count; ++i)
names[i] = "Unknown";
names[Round] = "round";
names[RoundEven] = "roundEven";
names[Trunc] = "trunc";
names[Abs] = "abs";
names[Sign] = "sign";
names[Floor] = "floor";
names[Ceil] = "ceil";
names[Fract] = "fract";
names[Radians] = "radians";
names[Degrees] = "degrees";
names[Sin] = "sin";
names[Cos] = "cos";
names[Tan] = "tan";
names[Asin] = "asin";
names[Acos] = "acos";
names[Atan] = "atan";
names[Sinh] = "sinh";
names[Cosh] = "cosh";
names[Tanh] = "tanh";
names[Asinh] = "asinh";
names[Acosh] = "acosh";
names[Atanh] = "atanh";
names[Atan2] = "atan2";
names[Pow] = "pow";
names[Exp] = "exp";
names[Log] = "log";
names[Exp2] = "exp2";
names[Log2] = "log2";
names[Sqrt] = "sqrt";
names[InverseSqrt] = "inversesqrt";
names[Determinant] = "determinant";
names[MatrixInverse] = "inverse";
names[Modf] = "modf";
names[Min] = "min";
names[Max] = "max";
names[Clamp] = "clamp";
names[Mix] = "mix";
names[Step] = "step";
names[SmoothStep] = "smoothstep";
names[FloatBitsToInt] = "floatBitsToInt";
names[FloatBitsToUint] = "floatBitsToUint";
names[IntBitsToFloat] = "intBitsToFloat";
names[UintBitsToFloat] = "uintBitsToFloat";
names[Fma] = "fma";
names[Frexp] = "frexp";
names[Ldexp] = "ldexp";
names[PackSnorm4x8] = "packSnorm4x8";
names[PackUnorm4x8] = "packUnorm4x8";
names[PackSnorm2x16] = "packSnorm2x16";
names[PackUnorm2x16] = "packUnorm2x16";
names[PackHalf2x16] = "packHalf2x16";
names[PackDouble2x32] = "packDouble2x32";
names[UnpackSnorm2x16] = "unpackSnorm2x16";
names[UnpackUnorm2x16] = "unpackUnorm2x16";
names[UnpackHalf2x16] = "unpackHalf2x16";
names[UnpackSnorm4x8] = "unpackSnorm4x8";
names[UnpackUnorm4x8] = "unpackUnorm4x8";
names[UnpackDouble2x32] = "unpackDouble2x32";
names[Length] = "length";
names[Distance] = "distance";
names[Cross] = "cross";
names[Normalize] = "normalize";
names[Ftransform] = "ftransform";
names[FaceForward] = "faceforward";
names[Reflect] = "reflect";
names[Refract] = "refract";
names[UaddCarry] = "uaddCarry";
names[UsubBorrow] = "usubBorrow";
names[UmulExtended] = "umulExtended";
names[ImulExtended] = "imulExtended";
names[BitfieldExtract] = "bitfieldExtract";
names[BitfieldInsert] = "bitfieldInsert";
names[BitfieldReverse] = "bitfieldReverse";
names[BitCount] = "bitCount";
names[FindLSB] = "findLSB";
names[FindMSB] = "findMSB";
names[InterpolateAtCentroid] = "interpolateAtCentroid";
names[InterpolateAtSample] = "interpolateAtSample";
names[InterpolateAtOffset] = "interpolateAtOffset";
}
}; // end namespace GLSL_STD_450

View File

@ -149,7 +149,7 @@ enum Entrypoints {
Fast_length = 109,
Fast_normalize = 110,
// Images
// Images - Deprecated
Read_imagef = 111,
Read_imagei = 112,
Read_imageui = 113,
@ -170,9 +170,13 @@ enum Entrypoints {
Read_imagef_mipmap_grad = 126,
Read_imagei_mipmap_grad = 127,
Read_imageui_mipmap_grad = 128,
// Image write with LOD
Write_imagef_mipmap_lod = 129,
Write_imagei_mipmap_lod = 130,
Write_imageui_mipmap_lod = 131,
// Images - Deprecated
Get_image_width = 132,
Get_image_height = 133,
Get_image_depth = 134,
@ -262,46 +266,7 @@ enum Entrypoints {
UMad_hi = 204,
};
enum ImageChannelOrder {
R_ChannelOrder = 0x10B0,
A_ChannelOrder = 0x10B1,
RG_ChannelOrder = 0x10B2,
RA_ChannelOrder = 0x10B3,
RGB_ChannelOrder = 0x10B4,
RGBA_ChannelOrder = 0x10B5,
BGRA_ChannelOrder = 0x10B6,
ARGB_ChannelOrder = 0x10B7,
INTENSITY_ChannelOrder = 0x10B8,
LUMINANCE_ChannelOrder = 0x10B9,
Rx_ChannelOrder = 0x10BA,
RGx_ChannelOrder = 0x10BB,
RGBx_ChannelOrder = 0x10BC,
DEPTH_ChannelOrder = 0x10BD,
DEPTH_STENCIL_ChannelOrder = 0x10BE,
sRGB_ChannelOrder = 0x10BF,
sRGBx_ChannelOrder = 0x10C0,
sRGBA_ChannelOrder = 0x10C1,
sBGRA_ChannelOrder = 0x10C2,
};
enum ImageChannelType {
SNORM_INT8_ChannelType = 0x10D0,
SNORM_INT16_ChannelType = 0x10D1,
UNORM_INT8_ChannelType = 0x10D2,
UNORM_INT16_ChannelType = 0x10D3,
UNORM_SHORT_565_ChannelType = 0x10D4,
UNORM_SHORT_555_ChannelType = 0x10D5,
UNORM_INT_101010_ChannelType = 0x10D6,
SIGNED_INT8_ChannelType = 0x10D7,
SIGNED_INT16_ChannelType = 0x10D8,
SIGNED_INT32_ChannelType = 0x10D9,
UNSIGNED_INT8_ChannelType = 0x10DA,
UNSIGNED_INT16_ChannelType = 0x10DB,
UNSIGNED_INT32_ChannelType = 0x10DC,
HALF_FLOAT_ChannelType = 0x10DD,
FLOAT_ChannelType = 0x10DE,
UNORM_INT24_ChannelType = 0x10DF,
};
}; // end namespace OpenCL20

File diff suppressed because it is too large Load Diff

830
external/include/headers/spirv.hpp vendored Normal file
View File

@ -0,0 +1,830 @@
// Copyright (c) 2014-2015 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and/or associated documentation files (the "Materials"),
// to deal in the Materials without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// 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:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Materials.
//
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
//
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// 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
// IN THE MATERIALS.
// This header is automatically generated by the same tool that creates
// the Binary Section of the SPIR-V specification.
// Specification revision 31.
// Enumeration tokens for SPIR-V, in various styles:
// C, C++, C++11, JSON, Lua, Python
//
// - 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++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL
// - Lua will use tables, 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,
// while others are mutually exclusive. The mask-like ones have
// "Mask" in their name, and a parallel enum that has the shift
// amount (1 << x) for each corresponding enumerant.
#ifndef spirv_H
#define spirv_H
namespace spv {
typedef unsigned int Id;
static const unsigned int MagicNumber = 0x07230203;
static const unsigned int Version = 99;
static const unsigned int Revision = 31;
static const unsigned int OpCodeMask = 0xffff;
static const unsigned int WordCountShift = 16;
enum SourceLanguage {
SourceLanguageUnknown = 0,
SourceLanguageESSL = 1,
SourceLanguageGLSL = 2,
SourceLanguageOpenCL = 3,
};
enum ExecutionModel {
ExecutionModelVertex = 0,
ExecutionModelTessellationControl = 1,
ExecutionModelTessellationEvaluation = 2,
ExecutionModelGeometry = 3,
ExecutionModelFragment = 4,
ExecutionModelGLCompute = 5,
ExecutionModelKernel = 6,
};
enum AddressingModel {
AddressingModelLogical = 0,
AddressingModelPhysical32 = 1,
AddressingModelPhysical64 = 2,
};
enum MemoryModel {
MemoryModelSimple = 0,
MemoryModelGLSL450 = 1,
MemoryModelOpenCL = 2,
};
enum ExecutionMode {
ExecutionModeInvocations = 0,
ExecutionModeSpacingEqual = 1,
ExecutionModeSpacingFractionalEven = 2,
ExecutionModeSpacingFractionalOdd = 3,
ExecutionModeVertexOrderCw = 4,
ExecutionModeVertexOrderCcw = 5,
ExecutionModePixelCenterInteger = 6,
ExecutionModeOriginUpperLeft = 7,
ExecutionModeOriginLowerLeft = 8,
ExecutionModeEarlyFragmentTests = 9,
ExecutionModePointMode = 10,
ExecutionModeXfb = 11,
ExecutionModeDepthReplacing = 12,
ExecutionModeDepthAny = 13,
ExecutionModeDepthGreater = 14,
ExecutionModeDepthLess = 15,
ExecutionModeDepthUnchanged = 16,
ExecutionModeLocalSize = 17,
ExecutionModeLocalSizeHint = 18,
ExecutionModeInputPoints = 19,
ExecutionModeInputLines = 20,
ExecutionModeInputLinesAdjacency = 21,
ExecutionModeInputTriangles = 22,
ExecutionModeInputTrianglesAdjacency = 23,
ExecutionModeInputQuads = 24,
ExecutionModeInputIsolines = 25,
ExecutionModeOutputVertices = 26,
ExecutionModeOutputPoints = 27,
ExecutionModeOutputLineStrip = 28,
ExecutionModeOutputTriangleStrip = 29,
ExecutionModeVecTypeHint = 30,
ExecutionModeContractionOff = 31,
};
enum StorageClass {
StorageClassUniformConstant = 0,
StorageClassInput = 1,
StorageClassUniform = 2,
StorageClassOutput = 3,
StorageClassWorkgroupLocal = 4,
StorageClassWorkgroupGlobal = 5,
StorageClassPrivateGlobal = 6,
StorageClassFunction = 7,
StorageClassGeneric = 8,
StorageClassAtomicCounter = 10,
StorageClassImage = 11,
};
enum Dim {
Dim1D = 0,
Dim2D = 1,
Dim3D = 2,
DimCube = 3,
DimRect = 4,
DimBuffer = 5,
};
enum SamplerAddressingMode {
SamplerAddressingModeNone = 0,
SamplerAddressingModeClampToEdge = 1,
SamplerAddressingModeClamp = 2,
SamplerAddressingModeRepeat = 3,
SamplerAddressingModeRepeatMirrored = 4,
};
enum SamplerFilterMode {
SamplerFilterModeNearest = 0,
SamplerFilterModeLinear = 1,
};
enum ImageFormat {
ImageFormatUnknown = 0,
ImageFormatRgba32f = 1,
ImageFormatRgba16f = 2,
ImageFormatR32f = 3,
ImageFormatRgba8 = 4,
ImageFormatRgba8Snorm = 5,
ImageFormatRg32f = 6,
ImageFormatRg16f = 7,
ImageFormatR11fG11fB10f = 8,
ImageFormatR16f = 9,
ImageFormatRgba16 = 10,
ImageFormatRgb10A2 = 11,
ImageFormatRg16 = 12,
ImageFormatRg8 = 13,
ImageFormatR16 = 14,
ImageFormatR8 = 15,
ImageFormatRgba16Snorm = 16,
ImageFormatRg16Snorm = 17,
ImageFormatRg8Snorm = 18,
ImageFormatR16Snorm = 19,
ImageFormatR8Snorm = 20,
ImageFormatRgba32i = 21,
ImageFormatRgba16i = 22,
ImageFormatRgba8i = 23,
ImageFormatR32i = 24,
ImageFormatRg32i = 25,
ImageFormatRg16i = 26,
ImageFormatRg8i = 27,
ImageFormatR16i = 28,
ImageFormatR8i = 29,
ImageFormatRgba32ui = 30,
ImageFormatRgba16ui = 31,
ImageFormatRgba8ui = 32,
ImageFormatR32ui = 33,
ImageFormatRgb10a2ui = 34,
ImageFormatRg32ui = 35,
ImageFormatRg16ui = 36,
ImageFormatRg8ui = 37,
ImageFormatR16ui = 38,
ImageFormatR8ui = 39,
};
enum ImageChannelOrder {
ImageChannelOrderR = 0,
ImageChannelOrderA = 1,
ImageChannelOrderRG = 2,
ImageChannelOrderRA = 3,
ImageChannelOrderRGB = 4,
ImageChannelOrderRGBA = 5,
ImageChannelOrderBGRA = 6,
ImageChannelOrderARGB = 7,
ImageChannelOrderIntensity = 8,
ImageChannelOrderLuminance = 9,
ImageChannelOrderRx = 10,
ImageChannelOrderRGx = 11,
ImageChannelOrderRGBx = 12,
ImageChannelOrderDepth = 13,
ImageChannelOrderDepthStencil = 14,
ImageChannelOrdersRGB = 15,
ImageChannelOrdersRGBx = 16,
ImageChannelOrdersRGBA = 17,
ImageChannelOrdersBGRA = 18,
};
enum ImageChannelDataType {
ImageChannelDataTypeSnormInt8 = 0,
ImageChannelDataTypeSnormInt16 = 1,
ImageChannelDataTypeUnormInt8 = 2,
ImageChannelDataTypeUnormInt16 = 3,
ImageChannelDataTypeUnormShort565 = 4,
ImageChannelDataTypeUnormShort555 = 5,
ImageChannelDataTypeUnormInt101010 = 6,
ImageChannelDataTypeSignedInt8 = 7,
ImageChannelDataTypeSignedInt16 = 8,
ImageChannelDataTypeSignedInt32 = 9,
ImageChannelDataTypeUnsignedInt8 = 10,
ImageChannelDataTypeUnsignedInt16 = 11,
ImageChannelDataTypeUnsignedInt32 = 12,
ImageChannelDataTypeHalfFloat = 13,
ImageChannelDataTypeFloat = 14,
ImageChannelDataTypeUnormInt24 = 15,
};
enum ImageOperandsShift {
ImageOperandsBiasShift = 0,
ImageOperandsLodShift = 1,
ImageOperandsGradShift = 2,
ImageOperandsConstOffsetShift = 3,
ImageOperandsOffsetShift = 4,
ImageOperandsConstOffsetsShift = 5,
ImageOperandsSampleShift = 6,
};
enum ImageOperandsMask {
ImageOperandsMaskNone = 0,
ImageOperandsBiasMask = 0x00000001,
ImageOperandsLodMask = 0x00000002,
ImageOperandsGradMask = 0x00000004,
ImageOperandsConstOffsetMask = 0x00000008,
ImageOperandsOffsetMask = 0x00000010,
ImageOperandsConstOffsetsMask = 0x00000020,
ImageOperandsSampleMask = 0x00000040,
};
enum FPFastMathModeShift {
FPFastMathModeNotNaNShift = 0,
FPFastMathModeNotInfShift = 1,
FPFastMathModeNSZShift = 2,
FPFastMathModeAllowRecipShift = 3,
FPFastMathModeFastShift = 4,
};
enum FPFastMathModeMask {
FPFastMathModeMaskNone = 0,
FPFastMathModeNotNaNMask = 0x00000001,
FPFastMathModeNotInfMask = 0x00000002,
FPFastMathModeNSZMask = 0x00000004,
FPFastMathModeAllowRecipMask = 0x00000008,
FPFastMathModeFastMask = 0x00000010,
};
enum FPRoundingMode {
FPRoundingModeRTE = 0,
FPRoundingModeRTZ = 1,
FPRoundingModeRTP = 2,
FPRoundingModeRTN = 3,
};
enum LinkageType {
LinkageTypeExport = 0,
LinkageTypeImport = 1,
};
enum AccessQualifier {
AccessQualifierReadOnly = 0,
AccessQualifierWriteOnly = 1,
AccessQualifierReadWrite = 2,
};
enum FunctionParameterAttribute {
FunctionParameterAttributeZext = 0,
FunctionParameterAttributeSext = 1,
FunctionParameterAttributeByVal = 2,
FunctionParameterAttributeSret = 3,
FunctionParameterAttributeNoAlias = 4,
FunctionParameterAttributeNoCapture = 5,
FunctionParameterAttributeNoWrite = 6,
FunctionParameterAttributeNoReadWrite = 7,
};
enum Decoration {
DecorationRelaxedPrecision = 0,
DecorationSpecId = 1,
DecorationBlock = 2,
DecorationBufferBlock = 3,
DecorationRowMajor = 4,
DecorationColMajor = 5,
DecorationArrayStride = 6,
DecorationMatrixStride = 7,
DecorationGLSLShared = 8,
DecorationGLSLPacked = 9,
DecorationCPacked = 10,
DecorationBuiltIn = 11,
DecorationSmooth = 12,
DecorationNoperspective = 13,
DecorationFlat = 14,
DecorationPatch = 15,
DecorationCentroid = 16,
DecorationSample = 17,
DecorationInvariant = 18,
DecorationRestrict = 19,
DecorationAliased = 20,
DecorationVolatile = 21,
DecorationConstant = 22,
DecorationCoherent = 23,
DecorationNonwritable = 24,
DecorationNonreadable = 25,
DecorationUniform = 26,
DecorationNoStaticUse = 27,
DecorationSaturatedConversion = 28,
DecorationStream = 29,
DecorationLocation = 30,
DecorationComponent = 31,
DecorationIndex = 32,
DecorationBinding = 33,
DecorationDescriptorSet = 34,
DecorationOffset = 35,
DecorationXfbBuffer = 36,
DecorationXfbStride = 37,
DecorationFuncParamAttr = 38,
DecorationFPRoundingMode = 39,
DecorationFPFastMathMode = 40,
DecorationLinkageAttributes = 41,
};
enum BuiltIn {
BuiltInPosition = 0,
BuiltInPointSize = 1,
BuiltInClipDistance = 3,
BuiltInCullDistance = 4,
BuiltInVertexId = 5,
BuiltInInstanceId = 6,
BuiltInPrimitiveId = 7,
BuiltInInvocationId = 8,
BuiltInLayer = 9,
BuiltInViewportIndex = 10,
BuiltInTessLevelOuter = 11,
BuiltInTessLevelInner = 12,
BuiltInTessCoord = 13,
BuiltInPatchVertices = 14,
BuiltInFragCoord = 15,
BuiltInPointCoord = 16,
BuiltInFrontFacing = 17,
BuiltInSampleId = 18,
BuiltInSamplePosition = 19,
BuiltInSampleMask = 20,
BuiltInFragColor = 21,
BuiltInFragDepth = 22,
BuiltInHelperInvocation = 23,
BuiltInNumWorkgroups = 24,
BuiltInWorkgroupSize = 25,
BuiltInWorkgroupId = 26,
BuiltInLocalInvocationId = 27,
BuiltInGlobalInvocationId = 28,
BuiltInLocalInvocationIndex = 29,
BuiltInWorkDim = 30,
BuiltInGlobalSize = 31,
BuiltInEnqueuedWorkgroupSize = 32,
BuiltInGlobalOffset = 33,
BuiltInGlobalLinearId = 34,
BuiltInWorkgroupLinearId = 35,
BuiltInSubgroupSize = 36,
BuiltInSubgroupMaxSize = 37,
BuiltInNumSubgroups = 38,
BuiltInNumEnqueuedSubgroups = 39,
BuiltInSubgroupId = 40,
BuiltInSubgroupLocalInvocationId = 41,
};
enum SelectionControlShift {
SelectionControlFlattenShift = 0,
SelectionControlDontFlattenShift = 1,
};
enum SelectionControlMask {
SelectionControlMaskNone = 0,
SelectionControlFlattenMask = 0x00000001,
SelectionControlDontFlattenMask = 0x00000002,
};
enum LoopControlShift {
LoopControlUnrollShift = 0,
LoopControlDontUnrollShift = 1,
};
enum LoopControlMask {
LoopControlMaskNone = 0,
LoopControlUnrollMask = 0x00000001,
LoopControlDontUnrollMask = 0x00000002,
};
enum FunctionControlShift {
FunctionControlInlineShift = 0,
FunctionControlDontInlineShift = 1,
FunctionControlPureShift = 2,
FunctionControlConstShift = 3,
};
enum FunctionControlMask {
FunctionControlMaskNone = 0,
FunctionControlInlineMask = 0x00000001,
FunctionControlDontInlineMask = 0x00000002,
FunctionControlPureMask = 0x00000004,
FunctionControlConstMask = 0x00000008,
};
enum MemorySemanticsShift {
MemorySemanticsRelaxedShift = 0,
MemorySemanticsSequentiallyConsistentShift = 1,
MemorySemanticsAcquireShift = 2,
MemorySemanticsReleaseShift = 3,
MemorySemanticsUniformMemoryShift = 4,
MemorySemanticsSubgroupMemoryShift = 5,
MemorySemanticsWorkgroupLocalMemoryShift = 6,
MemorySemanticsWorkgroupGlobalMemoryShift = 7,
MemorySemanticsAtomicCounterMemoryShift = 8,
MemorySemanticsImageMemoryShift = 9,
};
enum MemorySemanticsMask {
MemorySemanticsMaskNone = 0,
MemorySemanticsRelaxedMask = 0x00000001,
MemorySemanticsSequentiallyConsistentMask = 0x00000002,
MemorySemanticsAcquireMask = 0x00000004,
MemorySemanticsReleaseMask = 0x00000008,
MemorySemanticsUniformMemoryMask = 0x00000010,
MemorySemanticsSubgroupMemoryMask = 0x00000020,
MemorySemanticsWorkgroupLocalMemoryMask = 0x00000040,
MemorySemanticsWorkgroupGlobalMemoryMask = 0x00000080,
MemorySemanticsAtomicCounterMemoryMask = 0x00000100,
MemorySemanticsImageMemoryMask = 0x00000200,
};
enum MemoryAccessShift {
MemoryAccessVolatileShift = 0,
MemoryAccessAlignedShift = 1,
};
enum MemoryAccessMask {
MemoryAccessMaskNone = 0,
MemoryAccessVolatileMask = 0x00000001,
MemoryAccessAlignedMask = 0x00000002,
};
enum Scope {
ScopeCrossDevice = 0,
ScopeDevice = 1,
ScopeWorkgroup = 2,
ScopeSubgroup = 3,
ScopeInvocation = 4,
};
enum GroupOperation {
GroupOperationReduce = 0,
GroupOperationInclusiveScan = 1,
GroupOperationExclusiveScan = 2,
};
enum KernelEnqueueFlags {
KernelEnqueueFlagsNoWait = 0,
KernelEnqueueFlagsWaitKernel = 1,
KernelEnqueueFlagsWaitWorkGroup = 2,
};
enum KernelProfilingInfoShift {
KernelProfilingInfoCmdExecTimeShift = 0,
};
enum KernelProfilingInfoMask {
KernelProfilingInfoMaskNone = 0,
KernelProfilingInfoCmdExecTimeMask = 0x00000001,
};
enum Capability {
CapabilityMatrix = 0,
CapabilityShader = 1,
CapabilityGeometry = 2,
CapabilityTessellation = 3,
CapabilityAddresses = 4,
CapabilityLinkage = 5,
CapabilityKernel = 6,
CapabilityVector16 = 7,
CapabilityFloat16Buffer = 8,
CapabilityFloat16 = 9,
CapabilityFloat64 = 10,
CapabilityInt64 = 11,
CapabilityInt64Atomics = 12,
CapabilityImageBasic = 13,
CapabilityImageReadWrite = 14,
CapabilityImageMipmap = 15,
CapabilityImageSRGBWrite = 16,
CapabilityPipes = 17,
CapabilityGroups = 18,
CapabilityDeviceEnqueue = 19,
CapabilityLiteralSampler = 20,
CapabilityAtomicStorage = 21,
CapabilityInt16 = 22,
CapabilityTessellationPointSize = 23,
CapabilityGeometryPointSize = 24,
CapabilityImageGatherExtended = 25,
CapabilityStorageImageExtendedFormats = 26,
CapabilityStorageImageMultisample = 27,
CapabilityUniformBufferArrayDynamicIndexing = 28,
CapabilitySampledImageArrayDynamicIndexing = 29,
CapabilityStorageBufferArrayDynamicIndexing = 30,
CapabilityStorageImageArrayDynamicIndexing = 31,
CapabilityClipDistance = 32,
CapabilityCullDistance = 33,
CapabilityImageCubeArray = 34,
CapabilitySampleRateShading = 35,
};
enum Op {
OpNop = 0,
OpUndef = 1,
OpSource = 3,
OpSourceExtension = 4,
OpName = 5,
OpMemberName = 6,
OpString = 7,
OpLine = 8,
OpExtension = 10,
OpExtInstImport = 11,
OpExtInst = 12,
OpMemoryModel = 14,
OpEntryPoint = 15,
OpExecutionMode = 16,
OpCapability = 17,
OpTypeVoid = 19,
OpTypeBool = 20,
OpTypeInt = 21,
OpTypeFloat = 22,
OpTypeVector = 23,
OpTypeMatrix = 24,
OpTypeImage = 25,
OpTypeSampler = 26,
OpTypeSampledImage = 27,
OpTypeArray = 28,
OpTypeRuntimeArray = 29,
OpTypeStruct = 30,
OpTypeOpaque = 31,
OpTypePointer = 32,
OpTypeFunction = 33,
OpTypeEvent = 34,
OpTypeDeviceEvent = 35,
OpTypeReserveId = 36,
OpTypeQueue = 37,
OpTypePipe = 38,
OpConstantTrue = 41,
OpConstantFalse = 42,
OpConstant = 43,
OpConstantComposite = 44,
OpConstantSampler = 45,
OpConstantNull = 46,
OpSpecConstantTrue = 48,
OpSpecConstantFalse = 49,
OpSpecConstant = 50,
OpSpecConstantComposite = 51,
OpSpecConstantOp = 52,
OpFunction = 54,
OpFunctionParameter = 55,
OpFunctionEnd = 56,
OpFunctionCall = 57,
OpVariable = 59,
OpImageTexelPointer = 60,
OpLoad = 61,
OpStore = 62,
OpCopyMemory = 63,
OpCopyMemorySized = 64,
OpAccessChain = 65,
OpInBoundsAccessChain = 66,
OpPtrAccessChain = 67,
OpArrayLength = 68,
OpGenericPtrMemSemantics = 69,
OpDecorate = 71,
OpMemberDecorate = 72,
OpDecorationGroup = 73,
OpGroupDecorate = 74,
OpGroupMemberDecorate = 75,
OpVectorExtractDynamic = 77,
OpVectorInsertDynamic = 78,
OpVectorShuffle = 79,
OpCompositeConstruct = 80,
OpCompositeExtract = 81,
OpCompositeInsert = 82,
OpCopyObject = 83,
OpTranspose = 84,
OpSampledImage = 86,
OpImageSampleImplicitLod = 87,
OpImageSampleExplicitLod = 88,
OpImageSampleDrefImplicitLod = 89,
OpImageSampleDrefExplicitLod = 90,
OpImageSampleProjImplicitLod = 91,
OpImageSampleProjExplicitLod = 92,
OpImageSampleProjDrefImplicitLod = 93,
OpImageSampleProjDrefExplicitLod = 94,
OpImageFetch = 95,
OpImageGather = 96,
OpImageDrefGather = 97,
OpImageRead = 98,
OpImageWrite = 99,
OpImageQueryDim = 100,
OpImageQueryFormat = 101,
OpImageQueryOrder = 102,
OpImageQuerySizeLod = 103,
OpImageQuerySize = 104,
OpImageQueryLod = 105,
OpImageQueryLevels = 106,
OpImageQuerySamples = 107,
OpConvertFToU = 109,
OpConvertFToS = 110,
OpConvertSToF = 111,
OpConvertUToF = 112,
OpUConvert = 113,
OpSConvert = 114,
OpFConvert = 115,
OpQuantizeToF16 = 116,
OpConvertPtrToU = 117,
OpSatConvertSToU = 118,
OpSatConvertUToS = 119,
OpConvertUToPtr = 120,
OpPtrCastToGeneric = 121,
OpGenericCastToPtr = 122,
OpGenericCastToPtrExplicit = 123,
OpBitcast = 124,
OpSNegate = 126,
OpFNegate = 127,
OpIAdd = 128,
OpFAdd = 129,
OpISub = 130,
OpFSub = 131,
OpIMul = 132,
OpFMul = 133,
OpUDiv = 134,
OpSDiv = 135,
OpFDiv = 136,
OpUMod = 137,
OpSRem = 138,
OpSMod = 139,
OpFRem = 140,
OpFMod = 141,
OpVectorTimesScalar = 142,
OpMatrixTimesScalar = 143,
OpVectorTimesMatrix = 144,
OpMatrixTimesVector = 145,
OpMatrixTimesMatrix = 146,
OpOuterProduct = 147,
OpDot = 148,
OpIAddCarry = 149,
OpISubBorrow = 150,
OpIMulExtended = 151,
OpAny = 154,
OpAll = 155,
OpIsNan = 156,
OpIsInf = 157,
OpIsFinite = 158,
OpIsNormal = 159,
OpSignBitSet = 160,
OpLessOrGreater = 161,
OpOrdered = 162,
OpUnordered = 163,
OpLogicalEqual = 164,
OpLogicalNotEqual = 165,
OpLogicalOr = 166,
OpLogicalAnd = 167,
OpLogicalNot = 168,
OpSelect = 169,
OpIEqual = 170,
OpINotEqual = 171,
OpUGreaterThan = 172,
OpSGreaterThan = 173,
OpUGreaterThanEqual = 174,
OpSGreaterThanEqual = 175,
OpULessThan = 176,
OpSLessThan = 177,
OpULessThanEqual = 178,
OpSLessThanEqual = 179,
OpFOrdEqual = 180,
OpFUnordEqual = 181,
OpFOrdNotEqual = 182,
OpFUnordNotEqual = 183,
OpFOrdLessThan = 184,
OpFUnordLessThan = 185,
OpFOrdGreaterThan = 186,
OpFUnordGreaterThan = 187,
OpFOrdLessThanEqual = 188,
OpFUnordLessThanEqual = 189,
OpFOrdGreaterThanEqual = 190,
OpFUnordGreaterThanEqual = 191,
OpShiftRightLogical = 194,
OpShiftRightArithmetic = 195,
OpShiftLeftLogical = 196,
OpBitwiseOr = 197,
OpBitwiseXor = 198,
OpBitwiseAnd = 199,
OpNot = 200,
OpBitFieldInsert = 201,
OpBitFieldSExtract = 202,
OpBitFieldUExtract = 203,
OpBitReverse = 204,
OpBitCount = 205,
OpDPdx = 207,
OpDPdy = 208,
OpFwidth = 209,
OpDPdxFine = 210,
OpDPdyFine = 211,
OpFwidthFine = 212,
OpDPdxCoarse = 213,
OpDPdyCoarse = 214,
OpFwidthCoarse = 215,
OpEmitVertex = 218,
OpEndPrimitive = 219,
OpEmitStreamVertex = 220,
OpEndStreamPrimitive = 221,
OpControlBarrier = 224,
OpMemoryBarrier = 225,
OpAtomicLoad = 227,
OpAtomicStore = 228,
OpAtomicExchange = 229,
OpAtomicCompareExchange = 230,
OpAtomicCompareExchangeWeak = 231,
OpAtomicIIncrement = 232,
OpAtomicIDecrement = 233,
OpAtomicIAdd = 234,
OpAtomicISub = 235,
OpAtomicSMin = 236,
OpAtomicUMin = 237,
OpAtomicSMax = 238,
OpAtomicUMax = 239,
OpAtomicAnd = 240,
OpAtomicOr = 241,
OpAtomicXor = 242,
OpPhi = 245,
OpLoopMerge = 246,
OpSelectionMerge = 247,
OpLabel = 248,
OpBranch = 249,
OpBranchConditional = 250,
OpSwitch = 251,
OpKill = 252,
OpReturn = 253,
OpReturnValue = 254,
OpUnreachable = 255,
OpLifetimeStart = 256,
OpLifetimeStop = 257,
OpAsyncGroupCopy = 259,
OpWaitGroupEvents = 260,
OpGroupAll = 261,
OpGroupAny = 262,
OpGroupBroadcast = 263,
OpGroupIAdd = 264,
OpGroupFAdd = 265,
OpGroupFMin = 266,
OpGroupUMin = 267,
OpGroupSMin = 268,
OpGroupFMax = 269,
OpGroupUMax = 270,
OpGroupSMax = 271,
OpReadPipe = 274,
OpWritePipe = 275,
OpReservedReadPipe = 276,
OpReservedWritePipe = 277,
OpReserveReadPipePackets = 278,
OpReserveWritePipePackets = 279,
OpCommitReadPipe = 280,
OpCommitWritePipe = 281,
OpIsValidReserveId = 282,
OpGetNumPipePackets = 283,
OpGetMaxPipePackets = 284,
OpGroupReserveReadPipePackets = 285,
OpGroupReserveWritePipePackets = 286,
OpGroupCommitReadPipe = 287,
OpGroupCommitWritePipe = 288,
OpEnqueueMarker = 291,
OpEnqueueKernel = 292,
OpGetKernelNDrangeSubGroupCount = 293,
OpGetKernelNDrangeMaxSubGroupSize = 294,
OpGetKernelWorkGroupSize = 295,
OpGetKernelPreferredWorkGroupSizeMultiple = 296,
OpRetainEvent = 297,
OpReleaseEvent = 298,
OpCreateUserEvent = 299,
OpIsValidEvent = 300,
OpSetUserEventStatus = 301,
OpCaptureEventProfilingInfo = 302,
OpGetDefaultQueue = 303,
OpBuildNDRange = 304,
};
// Overload operator| for mask bit combining
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 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 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 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)); }
} // end namespace spv
#endif // #ifndef spirv_H

View File

@ -27,8 +27,8 @@
#ifndef _CODEPLAY_SPIRV_SPIRV_H_
#define _CODEPLAY_SPIRV_SPIRV_H_
#include <headers/spirv.h>
#include <headers/GLSL450Lib.h>
#include <headers/spirv.hpp>
#include <headers/GLSL.std.450.h>
#include <headers/OpenCLLib.h>
#ifdef __cplusplus

View File

@ -4,7 +4,7 @@
static const spv_ext_inst_desc_t glslStd450Entries[] = {
{
"round", GLSL_STD_450::Round, {SPV_OPERAND_TYPE_ID},
"round", GLSLstd450::GLSLstd450Round, {SPV_OPERAND_TYPE_ID},
},
// TODO: Add remaining GLSL.std.450 instructions
};

View File

@ -186,12 +186,6 @@ static const spv_opcode_desc_t opcodeTableEntries[] = {
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_EXECUTION_MODE,
SPV_OPERAND_TYPE_LITERAL, SPV_OPERAND_TYPE_LITERAL,
SPV_OPERAND_TYPE_ELLIPSIS}},
{"CompileFlag",
1,
OpCompileFlag,
SPV_OPCODE_FLAGS_VARIABLE | SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityKernel,
{SPV_OPERAND_TYPE_LITERAL_STRING}},
{"Capability",
2,
OpCapability,
@ -249,12 +243,6 @@ static const spv_opcode_desc_t opcodeTableEntries[] = {
SPV_OPERAND_TYPE_LITERAL_NUMBER,
SPV_OPERAND_TYPE_ID // TODO: See Khronos bug 13755
}},
{"TypeFilter",
2,
OpTypeFilter,
SPV_OPCODE_FLAGS_NONE,
0,
{SPV_OPERAND_TYPE_RESULT_ID}},
{"TypeArray",
4,
OpTypeArray,
@ -409,13 +397,6 @@ static const spv_opcode_desc_t opcodeTableEntries[] = {
0,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID,
SPV_OPERAND_TYPE_STORAGE_CLASS, SPV_OPERAND_TYPE_ID}},
{"VariableArray",
5,
OpVariableArray,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityAddresses,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID,
SPV_OPERAND_TYPE_STORAGE_CLASS, SPV_OPERAND_TYPE_ID}},
{"Load",
4,
OpLoad,
@ -467,13 +448,6 @@ static const spv_opcode_desc_t opcodeTableEntries[] = {
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_LITERAL_NUMBER}},
{"ImagePointer",
6,
OpImagePointer,
SPV_OPCODE_FLAGS_NONE,
0,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}},
{"GenericPtrMemSemantics",
4,
OpGenericPtrMemSemantics,
@ -501,188 +475,6 @@ static const spv_opcode_desc_t opcodeTableEntries[] = {
0,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ELLIPSIS}},
{"Sampler",
5,
OpSampler,
SPV_OPCODE_FLAGS_NONE,
0,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID}},
{"TextureSample",
5,
OpTextureSample,
SPV_OPCODE_FLAGS_VARIABLE | SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}},
{"TextureSampleDref",
6,
OpTextureSampleDref,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}},
{"TextureSampleLod",
6,
OpTextureSampleLod,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}},
{"TextureSampleProj",
5,
OpTextureSampleProj,
SPV_OPCODE_FLAGS_VARIABLE | SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}},
{"TextureSampleGrad",
7,
OpTextureSampleGrad,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}},
{"TextureSampleOffset",
6,
OpTextureSampleOffset,
SPV_OPCODE_FLAGS_VARIABLE | SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}},
{"TextureSampleProjLod",
6,
OpTextureSampleProjLod,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}},
{"TextureSampleProjGrad",
7,
OpTextureSampleProjGrad,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}},
{"TextureSampleLodOffset",
7,
OpTextureSampleLodOffset,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}},
{"TextureSampleProjOffset",
6,
OpTextureSampleProjOffset,
SPV_OPCODE_FLAGS_VARIABLE | SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}},
{"TextureSampleGradOffset",
8,
OpTextureSampleGradOffset,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID}},
{"TextureSampleProjLodOffset",
7,
OpTextureSampleProjLodOffset,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}},
{"TextureSampleProjGradOffset",
8,
OpTextureSampleProjGradOffset,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID}},
{"TextureFetchTexel",
6,
OpTextureFetchTexel,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}},
{"TextureFetchTexelOffset",
6,
OpTextureFetchTexelOffset,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}},
{"TextureFetchSample",
6,
OpTextureFetchSample,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}},
{"TextureFetchTexel",
5,
OpTextureFetchTexel,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID}},
{"TextureGather",
6,
OpTextureGather,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}},
{"TextureGatherOffset",
7,
OpTextureGatherOffset,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID}},
{"TextureGatherOffsets",
7,
OpTextureGatherOffsets,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}},
{"TextureQuerySizeLod",
5,
OpTextureQuerySizeLod,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID}},
{"TextureQuerySize",
4,
OpTextureQuerySize,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}},
{"TextureQueryLod",
5,
OpTextureQueryLod,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID}},
{"TextureQueryLevels",
4,
OpTextureQueryLevels,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}},
{"TextureQuerySamples",
4,
OpTextureQuerySamples,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}},
{"ConvertFToU",
4,
OpConvertFToU,
@ -1108,13 +900,6 @@ static const spv_opcode_desc_t opcodeTableEntries[] = {
0,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID}},
{"LogicalXor",
5,
OpLogicalXor,
SPV_OPCODE_FLAGS_NONE,
0,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_ID}},
{"LogicalAnd",
5,
OpLogicalAnd,
@ -1411,12 +1196,6 @@ static const spv_opcode_desc_t opcodeTableEntries[] = {
SPV_OPCODE_FLAGS_NONE,
0,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_NUMBER}},
{"AtomicInit",
3,
OpAtomicInit,
SPV_OPCODE_FLAGS_NONE,
0,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}},
{"AtomicLoad",
6,
OpAtomicLoad,
@ -1525,17 +1304,33 @@ static const spv_opcode_desc_t opcodeTableEntries[] = {
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_EXECUTION_SCOPE, SPV_OPERAND_TYPE_MEMORY_SEMANTICS,
SPV_OPERAND_TYPE_ID}},
{"AtomicIMin",
{"AtomicSMin",
7,
OpAtomicIMin,
OpAtomicSMin,
SPV_OPCODE_FLAGS_NONE,
0,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_EXECUTION_SCOPE, SPV_OPERAND_TYPE_MEMORY_SEMANTICS,
SPV_OPERAND_TYPE_ID}},
{"AtomicIMax",
{"AtomicUMin",
7,
OpAtomicIMax,
OpAtomicUMin,
SPV_OPCODE_FLAGS_NONE,
0,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_EXECUTION_SCOPE, SPV_OPERAND_TYPE_MEMORY_SEMANTICS,
SPV_OPERAND_TYPE_ID}},
{"AtomicSMax",
7,
OpAtomicSMax,
SPV_OPCODE_FLAGS_NONE,
0,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
SPV_OPERAND_TYPE_EXECUTION_SCOPE, SPV_OPERAND_TYPE_MEMORY_SEMANTICS,
SPV_OPERAND_TYPE_ID}},
{"AtomicUMax",
7,
OpAtomicUMax,
SPV_OPCODE_FLAGS_NONE,
0,
{SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID,
@ -1977,7 +1772,6 @@ const char *spvOpcodeString(const Op opcode) {
CASE(OpTypeVector)
CASE(OpTypeMatrix)
CASE(OpTypeSampler)
CASE(OpTypeFilter)
CASE(OpTypeArray)
CASE(OpTypeRuntimeArray)
CASE(OpTypeStruct)
@ -2000,7 +1794,6 @@ const char *spvOpcodeString(const Op opcode) {
CASE(OpSpecConstant)
CASE(OpSpecConstantComposite)
CASE(OpVariable)
CASE(OpVariableArray)
CASE(OpFunction)
CASE(OpFunctionParameter)
CASE(OpFunctionEnd)
@ -2028,31 +1821,6 @@ const char *spvOpcodeString(const Op opcode) {
CASE(OpCopyObject)
CASE(OpCopyMemory)
CASE(OpCopyMemorySized)
CASE(OpSampler)
CASE(OpTextureSample)
CASE(OpTextureSampleDref)
CASE(OpTextureSampleLod)
CASE(OpTextureSampleProj)
CASE(OpTextureSampleGrad)
CASE(OpTextureSampleOffset)
CASE(OpTextureSampleProjLod)
CASE(OpTextureSampleProjGrad)
CASE(OpTextureSampleLodOffset)
CASE(OpTextureSampleProjOffset)
CASE(OpTextureSampleGradOffset)
CASE(OpTextureSampleProjLodOffset)
CASE(OpTextureSampleProjGradOffset)
CASE(OpTextureFetchTexelOffset)
CASE(OpTextureFetchSample)
CASE(OpTextureFetchTexel)
CASE(OpTextureGather)
CASE(OpTextureGatherOffset)
CASE(OpTextureGatherOffsets)
CASE(OpTextureQuerySizeLod)
CASE(OpTextureQuerySize)
CASE(OpTextureQueryLod)
CASE(OpTextureQueryLevels)
CASE(OpTextureQuerySamples)
CASE(OpAccessChain)
CASE(OpInBoundsAccessChain)
CASE(OpSNegate)
@ -2107,7 +1875,6 @@ const char *spvOpcodeString(const Op opcode) {
CASE(OpShiftRightArithmetic)
CASE(OpShiftLeftLogical)
CASE(OpLogicalOr)
CASE(OpLogicalXor)
CASE(OpLogicalAnd)
CASE(OpBitwiseOr)
CASE(OpBitwiseXor)
@ -2150,8 +1917,6 @@ const char *spvOpcodeString(const Op opcode) {
CASE(OpEndStreamPrimitive)
CASE(OpControlBarrier)
CASE(OpMemoryBarrier)
CASE(OpImagePointer)
CASE(OpAtomicInit)
CASE(OpAtomicLoad)
CASE(OpAtomicStore)
CASE(OpAtomicExchange)
@ -2178,7 +1943,6 @@ const char *spvOpcodeString(const Op opcode) {
CASE(OpUnreachable)
CASE(OpLifetimeStart)
CASE(OpLifetimeStop)
CASE(OpCompileFlag)
CASE(OpAsyncGroupCopy)
CASE(OpWaitGroupEvents)
CASE(OpGroupAll)
@ -2239,7 +2003,6 @@ int32_t spvOpcodeIsType(const Op opcode) {
case OpTypeVector:
case OpTypeMatrix:
case OpTypeSampler:
case OpTypeFilter:
case OpTypeArray:
case OpTypeRuntimeArray:
case OpTypeStruct:
@ -2309,10 +2072,8 @@ int32_t spvOpcodeAreTypesEqual(const spv_instruction_t *pTypeInst0,
int32_t spvOpcodeIsPointer(const Op opcode) {
switch (opcode) {
case OpVariable:
case OpVariableArray:
case OpAccessChain:
case OpInBoundsAccessChain:
// TODO: case OpImagePointer:
case OpFunctionParameter:
return true;
default:
@ -2334,7 +2095,6 @@ int32_t spvOpcodeIsObject(const Op opcode) {
case OpSpecConstantComposite:
// TODO: case OpSpecConstantOp:
case OpVariable:
case OpVariableArray:
case OpAccessChain:
case OpInBoundsAccessChain:
case OpConvertFToU:
@ -2396,7 +2156,6 @@ int32_t spvOpcodeIsObject(const Op opcode) {
case OpOrdered:
case OpUnordered:
case OpLogicalOr:
case OpLogicalXor:
case OpLogicalAnd:
case OpSelect:
case OpIEqual:

View File

@ -119,18 +119,8 @@ static const spv_operand_desc_t memoryModelEntries[] = {
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_NONE}},
{"OpenCL1.2",
MemoryModelOpenCL12,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityKernel,
{SPV_OPERAND_TYPE_NONE}},
{"OpenCL2.0",
MemoryModelOpenCL20,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityKernel,
{SPV_OPERAND_TYPE_NONE}},
{"OpenCL2.1",
MemoryModelOpenCL21,
{"OpenCL",
MemoryModelOpenCL,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityKernel,
{SPV_OPERAND_TYPE_NONE}},
@ -177,6 +167,13 @@ static const spv_operand_desc_t executionModeEntries[] = {
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_NONE}},
{
"OriginLowerLeft",
ExecutionModeOriginLowerLeft,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_NONE},
},
{"EarlyFragmentTests",
ExecutionModeEarlyFragmentTests,
SPV_OPCODE_FLAGS_CAPABILITIES,
@ -294,13 +291,6 @@ static const spv_operand_desc_t executionModeEntries[] = {
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityKernel,
{SPV_OPERAND_TYPE_NONE}},
{
"OriginLowerLeft",
ExecutionModeOriginLowerLeft,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_NONE},
},
};
static const spv_operand_desc_t storageClassEntries[] = {
@ -354,6 +344,11 @@ static const spv_operand_desc_t storageClassEntries[] = {
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_NONE}},
{"Image",
StorageClassImage,
SPV_OPCODE_FLAGS_NONE,
0,
{SPV_OPERAND_TYPE_NONE}},
};
static const spv_operand_desc_t dimensionalityEntries[] = {
@ -532,11 +527,6 @@ static const spv_operand_desc_t functionParameterAttributeEntries[] = {
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityKernel,
{SPV_OPERAND_TYPE_NONE}},
{"SVM",
FunctionParameterAttributeSVM,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityKernel,
{SPV_OPERAND_TYPE_NONE}},
{"NoWrite",
FunctionParameterAttributeNoWrite,
SPV_OPCODE_FLAGS_CAPABILITIES,
@ -550,21 +540,18 @@ static const spv_operand_desc_t functionParameterAttributeEntries[] = {
};
static const spv_operand_desc_t decorationEntries[] = {
{"PrecisionLow",
DecorationPrecisionLow,
{"RelaxedPrecision",
DecorationRelaxedPrecision,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_NONE}},
{"PrecisionMedium",
DecorationPrecisionMedium,
{
"SpecId",
DecorationSpecId,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_NONE}},
{"PrecisionHigh",
DecorationPrecisionHigh,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_NONE}},
{SPV_OPERAND_TYPE_LITERAL_NUMBER},
},
{"Block",
DecorationBlock,
SPV_OPCODE_FLAGS_CAPABILITIES,
@ -585,26 +572,36 @@ static const spv_operand_desc_t decorationEntries[] = {
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityMatrix,
{SPV_OPERAND_TYPE_NONE}},
{"ArrayStride",
DecorationArrayStride,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_LITERAL_NUMBER, SPV_OPERAND_TYPE_NONE}},
{"MatrixStride",
DecorationMatrixStride,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_LITERAL_NUMBER, SPV_OPERAND_TYPE_NONE}},
{"GLSLShared",
DecorationGLSLShared,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_NONE}},
{"GLSLStd140",
DecorationGLSLStd140,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_NONE}},
{"GLSLStd430",
DecorationGLSLStd430,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_NONE}},
{"GLSLPacked",
DecorationGLSLPacked,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_NONE}},
{"CPacked",
DecorationCPacked,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityKernel,
{SPV_OPERAND_TYPE_NONE}},
{"BuiltIn",
DecorationBuiltIn,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_BUILT_IN, SPV_OPERAND_TYPE_NONE}},
{"Smooth",
DecorationSmooth,
SPV_OPCODE_FLAGS_CAPABILITIES,
@ -685,11 +682,6 @@ static const spv_operand_desc_t decorationEntries[] = {
SPV_OPCODE_FLAGS_NONE,
0,
{SPV_OPERAND_TYPE_NONE}},
{"CPacked",
DecorationCPacked,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityKernel,
{SPV_OPERAND_TYPE_NONE}},
{"FPSaturatedConversion",
DecorationSaturatedConversion,
SPV_OPCODE_FLAGS_CAPABILITIES,
@ -730,26 +722,16 @@ static const spv_operand_desc_t decorationEntries[] = {
SPV_OPCODE_FLAGS_NONE,
0,
{SPV_OPERAND_TYPE_LITERAL_NUMBER, SPV_OPERAND_TYPE_NONE}},
{"Alignment",
DecorationAlignment,
SPV_OPCODE_FLAGS_NONE,
0,
{SPV_OPERAND_TYPE_LITERAL_NUMBER, SPV_OPERAND_TYPE_NONE}},
{"XfbBuffer",
DecorationXfbBuffer,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_LITERAL_NUMBER, SPV_OPERAND_TYPE_NONE}},
{"Stride",
DecorationStride,
{"XfbStride",
DecorationXfbStride,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_LITERAL_NUMBER, SPV_OPERAND_TYPE_NONE}},
{"BuiltIn",
DecorationBuiltIn,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_BUILT_IN, SPV_OPERAND_TYPE_NONE}},
{"FuncParamAttr",
DecorationFuncParamAttr,
SPV_OPCODE_FLAGS_CAPABILITIES,
@ -770,13 +752,6 @@ static const spv_operand_desc_t decorationEntries[] = {
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityLinkage,
{SPV_OPERAND_TYPE_LINKAGE_TYPE, SPV_OPERAND_TYPE_NONE}},
{
"SpecId",
DecorationSpecId,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_LITERAL_NUMBER},
},
};
static const spv_operand_desc_t builtInEntries[] = {
@ -790,11 +765,6 @@ static const spv_operand_desc_t builtInEntries[] = {
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_NONE}},
{"ClipVertex",
BuiltInClipVertex,
SPV_OPCODE_FLAGS_CAPABILITIES,
CapabilityShader,
{SPV_OPERAND_TYPE_NONE}},
{"ClipDistance",
BuiltInClipDistance,
SPV_OPCODE_FLAGS_CAPABILITIES,

View File

@ -1328,157 +1328,6 @@ bool idUsage::isValid<OpFunctionCall>(const spv_instruction_t *inst,
return true;
}
#if 0
template <>
bool idUsage::isValid<OpSampler>(const spv_instruction_t *inst,
const spv_opcode_desc opcodeEntry) {}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureSample>(const spv_instruction_t *inst,
const spv_opcode_desc opcodeEntry) {
}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureSampleDref>(
const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureSampleLod>(
const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureSampleProj>(
const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureSampleGrad>(
const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureSampleOffset>(
const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureSampleProjLod>(
const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureSampleProjGrad>(
const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureSampleLodOffset>(
const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureSampleProjOffset>(
const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureSampleGradOffset>(
const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureSampleProjLodOffset>(
const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureSampleProjGradOffset>(
const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureFetchTexelLod>(const spv_instruction_t *inst) {}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureFetchTexelOffset>(
const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureFetchSample>(
const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureFetchTexel>(
const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureGather>(const spv_instruction_t *inst,
const spv_opcode_desc opcodeEntry) {
}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureGatherOffset>(
const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureGatherOffsets>(
const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureQuerySizeLod>(
const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureQuerySize>(
const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureQueryLevels>(
const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {}
#endif
#if 0
template <>
bool idUsage::isValid<OpTextureQuerySamples>(
const spv_instruction_t *inst, const spv_opcode_desc opcodeEntry) {}
#endif
#if 0
template <>
bool idUsage::isValid<OpConvertUToF>(const spv_instruction_t *inst,
@ -2586,36 +2435,10 @@ bool idUsage::isValid(const spv_instruction_t *inst) {
FAIL(OpAccessChain)
FAIL(OpInBoundsAccessChain)
FAIL(OpArrayLength)
FAIL(OpImagePointer)
FAIL(OpGenericPtrMemSemantics)
CASE(OpFunction)
CASE(OpFunctionParameter)
CASE(OpFunctionCall)
FAIL(OpSampler)
FAIL(OpTextureSample)
FAIL(OpTextureSampleDref)
FAIL(OpTextureSampleLod)
FAIL(OpTextureSampleProj)
FAIL(OpTextureSampleGrad)
FAIL(OpTextureSampleOffset)
FAIL(OpTextureSampleProjLod)
FAIL(OpTextureSampleProjGrad)
FAIL(OpTextureSampleLodOffset)
FAIL(OpTextureSampleProjOffset)
FAIL(OpTextureSampleGradOffset)
FAIL(OpTextureSampleProjLodOffset)
FAIL(OpTextureSampleProjGradOffset)
FAIL(OpTextureFetchTexelLod)
FAIL(OpTextureFetchTexelOffset)
FAIL(OpTextureFetchSample)
FAIL(OpTextureFetchTexel)
FAIL(OpTextureGather)
FAIL(OpTextureGatherOffset)
FAIL(OpTextureGatherOffsets)
FAIL(OpTextureQuerySizeLod)
FAIL(OpTextureQuerySize)
FAIL(OpTextureQueryLevels)
FAIL(OpTextureQuerySamples)
FAIL(OpConvertUToF)
FAIL(OpConvertFToS)
FAIL(OpConvertSToF)
@ -2679,7 +2502,6 @@ bool idUsage::isValid(const spv_instruction_t *inst) {
FAIL(OpOrdered)
FAIL(OpUnordered)
FAIL(OpLogicalOr)
FAIL(OpLogicalXor)
FAIL(OpLogicalAnd)
FAIL(OpSelect)
FAIL(OpIEqual)
@ -2722,7 +2544,6 @@ bool idUsage::isValid(const spv_instruction_t *inst) {
CASE(OpReturnValue)
FAIL(OpLifetimeStart)
FAIL(OpLifetimeStop)
FAIL(OpAtomicInit)
FAIL(OpAtomicLoad)
FAIL(OpAtomicStore)
FAIL(OpAtomicExchange)
@ -2736,9 +2557,8 @@ bool idUsage::isValid(const spv_instruction_t *inst) {
FAIL(OpAtomicUMax)
FAIL(OpAtomicAnd)
FAIL(OpAtomicOr)
FAIL(OpAtomicXor)
FAIL(OpAtomicIMin)
FAIL(OpAtomicIMax)
FAIL(OpAtomicSMin)
FAIL(OpAtomicSMax)
FAIL(OpEmitStreamVertex)
FAIL(OpEndStreamPrimitive)
FAIL(OpAsyncGroupCopy)

View File

@ -37,7 +37,7 @@ class BinaryToText : public ::testing::Test {
const char *textStr = R"(
OpSource OpenCL 12
OpMemoryModel Physical64 OpenCL1.2
OpMemoryModel Physical64 OpenCL
OpSourceExtension "PlaceholderExtensionName"
OpEntryPoint Kernel $1
OpExecutionMode $1 LocalSizeHint 1 1 1

View File

@ -38,7 +38,7 @@ TEST(TextDestroy, Default) {
char textStr[] =
"OpSource OpenCL 12\n"
"OpMemoryModel Physical64 OpenCL1.2\n"
"OpMemoryModel Physical64 OpenCL\n"
"OpSourceExtension \"PlaceholderExtensionName\"\n"
"OpEntryPoint Kernel 0\n"
"OpExecutionMode 0 LocalSizeHint 1 1 1\n"

View File

@ -38,7 +38,7 @@ TEST(TextToBinary, Default) {
const char *textStr = R"(
OpSource OpenCL 12
OpMemoryModel Physical64 OpenCL1.2
OpMemoryModel Physical64 OpenCL
OpSourceExtension "PlaceholderExtensionName"
OpEntryPoint Kernel $1
OpExecutionMode $1 LocalSizeHint 1 1 1
@ -104,7 +104,7 @@ OpTypeVector %15 4 2
ASSERT_EQ(spvOpcodeMake(3, OpMemoryModel), binary->code[instIndex++]);
ASSERT_EQ(AddressingModelPhysical64, binary->code[instIndex++]);
ASSERT_EQ(MemoryModelOpenCL12, binary->code[instIndex++]);
ASSERT_EQ(MemoryModelOpenCL, binary->code[instIndex++]);
uint16_t sourceExtensionWordCount =
(uint16_t)((strlen("PlaceholderExtensionName") / sizeof(uint32_t)) + 2);

View File

@ -157,7 +157,7 @@ TEST_F(ValidateID, OpGroupDecorateGood) {
const char *spirv = R"(
OpDecorationGroup %1
OpDecorate $1 Uniform
OpDecorate $1 GLSLStd430
OpDecorate $1 GLSLShared
OpGroupDecorate $1 $3 $4
OpTypeInt %2 32 0
OpConstant $2 %3 42
@ -176,7 +176,7 @@ TEST_F(ValidateID, OpGroupDecorateTargetBad) {
const char *spirv = R"(
OpDecorationGroup %1
OpDecorate $1 Uniform
OpDecorate $1 GLSLStd430
OpDecorate $1 GLSLShared
OpGroupDecorate $1 $3
OpTypeInt %2 32 0)";
CHECK(spirv, SPV_ERROR_INVALID_ID);