summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_device.c
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2016-05-28 20:03:34 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2016-05-30 10:26:36 +0100
commitace54034536936c176270afc087675390072b17c (patch)
treee6ecd314b7af9237e87fd4b6fd65e551c2f6c39f /src/intel/vulkan/anv_device.c
parent93e65fdcac10545504b588e24d3ef03fa3e9e424 (diff)
downloadexternal_mesa3d-ace54034536936c176270afc087675390072b17c.zip
external_mesa3d-ace54034536936c176270afc087675390072b17c.tar.gz
external_mesa3d-ace54034536936c176270afc087675390072b17c.tar.bz2
anv: bail out if anv_wsi_init() fails
Otherwise we'll end up setting up a device with no winsys integration. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> --- Hard-coding the rendernode name in anv_physical_device_init() is a bad idea really. We could/should be using drmGetDevices() to get info on all the devices (master/render/etc. node names, pci location etc.) and apply our heuristics on top of that. That can come up as a follow up change.
Diffstat (limited to 'src/intel/vulkan/anv_device.c')
-rw-r--r--src/intel/vulkan/anv_device.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index da7a394..046777d 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -150,7 +150,9 @@ anv_physical_device_init(struct anv_physical_device *device,
device->compiler->shader_debug_log = compiler_debug_log;
device->compiler->shader_perf_log = compiler_perf_log;
- anv_init_wsi(device);
+ result = anv_init_wsi(device);
+ if (result != VK_SUCCESS)
+ goto fail;
/* XXX: Actually detect bit6 swizzling */
isl_device_init(&device->isl_dev, device->info, swizzled);