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
83855b97
Commit
83855b97
authored
Mar 30, 2020
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #2163: improve comments for addProcess() and the preamble.
parent
bfe4c595
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
4 deletions
+12
-4
StandAlone.cpp
StandAlone/StandAlone.cpp
+1
-0
ShaderLang.cpp
glslang/MachineIndependent/ShaderLang.cpp
+2
-0
localintermediate.h
glslang/MachineIndependent/localintermediate.h
+4
-1
ShaderLang.h
glslang/Public/ShaderLang.h
+5
-3
No files found.
StandAlone/StandAlone.cpp
View file @
83855b97
...
@@ -242,6 +242,7 @@ protected:
...
@@ -242,6 +242,7 @@ protected:
std
::
string
text
;
// contents of preamble
std
::
string
text
;
// contents of preamble
};
};
// Track the user's #define and #undef from the command line.
TPreamble
UserPreamble
;
TPreamble
UserPreamble
;
//
//
...
...
glslang/MachineIndependent/ShaderLang.cpp
View file @
83855b97
...
@@ -1777,6 +1777,8 @@ void TShader::setSourceEntryPoint(const char* name)
...
@@ -1777,6 +1777,8 @@ void TShader::setSourceEntryPoint(const char* name)
sourceEntryPointName
=
name
;
sourceEntryPointName
=
name
;
}
}
// Log initial settings and transforms.
// See comment for class TProcesses.
void
TShader
::
addProcesses
(
const
std
::
vector
<
std
::
string
>&
p
)
void
TShader
::
addProcesses
(
const
std
::
vector
<
std
::
string
>&
p
)
{
{
intermediate
->
addProcesses
(
p
);
intermediate
->
addProcesses
(
p
);
...
...
glslang/MachineIndependent/localintermediate.h
View file @
83855b97
...
@@ -162,7 +162,10 @@ struct TXfbBuffer {
...
@@ -162,7 +162,10 @@ struct TXfbBuffer {
#endif
#endif
// Track a set of strings describing how the module was processed.
// Track a set of strings describing how the module was processed.
// Using the form:
// This includes command line options, transforms, etc., ideally inclusive enough
// to reproduce the steps used to transform the input source to the output.
// E.g., see SPIR-V OpModuleProcessed.
// Each "process" or "transform" uses is expressed in the form:
// process arg0 arg1 arg2 ...
// process arg0 arg1 arg2 ...
// process arg0 arg1 arg2 ...
// process arg0 arg1 arg2 ...
// where everything is textual, and there can be zero or more arguments
// where everything is textual, and there can be zero or more arguments
...
...
glslang/Public/ShaderLang.h
View file @
83855b97
...
@@ -417,6 +417,8 @@ enum TResourceType {
...
@@ -417,6 +417,8 @@ enum TResourceType {
// - optionally call setEnv*(), see below for more detail
// - optionally call setEnv*(), see below for more detail
// - optionally use setPreamble() to set a special shader string that will be
// - optionally use setPreamble() to set a special shader string that will be
// processed before all others but won't affect the validity of #version
// processed before all others but won't affect the validity of #version
// - optionally call addProcesses() for each setting/transform,
// see comment for class TProcesses
// - call parse(): source language and target environment must be selected
// - call parse(): source language and target environment must be selected
// either by correct setting of EShMessages sent to parse(), or by
// either by correct setting of EShMessages sent to parse(), or by
// explicitly calling setEnv*()
// explicitly calling setEnv*()
...
@@ -651,11 +653,11 @@ protected:
...
@@ -651,11 +653,11 @@ protected:
// stringNames is the optional names for all the strings. If stringNames
// stringNames is the optional names for all the strings. If stringNames
// is null, then none of the strings has name. If a certain element in
// is null, then none of the strings has name. If a certain element in
// stringNames is null, then the corresponding string does not have name.
// stringNames is null, then the corresponding string does not have name.
const
char
*
const
*
strings
;
const
char
*
const
*
strings
;
// explicit code to compile, see previous comment
const
int
*
lengths
;
const
int
*
lengths
;
const
char
*
const
*
stringNames
;
const
char
*
const
*
stringNames
;
const
char
*
preamble
;
int
numStrings
;
// size of the above arrays
int
numStrings
;
const
char
*
preamble
;
// string of implicit code to compile before the explicitly provided code
// a function in the source string can be renamed FROM this TO the name given in setEntryPoint.
// a function in the source string can be renamed FROM this TO the name given in setEntryPoint.
std
::
string
sourceEntryPointName
;
std
::
string
sourceEntryPointName
;
...
...
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