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
1831087e
Commit
1831087e
authored
May 14, 2018
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SPV: Fix #1374: For an SSBO 16-bit access, only emit StorageUniformBufferBlock16 capability.
parent
2fb966aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+16
-4
spv.shaderBallotAMD.comp.out
Test/baseResults/spv.shaderBallotAMD.comp.out
+0
-1
No files found.
SPIRV/GlslangToSpv.cpp
View file @
1831087e
...
...
@@ -2479,17 +2479,29 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol*
node
->
getType
().
containsBasicType
(
glslang
::
EbtInt16
)
||
node
->
getType
().
containsBasicType
(
glslang
::
EbtUint16
);
if
(
contains16BitType
)
{
if
(
storageClass
==
spv
::
StorageClassInput
||
storageClass
==
spv
::
StorageClassOutput
)
{
switch
(
storageClass
)
{
case
spv
:
:
StorageClassInput
:
case
spv
:
:
StorageClassOutput
:
addPre13Extension
(
spv
::
E_SPV_KHR_16bit_storage
);
builder
.
addCapability
(
spv
::
CapabilityStorageInputOutput16
);
}
else
if
(
storageClass
==
spv
::
StorageClassPushConstant
)
{
break
;
case
spv
:
:
StorageClassPushConstant
:
addPre13Extension
(
spv
::
E_SPV_KHR_16bit_storage
);
builder
.
addCapability
(
spv
::
CapabilityStoragePushConstant16
);
}
else
if
(
storageClass
==
spv
::
StorageClassUniform
)
{
break
;
case
spv
:
:
StorageClassUniform
:
addPre13Extension
(
spv
::
E_SPV_KHR_16bit_storage
);
builder
.
addCapability
(
spv
::
CapabilityStorageUniform16
);
if
(
node
->
getType
().
getQualifier
().
storage
==
glslang
::
EvqBuffer
)
builder
.
addCapability
(
spv
::
CapabilityStorageUniformBufferBlock16
);
else
builder
.
addCapability
(
spv
::
CapabilityStorageUniform16
);
break
;
case
spv
:
:
StorageClassStorageBuffer
:
addPre13Extension
(
spv
::
E_SPV_KHR_16bit_storage
);
builder
.
addCapability
(
spv
::
CapabilityStorageUniformBufferBlock16
);
break
;
default
:
break
;
}
}
...
...
Test/baseResults/spv.shaderBallotAMD.comp.out
View file @
1831087e
...
...
@@ -10,7 +10,6 @@ spv.shaderBallotAMD.comp
Capability Groups
Capability Int16
Capability StorageUniformBufferBlock16
Capability StorageUniform16
Extension "SPV_AMD_gpu_shader_half_float"
Extension "SPV_AMD_gpu_shader_int16"
Extension "SPV_AMD_shader_ballot"
...
...
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