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
d55fe865
Commit
d55fe865
authored
Feb 27, 2018
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HLSL: Fix #1257: layout float1, int1, etc., as scalars.
parent
46413d57
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
hlsl.implicitBool.frag.out
Test/baseResults/hlsl.implicitBool.frag.out
+2
-2
linkValidate.cpp
glslang/MachineIndependent/linkValidate.cpp
+2
-0
hlslParseHelper.cpp
hlsl/hlslParseHelper.cpp
+3
-1
No files found.
Test/baseResults/hlsl.implicitBool.frag.out
View file @
d55fe865
...
@@ -358,8 +358,8 @@ gl_FragCoord origin is upper left
...
@@ -358,8 +358,8 @@ gl_FragCoord origin is upper left
Name 138 "@entryPointOutput"
Name 138 "@entryPointOutput"
MemberDecorate 16($Global) 0 Offset 0
MemberDecorate 16($Global) 0 Offset 0
MemberDecorate 16($Global) 1 Offset 4
MemberDecorate 16($Global) 1 Offset 4
MemberDecorate 16($Global) 2 Offset
16
MemberDecorate 16($Global) 2 Offset
8
MemberDecorate 16($Global) 3 Offset
3
2
MemberDecorate 16($Global) 3 Offset
1
2
Decorate 16($Global) Block
Decorate 16($Global) Block
Decorate 18 DescriptorSet 0
Decorate 18 DescriptorSet 0
Decorate 138(@entryPointOutput) Location 0
Decorate 138(@entryPointOutput) Location 0
...
...
glslang/MachineIndependent/linkValidate.cpp
View file @
d55fe865
...
@@ -1197,6 +1197,8 @@ int TIntermediate::getBaseAlignment(const TType& type, int& size, int& stride, b
...
@@ -1197,6 +1197,8 @@ int TIntermediate::getBaseAlignment(const TType& type, int& size, int& stride, b
if
(
type
.
isVector
())
{
if
(
type
.
isVector
())
{
int
scalarAlign
=
getBaseAlignmentScalar
(
type
,
size
);
int
scalarAlign
=
getBaseAlignmentScalar
(
type
,
size
);
switch
(
type
.
getVectorSize
())
{
switch
(
type
.
getVectorSize
())
{
case
1
:
// HLSL has this, GLSL does not
return
scalarAlign
;
case
2
:
case
2
:
size
*=
2
;
size
*=
2
;
return
2
*
scalarAlign
;
return
2
*
scalarAlign
;
...
...
hlsl/hlslParseHelper.cpp
View file @
d55fe865
...
@@ -829,7 +829,9 @@ TIntermTyped* HlslParseContext::handleBracketDereference(const TSourceLoc& loc,
...
@@ -829,7 +829,9 @@ TIntermTyped* HlslParseContext::handleBracketDereference(const TSourceLoc& loc,
}
else
{
}
else
{
// at least one of base and index is variable...
// at least one of base and index is variable...
if
(
base
->
getAsSymbolNode
()
&&
wasFlattened
(
base
))
{
if
(
base
->
getType
().
isScalarOrVec1
())
result
=
base
;
else
if
(
base
->
getAsSymbolNode
()
&&
wasFlattened
(
base
))
{
if
(
index
->
getQualifier
().
storage
!=
EvqConst
)
if
(
index
->
getQualifier
().
storage
!=
EvqConst
)
error
(
loc
,
"Invalid variable index to flattened array"
,
base
->
getAsSymbolNode
()
->
getName
().
c_str
(),
""
);
error
(
loc
,
"Invalid variable index to flattened array"
,
base
->
getAsSymbolNode
()
->
getName
().
c_str
(),
""
);
...
...
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