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
5f77d864
Commit
5f77d864
authored
Sep 19, 2017
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HLSL: Fix #1064: Don't include empty structures on OpEntryPoint
parent
31365afa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+4
-2
hlsl.emptystructreturn.frag.out
Test/baseResults/hlsl.emptystructreturn.frag.out
+1
-1
hlsl.emptystructreturn.vert.out
Test/baseResults/hlsl.emptystructreturn.vert.out
+1
-1
No files found.
SPIRV/GlslangToSpv.cpp
View file @
5f77d864
...
...
@@ -1081,8 +1081,10 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
// Include all "static use" and "linkage only" interface variables on the OpEntryPoint instruction
if
(
builder
.
isPointer
(
id
))
{
spv
::
StorageClass
sc
=
builder
.
getStorageClass
(
id
);
if
(
sc
==
spv
::
StorageClassInput
||
sc
==
spv
::
StorageClassOutput
)
iOSet
.
insert
(
id
);
if
(
sc
==
spv
::
StorageClassInput
||
sc
==
spv
::
StorageClassOutput
)
{
if
(
!
symbol
->
getType
().
isStruct
()
||
symbol
->
getType
().
getStruct
()
->
size
()
>
0
)
iOSet
.
insert
(
id
);
}
}
// Only process non-linkage-only nodes for generating actual static uses
...
...
Test/baseResults/hlsl.emptystructreturn.frag.out
View file @
5f77d864
...
...
@@ -56,7 +56,7 @@ gl_FragCoord origin is upper left
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
20 23
EntryPoint Fragment 4 "main"
ExecutionMode 4 OriginUpperLeft
Source HLSL 500
Name 4 "main"
...
...
Test/baseResults/hlsl.emptystructreturn.vert.out
View file @
5f77d864
...
...
@@ -54,7 +54,7 @@ Shader version: 500
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main"
20 23
EntryPoint Vertex 4 "main"
Source HLSL 500
Name 4 "main"
Name 6 "vs_in"
...
...
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