From 35abd8e2e8a3dc4d30cffe80d8faa08e6e1352fe Mon Sep 17 00:00:00 2001 From: Triang3l Date: Mon, 11 May 2020 22:47:07 +0300 Subject: [PATCH] [D3D12] Actually properly select tessellation mode --- src/xenia/gpu/d3d12/pipeline_cache.cc | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/xenia/gpu/d3d12/pipeline_cache.cc b/src/xenia/gpu/d3d12/pipeline_cache.cc index 053407524..83f901a4e 100644 --- a/src/xenia/gpu/d3d12/pipeline_cache.cc +++ b/src/xenia/gpu/d3d12/pipeline_cache.cc @@ -751,7 +751,6 @@ Shader::HostVertexShaderType PipelineCache::GetHostVertexShaderTypeIfValid() regs.Get().tess_mode; switch (vgt_draw_initiator.prim_type) { case PrimitiveType::kTriangleList: - case PrimitiveType::kTrianglePatch: // Also supported by triangle strips and fans according to: // https://www.khronos.org/registry/OpenGL/extensions/AMD/AMD_vertex_shader_tessellator.txt // Would need to convert those to triangle lists, but haven't seen any @@ -766,19 +765,11 @@ Shader::HostVertexShaderType PipelineCache::GetHostVertexShaderTypeIfValid() // (visible on the start screen behind the logo), waterfall in the // beginning - kTriangleList. return Shader::HostVertexShaderType::kTriangleDomainCPIndexed; - case xenos::TessellationMode::kAdaptive: - if (vgt_draw_initiator.prim_type == PrimitiveType::kTrianglePatch) { - // - Banjo-Kazooie: Nuts & Bolts - water. - // - Halo 3 - water. - return Shader::HostVertexShaderType::kTriangleDomainPatchIndexed; - } - break; default: break; } break; case PrimitiveType::kQuadList: - case PrimitiveType::kQuadPatch: switch (tessellation_mode) { // Also supported by quad strips according to: // https://www.khronos.org/registry/OpenGL/extensions/AMD/AMD_vertex_shader_tessellator.txt @@ -788,18 +779,19 @@ Shader::HostVertexShaderType PipelineCache::GetHostVertexShaderTypeIfValid() // Not seen in games so far. case xenos::TessellationMode::kContinuous: // - Defender - retro screen and beams in the main menu - kQuadList. - // - Fable 2 - kQuadPatch. return Shader::HostVertexShaderType::kQuadDomainCPIndexed; - case xenos::TessellationMode::kAdaptive: - if (vgt_draw_initiator.prim_type == PrimitiveType::kQuadPatch) { - // - Viva Pinata - garden ground. - return Shader::HostVertexShaderType::kQuadDomainPatchIndexed; - } - break; default: break; } break; + case PrimitiveType::kTrianglePatch: + // - Banjo-Kazooie: Nuts & Bolts - water - adaptive. + // - Halo 3 - water - adaptive. + return Shader::HostVertexShaderType::kTriangleDomainPatchIndexed; + case PrimitiveType::kQuadPatch: + // - Fable II - continuous. + // - Viva Pinata - garden ground - adaptive. + return Shader::HostVertexShaderType::kQuadDomainPatchIndexed; default: // TODO(Triang3l): Support line patches. break;