Add-support-for-SPV_NV_fragment_shader_barycentric
This commit is contained in:
parent
6dd4757f0f
commit
9eada4b971
19 changed files with 4369 additions and 4061 deletions
|
|
@ -227,6 +227,8 @@ enum TBuiltInVariable {
|
|||
EbvPositionPerViewNV,
|
||||
EbvViewportMaskPerViewNV,
|
||||
EbvFragFullyCoveredNV,
|
||||
EbvBaryCoordNV,
|
||||
EbvBaryCoordNoPerspNV,
|
||||
#endif
|
||||
|
||||
// HLSL built-ins that live only temporarily, until they get remapped
|
||||
|
|
@ -365,6 +367,8 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v)
|
|||
case EbvPositionPerViewNV: return "PositionPerViewNV";
|
||||
case EbvViewportMaskPerViewNV: return "ViewportMaskPerViewNV";
|
||||
case EbvFragFullyCoveredNV: return "FragFullyCoveredNV";
|
||||
case EbvBaryCoordNV: return "BaryCoordNV";
|
||||
case EbvBaryCoordNoPerspNV: return "BaryCoordNoPerspNV";
|
||||
#endif
|
||||
default: return "unknown built-in variable";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -456,6 +456,9 @@ public:
|
|||
nopersp = false;
|
||||
#ifdef AMD_EXTENSIONS
|
||||
explicitInterp = false;
|
||||
#endif
|
||||
#ifdef NV_EXTENSIONS
|
||||
pervertexNV = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -500,6 +503,9 @@ public:
|
|||
bool nopersp : 1;
|
||||
#ifdef AMD_EXTENSIONS
|
||||
bool explicitInterp : 1;
|
||||
#endif
|
||||
#ifdef NV_EXTENSIONS
|
||||
bool pervertexNV : 1;
|
||||
#endif
|
||||
bool patch : 1;
|
||||
bool sample : 1;
|
||||
|
|
@ -524,6 +530,7 @@ public:
|
|||
{
|
||||
return subgroupcoherent || workgroupcoherent || queuefamilycoherent || devicecoherent || coherent || volatil || restrict || readonly || writeonly;
|
||||
}
|
||||
|
||||
bool isInterpolation() const
|
||||
{
|
||||
#ifdef AMD_EXTENSIONS
|
||||
|
|
@ -532,15 +539,21 @@ public:
|
|||
return flat || smooth || nopersp;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AMD_EXTENSIONS
|
||||
bool isExplicitInterpolation() const
|
||||
{
|
||||
return explicitInterp;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool isAuxiliary() const
|
||||
{
|
||||
#ifdef NV_EXTENSIONS
|
||||
return centroid || patch || sample || pervertexNV;
|
||||
#else
|
||||
return centroid || patch || sample;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool isPipeInput() const
|
||||
|
|
@ -656,6 +669,11 @@ public:
|
|||
return ! patch && (isPipeInput() || isPipeOutput());
|
||||
case EShLangTessEvaluation:
|
||||
return ! patch && isPipeInput();
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EShLangFragment:
|
||||
return pervertexNV && isPipeInput();
|
||||
#endif
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1720,6 +1738,10 @@ public:
|
|||
#ifdef AMD_EXTENSIONS
|
||||
if (qualifier.explicitInterp)
|
||||
appendStr(" __explicitInterpAMD");
|
||||
#endif
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (qualifier.pervertexNV)
|
||||
appendStr(" pervertexNV");
|
||||
#endif
|
||||
if (qualifier.patch)
|
||||
appendStr(" patch");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue