mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 01:33:45 +01:00
Mac/iOS: Avoid a vulkan warning about primitive restart
This commit is contained in:
1 parent
998f726a5c
commit
00b28e28dc
3 files changed
+18
-1
No files matched your search
@@ -437,6 +437,10 @@ public:
|
||||
return vulkanDeviceApiVersion_;
|
||||
}
|
||||
|
||||
WindowSystem GetWindowSystem() const {
|
||||
return winsys_;
|
||||
}
|
||||
|
||||
private:
|
||||
bool ChooseQueue();
|
||||
|
||||
|
||||
@@ -106,6 +106,19 @@ bool VKRGraphicsPipeline::Create(VulkanContext *vulkan, VkRenderPass compatibleR
|
||||
|
||||
VkPipelineInputAssemblyStateCreateInfo inputAssembly{ VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO };
|
||||
inputAssembly.topology = desc->topology;
|
||||
inputAssembly.primitiveRestartEnable = VK_FALSE;
|
||||
|
||||
#if PPSSPP_PLATFORM(MAC)
|
||||
if (vulkan->GetWindowSystem() == WindowSystem::WINDOWSYSTEM_METAL_EXT) {
|
||||
if (desc->topology == VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP ||
|
||||
desc->topology == VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN ||
|
||||
desc->topology == VK_PRIMITIVE_TOPOLOGY_LINE_STRIP) {
|
||||
// Metal requires primitive restart to be on to not warn - having it off
|
||||
// simply isn't supported.
|
||||
inputAssembly.primitiveRestartEnable = VK_TRUE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// We will use dynamic viewport state.
|
||||
pipe.pVertexInputState = &desc->vis;
|
||||
|
||||
@@ -170,7 +170,7 @@ void OSXOpenURL(const char *url) {
|
||||
{
|
||||
GlobalUIState state = GetUIState();
|
||||
item.enabled = state == UISTATE_INGAME ? YES : NO;
|
||||
printf("Setting enabled state to %d\n", (int)item.enabled);
|
||||
// printf("Setting enabled state to %d\n", (int)item.enabled);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
Reference in new issue
Block a user