Mac/iOS: Avoid a vulkan warning about primitive restart

This commit is contained in:
Henrik Rydgård committed 2026-02-10 10:41:52 +01:00
1 parent 998f726a5c
commit 00b28e28dc
3 files changed
+18 -1

No files matched your search

+4
View File
@@ -437,6 +437,10 @@ public:
return vulkanDeviceApiVersion_;
}
WindowSystem GetWindowSystem() const {
return winsys_;
}
private:
bool ChooseQueue();
+13
View File
@@ -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;
+1 -1
View File
@@ -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: