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
26013595
Commit
26013595
authored
Mar 16, 2017
by
John Kessenich
Committed by
GitHub
Mar 16, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #776 from amdrexu/bugfix
SPV: Fix unexpected declarations of capability and extension
parents
36b218de
5e317ffe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
18 deletions
+21
-18
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+21
-16
spv.stereoViewRendering.tesc.out
Test/baseResults/spv.stereoViewRendering.tesc.out
+0
-1
spv.viewportArray2.tesc.out
Test/baseResults/spv.viewportArray2.tesc.out
+0
-1
No files found.
SPIRV/GlslangToSpv.cpp
View file @
26013595
...
...
@@ -480,16 +480,18 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
return
spv
::
BuiltInCullDistance
;
case
glslang
:
:
EbvViewportIndex
:
builder
.
addCapability
(
spv
::
CapabilityMultiViewport
);
if
(
!
memberDeclaration
)
{
builder
.
addCapability
(
spv
::
CapabilityMultiViewport
);
#ifdef NV_EXTENSIONS
if
(
glslangIntermediate
->
getStage
()
==
EShLangVertex
||
glslangIntermediate
->
getStage
()
==
EShLangTessControl
||
glslangIntermediate
->
getStage
()
==
EShLangTessEvaluation
)
{
builder
.
addExtension
(
spv
::
E_SPV_NV_viewport_array2
);
builder
.
addCapability
(
spv
::
CapabilityShaderViewportIndexLayerNV
);
}
if
(
glslangIntermediate
->
getStage
()
==
EShLangVertex
||
glslangIntermediate
->
getStage
()
==
EShLangTessControl
||
glslangIntermediate
->
getStage
()
==
EShLangTessEvaluation
)
{
builder
.
addExtension
(
spv
::
E_SPV_NV_viewport_array2
);
builder
.
addCapability
(
spv
::
CapabilityShaderViewportIndexLayerNV
);
}
#endif
}
return
spv
::
BuiltInViewportIndex
;
case
glslang
:
:
EbvSampleId
:
...
...
@@ -505,19 +507,19 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
return
spv
::
BuiltInSampleMask
;
case
glslang
:
:
EbvLayer
:
builder
.
addCapability
(
spv
::
CapabilityGeometry
);
if
(
!
memberDeclaration
)
{
builder
.
addCapability
(
spv
::
CapabilityGeometry
);
#ifdef NV_EXTENSIONS
if
(
!
memberDeclaration
)
{
if
(
glslangIntermediate
->
getStage
()
==
EShLangVertex
||
glslangIntermediate
->
getStage
()
==
EShLangTessControl
||
glslangIntermediate
->
getStage
()
==
EShLangTessEvaluation
)
{
glslangIntermediate
->
getStage
()
==
EShLangTessEvaluation
)
{
builder
.
addExtension
(
spv
::
E_SPV_NV_viewport_array2
);
builder
.
addCapability
(
spv
::
CapabilityShaderViewportIndexLayerNV
);
}
}
#endif
}
return
spv
::
BuiltInLayer
;
case
glslang
:
:
EbvPosition
:
return
spv
::
BuiltInPosition
;
...
...
@@ -640,8 +642,10 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
#ifdef NV_EXTENSIONS
case
glslang
:
:
EbvViewportMaskNV
:
builder
.
addExtension
(
spv
::
E_SPV_NV_viewport_array2
);
builder
.
addCapability
(
spv
::
CapabilityShaderViewportMaskNV
);
if
(
!
memberDeclaration
)
{
builder
.
addExtension
(
spv
::
E_SPV_NV_viewport_array2
);
builder
.
addCapability
(
spv
::
CapabilityShaderViewportMaskNV
);
}
return
spv
::
BuiltInViewportMaskNV
;
case
glslang
:
:
EbvSecondaryPositionNV
:
if
(
!
memberDeclaration
)
{
...
...
@@ -2690,6 +2694,7 @@ void TGlslangToSpvTraverser::declareUseOfStructMember(const glslang::TTypeList&
case
glslang
:
:
EbvPointSize
:
#ifdef NV_EXTENSIONS
case
glslang
:
:
EbvLayer
:
case
glslang
:
:
EbvViewportIndex
:
case
glslang
:
:
EbvViewportMaskNV
:
case
glslang
:
:
EbvSecondaryPositionNV
:
case
glslang
:
:
EbvSecondaryViewportMaskNV
:
...
...
Test/baseResults/spv.stereoViewRendering.tesc.out
View file @
26013595
...
...
@@ -5,7 +5,6 @@ Warning, version 450 is not yet complete; most version-specific features are pre
// Generated by (magic number): 80001
// Id's are bound by 39
Capability Geometry
Capability Tessellation
Capability ShaderViewportMaskNV
Capability ShaderStereoViewNV
...
...
Test/baseResults/spv.viewportArray2.tesc.out
View file @
26013595
...
...
@@ -5,7 +5,6 @@ Warning, version 450 is not yet complete; most version-specific features are pre
// Generated by (magic number): 80001
// Id's are bound by 25
Capability Geometry
Capability Tessellation
Capability MultiViewport
Capability ShaderViewportIndexLayerNV
...
...
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