GPU/HW: Expand lines into triangles before rendering

Fewer batches, consistent upscaling behavior.
This commit is contained in:
Connor McLaughlin
2020-08-02 17:17:05 +10:00
parent 568cfa1865
commit 96ba9198ef
11 changed files with 210 additions and 368 deletions

View File

@ -462,19 +462,11 @@ bool Context::SelectDeviceFeatures(const VkPhysicalDeviceFeatures* required_feat
VkPhysicalDeviceFeatures available_features;
vkGetPhysicalDeviceFeatures(m_physical_device, &available_features);
if (!available_features.fillModeNonSolid && !available_features.geometryShader)
{
Log_ErrorPrintf("fillModeNonSolid or geometryShader feature is required for line drawing.");
return false;
}
if (required_features)
std::memcpy(&m_device_features, required_features, sizeof(m_device_features));
// Enable the features we use.
m_device_features.dualSrcBlend = available_features.dualSrcBlend;
m_device_features.geometryShader = available_features.geometryShader;
m_device_features.fillModeNonSolid = available_features.fillModeNonSolid;
return true;
}