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
f8842e55
Commit
f8842e55
authored
Jan 04, 2016
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SPV: Don't do stride decorations for arrays of arrays of blocks.
parent
c9e0a42b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+5
-4
No files found.
SPIRV/GlslangToSpv.cpp
View file @
f8842e55
...
...
@@ -1655,7 +1655,8 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
// Do all but the outer dimension
if
(
type
.
getArraySizes
()
->
getNumDims
()
>
1
)
{
if
(
explicitLayout
!=
glslang
::
ElpNone
)
{
// We need to decorate array strides for types needing explicit layout, except blocks.
if
(
explicitLayout
!=
glslang
::
ElpNone
&&
type
.
getBasicType
()
!=
glslang
::
EbtBlock
)
{
// Use a dummy glslang type for querying internal strides of
// arrays of arrays, but using just a one-dimensional array.
glslang
::
TType
simpleArrayType
(
type
,
0
);
// deference type of the array
...
...
@@ -1666,6 +1667,8 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
// pile of types and doing repetitive recursion on their contents.
stride
=
getArrayStride
(
simpleArrayType
,
explicitLayout
,
qualifier
.
layoutMatrix
);
}
// make the arrays
for
(
int
dim
=
type
.
getArraySizes
()
->
getNumDims
()
-
1
;
dim
>
0
;
--
dim
)
{
int
size
=
type
.
getArraySizes
()
->
getDimSize
(
dim
);
assert
(
size
>
0
);
...
...
@@ -1677,9 +1680,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
}
else
{
// single-dimensional array, and don't yet have stride
// We need to decorate array strides for types needing explicit layout,
// except for the very top if it is an array of blocks; that array is
// not laid out in memory in a way needing a stride.
// We need to decorate array strides for types needing explicit layout, except blocks.
if
(
explicitLayout
!=
glslang
::
ElpNone
&&
type
.
getBasicType
()
!=
glslang
::
EbtBlock
)
stride
=
getArrayStride
(
type
,
explicitLayout
,
qualifier
.
layoutMatrix
);
}
...
...
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