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
80b9872c
Commit
80b9872c
authored
Sep 27, 2018
by
Sahil Parmar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Based on feedback rename checkShaderStageForNVExtensions to checkExtensionStage
Also continue error checking post requireStage() check
parent
251344f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
18 deletions
+6
-18
Versions.cpp
glslang/MachineIndependent/Versions.cpp
+5
-15
parseVersions.h
glslang/MachineIndependent/parseVersions.h
+1
-3
No files found.
glslang/MachineIndependent/Versions.cpp
View file @
80b9872c
...
@@ -742,10 +742,8 @@ void TParseVersions::updateExtensionBehavior(int line, const char* extension, co
...
@@ -742,10 +742,8 @@ void TParseVersions::updateExtensionBehavior(int line, const char* extension, co
return
;
return
;
}
}
#ifdef NV_EXTENSIONS
// check if extension is used with correct shader stage
if
(
!
checkShaderStageForNVExtensions
(
getCurrentLoc
(),
extension
))
checkExtensionStage
(
getCurrentLoc
(),
extension
);
return
;
#endif
// update the requested extension
// update the requested extension
updateExtensionBehavior
(
extension
,
behavior
);
updateExtensionBehavior
(
extension
,
behavior
);
...
@@ -839,24 +837,16 @@ void TParseVersions::updateExtensionBehavior(const char* extension, TExtensionBe
...
@@ -839,24 +837,16 @@ void TParseVersions::updateExtensionBehavior(const char* extension, TExtensionBe
}
}
}
}
#ifdef NV_EXTENSIONS
// Check if extension is used with correct shader stage.
// Check if extension is used with correct shader stage.
bool
TParseVersions
::
checkShaderStageForNVExtensions
(
const
TSourceLoc
&
loc
,
const
char
*
const
extension
)
void
TParseVersions
::
checkExtensionStage
(
const
TSourceLoc
&
loc
,
const
char
*
const
extension
)
{
{
int
lNumErrors
=
getNumErrors
();
#ifdef NV_EXTENSIONS
// GL_NV_mesh_shader extension is only allowed in task/mesh shaders
// GL_NV_mesh_shader extension is only allowed in task/mesh shaders
if
(
strcmp
(
extension
,
"GL_NV_mesh_shader"
)
==
0
)
if
(
strcmp
(
extension
,
"GL_NV_mesh_shader"
)
==
0
)
requireStage
(
loc
,
(
EShLanguageMask
)(
EShLangTaskNVMask
|
EShLangMeshNVMask
),
requireStage
(
loc
,
(
EShLanguageMask
)(
EShLangTaskNVMask
|
EShLangMeshNVMask
),
"#extension GL_NV_mesh_shader"
);
"#extension GL_NV_mesh_shader"
);
// TODO: need to add error checks for other nvidia turing extensions
if
(
getNumErrors
()
>
lNumErrors
)
return
false
;
return
true
;
}
#endif
#endif
}
// Call for any operation needing full GLSL integer data-type support.
// Call for any operation needing full GLSL integer data-type support.
void
TParseVersions
::
fullIntegerCheck
(
const
TSourceLoc
&
loc
,
const
char
*
op
)
void
TParseVersions
::
fullIntegerCheck
(
const
TSourceLoc
&
loc
,
const
char
*
op
)
...
...
glslang/MachineIndependent/parseVersions.h
View file @
80b9872c
...
@@ -103,9 +103,7 @@ public:
...
@@ -103,9 +103,7 @@ public:
virtual
void
requireSpv
(
const
TSourceLoc
&
,
const
char
*
op
);
virtual
void
requireSpv
(
const
TSourceLoc
&
,
const
char
*
op
);
virtual
bool
checkExtensionsRequested
(
const
TSourceLoc
&
,
int
numExtensions
,
const
char
*
const
extensions
[],
const
char
*
featureDesc
);
virtual
bool
checkExtensionsRequested
(
const
TSourceLoc
&
,
int
numExtensions
,
const
char
*
const
extensions
[],
const
char
*
featureDesc
);
virtual
void
updateExtensionBehavior
(
const
char
*
const
extension
,
TExtensionBehavior
);
virtual
void
updateExtensionBehavior
(
const
char
*
const
extension
,
TExtensionBehavior
);
#ifdef NV_EXTENSIONS
virtual
void
checkExtensionStage
(
const
TSourceLoc
&
,
const
char
*
const
extension
);
virtual
bool
checkShaderStageForNVExtensions
(
const
TSourceLoc
&
,
const
char
*
const
extension
);
#endif
virtual
void
C_DECL
error
(
const
TSourceLoc
&
,
const
char
*
szReason
,
const
char
*
szToken
,
virtual
void
C_DECL
error
(
const
TSourceLoc
&
,
const
char
*
szReason
,
const
char
*
szToken
,
const
char
*
szExtraInfoFormat
,
...)
=
0
;
const
char
*
szExtraInfoFormat
,
...)
=
0
;
...
...
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