[D3D12] Point sprite size fixes, point/line bits in PsParamGen
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user