[D3D12] Point sprite size fixes, point/line bits in PsParamGen

This commit is contained in:
Triang3l
2022-05-03 16:15:16 +03:00
parent fe50c5c2e5
commit 6fcf9d21fe
14 changed files with 2552 additions and 2417 deletions

View File

@@ -25,6 +25,33 @@ namespace xe {
namespace gpu {
namespace draw_util {
constexpr bool IsPrimitiveLine(bool vgt_output_path_is_tessellation_enable,
xenos::PrimitiveType type) {
if (vgt_output_path_is_tessellation_enable &&
type == xenos::PrimitiveType::kLinePatch) {
// For patch primitive types, the major mode is always explicit, so just
// checking if VGT_OUTPUT_PATH_CNTL::path_select is kTessellationEnable is
// enough.
return true;
}
switch (type) {
case xenos::PrimitiveType::kLineList:
case xenos::PrimitiveType::kLineStrip:
case xenos::PrimitiveType::kLineLoop:
case xenos::PrimitiveType::k2DLineStrip:
return true;
default:
break;
}
return false;
}
inline bool IsPrimitiveLine(const RegisterFile& regs) {
return IsPrimitiveLine(regs.Get<reg::VGT_OUTPUT_PATH_CNTL>().path_select ==
xenos::VGTOutputPath::kTessellationEnable,
regs.Get<reg::VGT_DRAW_INITIATOR>().prim_type);
}
// Polygonal primitive types (not including points and lines) are rasterized as
// triangles, have front and back faces, and also support face culling and fill
// modes (polymode_front_ptype, polymode_back_ptype). Other primitive types are