Lines Matching refs:dev
56 _EGLDevice *dev_list, *dev;
69 dev = dev_list;
73 assert(_eglDeviceSupports(dev, _EGL_DEVICE_DRM));
74 drmFreeDevice(&dev->device);
76 free(dev);
110 _EGLDevice *dev;
116 dev = _eglGlobal.DeviceList;
119 assert(dev);
120 assert(_eglDeviceSupports(dev, _EGL_DEVICE_SOFTWARE));
122 while (dev->Next) {
123 dev = dev->Next;
125 assert(_eglDeviceSupports(dev, _EGL_DEVICE_DRM));
126 if (drmDevicesEqual(device, dev->device) != 0) {
128 *out_dev = dev;
133 dev->Next = calloc(1, sizeof(_EGLDevice));
134 if (!dev->Next) {
140 dev = dev->Next;
141 dev->extensions = "EGL_EXT_device_drm";
142 dev->EXT_device_drm = EGL_TRUE;
143 dev->device = device;
146 *out_dev = dev;
159 _EGLDevice *dev;
162 dev = _eglGlobal.DeviceList;
165 assert(dev);
166 assert(_eglDeviceSupports(dev, _EGL_DEVICE_SOFTWARE));
174 dev = NULL;
179 if (_eglAddDRMDevice(device, &dev) != 0)
183 dev = NULL;
188 return dev;
192 _eglDeviceSupports(_EGLDevice *dev, _EGLDeviceExtension ext)
196 return dev->MESA_device_software;
198 return dev->EXT_device_drm;
206 _eglQueryDeviceAttribEXT(_EGLDevice *dev, EGLint attribute,
217 _eglQueryDeviceStringEXT(_EGLDevice *dev, EGLint name)
221 return dev->extensions;
224 if (_eglDeviceSupports(dev, _EGL_DEVICE_DRM))
225 return dev->device->nodes[DRM_NODE_PRIMARY];
244 MAYBE_UNUSED _EGLDevice *dev;
247 dev = _eglGlobal.DeviceList;
250 assert(dev);
251 assert(_eglDeviceSupports(dev, _EGL_DEVICE_SOFTWARE));
279 _EGLDevice *dev, *devs;
298 for (i = 0, dev = devs; i < *num_devices; i++) {
299 devices[i] = dev;
300 dev = dev->Next;