Add implementation of SPV_EXT_fragment_fully_covered

This implementation uses the GLSL extension
GL_NV_conservative_raster_underestimation to generate the new SPIR-V
FullyCoveredEXT built in.
This commit is contained in:
Piers Daniell
2017-12-13 13:07:22 -07:00
committed by John Kessenich
parent e9e0cb60ec
commit 1c5443c693
11 changed files with 116 additions and 1 deletions

View File

@@ -44,6 +44,7 @@
namespace spv {
#include "GLSL.std.450.h"
#include "GLSL.ext.KHR.h"
#include "GLSL.ext.EXT.h"
#ifdef AMD_EXTENSIONS
#include "GLSL.ext.AMD.h"
#endif
@@ -646,6 +647,10 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
builder.addCapability(spv::CapabilityPerViewAttributesNV);
}
return spv::BuiltInViewportMaskPerViewNV;
case glslang::EbvFragFullyCoveredNV:
builder.addExtension(spv::E_SPV_EXT_fragment_fully_covered);
builder.addCapability(spv::CapabilityFragmentFullyCoveredEXT);
return spv::BuiltInFullyCoveredEXT;
#endif
default:
return spv::BuiltInMax;