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
2921e0c5
Commit
2921e0c5
authored
May 20, 2016
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KHR_vulkan_glsl: name mangle distinguish pure textures.
Fixes issue #252.
parent
22e0d414
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
3 deletions
+16
-3
vulkan.frag.out
Test/baseResults/vulkan.frag.out
+3
-1
vulkan.frag
Test/vulkan.frag
+7
-0
SymbolTable.cpp
glslang/MachineIndependent/SymbolTable.cpp
+6
-2
No files found.
Test/baseResults/vulkan.frag.out
View file @
2921e0c5
...
...
@@ -31,7 +31,9 @@ ERROR: 0:66: 'non-opaque uniforms outside a block' : not allowed when using GLSL
ERROR: 0:67: 'subroutine' : not allowed when generating SPIR-V
ERROR: 0:67: 'uniform' : no qualifiers allowed for function return
ERROR: 0:69: 'non-opaque uniforms outside a block' : not allowed when using GLSL for Vulkan
ERROR: 31 compilation errors. No code generated.
ERROR: 0:73: 'texture' : no matching overloaded function found
ERROR: 0:74: 'imageStore' : no matching overloaded function found
ERROR: 33 compilation errors. No code generated.
...
...
Test/vulkan.frag
View file @
2921e0c5
...
...
@@ -67,3 +67,9 @@ subroutine int fooS; // ERROR, not in SPV
subroutine
int
fooSub
();
// ERROR, not in SPV
uniform
vec4
dv4
;
// ERROR, no default uniforms
void
fooTex
()
{
texture
(
t2d
,
vec2
(
1
.
0
));
// ERROR, need a sampler, not a pure texture
imageStore
(
t2d
,
ivec2
(
4
,
5
),
vec4
(
1
.
2
));
// ERROR, need an image, not a pure texture
}
\ No newline at end of file
glslang/MachineIndependent/SymbolTable.cpp
View file @
2921e0c5
...
...
@@ -73,9 +73,13 @@ void TType::buildMangledName(TString& mangledName)
default
:
break
;
// some compilers want this
}
if
(
sampler
.
image
)
mangledName
+=
"I"
;
mangledName
+=
"I"
;
// a normal image
else
if
(
sampler
.
sampler
)
mangledName
+=
"p"
;
// a "pure" sampler
else
if
(
!
sampler
.
combined
)
mangledName
+=
"t"
;
// a "pure" texture
else
mangledName
+=
"s"
;
mangledName
+=
"s"
;
// traditional combined sampler
if
(
sampler
.
arrayed
)
mangledName
+=
"A"
;
if
(
sampler
.
shadow
)
...
...
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