Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
0e65b316
Commit
0e65b316
authored
Dec 30, 2019
by
Sergey Kosarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added LAST_ELEMENT_MARKER for every enum used in the C interface
parent
b80a63a0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
Versions.h
glslang/MachineIndependent/Versions.h
+4
-1
ShaderLang.h
glslang/Public/ShaderLang.h
+11
-1
No files found.
glslang/MachineIndependent/Versions.h
View file @
0e65b316
...
@@ -38,6 +38,8 @@
...
@@ -38,6 +38,8 @@
#ifndef _VERSIONS_INCLUDED_
#ifndef _VERSIONS_INCLUDED_
#define _VERSIONS_INCLUDED_
#define _VERSIONS_INCLUDED_
#define LAST_ELEMENT_MARKER(x) x
//
//
// Help manage multiple profiles, versions, extensions etc.
// Help manage multiple profiles, versions, extensions etc.
//
//
...
@@ -54,7 +56,8 @@ typedef enum {
...
@@ -54,7 +56,8 @@ typedef enum {
ENoProfile
=
(
1
<<
0
),
// only for desktop, before profiles showed up
ENoProfile
=
(
1
<<
0
),
// only for desktop, before profiles showed up
ECoreProfile
=
(
1
<<
1
),
ECoreProfile
=
(
1
<<
1
),
ECompatibilityProfile
=
(
1
<<
2
),
ECompatibilityProfile
=
(
1
<<
2
),
EEsProfile
=
(
1
<<
3
)
EEsProfile
=
(
1
<<
3
),
LAST_ELEMENT_MARKER
(
EProfileCount
),
}
EProfile
;
}
EProfile
;
namespace
glslang
{
namespace
glslang
{
...
...
glslang/Public/ShaderLang.h
View file @
0e65b316
...
@@ -100,7 +100,7 @@ typedef enum {
...
@@ -100,7 +100,7 @@ typedef enum {
EShLangCallableNV
,
EShLangCallableNV
,
EShLangTaskNV
,
EShLangTaskNV
,
EShLangMeshNV
,
EShLangMeshNV
,
EShLangCount
,
LAST_ELEMENT_MARKER
(
EShLangCount
)
,
}
EShLanguage
;
// would be better as stage, but this is ancient now
}
EShLanguage
;
// would be better as stage, but this is ancient now
typedef
enum
{
typedef
enum
{
...
@@ -118,6 +118,7 @@ typedef enum {
...
@@ -118,6 +118,7 @@ typedef enum {
EShLangCallableNVMask
=
(
1
<<
EShLangCallableNV
),
EShLangCallableNVMask
=
(
1
<<
EShLangCallableNV
),
EShLangTaskNVMask
=
(
1
<<
EShLangTaskNV
),
EShLangTaskNVMask
=
(
1
<<
EShLangTaskNV
),
EShLangMeshNVMask
=
(
1
<<
EShLangMeshNV
),
EShLangMeshNVMask
=
(
1
<<
EShLangMeshNV
),
LAST_ELEMENT_MARKER
(
EShLanguageMaskCount
),
}
EShLanguageMask
;
}
EShLanguageMask
;
namespace
glslang
{
namespace
glslang
{
...
@@ -128,24 +129,28 @@ typedef enum {
...
@@ -128,24 +129,28 @@ typedef enum {
EShSourceNone
,
EShSourceNone
,
EShSourceGlsl
,
// GLSL, includes ESSL (OpenGL ES GLSL)
EShSourceGlsl
,
// GLSL, includes ESSL (OpenGL ES GLSL)
EShSourceHlsl
,
// HLSL
EShSourceHlsl
,
// HLSL
LAST_ELEMENT_MARKER
(
EShSourceCount
),
}
EShSource
;
// if EShLanguage were EShStage, this could be EShLanguage instead
}
EShSource
;
// if EShLanguage were EShStage, this could be EShLanguage instead
typedef
enum
{
typedef
enum
{
EShClientNone
,
// use when there is no client, e.g. for validation
EShClientNone
,
// use when there is no client, e.g. for validation
EShClientVulkan
,
EShClientVulkan
,
EShClientOpenGL
,
EShClientOpenGL
,
LAST_ELEMENT_MARKER
(
EShClientCount
),
}
EShClient
;
}
EShClient
;
typedef
enum
{
typedef
enum
{
EShTargetNone
,
EShTargetNone
,
EShTargetSpv
,
// SPIR-V (preferred spelling)
EShTargetSpv
,
// SPIR-V (preferred spelling)
EshTargetSpv
=
EShTargetSpv
,
// legacy spelling
EshTargetSpv
=
EShTargetSpv
,
// legacy spelling
LAST_ELEMENT_MARKER
(
EShTargetCount
),
}
EShTargetLanguage
;
}
EShTargetLanguage
;
typedef
enum
{
typedef
enum
{
EShTargetVulkan_1_0
=
(
1
<<
22
),
// Vulkan 1.0
EShTargetVulkan_1_0
=
(
1
<<
22
),
// Vulkan 1.0
EShTargetVulkan_1_1
=
(
1
<<
22
)
|
(
1
<<
12
),
// Vulkan 1.1
EShTargetVulkan_1_1
=
(
1
<<
22
)
|
(
1
<<
12
),
// Vulkan 1.1
EShTargetOpenGL_450
=
450
,
// OpenGL
EShTargetOpenGL_450
=
450
,
// OpenGL
LAST_ELEMENT_MARKER
(
EShTargetClientVersionCount
),
}
EShTargetClientVersion
;
}
EShTargetClientVersion
;
typedef
EShTargetClientVersion
EshTargetClientVersion
;
typedef
EShTargetClientVersion
EshTargetClientVersion
;
...
@@ -157,6 +162,7 @@ typedef enum {
...
@@ -157,6 +162,7 @@ typedef enum {
EShTargetSpv_1_3
=
(
1
<<
16
)
|
(
3
<<
8
),
// SPIR-V 1.3
EShTargetSpv_1_3
=
(
1
<<
16
)
|
(
3
<<
8
),
// SPIR-V 1.3
EShTargetSpv_1_4
=
(
1
<<
16
)
|
(
4
<<
8
),
// SPIR-V 1.4
EShTargetSpv_1_4
=
(
1
<<
16
)
|
(
4
<<
8
),
// SPIR-V 1.4
EShTargetSpv_1_5
=
(
1
<<
16
)
|
(
5
<<
8
),
// SPIR-V 1.5
EShTargetSpv_1_5
=
(
1
<<
16
)
|
(
5
<<
8
),
// SPIR-V 1.5
LAST_ELEMENT_MARKER
(
EShTargetLanguageVersionCount
),
}
EShTargetLanguageVersion
;
}
EShTargetLanguageVersion
;
struct
TInputLanguage
{
struct
TInputLanguage
{
...
@@ -206,6 +212,7 @@ typedef enum {
...
@@ -206,6 +212,7 @@ typedef enum {
EShOptNone
,
EShOptNone
,
EShOptSimple
,
// Optimizations that can be done quickly
EShOptSimple
,
// Optimizations that can be done quickly
EShOptFull
,
// Optimizations that will take more time
EShOptFull
,
// Optimizations that will take more time
LAST_ELEMENT_MARKER
(
EshOptLevelCount
),
}
EShOptimizationLevel
;
}
EShOptimizationLevel
;
//
//
...
@@ -214,6 +221,7 @@ typedef enum {
...
@@ -214,6 +221,7 @@ typedef enum {
typedef
enum
{
typedef
enum
{
EShTexSampTransKeep
,
// keep textures and samplers as is (default)
EShTexSampTransKeep
,
// keep textures and samplers as is (default)
EShTexSampTransUpgradeTextureRemoveSampler
,
// change texture w/o embeded sampler into sampled texture and throw away all samplers
EShTexSampTransUpgradeTextureRemoveSampler
,
// change texture w/o embeded sampler into sampled texture and throw away all samplers
LAST_ELEMENT_MARKER
(
EShTexSampTransCount
),
}
EShTextureSamplerTransformMode
;
}
EShTextureSamplerTransformMode
;
//
//
...
@@ -236,6 +244,7 @@ enum EShMessages {
...
@@ -236,6 +244,7 @@ enum EShMessages {
EShMsgHlslLegalization
=
(
1
<<
12
),
// enable HLSL Legalization messages
EShMsgHlslLegalization
=
(
1
<<
12
),
// enable HLSL Legalization messages
EShMsgHlslDX9Compatible
=
(
1
<<
13
),
// enable HLSL DX9 compatible mode (right now only for samplers)
EShMsgHlslDX9Compatible
=
(
1
<<
13
),
// enable HLSL DX9 compatible mode (right now only for samplers)
EShMsgBuiltinSymbolTable
=
(
1
<<
14
),
// print the builtin symbol table
EShMsgBuiltinSymbolTable
=
(
1
<<
14
),
// print the builtin symbol table
LAST_ELEMENT_MARKER
(
EShMsgCount
),
};
};
//
//
...
@@ -249,6 +258,7 @@ typedef enum {
...
@@ -249,6 +258,7 @@ typedef enum {
EShReflectionSeparateBuffers
=
(
1
<<
3
),
// buffer variables and buffer blocks are reflected separately
EShReflectionSeparateBuffers
=
(
1
<<
3
),
// buffer variables and buffer blocks are reflected separately
EShReflectionAllBlockVariables
=
(
1
<<
4
),
// reflect all variables in blocks, even if they are inactive
EShReflectionAllBlockVariables
=
(
1
<<
4
),
// reflect all variables in blocks, even if they are inactive
EShReflectionUnwrapIOBlocks
=
(
1
<<
5
),
// unwrap input/output blocks the same as with uniform blocks
EShReflectionUnwrapIOBlocks
=
(
1
<<
5
),
// unwrap input/output blocks the same as with uniform blocks
LAST_ELEMENT_MARKER
(
EShReflectionCount
),
}
EShReflectionOptions
;
}
EShReflectionOptions
;
//
//
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment