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
33dadd12
Commit
33dadd12
authored
Jan 13, 2017
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build break for non-VS.
parent
44251539
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
10 deletions
+11
-10
revision.h
glslang/Include/revision.h
+1
-1
ParseContextBase.cpp
glslang/MachineIndependent/ParseContextBase.cpp
+3
-3
localintermediate.h
glslang/MachineIndependent/localintermediate.h
+5
-4
hlslParseHelper.cpp
hlsl/hlslParseHelper.cpp
+2
-2
No files found.
glslang/Include/revision.h
View file @
33dadd12
...
...
@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "Overload400-PrecQual.17
69
"
#define GLSLANG_REVISION "Overload400-PrecQual.17
70
"
#define GLSLANG_DATE "13-Jan-2017"
glslang/MachineIndependent/ParseContextBase.cpp
View file @
33dadd12
...
...
@@ -443,7 +443,7 @@ void TParseContextBase::parseSwizzleSelector(const TSourceLoc& loc, const TStrin
TSwizzleSelectors
<
TVectorSelector
>&
selector
)
{
// Too long?
if
(
compString
.
size
()
>
TSwizzleSelectors
<
TVectorSelector
>::
max
Selectors
)
if
(
compString
.
size
()
>
MaxSwizzle
Selectors
)
error
(
loc
,
"vector swizzle too long"
,
compString
.
c_str
(),
""
);
// Use this to test that all swizzle characters are from the same swizzle-namespace-set
...
...
@@ -451,10 +451,10 @@ void TParseContextBase::parseSwizzleSelector(const TSourceLoc& loc, const TStrin
exyzw
,
ergba
,
estpq
,
}
fieldSet
[
TSwizzleSelectors
<
TVectorSelector
>::
max
Selectors
];
}
fieldSet
[
MaxSwizzle
Selectors
];
// Decode the swizzle string.
int
size
=
std
::
min
(
TSwizzleSelectors
<
TVectorSelector
>::
max
Selectors
,
(
int
)
compString
.
size
());
int
size
=
std
::
min
(
MaxSwizzle
Selectors
,
(
int
)
compString
.
size
());
for
(
int
i
=
0
;
i
<
size
;
++
i
)
{
switch
(
compString
[
i
])
{
case
'x'
:
...
...
glslang/MachineIndependent/localintermediate.h
View file @
33dadd12
...
...
@@ -54,15 +54,16 @@ struct TMatrixSelector {
typedef
int
TVectorSelector
;
const
int
MaxSwizzleSelectors
=
4
;
template
<
typename
selectorType
>
class
TSwizzleSelectors
{
public
:
static
const
int
maxSelectors
=
4
;
TSwizzleSelectors
()
:
size_
(
0
)
{
}
void
push_back
(
selectorType
comp
)
{
if
(
size_
<
max
Selectors
)
if
(
size_
<
MaxSwizzle
Selectors
)
components
[
size_
++
]
=
comp
;
}
void
resize
(
int
s
)
...
...
@@ -73,13 +74,13 @@ public:
int
size
()
const
{
return
size_
;
}
selectorType
operator
[](
int
i
)
const
{
assert
(
i
<
max
Selectors
);
assert
(
i
<
MaxSwizzle
Selectors
);
return
components
[
i
];
}
private
:
int
size_
;
selectorType
components
[
max
Selectors
];
selectorType
components
[
MaxSwizzle
Selectors
];
};
//
...
...
hlsl/hlslParseHelper.cpp
View file @
33dadd12
...
...
@@ -513,7 +513,7 @@ void HlslParseContext::handlePragma(const TSourceLoc& loc, const TVector<TString
bool
HlslParseContext
::
parseMatrixSwizzleSelector
(
const
TSourceLoc
&
loc
,
const
TString
&
fields
,
int
cols
,
int
rows
,
TSwizzleSelectors
<
TMatrixSelector
>&
components
)
{
int
startPos
[
TSwizzleSelectors
<
TVectorSelector
>::
max
Selectors
];
int
startPos
[
MaxSwizzle
Selectors
];
int
numComps
=
0
;
TString
compString
=
fields
;
...
...
@@ -521,7 +521,7 @@ bool HlslParseContext::parseMatrixSwizzleSelector(const TSourceLoc& loc, const T
// recording the first character position after the '_'.
for
(
size_t
c
=
0
;
c
<
compString
.
size
();
++
c
)
{
if
(
compString
[
c
]
==
'_'
)
{
if
(
numComps
>=
TSwizzleSelectors
<
TVectorSelector
>::
max
Selectors
)
{
if
(
numComps
>=
MaxSwizzle
Selectors
)
{
error
(
loc
,
"matrix component swizzle has too many components"
,
compString
.
c_str
(),
""
);
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