mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-17 20:05:46 -04:00
GPU/Vulkan: Use geometry shader for line rendering at >1xIR
This commit is contained in:
@ -197,7 +197,6 @@ bool Context::SelectInstanceExtensions(ExtensionList* extension_list, bool enabl
|
||||
return false;
|
||||
#endif
|
||||
|
||||
|
||||
// VK_EXT_debug_report
|
||||
if (enable_debug_report && !SupportsExtension(VK_EXT_DEBUG_REPORT_EXTENSION_NAME, false))
|
||||
Log_WarningPrintf("Vulkan: Debug report requested, but extension is not available.");
|
||||
@ -422,12 +421,15 @@ bool Context::SelectDeviceExtensions(ExtensionList* extension_list, bool enable_
|
||||
|
||||
bool Context::SelectDeviceFeatures()
|
||||
{
|
||||
VkPhysicalDeviceProperties properties;
|
||||
vkGetPhysicalDeviceProperties(m_physical_device, &properties);
|
||||
|
||||
VkPhysicalDeviceFeatures available_features;
|
||||
vkGetPhysicalDeviceFeatures(m_physical_device, &available_features);
|
||||
|
||||
if (!available_features.fillModeNonSolid)
|
||||
{
|
||||
Log_ErrorPrintf("fillModeNonSolid feature is required for line drawing.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Enable the features we use.
|
||||
m_device_features.dualSrcBlend = available_features.dualSrcBlend;
|
||||
m_device_features.geometryShader = available_features.geometryShader;
|
||||
|
@ -178,6 +178,15 @@ void SafeDestroyFramebuffer(VkFramebuffer& fb)
|
||||
}
|
||||
}
|
||||
|
||||
void SafeDestroyShaderModule(VkShaderModule& sm)
|
||||
{
|
||||
if (sm != VK_NULL_HANDLE)
|
||||
{
|
||||
vkDestroyShaderModule(g_vulkan_context->GetDevice(), sm, nullptr);
|
||||
sm = VK_NULL_HANDLE;
|
||||
}
|
||||
}
|
||||
|
||||
void SafeDestroyPipeline(VkPipeline& p)
|
||||
{
|
||||
if (p != VK_NULL_HANDLE)
|
||||
|
@ -35,6 +35,7 @@ VkBlendFactor GetAlphaBlendFactor(VkBlendFactor factor);
|
||||
|
||||
// Safe destroy helpers
|
||||
void SafeDestroyFramebuffer(VkFramebuffer& fb);
|
||||
void SafeDestroyShaderModule(VkShaderModule& sm);
|
||||
void SafeDestroyPipeline(VkPipeline& p);
|
||||
void SafeDestroyPipelineLayout(VkPipelineLayout& pl);
|
||||
void SafeDestroyDescriptorSetLayout(VkDescriptorSetLayout& dsl);
|
||||
@ -43,7 +44,7 @@ void SafeDestroySampler(VkSampler& samp);
|
||||
void SafeFreeGlobalDescriptorSet(VkDescriptorSet& ds);
|
||||
|
||||
void SetViewport(VkCommandBuffer command_buffer, int x, int y, int width, int height, float min_depth = 0.0f,
|
||||
float max_depth = 1.0f);
|
||||
float max_depth = 1.0f);
|
||||
void SetScissor(VkCommandBuffer command_buffer, int x, int y, int width, int height);
|
||||
|
||||
// Combines viewport and scissor updates
|
||||
|
Reference in New Issue
Block a user