#include <stdbool.h>
-#ifndef __NOT_HAVE_DRM_H
-#include <xf86drm.h>
-#endif
#include "dri_util.h"
#include "utils.h"
#include "xmlpool.h"
-#include "../glsl/glsl_parser_extras.h"
#include "main/mtypes.h"
+#include "main/framebuffer.h"
#include "main/version.h"
#include "main/errors.h"
#include "main/macros.h"
setupLoaderExtensions(psp, extensions);
-#ifndef __NOT_HAVE_DRM_H
- if (fd != -1) {
- drmVersionPtr version = drmGetVersion(fd);
- if (version) {
- psp->drm_version.major = version->version_major;
- psp->drm_version.minor = version->version_minor;
- psp->drm_version.patch = version->version_patchlevel;
- drmFreeVersion(version);
- }
- }
-#endif
-
psp->loaderPrivate = data;
psp->extensions = emptyExtensionList;
struct gl_constants consts = { 0 };
gl_api api;
- int version;
+ unsigned version;
+
+ api = API_OPENGLES2;
+ if (_mesa_override_gl_version_contextless(&consts, &api, &version))
+ psp->max_gl_es2_version = version;
api = API_OPENGL_COMPAT;
if (_mesa_override_gl_version_contextless(&consts, &api, &version)) {
}
}
- psp->api_mask = (1 << __DRI_API_OPENGL);
+ psp->api_mask = 0;
+ if (psp->max_gl_compat_version > 0)
+ psp->api_mask |= (1 << __DRI_API_OPENGL);
if (psp->max_gl_core_version > 0)
psp->api_mask |= (1 << __DRI_API_OPENGL_CORE);
if (psp->max_gl_es1_version > 0)
* stream open to the X-server anymore.
*/
- _mesa_destroy_shader_compiler();
-
psp->driver->DestroyScreen(psp);
driDestroyOptionCache(&psp->optionCache);
{
struct gl_framebuffer *fb = (struct gl_framebuffer *) dPriv->driverPrivate;
if (fb && (dPriv->w != fb->Width || dPriv->h != fb->Height)) {
- ctx->Driver.ResizeBuffers(ctx, fb, dPriv->w, dPriv->h);
+ _mesa_resize_framebuffer(ctx, fb, dPriv->w, dPriv->h);
/* if the driver needs the hw lock for ResizeBuffers, the drawable
might have changed again by now */
assert(fb->Width == dPriv->w);