diff --git a/.pick_status.json b/.pick_status.json index 6640f34ba51..8a0c109a699 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1244,7 +1244,7 @@ "description": "zink: allow software rendering only if selected", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "8cd44b8843877a2f7d559d123eb3694841f16fdc", "notes": null diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 29a377acfb6..50168d8daa1 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -1632,6 +1632,12 @@ choose_pdev(struct zink_screen *screen, int64_t dev_major, int64_t dev_minor) } VKSCR(GetPhysicalDeviceProperties)(screen->pdev, &screen->info.props); + /* allow software rendering only if forced by the user */ + if (!cpu && screen->info.props.deviceType == VK_PHYSICAL_DEVICE_TYPE_CPU) { + screen->pdev = VK_NULL_HANDLE; + return; + } + screen->info.device_version = screen->info.props.apiVersion; /* runtime version is the lesser of the instance version and device version */