typedef struct __DRIallocateExtensionRec __DRIallocateExtension;
typedef struct __DRIframeTrackingExtensionRec __DRIframeTrackingExtension;
typedef struct __DRImediaStreamCounterExtensionRec __DRImediaStreamCounterExtension;
+typedef struct __DRItexOffsetExtensionRec __DRItexOffsetExtension;
/*@}*/
};
+#define __DRI_TEX_OFFSET "DRI_TexOffset"
+struct __DRItexOffsetExtensionRec {
+ __DRIextension base;
+
+ /**
+ * Method to override base texture image with a driver specific 'offset'.
+ * The depth passed in allows e.g. to ignore the alpha channel of texture
+ * images where the non-alpha components don't occupy a whole texel.
+ *
+ * For GLX_EXT_texture_from_pixmap with AIGLX.
+ */
+ void (*setTexOffset)(__DRIcontext *pDRICtx, GLint texname,
+ unsigned long long offset, GLint depth, GLuint pitch);
+};
+
+
/**
* Macros for building symbol and strings. Standard CPP two step...
*/
int render_type,
__DRIcontext *shared,
drm_context_t hwContext, __DRIcontext *pctx);
-
- /**
- * Method to override base texture image with a driver specific 'offset'.
- * The depth passed in allows e.g. to ignore the alpha channel of texture
- * images where the non-alpha components don't occupy a whole texel.
- *
- * For GLX_EXT_texture_from_pixmap with AIGLX.
- *
- * \since Internal API version 20070121.
- */
- void (*setTexOffset)(__DRIcontext *pDRICtx, GLint texname,
- unsigned long long offset, GLint depth, GLuint pitch);
};
/**
psc->createNewDrawable = driCreateNewDrawable;
psc->createNewContext = driCreateNewContext;
- if (internal_api_version >= 20070121)
- psc->setTexOffset = psp->DriverAPI.setTexOffset;
-
*driver_modes = __driDriverInitScreen(psp);
if (*driver_modes == NULL) {
_mesa_free(psp);
}
#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R200)
-
static const __DRIallocateExtension r200AllocateExtension = {
{ __DRI_ALLOCATE },
r200AllocateMemoryMESA,
r200FreeMemoryMESA,
r200GetMemoryOffsetMESA
};
+#endif
+#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R300)
+static const __DRItexOffsetExtension r300texOffsetExtension = {
+ { __DRI_TEX_OFFSET },
+ r300SetTexOffset,
+};
#endif
/* Create the device specific screen private data struct.
screen->extensions[i++] = &r200AllocateExtension.base;
#endif
+#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R300)
+ screen->extensions[i++] = &r300texOffsetExtension.base;
+#endif
+
screen->extensions[i++] = NULL;
sPriv->extensions = screen->extensions;
.WaitForSBC = NULL,
.SwapBuffersMSC = NULL,
.CopySubBuffer = radeonCopySubBuffer,
-#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R300)
- .setTexOffset = r300SetTexOffset,
-#endif
};
#else
static const struct __DriverAPIRec r200API = {
/* Configuration cache with default values for all contexts */
driOptionCache optionCache;
- const __DRIextension *extensions[7];
+ const __DRIextension *extensions[8];
} radeonScreenRec, *radeonScreenPtr;
#define IS_R100_CLASS(screen) \