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
102328b7
Commit
102328b7
authored
Jun 26, 2017
by
John Kessenich
Committed by
GitHub
Jun 26, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #950 from dsrbecky/shadow_samplers
Add support for GL_EXT_shadow_samplers
parents
a8a83204
c6ac40a1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
3 deletions
+24
-3
Initialize.cpp
glslang/MachineIndependent/Initialize.cpp
+17
-0
Scan.cpp
glslang/MachineIndependent/Scan.cpp
+4
-2
Versions.cpp
glslang/MachineIndependent/Versions.cpp
+2
-1
Versions.h
glslang/MachineIndependent/Versions.h
+1
-0
No files found.
glslang/MachineIndependent/Initialize.cpp
View file @
102328b7
...
...
@@ -1333,6 +1333,9 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"vec4 texture2DProjGradEXT(sampler2D, vec4, vec2, vec2);"
// GL_EXT_shader_texture_lod
"vec4 textureCubeGradEXT(samplerCube, vec3, vec3, vec3);"
// GL_EXT_shader_texture_lod
"float shadow2DEXT(sampler2DShadow, vec3);"
// GL_EXT_shadow_samplers
"float shadow2DProjEXT(sampler2DShadow, vec4);"
// GL_EXT_shadow_samplers
"
\n
"
);
}
}
...
...
@@ -5324,6 +5327,11 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
BuiltInVariable
(
"gl_InstanceIndex"
,
EbvInstanceIndex
,
symbolTable
);
}
if
(
profile
==
EEsProfile
)
{
symbolTable
.
setFunctionExtensions
(
"shadow2DEXT"
,
1
,
&
E_GL_EXT_shadow_samplers
);
symbolTable
.
setFunctionExtensions
(
"shadow2DProjEXT"
,
1
,
&
E_GL_EXT_shadow_samplers
);
}
// Fall through
case
EShLangTessControl
:
...
...
@@ -5661,6 +5669,11 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
BuiltInVariable
(
"gl_DeviceIndex"
,
EbvDeviceIndex
,
symbolTable
);
symbolTable
.
setVariableExtensions
(
"gl_ViewIndex"
,
1
,
&
E_GL_EXT_multiview
);
BuiltInVariable
(
"gl_ViewIndex"
,
EbvViewIndex
,
symbolTable
);
if
(
profile
==
EEsProfile
)
{
symbolTable
.
setFunctionExtensions
(
"shadow2DEXT"
,
1
,
&
E_GL_EXT_shadow_samplers
);
symbolTable
.
setFunctionExtensions
(
"shadow2DProjEXT"
,
1
,
&
E_GL_EXT_shadow_samplers
);
}
break
;
case
EShLangCompute
:
...
...
@@ -6048,6 +6061,10 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable
.
relateToOperator
(
"sparseTextureGatherLodOffsetsAMD"
,
EOpSparseTextureGatherLodOffsets
);
#endif
}
if
(
profile
==
EEsProfile
)
{
symbolTable
.
relateToOperator
(
"shadow2DEXT"
,
EOpTexture
);
symbolTable
.
relateToOperator
(
"shadow2DProjEXT"
,
EOpTextureProj
);
}
}
switch
(
language
)
{
...
...
glslang/MachineIndependent/Scan.cpp
View file @
102328b7
...
...
@@ -1113,8 +1113,10 @@ int TScanContext::tokenizeIdentifier()
case
SAMPLER2DSHADOW
:
afterType
=
true
;
if
(
parseContext
.
profile
==
EEsProfile
&&
parseContext
.
version
<
300
)
reservedWord
();
if
(
parseContext
.
profile
==
EEsProfile
&&
parseContext
.
version
<
300
)
{
if
(
!
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shadow_samplers
))
reservedWord
();
}
return
keyword
;
case
SAMPLER2DRECT
:
...
...
glslang/MachineIndependent/Versions.cpp
View file @
102328b7
...
...
@@ -155,7 +155,7 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior
[
E_GL_EXT_frag_depth
]
=
EBhDisable
;
extensionBehavior
[
E_GL_OES_EGL_image_external
]
=
EBhDisable
;
extensionBehavior
[
E_GL_EXT_shader_texture_lod
]
=
EBhDisable
;
extensionBehavior
[
E_GL_EXT_shadow_samplers
]
=
EBhDisable
;
extensionBehavior
[
E_GL_ARB_texture_rectangle
]
=
EBhDisable
;
extensionBehavior
[
E_GL_3DL_array_objects
]
=
EBhDisable
;
extensionBehavior
[
E_GL_ARB_shading_language_420pack
]
=
EBhDisable
;
...
...
@@ -253,6 +253,7 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_EXT_frag_depth 1
\n
"
"#define GL_OES_EGL_image_external 1
\n
"
"#define GL_EXT_shader_texture_lod 1
\n
"
"#define GL_EXT_shadow_samplers 1
\n
"
// AEP
"#define GL_ANDROID_extension_pack_es31a 1
\n
"
...
...
glslang/MachineIndependent/Versions.h
View file @
102328b7
...
...
@@ -108,6 +108,7 @@ const char* const E_GL_OES_standard_derivatives = "GL_OES_standard_deriv
const
char
*
const
E_GL_EXT_frag_depth
=
"GL_EXT_frag_depth"
;
const
char
*
const
E_GL_OES_EGL_image_external
=
"GL_OES_EGL_image_external"
;
const
char
*
const
E_GL_EXT_shader_texture_lod
=
"GL_EXT_shader_texture_lod"
;
const
char
*
const
E_GL_EXT_shadow_samplers
=
"GL_EXT_shadow_samplers"
;
const
char
*
const
E_GL_ARB_texture_rectangle
=
"GL_ARB_texture_rectangle"
;
const
char
*
const
E_GL_3DL_array_objects
=
"GL_3DL_array_objects"
;
...
...
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