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
c3387d33
Commit
c3387d33
authored
Jun 17, 2016
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HLSL: Support semantics in function parameter declarations.
parent
21f1286f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
hlsl.float1.frag
Test/hlsl.float1.frag
+1
-1
hlslGrammar.cpp
hlsl/hlslGrammar.cpp
+4
-2
No files found.
Test/hlsl.float1.frag
View file @
c3387d33
float1
f1
=
float1
(
1
.
0
);
float1
f1
=
float1
(
1
.
0
);
float
scalar
=
2
.
0
;
float
scalar
=
2
.
0
;
float1
ShaderFunction
(
float1
inFloat1
,
float
inScalar
)
:
COLOR0
float1
ShaderFunction
(
float1
inFloat1
:
COLOR
,
float
inScalar
)
:
COLOR0
{
{
return
f1
*
scalar
+
inFloat1
*
inScalar
;
return
f1
*
scalar
+
inFloat1
*
inScalar
;
}
}
hlsl/hlslGrammar.cpp
View file @
c3387d33
...
@@ -769,8 +769,8 @@ bool HlslGrammar::acceptFunctionParameters(TFunction& function)
...
@@ -769,8 +769,8 @@ bool HlslGrammar::acceptFunctionParameters(TFunction& function)
}
}
// parameter_declaration
// parameter_declaration
// : fully_specified_type
// : fully_specified_type
post_decls
// | fully_specified_type identifier
// | fully_specified_type identifier
post_decls
//
//
bool
HlslGrammar
::
acceptParameterDeclaration
(
TFunction
&
function
)
bool
HlslGrammar
::
acceptParameterDeclaration
(
TFunction
&
function
)
{
{
...
@@ -783,6 +783,8 @@ bool HlslGrammar::acceptParameterDeclaration(TFunction& function)
...
@@ -783,6 +783,8 @@ bool HlslGrammar::acceptParameterDeclaration(TFunction& function)
HlslToken
idToken
;
HlslToken
idToken
;
acceptIdentifier
(
idToken
);
acceptIdentifier
(
idToken
);
acceptPostDecls
(
*
type
);
TParameter
param
=
{
idToken
.
string
,
type
};
TParameter
param
=
{
idToken
.
string
,
type
};
function
.
addParameter
(
param
);
function
.
addParameter
(
param
);
...
...
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