Merge pull request #1025 from amdrexu/feature
SPV: Implement extension SPV_EXT_shader_stencil_export
This commit is contained in:
commit
00b3e384a3
@ -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_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_EXT_shader_stencil_export = "SPV_EXT_shader_stencil_export";
|
||||
|
||||
#endif // #ifndef GLSLextKHR_H
|
||||
|
@ -522,8 +522,9 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
|
||||
return spv::BuiltInPrimitiveId;
|
||||
|
||||
case glslang::EbvFragStencilRef:
|
||||
logger->missingFunctionality("shader stencil export");
|
||||
return spv::BuiltInMax;
|
||||
builder.addExtension(spv::E_SPV_EXT_shader_stencil_export);
|
||||
builder.addCapability(spv::CapabilityStencilExportEXT);
|
||||
return spv::BuiltInFragStencilRefEXT;
|
||||
|
||||
case glslang::EbvInvocationId: return spv::BuiltInInvocationId;
|
||||
case glslang::EbvTessLevelInner: return spv::BuiltInTessLevelInner;
|
||||
|
@ -331,6 +331,7 @@ const char* BuiltInString(int builtIn)
|
||||
case 4424: return "BaseVertex";
|
||||
case 4425: return "BaseInstance";
|
||||
case 4426: return "DrawIndex";
|
||||
case 5014: return "FragStencilRefEXT";
|
||||
|
||||
#ifdef AMD_EXTENSIONS
|
||||
case 4992: return "BaryCoordNoPerspAMD";
|
||||
@ -842,6 +843,8 @@ const char* CapabilityString(int info)
|
||||
case 4437: return "DeviceGroup";
|
||||
case 4439: return "MultiView";
|
||||
|
||||
case 5013: return "StencilExportEXT";
|
||||
|
||||
#ifdef AMD_EXTENSIONS
|
||||
case 5009: return "ImageGatherBiasLodAMD";
|
||||
#endif
|
||||
|
@ -47,11 +47,11 @@ namespace spv {
|
||||
typedef unsigned int Id;
|
||||
|
||||
#define SPV_VERSION 0x10000
|
||||
#define SPV_REVISION 11
|
||||
#define SPV_REVISION 12
|
||||
|
||||
static const unsigned int MagicNumber = 0x07230203;
|
||||
static const unsigned int Version = 0x00010000;
|
||||
static const unsigned int Revision = 11;
|
||||
static const unsigned int Revision = 12;
|
||||
static const unsigned int OpCodeMask = 0xffff;
|
||||
static const unsigned int WordCountShift = 16;
|
||||
|
||||
@ -444,6 +444,7 @@ enum BuiltIn {
|
||||
BuiltInBaryCoordSmoothCentroidAMD = 4996,
|
||||
BuiltInBaryCoordSmoothSampleAMD = 4997,
|
||||
BuiltInBaryCoordPullModelAMD = 4998,
|
||||
BuiltInFragStencilRefEXT = 5014,
|
||||
BuiltInViewportMaskNV = 5253,
|
||||
BuiltInSecondaryPositionNV = 5257,
|
||||
BuiltInSecondaryViewportMaskNV = 5258,
|
||||
@ -640,8 +641,10 @@ enum Capability {
|
||||
CapabilityAtomicStorageOps = 4445,
|
||||
CapabilitySampleMaskPostDepthCoverage = 4447,
|
||||
CapabilityImageGatherBiasLodAMD = 5009,
|
||||
CapabilityStencilExportEXT = 5013,
|
||||
CapabilitySampleMaskOverrideCoverageNV = 5249,
|
||||
CapabilityGeometryShaderPassthroughNV = 5251,
|
||||
CapabilityShaderViewportIndexLayerEXT = 5254,
|
||||
CapabilityShaderViewportIndexLayerNV = 5254,
|
||||
CapabilityShaderViewportMaskNV = 5255,
|
||||
CapabilityShaderStereoViewNV = 5259,
|
||||
|
@ -1,10 +1,11 @@
|
||||
spv.shaderStencilExport.frag
|
||||
Missing functionality: shader stencil export
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 10
|
||||
|
||||
Capability Shader
|
||||
Capability StencilExportEXT
|
||||
Extension "SPV_EXT_shader_stencil_export"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 8
|
||||
@ -13,6 +14,7 @@ Missing functionality: shader stencil export
|
||||
SourceExtension "GL_ARB_shader_stencil_export"
|
||||
Name 4 "main"
|
||||
Name 8 "gl_FragStencilRefARB"
|
||||
Decorate 8(gl_FragStencilRefARB) BuiltIn FragStencilRefEXT
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user