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
4513df91
Commit
4513df91
authored
Feb 08, 2019
by
baldurk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reflow for better readability
parent
a972e73a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
85 deletions
+49
-85
StandAlone.cpp
StandAlone/StandAlone.cpp
+8
-5
ShaderLang.h
glslang/Public/ShaderLang.h
+41
-80
No files found.
StandAlone/StandAlone.cpp
View file @
4513df91
...
...
@@ -1529,12 +1529,15 @@ void usage()
" --invert-y | --iy invert position.Y output in vertex shader
\n
"
" --keep-uncalled | --ku don't eliminate uncalled functions
\n
"
" --no-storage-format | --nsf use Unknown image format
\n
"
" --reflect-strict-array-suffix use strict array suffix rules when reflecting
\n
"
" --reflect-strict-array-suffix use strict array suffix rules when
\n
"
" reflecting
\n
"
" --reflect-basic-array-suffix arrays of basic types will have trailing [0]
\n
"
" --reflect-intermediate-io reflection includes inputs/outputs of linked shaders
\n
"
" rather than just vertex/fragment
\n
"
" --reflect-separate-buffers reflect buffer variables and blocks separately to uniforms
\n
"
" --reflect-all-block-variables reflect all variables in blocks, whether inactive or active
\n
"
" --reflect-intermediate-io reflection includes inputs/outputs of linked
\n
"
" shaders rather than just vertex/fragment
\n
"
" --reflect-separate-buffers reflect buffer variables and blocks
\n
"
" separately to uniforms
\n
"
" --reflect-all-block-variables reflect all variables in blocks, whether
\n
"
" inactive or active
\n
"
" --resource-set-binding [stage] name set binding
\n
"
" set descriptor set and binding for
\n
"
" individual resources
\n
"
...
...
glslang/Public/ShaderLang.h
View file @
4513df91
...
...
@@ -758,105 +758,66 @@ public:
const
TObjectReflection
&
getAtomicCounter
(
int
index
)
const
;
// Legacy Reflection Interface - expressed in terms of above interface
int
getNumLiveUniformVariables
()
const
// can be used for glGetProgramiv(GL_ACTIVE_UNIFORMS)
{
return
getNumUniformVariables
();
}
int
getNumLiveUniformBlocks
()
const
// can be used for glGetProgramiv(GL_ACTIVE_UNIFORM_BLOCKS)
{
return
getNumUniformBlocks
();
}
// can be used for glGetProgramiv(GL_ACTIVE_UNIFORMS)
int
getNumLiveUniformVariables
()
const
{
return
getNumUniformVariables
();
}
int
getNumLiveAttributes
()
const
// can be used for glGetProgramiv(GL_ACTIVE_ATTRIBUTES)
{
return
getNumPipeInputs
();
}
// can be used for glGetProgramiv(GL_ACTIVE_UNIFORM_BLOCKS)
int
getNumLiveUniformBlocks
()
const
{
return
getNumUniformBlocks
();
}
int
getUniformIndex
(
const
char
*
name
)
const
// can be used for glGetUniformIndices()
{
return
getReflectionIndex
(
name
);
}
// can be used for glGetProgramiv(GL_ACTIVE_ATTRIBUTES)
int
getNumLiveAttributes
()
const
{
return
getNumPipeInputs
();
}
const
char
*
getUniformName
(
int
index
)
const
// can be used for "name" part of glGetActiveUniform()
{
return
getUniform
(
index
).
name
.
c_str
();
}
// can be used for glGetUniformIndices()
int
getUniformIndex
(
const
char
*
name
)
const
{
return
getReflectionIndex
(
name
);
}
int
getUniformBinding
(
int
index
)
const
// returns the binding number
{
return
getUniform
(
index
).
getBinding
();
}
// can be used for "name" part of glGetActiveUniform()
const
char
*
getUniformName
(
int
index
)
const
{
return
getUniform
(
index
).
name
.
c_str
();
}
EShLanguageMask
getUniformStages
(
int
index
)
const
// returns Shaders Stages where a Uniform is present
{
return
getUniform
(
index
).
stages
;
}
// returns the binding number
int
getUniformBinding
(
int
index
)
const
{
return
getUniform
(
index
).
getBinding
();
}
int
getUniformBlockIndex
(
int
index
)
const
// can be used for glGetActiveUniformsiv(GL_UNIFORM_BLOCK_INDEX)
{
return
getUniform
(
index
).
index
;
}
// returns Shaders Stages where a Uniform is present
EShLanguageMask
getUniformStages
(
int
index
)
const
{
return
getUniform
(
index
).
stages
;
}
int
getUniformType
(
int
index
)
const
// can be used for glGetActiveUniformsiv(GL_UNIFORM_TYPE)
{
return
getUniform
(
index
).
glDefineType
;
}
// can be used for glGetActiveUniformsiv(GL_UNIFORM_BLOCK_INDEX)
int
getUniformBlockIndex
(
int
index
)
const
{
return
getUniform
(
index
).
index
;
}
int
getUniformBufferOffset
(
int
index
)
const
// can be used for glGetActiveUniformsiv(GL_UNIFORM_OFFSET)
{
return
getUniform
(
index
).
offset
;
}
// can be used for glGetActiveUniformsiv(GL_UNIFORM_TYPE)
int
getUniformType
(
int
index
)
const
{
return
getUniform
(
index
).
glDefineType
;
}
int
getUniformArraySize
(
int
index
)
const
// can be used for glGetActiveUniformsiv(GL_UNIFORM_SIZE)
{
return
getUniform
(
index
).
size
;
}
// can be used for glGetActiveUniformsiv(GL_UNIFORM_OFFSET)
int
getUniformBufferOffset
(
int
index
)
const
{
return
getUniform
(
index
).
offset
;
}
const
TType
*
getUniformTType
(
int
index
)
const
// returns a TType*
{
return
getUniform
(
index
).
getType
();
}
// can be used for glGetActiveUniformsiv(GL_UNIFORM_SIZE)
int
getUniformArraySize
(
int
index
)
const
{
return
getUniform
(
index
).
size
;
}
const
char
*
getUniformBlockName
(
int
index
)
const
// can be used for glGetActiveUniformBlockName()
{
return
getUniformBlock
(
index
).
name
.
c_str
();
}
// returns a TType*
const
TType
*
getUniformTType
(
int
index
)
const
{
return
getUniform
(
index
).
getType
();
}
int
getUniformBlockSize
(
int
index
)
const
// can be used for glGetActiveUniformBlockiv(UNIFORM_BLOCK_DATA_SIZE)
{
return
getUniformBlock
(
index
).
size
;
}
// can be used for glGetActiveUniformBlockName()
const
char
*
getUniformBlockName
(
int
index
)
const
{
return
getUniformBlock
(
index
).
name
.
c_str
();
}
int
getUniformBlockBinding
(
int
index
)
const
// returns the block binding number
{
return
getUniformBlock
(
index
).
getBinding
();
}
// can be used for glGetActiveUniformBlockiv(UNIFORM_BLOCK_DATA_SIZE)
int
getUniformBlockSize
(
int
index
)
const
{
return
getUniformBlock
(
index
).
size
;
}
int
getUniformBlockCounterIndex
(
int
index
)
const
// returns block index of associated counter.
{
return
getUniformBlock
(
index
).
counterIndex
;
}
// returns the block binding number
int
getUniformBlockBinding
(
int
index
)
const
{
return
getUniformBlock
(
index
).
getBinding
();
}
const
TType
*
getUniformBlockTType
(
int
index
)
const
// returns a TType*
{
return
getUniformBlock
(
index
).
getType
();
}
// returns block index of associated counter.
int
getUniformBlockCounterIndex
(
int
index
)
const
{
return
getUniformBlock
(
index
).
counterIndex
;
}
const
char
*
getAttributeName
(
int
index
)
const
// can be used for glGetActiveAttrib()
{
return
getPipeInput
(
index
).
name
.
c_str
();
}
// returns a TType*
const
TType
*
getUniformBlockTType
(
int
index
)
const
{
return
getUniformBlock
(
index
).
getType
();
}
int
getAttributeType
(
int
index
)
const
// can be used for glGetActiveAttrib()
{
return
getPipeInput
(
index
).
glDefineType
;
}
// can be used for glGetActiveAttrib()
const
char
*
getAttributeName
(
int
index
)
const
{
return
getPipeInput
(
index
).
name
.
c_str
();
}
const
TType
*
getAttributeTType
(
int
index
)
const
// returns a TType*
{
return
getPipeInput
(
index
).
getType
();
}
// can be used for glGetActiveAttrib()
int
getAttributeType
(
int
index
)
const
{
return
getPipeInput
(
index
).
glDefineType
;
}
// returns a TType*
const
TType
*
getAttributeTType
(
int
index
)
const
{
return
getPipeInput
(
index
).
getType
();
}
void
dumpReflection
();
...
...
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