summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/src/shader_spirv.h
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/src/shader_spirv.h')
-rw-r--r--3rdparty/bgfx/src/shader_spirv.h30
1 files changed, 25 insertions, 5 deletions
diff --git a/3rdparty/bgfx/src/shader_spirv.h b/3rdparty/bgfx/src/shader_spirv.h
index 9a7c81b1ac2..5c7a983f63a 100644
--- a/3rdparty/bgfx/src/shader_spirv.h
+++ b/3rdparty/bgfx/src/shader_spirv.h
@@ -345,7 +345,9 @@ namespace bgfx
};
};
- struct SpirvBuiltin
+ const char* getName(SpvOpcode::Enum _opcode);
+
+ struct SpvBuiltin
{
enum Enum
{
@@ -395,6 +397,8 @@ namespace bgfx
};
};
+ const char* getName(SpvBuiltin::Enum _enum);
+
struct SpvExecutionModel
{
enum Enum
@@ -456,6 +460,8 @@ namespace bgfx
};
};
+ const char* getName(SpvStorageClass::Enum _enum);
+
struct SpvResourceDim
{
enum Enum
@@ -486,6 +492,7 @@ namespace bgfx
GLSLPacked,
CPacked,
BuiltIn,
+ Unknown12,
NoPerspective,
Flat,
Patch,
@@ -500,6 +507,7 @@ namespace bgfx
NonWritable,
NonReadable,
Uniform,
+ Unknown27,
SaturatedConversion,
Stream,
Location,
@@ -522,8 +530,12 @@ namespace bgfx
};
};
+ const char* getName(SpvDecoration::Enum _enum);
+
struct SpvOperand
{
+ SpvOperand() { /* not pod */ }
+
enum Enum
{
AccessQualifier,
@@ -538,6 +550,7 @@ namespace bgfx
Decoration,
Dim,
Dref,
+ ElementType,
ExecutionModel,
Function,
FunctionControl,
@@ -545,6 +558,7 @@ namespace bgfx
IdRep,
ImageFormat,
ImageOperands,
+ LinkageType,
LiteralNumber,
LiteralRep,
LiteralString,
@@ -575,6 +589,8 @@ namespace bgfx
struct SpvInstruction
{
+ SpvInstruction() { /* not pod */ }
+
SpvOpcode::Enum opcode;
uint16_t length;
uint16_t numOperands;
@@ -593,20 +609,24 @@ namespace bgfx
struct SpvShader
{
+ SpvShader() { /* not pod */ }
+
stl::vector<uint8_t> byteCode;
};
int32_t read(bx::ReaderSeekerI* _reader, SpvShader& _shader, bx::Error* _err);
int32_t write(bx::WriterI* _writer, const SpvShader& _shader, bx::Error* _err);
- typedef bool (*SpirvParseFn)(uint32_t _offset, const SpvInstruction& _instruction, void* _userData);
- void parse(const SpvShader& _src, SpirvParseFn _fn, void* _userData, bx::Error* _err = NULL);
+ typedef bool (*SpvParseFn)(uint32_t _offset, const SpvInstruction& _instruction, void* _userData);
+ void parse(const SpvShader& _src, SpvParseFn _fn, void* _userData, bx::Error* _err = NULL);
- typedef void (*SpirvFilterFn)(SpvInstruction& _instruction, void* _userData);
- void filter(SpvShader& _dst, const SpvShader& _src, SpirvFilterFn _fn, void* _userData, bx::Error* _err = NULL);
+ typedef void (*SpvFilterFn)(SpvInstruction& _instruction, void* _userData);
+ void filter(SpvShader& _dst, const SpvShader& _src, SpvFilterFn _fn, void* _userData, bx::Error* _err = NULL);
struct SpirV
{
+ SpirV() { /* not pod */ }
+
struct Header
{
uint32_t magic;