Function fill_physical_device() has a 'path' parameter, and struct
anv_physical_device has a 'path' member. Sometimes these are used;
sometimes hardcoded "/dev/dri/renderD128" is used instead.
Be consistent. Hardcode "/dev/dri/renderD128" in exactly one location,
during initialization of the physical device.
{
int fd;
- fd = open("/dev/dri/renderD128", O_RDWR | O_CLOEXEC);
+ fd = open(path, O_RDWR | O_CLOEXEC);
if (fd < 0)
return vk_error(VK_ERROR_UNAVAILABLE);
parse_debug_flags(device);
device->instance = physicalDevice->instance;
- device->fd = open("/dev/dri/renderD128", O_RDWR | O_CLOEXEC);
+ device->fd = open(physicalDevice->path, O_RDWR | O_CLOEXEC);
if (device->fd == -1)
goto fail_device;