Merge branch 'master' into d3d12

This commit is contained in:
Triang3l 2019-07-13 15:33:45 +03:00
commit 863217217e
1 changed files with 22 additions and 1 deletions

View File

@ -43,12 +43,33 @@ enum class PrimitiveType : uint32_t {
k2DFillRectList = 0x14,
k2DLineStrip = 0x15,
k2DTriStrip = 0x16,
// Tessellation patches (D3DTPT) - reusing 2DCopyRectList types.
// Tessellation patches (D3DTPT) when VGT_OUTPUT_PATH_CNTL & 3 is
// VGT_OUTPATH_TESS_EN (1).
kLinePatch = 0x10,
kTrianglePatch = 0x11,
kQuadPatch = 0x12,
};
inline bool IsPrimitiveTwoFaced(PrimitiveType type, bool tessellated) {
if (tessellated) {
return type == PrimitiveType::kTrianglePatch ||
type == PrimitiveType::kQuadPatch;
}
switch (type) {
case PrimitiveType::kTriangleList:
case PrimitiveType::kTriangleFan:
case PrimitiveType::kTriangleStrip:
case PrimitiveType::kTriangleWithWFlags:
case PrimitiveType::kQuadList:
case PrimitiveType::kQuadStrip:
case PrimitiveType::kPolygon:
return true;
default:
break;
}
return false;
}
enum class TessellationMode : uint32_t {
kDiscrete = 0,
kContinuous = 1,