From: Samuel Pitoiset Date: Wed, 26 Feb 2020 09:21:24 +0000 (+0100) Subject: radv: fix creating null devices if KHR_display is enabled X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d2e4435c205810b71990c27befde2f99ed45b9df;p=mesa.git radv: fix creating null devices if KHR_display is enabled Found this while replaying pipelines with Fossilize, it worked fine with vkpipeline-db. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Tested-by: Marge Bot Part-of: --- diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index a130952e88f..d86f2c7d690 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -350,7 +350,7 @@ radv_physical_device_init(struct radv_physical_device *device, goto fail; } - if (instance->enabled_extensions.KHR_display) { + if (drm_device && instance->enabled_extensions.KHR_display) { master_fd = open(drm_device->nodes[DRM_NODE_PRIMARY], O_RDWR | O_CLOEXEC); if (master_fd >= 0) { uint32_t accel_working = 0;