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
017a567b
Commit
017a567b
authored
Mar 12, 2018
by
Ben Clayton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for GL_NV_shader_noperspective_interpolation
parent
845860d5
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
29 additions
and
9 deletions
+29
-9
300.frag.out
Test/baseResults/300.frag.out
+1
-1
310.frag.out
Test/baseResults/310.frag.out
+1
-1
310.tese.out
Test/baseResults/310.tese.out
+1
-1
320.frag.out
Test/baseResults/320.frag.out
+1
-1
320.tese.out
Test/baseResults/320.tese.out
+1
-1
Scan.cpp
glslang/MachineIndependent/Scan.cpp
+6
-1
Versions.cpp
glslang/MachineIndependent/Versions.cpp
+8
-0
Versions.h
glslang/MachineIndependent/Versions.h
+1
-0
glslang.y
glslang/MachineIndependent/glslang.y
+4
-0
glslang_tab.cpp
glslang/MachineIndependent/glslang_tab.cpp
+0
-0
glslang_tab.cpp.h
glslang/MachineIndependent/glslang_tab.cpp.h
+5
-3
No files found.
Test/baseResults/300.frag.out
View file @
017a567b
300.frag
300.frag
ERROR: 0:2: 'float' : type requires declaration of default precision qualifier
ERROR: 0:2: 'float' : type requires declaration of default precision qualifier
ERROR: 0:30: 'noperspective' : Reserved word.
ERROR: 0:30: 'noperspective' : Reserved word.
ERROR: 0:30: 'noperspective' : not supported
with this profile: es
ERROR: 0:30: 'noperspective' : not supported
for this version or the enabled extensions
ERROR: 0:31: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: bads
ERROR: 0:31: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: bads
ERROR: 0:32: 'uint' : cannot apply precision statement to this type; use 'float', 'int' or a sampler type
ERROR: 0:32: 'uint' : cannot apply precision statement to this type; use 'float', 'int' or a sampler type
ERROR: 0:39: 'structure' : must be qualified as flat in
ERROR: 0:39: 'structure' : must be qualified as flat in
...
...
Test/baseResults/310.frag.out
View file @
017a567b
...
@@ -105,7 +105,7 @@ ERROR: 0:346: 'centroid/sample/patch' : can't use auxiliary qualifier on a fragm
...
@@ -105,7 +105,7 @@ ERROR: 0:346: 'centroid/sample/patch' : can't use auxiliary qualifier on a fragm
ERROR: 0:347: 'flat/smooth/noperspective' : can't use interpolation qualifier on a fragment output
ERROR: 0:347: 'flat/smooth/noperspective' : can't use interpolation qualifier on a fragment output
ERROR: 0:348: 'flat/smooth/noperspective' : can't use interpolation qualifier on a fragment output
ERROR: 0:348: 'flat/smooth/noperspective' : can't use interpolation qualifier on a fragment output
ERROR: 0:349: 'noperspective' : Reserved word.
ERROR: 0:349: 'noperspective' : Reserved word.
ERROR: 0:349: 'noperspective' : not supported
with this profile: es
ERROR: 0:349: 'noperspective' : not supported
for this version or the enabled extensions
ERROR: 0:349: 'flat/smooth/noperspective' : can't use interpolation qualifier on a fragment output
ERROR: 0:349: 'flat/smooth/noperspective' : can't use interpolation qualifier on a fragment output
ERROR: 0:355: 'interpolateAtCentroid' : required extension not requested: GL_OES_shader_multisample_interpolation
ERROR: 0:355: 'interpolateAtCentroid' : required extension not requested: GL_OES_shader_multisample_interpolation
ERROR: 0:356: 'interpolateAtSample' : required extension not requested: GL_OES_shader_multisample_interpolation
ERROR: 0:356: 'interpolateAtSample' : required extension not requested: GL_OES_shader_multisample_interpolation
...
...
Test/baseResults/310.tese.out
View file @
017a567b
...
@@ -21,7 +21,7 @@ ERROR: 0:48: 'assign' : l-value required (can't modify a const)
...
@@ -21,7 +21,7 @@ ERROR: 0:48: 'assign' : l-value required (can't modify a const)
ERROR: 0:51: 'patch' : cannot use interpolation qualifiers with patch
ERROR: 0:51: 'patch' : cannot use interpolation qualifiers with patch
ERROR: 0:52: 'patch' : cannot use interpolation qualifiers with patch
ERROR: 0:52: 'patch' : cannot use interpolation qualifiers with patch
ERROR: 0:53: 'noperspective' : Reserved word.
ERROR: 0:53: 'noperspective' : Reserved word.
ERROR: 0:53: 'noperspective' : not supported
with this profile: es
ERROR: 0:53: 'noperspective' : not supported
for this version or the enabled extensions
ERROR: 0:53: 'patch' : cannot use interpolation qualifiers with patch
ERROR: 0:53: 'patch' : cannot use interpolation qualifiers with patch
ERROR: 0:54: 'sample' : Reserved word.
ERROR: 0:54: 'sample' : Reserved word.
ERROR: 0:54: '' : can only have one auxiliary qualifier (centroid, patch, and sample)
ERROR: 0:54: '' : can only have one auxiliary qualifier (centroid, patch, and sample)
...
...
Test/baseResults/320.frag.out
View file @
017a567b
...
@@ -23,7 +23,7 @@ ERROR: 0:157: 'centroid/sample/patch' : can't use auxiliary qualifier on a fragm
...
@@ -23,7 +23,7 @@ ERROR: 0:157: 'centroid/sample/patch' : can't use auxiliary qualifier on a fragm
ERROR: 0:158: 'flat/smooth/noperspective' : can't use interpolation qualifier on a fragment output
ERROR: 0:158: 'flat/smooth/noperspective' : can't use interpolation qualifier on a fragment output
ERROR: 0:159: 'flat/smooth/noperspective' : can't use interpolation qualifier on a fragment output
ERROR: 0:159: 'flat/smooth/noperspective' : can't use interpolation qualifier on a fragment output
ERROR: 0:160: 'noperspective' : Reserved word.
ERROR: 0:160: 'noperspective' : Reserved word.
ERROR: 0:160: 'noperspective' : not supported
with this profile: es
ERROR: 0:160: 'noperspective' : not supported
for this version or the enabled extensions
ERROR: 0:160: 'flat/smooth/noperspective' : can't use interpolation qualifier on a fragment output
ERROR: 0:160: 'flat/smooth/noperspective' : can't use interpolation qualifier on a fragment output
ERROR: 0:165: 'centroid/sample/patch' : can't use auxiliary qualifier on a fragment output
ERROR: 0:165: 'centroid/sample/patch' : can't use auxiliary qualifier on a fragment output
ERROR: 0:180: 'interpolateAtCentroid' : no matching overloaded function found
ERROR: 0:180: 'interpolateAtCentroid' : no matching overloaded function found
...
...
Test/baseResults/320.tese.out
View file @
017a567b
...
@@ -21,7 +21,7 @@ ERROR: 0:44: 'assign' : l-value required (can't modify a const)
...
@@ -21,7 +21,7 @@ ERROR: 0:44: 'assign' : l-value required (can't modify a const)
ERROR: 0:47: 'patch' : cannot use interpolation qualifiers with patch
ERROR: 0:47: 'patch' : cannot use interpolation qualifiers with patch
ERROR: 0:48: 'patch' : cannot use interpolation qualifiers with patch
ERROR: 0:48: 'patch' : cannot use interpolation qualifiers with patch
ERROR: 0:49: 'noperspective' : Reserved word.
ERROR: 0:49: 'noperspective' : Reserved word.
ERROR: 0:49: 'noperspective' : not supported
with this profile: es
ERROR: 0:49: 'noperspective' : not supported
for this version or the enabled extensions
ERROR: 0:49: 'patch' : cannot use interpolation qualifiers with patch
ERROR: 0:49: 'patch' : cannot use interpolation qualifiers with patch
ERROR: 0:50: '' : can only have one auxiliary qualifier (centroid, patch, and sample)
ERROR: 0:50: '' : can only have one auxiliary qualifier (centroid, patch, and sample)
ERROR: 0:54: 'gl_PerVertex' : block already declared with size, can't redeclare as implicitly-sized
ERROR: 0:54: 'gl_PerVertex' : block already declared with size, can't redeclare as implicitly-sized
...
...
glslang/MachineIndependent/Scan.cpp
View file @
017a567b
...
@@ -962,7 +962,7 @@ int TScanContext::tokenizeIdentifier()
...
@@ -962,7 +962,7 @@ int TScanContext::tokenizeIdentifier()
case
PATCH
:
case
PATCH
:
if
(
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
if
(
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
(
parseContext
.
profile
==
EEsProfile
&&
(
parseContext
.
profile
==
EEsProfile
&&
(
parseContext
.
version
>=
320
||
(
parseContext
.
version
>=
320
||
parseContext
.
extensionsTurnedOn
(
Num_AEP_tessellation_shader
,
AEP_tessellation_shader
)))
||
parseContext
.
extensionsTurnedOn
(
Num_AEP_tessellation_shader
,
AEP_tessellation_shader
)))
||
(
parseContext
.
profile
!=
EEsProfile
&&
parseContext
.
extensionTurnedOn
(
E_GL_ARB_tessellation_shader
)))
(
parseContext
.
profile
!=
EEsProfile
&&
parseContext
.
extensionTurnedOn
(
E_GL_ARB_tessellation_shader
)))
return
keyword
;
return
keyword
;
...
@@ -1450,6 +1450,11 @@ int TScanContext::tokenizeIdentifier()
...
@@ -1450,6 +1450,11 @@ int TScanContext::tokenizeIdentifier()
#endif
#endif
case
NOPERSPECTIVE
:
case
NOPERSPECTIVE
:
#ifdef NV_EXTENSIONS
if
(
parseContext
.
profile
==
EEsProfile
&&
parseContext
.
version
>=
300
&&
parseContext
.
extensionTurnedOn
(
E_GL_NV_shader_noperspective_interpolation
))
return
keyword
;
#endif
return
es30ReservedFromGLSL
(
130
);
return
es30ReservedFromGLSL
(
130
);
case
SMOOTH
:
case
SMOOTH
:
...
...
glslang/MachineIndependent/Versions.cpp
View file @
017a567b
...
@@ -225,6 +225,7 @@ void TParseVersions::initializeExtensionBehavior()
...
@@ -225,6 +225,7 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior
[
E_GL_NVX_multiview_per_view_attributes
]
=
EBhDisable
;
extensionBehavior
[
E_GL_NVX_multiview_per_view_attributes
]
=
EBhDisable
;
extensionBehavior
[
E_GL_NV_shader_atomic_int64
]
=
EBhDisable
;
extensionBehavior
[
E_GL_NV_shader_atomic_int64
]
=
EBhDisable
;
extensionBehavior
[
E_GL_NV_conservative_raster_underestimation
]
=
EBhDisable
;
extensionBehavior
[
E_GL_NV_conservative_raster_underestimation
]
=
EBhDisable
;
extensionBehavior
[
E_GL_NV_shader_noperspective_interpolation
]
=
EBhDisable
;
#endif
#endif
// AEP
// AEP
...
@@ -319,6 +320,13 @@ void TParseVersions::getPreamble(std::string& preamble)
...
@@ -319,6 +320,13 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_OES_texture_cube_map_array 1
\n
"
"#define GL_OES_texture_cube_map_array 1
\n
"
"#define GL_EXT_shader_non_constant_global_initializers 1
\n
"
"#define GL_EXT_shader_non_constant_global_initializers 1
\n
"
;
;
#ifdef NV_EXTENSIONS
if
(
profile
==
EEsProfile
&&
version
>=
300
)
{
preamble
+=
"#define GL_NV_shader_noperspective_interpolation 1
\n
"
;
}
#endif
}
else
{
}
else
{
preamble
=
preamble
=
"#define GL_FRAGMENT_PRECISION_HIGH 1
\n
"
"#define GL_FRAGMENT_PRECISION_HIGH 1
\n
"
...
...
glslang/MachineIndependent/Versions.h
View file @
017a567b
...
@@ -196,6 +196,7 @@ const char* const E_GL_NV_stereo_view_rendering = "GL_NV_stereo_
...
@@ -196,6 +196,7 @@ const char* const E_GL_NV_stereo_view_rendering = "GL_NV_stereo_
const
char
*
const
E_GL_NVX_multiview_per_view_attributes
=
"GL_NVX_multiview_per_view_attributes"
;
const
char
*
const
E_GL_NVX_multiview_per_view_attributes
=
"GL_NVX_multiview_per_view_attributes"
;
const
char
*
const
E_GL_NV_shader_atomic_int64
=
"GL_NV_shader_atomic_int64"
;
const
char
*
const
E_GL_NV_shader_atomic_int64
=
"GL_NV_shader_atomic_int64"
;
const
char
*
const
E_GL_NV_conservative_raster_underestimation
=
"GL_NV_conservative_raster_underestimation"
;
const
char
*
const
E_GL_NV_conservative_raster_underestimation
=
"GL_NV_conservative_raster_underestimation"
;
const
char
*
const
E_GL_NV_shader_noperspective_interpolation
=
"GL_NV_shader_noperspective_interpolation"
;
// Arrays of extensions for the above viewportEXTs duplications
// Arrays of extensions for the above viewportEXTs duplications
...
...
glslang/MachineIndependent/glslang.y
View file @
017a567b
...
@@ -1117,7 +1117,11 @@ interpolation_qualifier
...
@@ -1117,7 +1117,11 @@ interpolation_qualifier
}
}
| NOPERSPECTIVE {
| NOPERSPECTIVE {
parseContext.globalCheck($1.loc, "noperspective");
parseContext.globalCheck($1.loc, "noperspective");
#ifdef NV_EXTENSIONS
parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_NV_shader_noperspective_interpolation, "noperspective");
#else
parseContext.requireProfile($1.loc, ~EEsProfile, "noperspective");
parseContext.requireProfile($1.loc, ~EEsProfile, "noperspective");
#endif
parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "noperspective");
parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "noperspective");
$$.init($1.loc);
$$.init($1.loc);
$$.qualifier.nopersp = true;
$$.qualifier.nopersp = true;
...
...
glslang/MachineIndependent/glslang_tab.cpp
View file @
017a567b
This source diff could not be displayed because it is too large. You can
view the blob
instead.
glslang/MachineIndependent/glslang_tab.cpp.h
View file @
017a567b
/* A Bison parser, made by GNU Bison 3.0. */
/* A Bison parser, made by GNU Bison 3.0.
4.
*/
/* Bison interface for Yacc-like parsers in C
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-201
3
Free Software Foundation, Inc.
Copyright (C) 1984, 1989-1990, 2000-201
5
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
...
@@ -437,7 +437,7 @@ extern int yydebug;
...
@@ -437,7 +437,7 @@ extern int yydebug;
/* Value type. */
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef
union
YYSTYPE
YYSTYPE
;
union
YYSTYPE
union
YYSTYPE
{
{
#line 70 "MachineIndependent/glslang.y"
/* yacc.c:1909 */
#line 70 "MachineIndependent/glslang.y"
/* yacc.c:1909 */
...
@@ -477,6 +477,8 @@ union YYSTYPE
...
@@ -477,6 +477,8 @@ union YYSTYPE
#line 479 "MachineIndependent/glslang_tab.cpp.h"
/* yacc.c:1909 */
#line 479 "MachineIndependent/glslang_tab.cpp.h"
/* yacc.c:1909 */
};
};
typedef
union
YYSTYPE
YYSTYPE
;
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_DECLARED 1
#endif
#endif
...
...
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