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
e8fdd79f
Commit
e8fdd79f
authored
Aug 23, 2017
by
Rex Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SPV: Implement extension SPV_EXT_shader_stencil_export
parent
778806a6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
5 deletions
+15
-5
GLSL.ext.KHR.h
SPIRV/GLSL.ext.KHR.h
+1
-0
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+3
-2
doc.cpp
SPIRV/doc.cpp
+3
-0
spirv.hpp
SPIRV/spirv.hpp
+5
-2
spv.shaderStencilExport.frag.out
Test/baseResults/spv.shaderStencilExport.frag.out
+3
-1
No files found.
SPIRV/GLSL.ext.KHR.h
View file @
e8fdd79f
...
@@ -42,5 +42,6 @@ static const char* const E_SPV_KHR_shader_draw_parameters = "SPV_KHR_shade
...
@@ -42,5 +42,6 @@ static const char* const E_SPV_KHR_shader_draw_parameters = "SPV_KHR_shade
static
const
char
*
const
E_SPV_KHR_16bit_storage
=
"SPV_KHR_16bit_storage"
;
static
const
char
*
const
E_SPV_KHR_16bit_storage
=
"SPV_KHR_16bit_storage"
;
static
const
char
*
const
E_SPV_KHR_storage_buffer_storage_class
=
"SPV_KHR_storage_buffer_storage_class"
;
static
const
char
*
const
E_SPV_KHR_storage_buffer_storage_class
=
"SPV_KHR_storage_buffer_storage_class"
;
static
const
char
*
const
E_SPV_KHR_post_depth_coverage
=
"SPV_KHR_post_depth_coverage"
;
static
const
char
*
const
E_SPV_KHR_post_depth_coverage
=
"SPV_KHR_post_depth_coverage"
;
static
const
char
*
const
E_SPV_EXT_shader_stencil_export
=
"SPV_EXT_shader_stencil_export"
;
#endif // #ifndef GLSLextKHR_H
#endif // #ifndef GLSLextKHR_H
SPIRV/GlslangToSpv.cpp
View file @
e8fdd79f
...
@@ -522,8 +522,9 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
...
@@ -522,8 +522,9 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
return
spv
::
BuiltInPrimitiveId
;
return
spv
::
BuiltInPrimitiveId
;
case
glslang
:
:
EbvFragStencilRef
:
case
glslang
:
:
EbvFragStencilRef
:
logger
->
missingFunctionality
(
"shader stencil export"
);
builder
.
addExtension
(
spv
::
E_SPV_EXT_shader_stencil_export
);
return
spv
::
BuiltInMax
;
builder
.
addCapability
(
spv
::
CapabilityStencilExportEXT
);
return
spv
::
BuiltInFragStencilRefEXT
;
case
glslang
:
:
EbvInvocationId
:
return
spv
::
BuiltInInvocationId
;
case
glslang
:
:
EbvInvocationId
:
return
spv
::
BuiltInInvocationId
;
case
glslang
:
:
EbvTessLevelInner
:
return
spv
::
BuiltInTessLevelInner
;
case
glslang
:
:
EbvTessLevelInner
:
return
spv
::
BuiltInTessLevelInner
;
...
...
SPIRV/doc.cpp
View file @
e8fdd79f
...
@@ -331,6 +331,7 @@ const char* BuiltInString(int builtIn)
...
@@ -331,6 +331,7 @@ const char* BuiltInString(int builtIn)
case
4424
:
return
"BaseVertex"
;
case
4424
:
return
"BaseVertex"
;
case
4425
:
return
"BaseInstance"
;
case
4425
:
return
"BaseInstance"
;
case
4426
:
return
"DrawIndex"
;
case
4426
:
return
"DrawIndex"
;
case
5014
:
return
"FragStencilRefEXT"
;
#ifdef AMD_EXTENSIONS
#ifdef AMD_EXTENSIONS
case
4992
:
return
"BaryCoordNoPerspAMD"
;
case
4992
:
return
"BaryCoordNoPerspAMD"
;
...
@@ -842,6 +843,8 @@ const char* CapabilityString(int info)
...
@@ -842,6 +843,8 @@ const char* CapabilityString(int info)
case
4437
:
return
"DeviceGroup"
;
case
4437
:
return
"DeviceGroup"
;
case
4439
:
return
"MultiView"
;
case
4439
:
return
"MultiView"
;
case
5013
:
return
"StencilExportEXT"
;
#ifdef AMD_EXTENSIONS
#ifdef AMD_EXTENSIONS
case
5009
:
return
"ImageGatherBiasLodAMD"
;
case
5009
:
return
"ImageGatherBiasLodAMD"
;
#endif
#endif
...
...
SPIRV/spirv.hpp
View file @
e8fdd79f
...
@@ -47,11 +47,11 @@ namespace spv {
...
@@ -47,11 +47,11 @@ namespace spv {
typedef
unsigned
int
Id
;
typedef
unsigned
int
Id
;
#define SPV_VERSION 0x10000
#define SPV_VERSION 0x10000
#define SPV_REVISION 1
1
#define SPV_REVISION 1
2
static
const
unsigned
int
MagicNumber
=
0x07230203
;
static
const
unsigned
int
MagicNumber
=
0x07230203
;
static
const
unsigned
int
Version
=
0x00010000
;
static
const
unsigned
int
Version
=
0x00010000
;
static
const
unsigned
int
Revision
=
1
1
;
static
const
unsigned
int
Revision
=
1
2
;
static
const
unsigned
int
OpCodeMask
=
0xffff
;
static
const
unsigned
int
OpCodeMask
=
0xffff
;
static
const
unsigned
int
WordCountShift
=
16
;
static
const
unsigned
int
WordCountShift
=
16
;
...
@@ -444,6 +444,7 @@ enum BuiltIn {
...
@@ -444,6 +444,7 @@ enum BuiltIn {
BuiltInBaryCoordSmoothCentroidAMD
=
4996
,
BuiltInBaryCoordSmoothCentroidAMD
=
4996
,
BuiltInBaryCoordSmoothSampleAMD
=
4997
,
BuiltInBaryCoordSmoothSampleAMD
=
4997
,
BuiltInBaryCoordPullModelAMD
=
4998
,
BuiltInBaryCoordPullModelAMD
=
4998
,
BuiltInFragStencilRefEXT
=
5014
,
BuiltInViewportMaskNV
=
5253
,
BuiltInViewportMaskNV
=
5253
,
BuiltInSecondaryPositionNV
=
5257
,
BuiltInSecondaryPositionNV
=
5257
,
BuiltInSecondaryViewportMaskNV
=
5258
,
BuiltInSecondaryViewportMaskNV
=
5258
,
...
@@ -640,8 +641,10 @@ enum Capability {
...
@@ -640,8 +641,10 @@ enum Capability {
CapabilityAtomicStorageOps
=
4445
,
CapabilityAtomicStorageOps
=
4445
,
CapabilitySampleMaskPostDepthCoverage
=
4447
,
CapabilitySampleMaskPostDepthCoverage
=
4447
,
CapabilityImageGatherBiasLodAMD
=
5009
,
CapabilityImageGatherBiasLodAMD
=
5009
,
CapabilityStencilExportEXT
=
5013
,
CapabilitySampleMaskOverrideCoverageNV
=
5249
,
CapabilitySampleMaskOverrideCoverageNV
=
5249
,
CapabilityGeometryShaderPassthroughNV
=
5251
,
CapabilityGeometryShaderPassthroughNV
=
5251
,
CapabilityShaderViewportIndexLayerEXT
=
5254
,
CapabilityShaderViewportIndexLayerNV
=
5254
,
CapabilityShaderViewportIndexLayerNV
=
5254
,
CapabilityShaderViewportMaskNV
=
5255
,
CapabilityShaderViewportMaskNV
=
5255
,
CapabilityShaderStereoViewNV
=
5259
,
CapabilityShaderStereoViewNV
=
5259
,
...
...
Test/baseResults/spv.shaderStencilExport.frag.out
View file @
e8fdd79f
spv.shaderStencilExport.frag
spv.shaderStencilExport.frag
Missing functionality: shader stencil export
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 10
// Id's are bound by 10
Capability Shader
Capability Shader
Capability StencilExportEXT
Extension "SPV_EXT_shader_stencil_export"
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 8
EntryPoint Fragment 4 "main" 8
...
@@ -13,6 +14,7 @@ Missing functionality: shader stencil export
...
@@ -13,6 +14,7 @@ Missing functionality: shader stencil export
SourceExtension "GL_ARB_shader_stencil_export"
SourceExtension "GL_ARB_shader_stencil_export"
Name 4 "main"
Name 4 "main"
Name 8 "gl_FragStencilRefARB"
Name 8 "gl_FragStencilRefARB"
Decorate 8(gl_FragStencilRefARB) BuiltIn FragStencilRefEXT
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeInt 32 1
6: TypeInt 32 1
...
...
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