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
e891afac
Commit
e891afac
authored
Apr 10, 2018
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GLSL: Fix #1330: default outputs for GL_NV_geometry_shader_passthrough
parent
9de57c81
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
spv.GeometryShaderPassthrough.geom.out
Test/baseResults/spv.GeometryShaderPassthrough.geom.out
+1
-1
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+20
-0
No files found.
Test/baseResults/spv.GeometryShaderPassthrough.geom.out
View file @
e891afac
...
@@ -11,7 +11,7 @@ spv.GeometryShaderPassthrough.geom
...
@@ -11,7 +11,7 @@ spv.GeometryShaderPassthrough.geom
EntryPoint Geometry 4 "main" 10 14
EntryPoint Geometry 4 "main" 10 14
ExecutionMode 4 Triangles
ExecutionMode 4 Triangles
ExecutionMode 4 Invocations 1
ExecutionMode 4 Invocations 1
ExecutionMode 4 OutputVertices
ExecutionMode 4 OutputVertices
3
Source GLSL 450
Source GLSL 450
SourceExtension "GL_NV_geometry_shader_passthrough"
SourceExtension "GL_NV_geometry_shader_passthrough"
Name 4 "main"
Name 4 "main"
...
...
glslang/MachineIndependent/ParseHelper.cpp
View file @
e891afac
...
@@ -3977,6 +3977,26 @@ void TParseContext::finish()
...
@@ -3977,6 +3977,26 @@ void TParseContext::finish()
default
:
default
:
break
;
break
;
}
}
// Set default outputs for GL_NV_geometry_shader_passthrough
if
(
language
==
EShLangGeometry
&&
extensionTurnedOn
(
E_SPV_NV_geometry_shader_passthrough
))
{
if
(
intermediate
.
getOutputPrimitive
()
==
ElgNone
)
{
switch
(
intermediate
.
getInputPrimitive
())
{
case
ElgPoints
:
intermediate
.
setOutputPrimitive
(
ElgPoints
);
break
;
case
ElgLines
:
intermediate
.
setOutputPrimitive
(
ElgLineStrip
);
break
;
case
ElgTriangles
:
intermediate
.
setOutputPrimitive
(
ElgTriangles
);
break
;
default
:
break
;
}
}
if
(
intermediate
.
getVertices
()
==
TQualifier
::
layoutNotSet
)
{
switch
(
intermediate
.
getInputPrimitive
())
{
case
ElgPoints
:
intermediate
.
setVertices
(
1
);
break
;
case
ElgLines
:
intermediate
.
setVertices
(
2
);
break
;
case
ElgTriangles
:
intermediate
.
setVertices
(
3
);
break
;
default
:
break
;
}
}
}
}
}
//
//
...
...
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