Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
angle
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
angle
Commits
52660ffc
Commit
52660ffc
authored
Jun 07, 2013
by
Jamie Madill
Committed by
Shannon Woods
Jul 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix alignment of HLSL packed structs in interface blocks.
TRAC #22856 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Authored-by: Jamie Madill
parent
a295edfc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
Uniform.cpp
src/compiler/Uniform.cpp
+6
-8
No files found.
src/compiler/Uniform.cpp
View file @
52660ffc
...
...
@@ -92,17 +92,15 @@ bool InterfaceBlock::getBlockLayoutInfo(const sh::Uniform &uniform, unsigned int
{
if
(
!
uniform
.
fields
.
empty
())
{
if
(
uniform
.
arraySize
>
0
)
{
for
(
unsigned
int
arrayElement
=
0
;
arrayElement
<
uniform
.
arraySize
;
arrayElement
++
)
{
getBlockLayoutInfo
(
uniform
.
fields
,
currentOffset
);
}
}
else
const
unsigned
int
elementCount
=
std
::
max
(
1u
,
uniform
.
arraySize
);
for
(
unsigned
int
elementIndex
=
0
;
elementIndex
<
elementCount
;
elementIndex
++
)
{
// align struct to register size
*
currentOffset
=
rx
::
roundUp
(
*
currentOffset
,
4u
);
getBlockLayoutInfo
(
uniform
.
fields
,
currentOffset
);
}
return
false
;
}
...
...
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