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
2a305f65
Commit
2a305f65
authored
Aug 31, 2017
by
Rex Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issues of GL_ARB_viewport_layer_array
parent
75e057f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
4 deletions
+20
-4
Initialize.cpp
glslang/MachineIndependent/Initialize.cpp
+20
-4
No files found.
glslang/MachineIndependent/Initialize.cpp
View file @
2a305f65
...
@@ -3425,6 +3425,12 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
...
@@ -3425,6 +3425,12 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"in int gl_DrawIDARB;"
"in int gl_DrawIDARB;"
);
);
}
}
if
(
version
>=
450
)
{
stageBuiltins
[
EShLangVertex
].
append
(
"out int gl_ViewportIndex;"
"out int gl_Layer;"
);
}
if
(
version
>=
460
)
{
if
(
version
>=
460
)
{
stageBuiltins
[
EShLangVertex
].
append
(
stageBuiltins
[
EShLangVertex
].
append
(
"in int gl_BaseVertex;"
"in int gl_BaseVertex;"
...
@@ -3436,8 +3442,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
...
@@ -3436,8 +3442,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
#ifdef NV_EXTENSIONS
#ifdef NV_EXTENSIONS
if
(
version
>=
450
)
if
(
version
>=
450
)
stageBuiltins
[
EShLangVertex
].
append
(
stageBuiltins
[
EShLangVertex
].
append
(
"out int gl_ViewportIndex;"
"out int gl_Layer;"
"out int gl_ViewportMask[];"
// GL_NV_viewport_array2
"out int gl_ViewportMask[];"
// GL_NV_viewport_array2
"out int gl_SecondaryViewportMaskNV[];"
// GL_NV_stereo_view_rendering
"out int gl_SecondaryViewportMaskNV[];"
// GL_NV_stereo_view_rendering
"out vec4 gl_SecondaryPositionNV;"
// GL_NV_stereo_view_rendering
"out vec4 gl_SecondaryPositionNV;"
// GL_NV_stereo_view_rendering
...
@@ -3730,11 +3734,15 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
...
@@ -3730,11 +3734,15 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"};"
"};"
"
\n
"
);
"
\n
"
);
if
(
version
>=
450
)
stageBuiltins
[
EShLangTessEvaluation
].
append
(
"out int gl_ViewportIndex;"
"out int gl_Layer;"
);
#ifdef NV_EXTENSIONS
#ifdef NV_EXTENSIONS
if
(
version
>=
450
)
if
(
version
>=
450
)
stageBuiltins
[
EShLangTessEvaluation
].
append
(
stageBuiltins
[
EShLangTessEvaluation
].
append
(
"out int gl_ViewportIndex;"
"out int gl_Layer;"
"out int gl_ViewportMask[];"
// GL_NV_viewport_array2
"out int gl_ViewportMask[];"
// GL_NV_viewport_array2
"out vec4 gl_SecondaryPositionNV;"
// GL_NV_stereo_view_rendering
"out vec4 gl_SecondaryPositionNV;"
// GL_NV_stereo_view_rendering
"out int gl_SecondaryViewportMaskNV[];"
// GL_NV_stereo_view_rendering
"out int gl_SecondaryViewportMaskNV[];"
// GL_NV_stereo_view_rendering
...
@@ -5467,6 +5475,14 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
...
@@ -5467,6 +5475,14 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable
.
setVariableExtensions
(
"gl_Layer"
,
Num_viewportEXTs
,
viewportEXTs
);
symbolTable
.
setVariableExtensions
(
"gl_Layer"
,
Num_viewportEXTs
,
viewportEXTs
);
symbolTable
.
setVariableExtensions
(
"gl_ViewportIndex"
,
Num_viewportEXTs
,
viewportEXTs
);
symbolTable
.
setVariableExtensions
(
"gl_ViewportIndex"
,
Num_viewportEXTs
,
viewportEXTs
);
}
}
#else
if
(
language
==
EShLangVertex
||
language
==
EShLangTessEvaluation
)
{
symbolTable
.
setVariableExtensions
(
"gl_Layer"
,
1
,
&
E_GL_ARB_shader_viewport_layer_array
);
symbolTable
.
setVariableExtensions
(
"gl_ViewportIndex"
,
1
,
&
E_GL_ARB_shader_viewport_layer_array
);
}
#endif
#ifdef NV_EXTENSIONS
symbolTable
.
setVariableExtensions
(
"gl_ViewportMask"
,
1
,
&
E_GL_NV_viewport_array2
);
symbolTable
.
setVariableExtensions
(
"gl_ViewportMask"
,
1
,
&
E_GL_NV_viewport_array2
);
symbolTable
.
setVariableExtensions
(
"gl_SecondaryPositionNV"
,
1
,
&
E_GL_NV_stereo_view_rendering
);
symbolTable
.
setVariableExtensions
(
"gl_SecondaryPositionNV"
,
1
,
&
E_GL_NV_stereo_view_rendering
);
symbolTable
.
setVariableExtensions
(
"gl_SecondaryViewportMaskNV"
,
1
,
&
E_GL_NV_stereo_view_rendering
);
symbolTable
.
setVariableExtensions
(
"gl_SecondaryViewportMaskNV"
,
1
,
&
E_GL_NV_stereo_view_rendering
);
...
...
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