#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 "util/u_endian.h"
+#include "util/driconf.h"
#include "main/mtypes.h"
+#include "main/framebuffer.h"
#include "main/version.h"
+#include "main/debug_output.h"
+#include "main/errors.h"
#include "main/macros.h"
-PUBLIC const char __dri2ConfigOptions[] =
+const char __dri2ConfigOptions[] =
DRI_CONF_BEGIN
DRI_CONF_SECTION_PERFORMANCE
DRI_CONF_VBLANK_MODE(DRI_CONF_VBLANK_DEF_INTERVAL_1)
psp->dri2.image = (__DRIimageLookupExtension *) extensions[i];
if (strcmp(extensions[i]->name, __DRI_USE_INVALIDATE) == 0)
psp->dri2.useInvalidate = (__DRIuseInvalidateExtension *) extensions[i];
+ if (strcmp(extensions[i]->name, __DRI_BACKGROUND_CALLABLE) == 0)
+ psp->dri2.backgroundCallable = (__DRIbackgroundCallableExtension *) extensions[i];
if (strcmp(extensions[i]->name, __DRI_SWRAST_LOADER) == 0)
psp->swrast_loader = (__DRIswrastLoaderExtension *) extensions[i];
+ if (strcmp(extensions[i]->name, __DRI_IMAGE_LOADER) == 0)
+ psp->image.loader = (__DRIimageLoaderExtension *) extensions[i];
+ if (strcmp(extensions[i]->name, __DRI_MUTABLE_RENDER_BUFFER_LOADER) == 0)
+ psp->mutableRenderBuffer.loader = (__DRImutableRenderBufferLoaderExtension *) extensions[i];
}
}
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;
psp->fd = fd;
psp->myNum = scrn;
+ /* Option parsing before ->InitScreen(), as some options apply there. */
+ driParseOptionInfo(&psp->optionInfo, __dri2ConfigOptions);
+ driParseConfigFiles(&psp->optionCache, &psp->optionInfo, psp->myNum,
+ "dri2", NULL, NULL, 0, NULL, 0);
+
*driver_configs = psp->driver->InitScreen(psp);
if (*driver_configs == NULL) {
free(psp);
return NULL;
}
- int gl_version_override = _mesa_get_gl_version_override();
- if (gl_version_override >= 31) {
- psp->max_gl_core_version = MAX2(psp->max_gl_core_version,
- gl_version_override);
- } else {
- psp->max_gl_compat_version = MAX2(psp->max_gl_compat_version,
- gl_version_override);
+ struct gl_constants consts = { 0 };
+ gl_api api;
+ 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->max_gl_core_version = version;
+ if (api == API_OPENGL_COMPAT)
+ psp->max_gl_compat_version = 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)
if (psp->max_gl_es2_version >= 30)
psp->api_mask |= (1 << __DRI_API_GLES3);
- driParseOptionInfo(&psp->optionInfo, __dri2ConfigOptions);
- driParseConfigFiles(&psp->optionCache, &psp->optionInfo, psp->myNum, "dri2");
-
-
return psp;
}
* stream open to the X-server anymore.
*/
- _mesa_destroy_shader_compiler();
-
psp->driver->DestroyScreen(psp);
driDestroyOptionCache(&psp->optionCache);
const struct gl_config *modes = (config != NULL) ? &config->modes : NULL;
void *shareCtx = (shared != NULL) ? shared->driverPrivate : NULL;
gl_api mesa_api;
- unsigned major_version = 1;
- unsigned minor_version = 0;
- uint32_t flags = 0;
- bool notify_reset = false;
+ struct __DriverContextConfig ctx_config;
+
+ ctx_config.major_version = 1;
+ ctx_config.minor_version = 0;
+ ctx_config.flags = 0;
+ ctx_config.attribute_mask = 0;
+ ctx_config.priority = __DRI_CTX_PRIORITY_MEDIUM;
assert((num_attribs == 0) || (attribs != NULL));
for (unsigned i = 0; i < num_attribs; i++) {
switch (attribs[i * 2]) {
case __DRI_CTX_ATTRIB_MAJOR_VERSION:
- major_version = attribs[i * 2 + 1];
+ ctx_config.major_version = attribs[i * 2 + 1];
break;
case __DRI_CTX_ATTRIB_MINOR_VERSION:
- minor_version = attribs[i * 2 + 1];
+ ctx_config.minor_version = attribs[i * 2 + 1];
break;
case __DRI_CTX_ATTRIB_FLAGS:
- flags = attribs[i * 2 + 1];
+ ctx_config.flags = attribs[i * 2 + 1];
break;
case __DRI_CTX_ATTRIB_RESET_STRATEGY:
- notify_reset = (attribs[i * 2 + 1]
- != __DRI_CTX_RESET_NO_NOTIFICATION);
+ if (attribs[i * 2 + 1] != __DRI_CTX_RESET_NO_NOTIFICATION) {
+ ctx_config.attribute_mask |=
+ __DRIVER_CONTEXT_ATTRIB_RESET_STRATEGY;
+ ctx_config.reset_strategy = attribs[i * 2 + 1];
+ } else {
+ ctx_config.attribute_mask &=
+ ~__DRIVER_CONTEXT_ATTRIB_RESET_STRATEGY;
+ }
+ break;
+ case __DRI_CTX_ATTRIB_PRIORITY:
+ ctx_config.attribute_mask |= __DRIVER_CONTEXT_ATTRIB_PRIORITY;
+ ctx_config.priority = attribs[i * 2 + 1];
+ break;
+ case __DRI_CTX_ATTRIB_RELEASE_BEHAVIOR:
+ if (attribs[i * 2 + 1] != __DRI_CTX_RELEASE_BEHAVIOR_FLUSH) {
+ ctx_config.attribute_mask |=
+ __DRIVER_CONTEXT_ATTRIB_RELEASE_BEHAVIOR;
+ ctx_config.release_behavior = attribs[i * 2 + 1];
+ } else {
+ ctx_config.attribute_mask &=
+ ~__DRIVER_CONTEXT_ATTRIB_RELEASE_BEHAVIOR;
+ }
break;
default:
/* We can't create a context that satisfies the requirements of an
}
}
- /* Mesa does not support the GL_ARB_compatibilty extension or the
- * compatibility profile. This means that we treat a API_OPENGL_COMPAT 3.1 as
- * API_OPENGL_CORE and reject API_OPENGL_COMPAT 3.2+.
+ /* The specific Mesa driver may not support the GL_ARB_compatibilty
+ * extension or the compatibility profile. In that case, we treat an
+ * API_OPENGL_COMPAT 3.1 as API_OPENGL_CORE. We reject API_OPENGL_COMPAT
+ * 3.2+ in any case.
*/
- if (mesa_api == API_OPENGL_COMPAT && major_version == 3 && minor_version == 1)
+ if (mesa_api == API_OPENGL_COMPAT &&
+ ctx_config.major_version == 3 && ctx_config.minor_version == 1 &&
+ screen->max_gl_compat_version < 31)
mesa_api = API_OPENGL_CORE;
- if (mesa_api == API_OPENGL_COMPAT
- && ((major_version > 3)
- || (major_version == 3 && minor_version >= 2))) {
- *error = __DRI_CTX_ERROR_BAD_API;
- return NULL;
- }
-
- /* The EGL_KHR_create_context spec says:
+ /* The latest version of EGL_KHR_create_context spec says:
+ *
+ * "If the EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR flag bit is set in
+ * EGL_CONTEXT_FLAGS_KHR, then a <debug context> will be created.
+ * [...] This bit is supported for OpenGL and OpenGL ES contexts.
+ *
+ * No other EGL_CONTEXT_OPENGL_*_BIT is legal for an ES context.
+ *
+ * However, Mesa's EGL layer translates the context attribute
+ * EGL_CONTEXT_OPENGL_ROBUST_ACCESS into the context flag
+ * __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS. That attribute is legal for ES
+ * (with EGL 1.5 or EGL_EXT_create_context_robustness) and GL (only with
+ * EGL 1.5).
*
- * "Flags are only defined for OpenGL context creation, and specifying
- * a flags value other than zero for other types of contexts,
- * including OpenGL ES contexts, will generate an error."
+ * From the EGL_EXT_create_context_robustness spec:
*
- * The GLX_EXT_create_context_es2_profile specification doesn't say
- * anything specific about this case. However, none of the known flags
- * have any meaning in an ES context, so this seems safe.
+ * This extension is written against the OpenGL ES 2.0 Specification
+ * but can apply to OpenGL ES 1.1 and up.
+ *
+ * From the EGL 1.5 (2014.08.27) spec, p55:
+ *
+ * If the EGL_CONTEXT_OPENGL_ROBUST_ACCESS attribute is set to
+ * EGL_TRUE, a context supporting robust buffer access will be created.
+ * OpenGL contexts must support the GL_ARB_robustness extension, or
+ * equivalent core API functional- ity. OpenGL ES contexts must support
+ * the GL_EXT_robustness extension, or equivalent core API
+ * functionality.
*/
if (mesa_api != API_OPENGL_COMPAT
&& mesa_api != API_OPENGL_CORE
- && flags != 0) {
+ && (ctx_config.flags & ~(__DRI_CTX_FLAG_DEBUG |
+ __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS |
+ __DRI_CTX_FLAG_NO_ERROR))) {
*error = __DRI_CTX_ERROR_BAD_FLAG;
return NULL;
}
*
* In Mesa, a debug context is the same as a regular context.
*/
- if ((flags & __DRI_CTX_FLAG_FORWARD_COMPATIBLE) != 0) {
+ if ((ctx_config.flags & __DRI_CTX_FLAG_FORWARD_COMPATIBLE) != 0) {
mesa_api = API_OPENGL_CORE;
}
- if ((flags & ~(__DRI_CTX_FLAG_DEBUG | __DRI_CTX_FLAG_FORWARD_COMPATIBLE))
- != 0) {
+ const uint32_t allowed_flags = (__DRI_CTX_FLAG_DEBUG
+ | __DRI_CTX_FLAG_FORWARD_COMPATIBLE
+ | __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS
+ | __DRI_CTX_FLAG_NO_ERROR);
+ if (ctx_config.flags & ~allowed_flags) {
*error = __DRI_CTX_ERROR_UNKNOWN_FLAG;
return NULL;
}
if (!validate_context_version(screen, mesa_api,
- major_version, minor_version, error))
+ ctx_config.major_version,
+ ctx_config.minor_version,
+ error))
return NULL;
context = calloc(1, sizeof *context);
context->driReadablePriv = NULL;
if (!screen->driver->CreateContext(mesa_api, modes, context,
- major_version, minor_version,
- flags, notify_reset, error, shareCtx)) {
+ &ctx_config, error, shareCtx)) {
free(context);
return NULL;
}
- struct gl_context *ctx = context->driverPrivate;
+ *error = __DRI_CTX_ERROR_SUCCESS;
+ return context;
+}
+
+void
+driContextSetFlags(struct gl_context *ctx, uint32_t flags)
+{
if ((flags & __DRI_CTX_FLAG_FORWARD_COMPATIBLE) != 0)
ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT;
if ((flags & __DRI_CTX_FLAG_DEBUG) != 0) {
+ _mesa_set_debug_state_int(ctx, GL_DEBUG_OUTPUT, GL_TRUE);
ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_DEBUG_BIT;
- ctx->Debug.DebugOutput = GL_TRUE;
}
-
- *error = __DRI_CTX_ERROR_SUCCESS;
- return context;
+ if ((flags & __DRI_CTX_FLAG_NO_ERROR) != 0)
+ ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR;
}
static __DRIcontext *
if (pcp == NULL)
return GL_FALSE;
+ /*
+ ** Call driUnbindContext before checking for valid drawables
+ ** to handle surfaceless contexts properly.
+ */
+ pcp->driScreenPriv->driver->UnbindContext(pcp);
+
pdp = pcp->driDrawablePriv;
prp = pcp->driReadablePriv;
if (!pdp && !prp)
return GL_TRUE;
- pcp->driScreenPriv->driver->UnbindContext(pcp);
-
assert(pdp);
if (pdp->refcount == 0) {
/* ERROR!!! */
{
__DRIdrawable *pdraw;
+ assert(data != NULL);
+
pdraw = malloc(sizeof *pdraw);
if (!pdraw)
return NULL;
static void
driDestroyDrawable(__DRIdrawable *pdp)
{
+ /*
+ * The loader's data structures are going away, even if pdp itself stays
+ * around for the time being because it is currently bound. This happens
+ * when a currently bound GLX pixmap is destroyed.
+ *
+ * Clear out the pointer back into the loader's data structures to avoid
+ * accessing an outdated pointer.
+ */
+ pdp->loaderPrivate = NULL;
+
dri_put_drawable(pdp);
}
static int
-dri2ConfigQueryb(__DRIscreen *screen, const char *var, GLboolean *val)
+dri2ConfigQueryb(__DRIscreen *screen, const char *var, unsigned char *val)
{
if (!driCheckOption(&screen->optionCache, var, DRI_BOOL))
return -1;
}
static int
-dri2ConfigQueryi(__DRIscreen *screen, const char *var, GLint *val)
+dri2ConfigQueryi(__DRIscreen *screen, const char *var, int *val)
{
if (!driCheckOption(&screen->optionCache, var, DRI_INT) &&
!driCheckOption(&screen->optionCache, var, DRI_ENUM))
}
static int
-dri2ConfigQueryf(__DRIscreen *screen, const char *var, GLfloat *val)
+dri2ConfigQueryf(__DRIscreen *screen, const char *var, float *val)
{
if (!driCheckOption(&screen->optionCache, var, DRI_FLOAT))
return -1;
/** Core interface */
const __DRIcoreExtension driCoreExtension = {
- .base = { __DRI_CORE, __DRI_CORE_VERSION },
+ .base = { __DRI_CORE, 2 },
.createNewScreen = NULL,
.destroyScreen = driDestroyScreen,
};
const __DRIswrastExtension driSWRastExtension = {
- { __DRI_SWRAST, 4 },
- driSWRastCreateNewScreen,
- driCreateNewDrawable,
- driCreateNewContextForAPI,
- driCreateContextAttribs,
- driSWRastCreateNewScreen2,
+ .base = { __DRI_SWRAST, 4 },
+
+ .createNewScreen = driSWRastCreateNewScreen,
+ .createNewDrawable = driCreateNewDrawable,
+ .createNewContextForAPI = driCreateNewContextForAPI,
+ .createContextAttribs = driCreateContextAttribs,
+ .createNewScreen2 = driSWRastCreateNewScreen2,
};
const __DRI2configQueryExtension dri2ConfigQueryExtension = {
- .base = { __DRI2_CONFIG_QUERY, __DRI2_CONFIG_QUERY_VERSION },
+ .base = { __DRI2_CONFIG_QUERY, 1 },
.configQueryb = dri2ConfigQueryb,
.configQueryi = dri2ConfigQueryi,
.configQueryf = dri2ConfigQueryf,
};
+const __DRI2flushControlExtension dri2FlushControlExtension = {
+ .base = { __DRI2_FLUSH_CONTROL, 1 }
+};
+
void
dri2InvalidateDrawable(__DRIdrawable *drawable)
{
{
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);
assert(fb->Height == dPriv->h);
}
}
+
+/*
+ * Note: the first match is returned, which is important for formats like
+ * __DRI_IMAGE_FORMAT_R8 which maps to both MESA_FORMAT_{R,L}_UNORM8
+ */
+static const struct {
+ uint32_t image_format;
+ mesa_format mesa_format;
+ GLenum internal_format;
+} format_mapping[] = {
+ {
+ .image_format = __DRI_IMAGE_FORMAT_RGB565,
+ .mesa_format = MESA_FORMAT_B5G6R5_UNORM,
+ .internal_format = GL_RGB565,
+ },
+ {
+ .image_format = __DRI_IMAGE_FORMAT_ARGB1555,
+ .mesa_format = MESA_FORMAT_B5G5R5A1_UNORM,
+ .internal_format = GL_RGB5_A1,
+ },
+ {
+ .image_format = __DRI_IMAGE_FORMAT_XRGB8888,
+ .mesa_format = MESA_FORMAT_B8G8R8X8_UNORM,
+ .internal_format = GL_RGB8,
+ },
+ {
+ .image_format = __DRI_IMAGE_FORMAT_ABGR16161616F,
+ .mesa_format = MESA_FORMAT_RGBA_FLOAT16,
+ .internal_format = GL_RGBA16F,
+ },
+ {
+ .image_format = __DRI_IMAGE_FORMAT_XBGR16161616F,
+ .mesa_format = MESA_FORMAT_RGBX_FLOAT16,
+ .internal_format = GL_RGBA16F,
+ },
+ {
+ .image_format = __DRI_IMAGE_FORMAT_ARGB2101010,
+ .mesa_format = MESA_FORMAT_B10G10R10A2_UNORM,
+ .internal_format = GL_RGB10_A2,
+ },
+ {
+ .image_format = __DRI_IMAGE_FORMAT_XRGB2101010,
+ .mesa_format = MESA_FORMAT_B10G10R10X2_UNORM,
+ .internal_format = GL_RGB10_A2,
+ },
+ {
+ .image_format = __DRI_IMAGE_FORMAT_ABGR2101010,
+ .mesa_format = MESA_FORMAT_R10G10B10A2_UNORM,
+ .internal_format = GL_RGB10_A2,
+ },
+ {
+ .image_format = __DRI_IMAGE_FORMAT_XBGR2101010,
+ .mesa_format = MESA_FORMAT_R10G10B10X2_UNORM,
+ .internal_format = GL_RGB10_A2,
+ },
+ {
+ .image_format = __DRI_IMAGE_FORMAT_ARGB8888,
+ .mesa_format = MESA_FORMAT_B8G8R8A8_UNORM,
+ .internal_format = GL_RGBA8,
+ },
+ {
+ .image_format = __DRI_IMAGE_FORMAT_ABGR8888,
+ .mesa_format = MESA_FORMAT_R8G8B8A8_UNORM,
+ .internal_format = GL_RGBA8,
+ },
+ {
+ .image_format = __DRI_IMAGE_FORMAT_XBGR8888,
+ .mesa_format = MESA_FORMAT_R8G8B8X8_UNORM,
+ .internal_format = GL_RGB8,
+ },
+ {
+ .image_format = __DRI_IMAGE_FORMAT_R8,
+ .mesa_format = MESA_FORMAT_R_UNORM8,
+ .internal_format = GL_R8,
+ },
+ {
+ .image_format = __DRI_IMAGE_FORMAT_R8,
+ .mesa_format = MESA_FORMAT_L_UNORM8,
+ .internal_format = GL_R8,
+ },
+#if UTIL_ARCH_LITTLE_ENDIAN
+ {
+ .image_format = __DRI_IMAGE_FORMAT_GR88,
+ .mesa_format = MESA_FORMAT_RG_UNORM8,
+ .internal_format = GL_RG8,
+ },
+ {
+ .image_format = __DRI_IMAGE_FORMAT_GR88,
+ .mesa_format = MESA_FORMAT_LA_UNORM8,
+ .internal_format = GL_RG8,
+ },
+#endif
+ {
+ .image_format = __DRI_IMAGE_FORMAT_SABGR8,
+ .mesa_format = MESA_FORMAT_R8G8B8A8_SRGB,
+ .internal_format = GL_SRGB8_ALPHA8,
+ },
+ {
+ .image_format = __DRI_IMAGE_FORMAT_SARGB8,
+ .mesa_format = MESA_FORMAT_B8G8R8A8_SRGB,
+ .internal_format = GL_SRGB8_ALPHA8,
+ },
+ {
+ .image_format = __DRI_IMAGE_FORMAT_SXRGB8,
+ .mesa_format = MESA_FORMAT_B8G8R8X8_SRGB,
+ .internal_format = GL_SRGB8_ALPHA8,
+ },
+ {
+ .image_format = __DRI_IMAGE_FORMAT_R16,
+ .mesa_format = MESA_FORMAT_R_UNORM16,
+ .internal_format = GL_R16,
+ },
+ {
+ .image_format = __DRI_IMAGE_FORMAT_R16,
+ .mesa_format = MESA_FORMAT_L_UNORM16,
+ .internal_format = GL_R16,
+ },
+#if UTIL_ARCH_LITTLE_ENDIAN
+ {
+ .image_format = __DRI_IMAGE_FORMAT_GR1616,
+ .mesa_format = MESA_FORMAT_RG_UNORM16,
+ .internal_format = GL_RG16,
+ },
+ {
+ .image_format = __DRI_IMAGE_FORMAT_GR1616,
+ .mesa_format = MESA_FORMAT_LA_UNORM16,
+ .internal_format = GL_RG16,
+ },
+#endif
+};
+
+uint32_t
+driGLFormatToImageFormat(mesa_format format)
+{
+ for (size_t i = 0; i < ARRAY_SIZE(format_mapping); i++)
+ if (format_mapping[i].mesa_format == format)
+ return format_mapping[i].image_format;
+
+ return __DRI_IMAGE_FORMAT_NONE;
+}
+
+uint32_t
+driGLFormatToSizedInternalGLFormat(mesa_format format)
+{
+ for (size_t i = 0; i < ARRAY_SIZE(format_mapping); i++)
+ if (format_mapping[i].mesa_format == format)
+ return format_mapping[i].internal_format;
+
+ return GL_NONE;
+}
+
+mesa_format
+driImageFormatToGLFormat(uint32_t image_format)
+{
+ for (size_t i = 0; i < ARRAY_SIZE(format_mapping); i++)
+ if (format_mapping[i].image_format == image_format)
+ return format_mapping[i].mesa_format;
+
+ return MESA_FORMAT_NONE;
+}
+
+/** Image driver interface */
+const __DRIimageDriverExtension driImageDriverExtension = {
+ .base = { __DRI_IMAGE_DRIVER, 1 },
+
+ .createNewScreen2 = driCreateNewScreen2,
+ .createNewDrawable = driCreateNewDrawable,
+ .getAPIMask = driGetAPIMask,
+ .createContextAttribs = driCreateContextAttribs,
+};
+
+/* swrast copy sub buffer entrypoint. */
+static void driCopySubBuffer(__DRIdrawable *pdp, int x, int y,
+ int w, int h)
+{
+ assert(pdp->driScreenPriv->swrast_loader);
+
+ pdp->driScreenPriv->driver->CopySubBuffer(pdp, x, y, w, h);
+}
+
+/* for swrast only */
+const __DRIcopySubBufferExtension driCopySubBufferExtension = {
+ .base = { __DRI_COPY_SUB_BUFFER, 1 },
+
+ .copySubBuffer = driCopySubBuffer,
+};
+
+const __DRInoErrorExtension dri2NoErrorExtension = {
+ .base = { __DRI2_NO_ERROR, 1 },
+};