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
df1d4ccf
Commit
df1d4ccf
authored
Aug 28, 2019
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ESSL/SPV: Fix #1856: Allow ESSL shaders to compile to OpenGL SPIR-V.
parent
efd47a8f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
14 deletions
+28
-14
README.md
README.md
+1
-1
glspv.esversion.vert.out
Test/baseResults/glspv.esversion.vert.out
+23
-4
ShaderLang.cpp
glslang/MachineIndependent/ShaderLang.cpp
+2
-7
ShaderLang.h
glslang/Public/ShaderLang.h
+2
-2
No files found.
README.md
View file @
df1d4ccf
...
...
@@ -293,7 +293,7 @@ class TProgram
For just validating (not generating code), subsitute these calls:
```
```
cxx
setEnvInput(EShSourceHlsl or EShSourceGlsl, stage, EShClientNone, 0);
setEnvClient(EShClientNone, 0);
setEnvTarget(EShTargetNone, 0);
...
...
Test/baseResults/glspv.esversion.vert.out
View file @
df1d4ccf
glspv.esversion.vert
ERROR: #version: ES shaders for OpenGL SPIR-V are not supported
ERROR: 1 compilation errors. No code generated.
// Module Version 10000
// Generated by (magic number): 80007
// Id's are bound by 10
SPIR-V is not generated for failed compile or link
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 8 9
Source ESSL 310
Name 4 "main"
Name 8 "gl_VertexID"
Name 9 "gl_InstanceID"
Decorate 8(gl_VertexID) BuiltIn VertexId
Decorate 9(gl_InstanceID) BuiltIn InstanceId
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
7: TypePointer Input 6(int)
8(gl_VertexID): 7(ptr) Variable Input
9(gl_InstanceID): 7(ptr) Variable Input
4(main): 2 Function None 3
5: Label
Return
FunctionEnd
glslang/MachineIndependent/ShaderLang.cpp
View file @
df1d4ccf
...
...
@@ -646,14 +646,9 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
if
(
spvVersion
.
spv
!=
0
)
{
switch
(
profile
)
{
case
EEsProfile
:
if
(
spvVersion
.
vulkan
>
0
&&
version
<
310
)
{
if
(
version
<
310
)
{
correct
=
false
;
infoSink
.
info
.
message
(
EPrefixError
,
"#version: ES shaders for Vulkan SPIR-V require version 310 or higher"
);
version
=
310
;
}
if
(
spvVersion
.
openGl
>=
100
)
{
correct
=
false
;
infoSink
.
info
.
message
(
EPrefixError
,
"#version: ES shaders for OpenGL SPIR-V are not supported"
);
infoSink
.
info
.
message
(
EPrefixError
,
"#version: ES shaders for SPIR-V require version 310 or higher"
);
version
=
310
;
}
break
;
...
...
glslang/Public/ShaderLang.h
View file @
df1d4ccf
...
...
@@ -126,8 +126,8 @@ class TType;
typedef
enum
{
EShSourceNone
,
EShSourceGlsl
,
EShSourceHlsl
,
EShSourceGlsl
,
// GLSL, includes ESSL (OpenGL ES GLSL)
EShSourceHlsl
,
// HLSL
}
EShSource
;
// if EShLanguage were EShStage, this could be EShLanguage instead
typedef
enum
{
...
...
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