mirror of
https://github.com/RPCSX/SPIRV-Tools.git
synced 2024-12-04 17:46:50 +00:00
Substitute GLSL450Lib.h with GLSL.std.450.h of revision 31.
This commit is contained in:
parent
17f1bae331
commit
884c833889
130
external/include/headers/GLSL.std.450.h
vendored
Normal file
130
external/include/headers/GLSL.std.450.h
vendored
Normal 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
|
213
external/include/headers/GLSL450Lib.h
vendored
213
external/include/headers/GLSL450Lib.h
vendored
@ -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
|
@ -28,7 +28,7 @@
|
||||
#define _CODEPLAY_SPIRV_SPIRV_H_
|
||||
|
||||
#include <headers/spirv.h>
|
||||
#include <headers/GLSL450Lib.h>
|
||||
#include <headers/GLSL.std.450.h>
|
||||
#include <headers/OpenCLLib.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -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
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user