[GPU] Shader::HostVertexShaderType enum for domain shader types

This commit is contained in:
Triang3l
2020-04-06 00:03:23 +03:00
parent 8da8044771
commit 4b9f63cdf1
12 changed files with 492 additions and 443 deletions

View File

@@ -52,17 +52,19 @@ enum class PrimitiveType : uint32_t {
k2DLineStrip = 0x15,
k2DTriStrip = 0x16,
// Tessellation patches (D3DTPT) when VGT_OUTPUT_PATH_CNTL & 3 is
// VGT_OUTPATH_TESS_EN (1).
// Tessellation patches (D3DTPT) when VGT_OUTPUT_PATH_CNTL::path_select is
// xenos::VGTOutputPath::tess_mode. Seen being used with adaptive tessellation
// in Banjo-Kazooie: Nuts & Bolts, Halo 3 and Viva Pinata; discrete/continuous
// uses kTriangleList in Call of Duty 3 and Viva Pinata.
kLinePatch = 0x10,
kTrianglePatch = 0x11,
kQuadPatch = 0x12,
};
inline bool IsPrimitiveTwoFaced(bool tessellated, PrimitiveType type) {
if (tessellated) {
return type == PrimitiveType::kTrianglePatch ||
type == PrimitiveType::kQuadPatch;
if (tessellated && (type == PrimitiveType::kTrianglePatch ||
type == PrimitiveType::kQuadPatch)) {
return true;
}
switch (type) {
case PrimitiveType::kTriangleList: