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
0af795e8
Commit
0af795e8
authored
Jul 03, 2017
by
John Kessenich
Committed by
GitHub
Jul 03, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #966 from TiemoJung/io_remapper_update
io resolver improvements
parents
aad93a80
0422eb23
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
iomapper.cpp
glslang/MachineIndependent/iomapper.cpp
+8
-2
ShaderLang.h
glslang/Public/ShaderLang.h
+7
-1
No files found.
glslang/MachineIndependent/iomapper.cpp
View file @
0af795e8
...
@@ -436,7 +436,10 @@ struct TDefaultIoResolverBase : public glslang::TIoMapResolver
...
@@ -436,7 +436,10 @@ struct TDefaultIoResolverBase : public glslang::TIoMapResolver
void
notifyBinding
(
EShLanguage
,
const
char
*
/*name*/
,
const
TType
&
,
bool
/*is_live*/
)
override
{}
void
notifyBinding
(
EShLanguage
,
const
char
*
/*name*/
,
const
TType
&
,
bool
/*is_live*/
)
override
{}
void
notifyInOut
(
EShLanguage
,
const
char
*
/*name*/
,
const
TType
&
,
bool
/*is_live*/
)
override
{}
void
notifyInOut
(
EShLanguage
,
const
char
*
/*name*/
,
const
TType
&
,
bool
/*is_live*/
)
override
{}
void
endNotifications
()
override
{}
void
endNotifications
(
EShLanguage
)
override
{}
void
beginNotifications
(
EShLanguage
)
override
{}
void
beginResolve
(
EShLanguage
)
override
{}
void
endResolve
(
EShLanguage
)
override
{}
protected
:
protected
:
static
int
getLayoutSet
(
const
glslang
::
TType
&
type
)
{
static
int
getLayoutSet
(
const
glslang
::
TType
&
type
)
{
...
@@ -704,13 +707,16 @@ bool TIoMapper::addStage(EShLanguage stage, TIntermediate &intermediate, TInfoSi
...
@@ -704,13 +707,16 @@ bool TIoMapper::addStage(EShLanguage stage, TIntermediate &intermediate, TInfoSi
TNotifyUniformAdaptor
uniformNotify
(
stage
,
*
resolver
);
TNotifyUniformAdaptor
uniformNotify
(
stage
,
*
resolver
);
TResolverUniformAdaptor
uniformResolve
(
stage
,
*
resolver
,
infoSink
,
hadError
,
intermediate
);
TResolverUniformAdaptor
uniformResolve
(
stage
,
*
resolver
,
infoSink
,
hadError
,
intermediate
);
TResolverInOutAdaptor
inOutResolve
(
stage
,
*
resolver
,
infoSink
,
hadError
,
intermediate
);
TResolverInOutAdaptor
inOutResolve
(
stage
,
*
resolver
,
infoSink
,
hadError
,
intermediate
);
resolver
->
beginNotifications
(
stage
);
std
::
for_each
(
inVarMap
.
begin
(),
inVarMap
.
end
(),
inOutNotify
);
std
::
for_each
(
inVarMap
.
begin
(),
inVarMap
.
end
(),
inOutNotify
);
std
::
for_each
(
outVarMap
.
begin
(),
outVarMap
.
end
(),
inOutNotify
);
std
::
for_each
(
outVarMap
.
begin
(),
outVarMap
.
end
(),
inOutNotify
);
std
::
for_each
(
uniformVarMap
.
begin
(),
uniformVarMap
.
end
(),
uniformNotify
);
std
::
for_each
(
uniformVarMap
.
begin
(),
uniformVarMap
.
end
(),
uniformNotify
);
resolver
->
endNotifications
();
resolver
->
endNotifications
(
stage
);
resolver
->
beginResolve
(
stage
);
std
::
for_each
(
inVarMap
.
begin
(),
inVarMap
.
end
(),
inOutResolve
);
std
::
for_each
(
inVarMap
.
begin
(),
inVarMap
.
end
(),
inOutResolve
);
std
::
for_each
(
outVarMap
.
begin
(),
outVarMap
.
end
(),
inOutResolve
);
std
::
for_each
(
outVarMap
.
begin
(),
outVarMap
.
end
(),
inOutResolve
);
std
::
for_each
(
uniformVarMap
.
begin
(),
uniformVarMap
.
end
(),
uniformResolve
);
std
::
for_each
(
uniformVarMap
.
begin
(),
uniformVarMap
.
end
(),
uniformResolve
);
resolver
->
endResolve
(
stage
);
if
(
!
hadError
)
{
if
(
!
hadError
)
{
// sort by id again, so we can use lower bound to find entries
// sort by id again, so we can use lower bound to find entries
...
...
glslang/Public/ShaderLang.h
View file @
0af795e8
...
@@ -583,7 +583,13 @@ public:
...
@@ -583,7 +583,13 @@ public:
// Notification of a in or out variable
// Notification of a in or out variable
virtual
void
notifyInOut
(
EShLanguage
stage
,
const
char
*
name
,
const
TType
&
type
,
bool
is_live
)
=
0
;
virtual
void
notifyInOut
(
EShLanguage
stage
,
const
char
*
name
,
const
TType
&
type
,
bool
is_live
)
=
0
;
// Called by mapIO when it has finished the notify pass
// Called by mapIO when it has finished the notify pass
virtual
void
endNotifications
()
=
0
;
virtual
void
endNotifications
(
EShLanguage
stage
)
=
0
;
// Called by mapIO when it starts its notify pass for the given stage
virtual
void
beginNotifications
(
EShLanguage
stage
)
=
0
;
// Called by mipIO when it starts its resolve pass for the given stage
virtual
void
beginResolve
(
EShLanguage
stage
)
=
0
;
// Called by mapIO when it has finished the resolve pass
virtual
void
endResolve
(
EShLanguage
stage
)
=
0
;
};
};
// Make one TProgram per set of shaders that will get linked together. Add all
// Make one TProgram per set of shaders that will get linked together. Add all
...
...
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