[D3D12] Non-adaptive quad tessellation

This commit is contained in:
Triang3l
2020-04-19 23:11:52 +03:00
parent e6068e0d64
commit f83809f7a1
3 changed files with 48 additions and 0 deletions

View File

@@ -1358,6 +1358,7 @@ bool D3D12CommandProcessor::IssueDraw(PrimitiveType primitive_type,
case PrimitiveType::kTrianglePatch:
primitive_topology = D3D_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST;
break;
case PrimitiveType::kQuadList:
case PrimitiveType::kQuadPatch:
primitive_topology = D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST;
break;

View File

@@ -769,6 +769,19 @@ Shader::HostVertexShaderType PipelineCache::GetHostVertexShaderTypeIfValid()
break;
}
break;
case PrimitiveType::kQuadList:
switch (tessellation_mode) {
// Also supported by quad strips according to:
// https://www.khronos.org/registry/OpenGL/extensions/AMD/AMD_vertex_shader_tessellator.txt
// Would need to convert those to quad lists, but haven't seen any games
// using tessellated strips so far.
case xenos::TessellationMode::kContinuous:
// - Defender - retro screen and beams in the main menu - kQuadList.
return Shader::HostVertexShaderType::kQuadDomainConstant;
default:
break;
}
break;
case PrimitiveType::kTrianglePatch:
if (tessellation_mode == xenos::TessellationMode::kAdaptive) {
// - Banjo-Kazooie: Nuts & Bolts - water.