Add support for SPV_NV_geometry_shader_passthrough
This commit is contained in:
parent
0ad6a4e60d
commit
6e5acae144
13 changed files with 153 additions and 8 deletions
|
|
@ -32,11 +32,18 @@ enum Decoration;
|
|||
enum Op;
|
||||
|
||||
static const int GLSLextNVVersion = 100;
|
||||
static const int GLSLextNVRevision = 1;
|
||||
static const int GLSLextNVRevision = 2;
|
||||
|
||||
//SPV_NV_sample_mask_override_coverage
|
||||
const char* const E_SPV_NV_sample_mask_override_coverage = "SPV_NV_sample_mask_override_coverage";
|
||||
|
||||
static const Decoration OverrideCoverageNV = static_cast<Decoration>(5248);
|
||||
|
||||
|
||||
//SPV_NV_geometry_shader_passthrough
|
||||
const char* const E_SPV_NV_geometry_shader_passthrough = "SPV_NV_geometry_shader_passthrough";
|
||||
|
||||
static const Decoration PassthroughNV = static_cast<Decoration>(5250);
|
||||
|
||||
static const Capability GeometryShaderPassthroughNV = static_cast<Capability>(5251);
|
||||
#endif // #ifndef GLSLextNV_H
|
||||
|
|
@ -4738,6 +4738,11 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
|
|||
builder.addExtension(spv::E_SPV_NV_sample_mask_override_coverage);
|
||||
}
|
||||
}
|
||||
if (symbol->getQualifier().layoutPassthrough) {
|
||||
addDecoration(id, spv::PassthroughNV);
|
||||
builder.addCapability(spv::GeometryShaderPassthroughNV);
|
||||
builder.addExtension(spv::E_SPV_NV_geometry_shader_passthrough);
|
||||
}
|
||||
#endif
|
||||
|
||||
return id;
|
||||
|
|
|
|||
|
|
@ -481,7 +481,8 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
|
|||
extInstSet = GLSLextAMDInst;
|
||||
#endif
|
||||
#ifdef NV_EXTENSIONS
|
||||
} else if (strcmp(spv::E_SPV_NV_sample_mask_override_coverage, name) == 0) {
|
||||
}else if (strcmp(spv::E_SPV_NV_sample_mask_override_coverage, name) == 0 ||
|
||||
strcmp(spv::E_SPV_NV_geometry_shader_passthrough, name) == 0) {
|
||||
extInstSet = GLSLextNVInst;
|
||||
#endif
|
||||
}
|
||||
|
|
@ -654,10 +655,13 @@ static const char* GLSLextAMDGetDebugNames(const char* name, unsigned entrypoint
|
|||
#ifdef NV_EXTENSIONS
|
||||
static const char* GLSLextNVGetDebugNames(const char* name, unsigned entrypoint)
|
||||
{
|
||||
if (strcmp(name, spv::E_SPV_NV_sample_mask_override_coverage) == 0) {
|
||||
if (strcmp(name, spv::E_SPV_NV_sample_mask_override_coverage) == 0 ||
|
||||
strcmp(name, spv::E_SPV_NV_geometry_shader_passthrough) == 0) {
|
||||
switch (entrypoint) {
|
||||
case OverrideCoverageNV: return "OverrideCoverageNV";
|
||||
default: return "Bad";
|
||||
case OverrideCoverageNV: return "OverrideCoverageNV";
|
||||
case PassthroughNV: return "PassthroughNV";
|
||||
case GeometryShaderPassthroughNV: return "GeometryShaderPassthroughNV";
|
||||
default: return "Bad";
|
||||
}
|
||||
}
|
||||
return "Bad";
|
||||
|
|
|
|||
|
|
@ -261,6 +261,7 @@ const char* DecorationString(int decoration)
|
|||
#endif
|
||||
#ifdef NV_EXTENSIONS
|
||||
case 5248: return "OverrideCoverageNV";
|
||||
case 5250: return "PassthroughNV";
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
@ -818,6 +819,11 @@ const char* CapabilityString(int info)
|
|||
|
||||
case 4423: return "SubgroupBallotKHR";
|
||||
case 4427: return "DrawParameters";
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
case 5251: return "GeometryShaderPassthroughNV";
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue