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
f62b5198
Commit
f62b5198
authored
May 18, 2016
by
John Kessenich
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #294 from scyganINTEL/scygan-fix-io_storage_structs-location
SPV: Fix missing location decoration for structures put directly on input/output interfaces
parents
9af54c33
2c864276
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+10
-2
spv.430.vert.out
Test/baseResults/spv.430.vert.out
+2
-0
No files found.
SPIRV/GlslangToSpv.cpp
View file @
f62b5198
...
...
@@ -1961,6 +1961,14 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
if
(
type
.
getQualifier
().
hasXfbBuffer
())
builder
.
addDecoration
(
spvType
,
spv
::
DecorationXfbBuffer
,
type
.
getQualifier
().
layoutXfbBuffer
);
}
if
(
type
.
getBasicType
()
!=
glslang
::
EbtBlock
&&
(
type
.
getQualifier
().
storage
==
glslang
::
EvqVaryingIn
||
type
.
getQualifier
().
storage
==
glslang
::
EvqVaryingOut
))
{
// The layout of a structure type used as an Input or Output depends on whether it is also a Block (i.e. has a Block decoration).
// If it is a not a Block, then the structure type must have a Location decoration.
if
(
type
.
getQualifier
().
hasLocation
())
builder
.
addDecoration
(
spvType
,
spv
::
DecorationLocation
,
type
.
getQualifier
().
layoutLocation
);
}
}
break
;
default
:
...
...
@@ -3918,8 +3926,6 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
addDecoration
(
id
,
TranslateInterpolationDecoration
(
symbol
->
getType
().
getQualifier
()));
if
(
symbol
->
getType
().
getQualifier
().
hasSpecConstantId
())
addDecoration
(
id
,
spv
::
DecorationSpecId
,
symbol
->
getType
().
getQualifier
().
layoutSpecConstantId
);
if
(
symbol
->
getQualifier
().
hasLocation
())
builder
.
addDecoration
(
id
,
spv
::
DecorationLocation
,
symbol
->
getQualifier
().
layoutLocation
);
if
(
symbol
->
getQualifier
().
hasIndex
())
builder
.
addDecoration
(
id
,
spv
::
DecorationIndex
,
symbol
->
getQualifier
().
layoutIndex
);
if
(
symbol
->
getQualifier
().
hasComponent
())
...
...
@@ -3935,6 +3941,8 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
}
}
if
(
symbol
->
getQualifier
().
hasLocation
())
builder
.
addDecoration
(
id
,
spv
::
DecorationLocation
,
symbol
->
getQualifier
().
layoutLocation
);
addDecoration
(
id
,
TranslateInvariantDecoration
(
symbol
->
getType
().
getQualifier
()));
if
(
symbol
->
getQualifier
().
hasStream
()
&&
glslangIntermediate
->
isMultiStream
())
{
builder
.
addCapability
(
spv
::
CapabilityGeometryStreams
);
...
...
Test/baseResults/spv.430.vert.out
View file @
f62b5198
...
...
@@ -65,6 +65,8 @@ Linked vertex stage:
MemberDecorate 60(SS) 0 Flat
MemberDecorate 60(SS) 1 Flat
MemberDecorate 60(SS) 2 Flat
Decorate 60(SS) Location 0
Decorate 62(var) Location 0
MemberDecorate 63(MS) 0 Location 17
Decorate 63(MS) Block
2: TypeVoid
...
...
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