Commit 4566b006 authored by Alan Hourihane's avatar Alan Hourihane

Bring in DRI2 changes

parent bd926421
......@@ -34,6 +34,7 @@ MINOR=0
PATCH=""
DEPS=""
LINK=""
LDFLAGS=""
CPLUSPLUS=0
STATIC=0
DLOPEN=0
......@@ -63,12 +64,14 @@ do
echo ' -LDIR search in DIR for library dependencies'
echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)'
echo ' Not observed on all systems at this time.'
echo ' -ldflags OPT specify any additional linker flags in OPT'
echo ' -cplusplus link with C++ runtime'
echo ' -static make a static library (default is dynamic/shared)'
echo ' -dlopen make a shared library suitable for dynamic loading'
echo ' -install DIR put resulting library file(s) in DIR'
echo ' -arch ARCH override using `uname` to determine host system'
echo ' -archopt OPT specify an extra achitecture-specific option OPT'
echo ' -altopts OPTS alternate options to override all others'
echo " -noprefix don't prefix library name with 'lib' nor add any suffix"
echo ' -exports FILE only export the symbols listed in FILE'
echo ' -h, --help display this information and exit'
......@@ -94,12 +97,19 @@ do
shift 1;
LINK=$1
;;
'-ldflags')
shift 1;
LDFLAGS=$1
;;
-l*)
DEPS="$DEPS $1"
;;
-L*)
DEPS="$DEPS $1"
;;
-Wl*)
DEPS="$DEPS $1"
;;
-pthread)
# this is a special case (see bugzilla 10876)
DEPS="$DEPS $1"
......@@ -128,6 +138,10 @@ do
shift 1;
ARCHOPT=$1
;;
'-altopts')
shift 1;
ALTOPTS=$1
;;
'-noprefix')
NOPREFIX=1
;;
......@@ -187,7 +201,7 @@ fi
#
case $ARCH in
'Linux' | 'OpenBSD' | 'GNU' | GNU/*)
'Linux' | 'OpenBSD' | 'DragonFly' | 'GNU' | GNU/*)
# we assume gcc
if [ "x$LINK" = "x" ] ; then
......@@ -218,9 +232,13 @@ case $ARCH in
OPTS="-m32 ${OPTS}"
fi
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
rm -f ${LIBNAME}
# make lib
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
# finish up
FINAL_LIBS="${LIBNAME}"
elif [ $STATIC = 1 ] ; then
......@@ -228,6 +246,9 @@ case $ARCH in
echo "mklib: Making" $ARCH "static library: " ${LIBNAME}
LINK="ar"
OPTS="-ru"
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
rm -f ${LIBNAME}
# make lib
${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
......@@ -263,6 +284,9 @@ case $ARCH in
if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then
OPTS="-m32 ${OPTS}"
fi
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
if [ x${PATCH} = "x" ] ; then
VERSION="${MAJOR}.${MINOR}"
......@@ -278,7 +302,7 @@ case $ARCH in
rm -f ${LIBNAME}.so
# make lib
${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
# make usual symlinks
ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR}
ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
......@@ -345,15 +369,17 @@ case $ARCH in
if [ "${SPARCV9}" ] ; then
OPTS="${OPTS} -xarch=v9"
fi
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
# for debug:
#echo "mklib: linker is" ${LINK} ${OPTS}
if [ $NOPREFIX = 1 ] ; then
rm -f ${LIBNAME}
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
else
rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
${LINK} ${OPTS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
fi
FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}"
......@@ -376,8 +402,11 @@ case $ARCH in
# No "lib" or ".so" part
echo "mklib: Making FreeBSD shared library: " ${LIBNAME}
OPTS="-shared"
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
rm -f ${LIBNAME}
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
FINAL_LIBS=${LIBNAME}
elif [ $STATIC = 1 ] ; then
STLIB="lib${LIBNAME}.a"
......@@ -389,9 +418,12 @@ case $ARCH in
else
SHLIB="lib${LIBNAME}.so.${MAJOR}"
OPTS="-shared -Wl,-soname,${SHLIB}"
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
echo "mklib: Making FreeBSD shared library: " ${SHLIB}
rm -f ${SHLIB}
${LINK} ${OPTS} -o ${SHLIB} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} ${LDFLAGS} -o ${SHLIB} ${OBJECTS} ${DEPS}
ln -sf ${SHLIB} "lib${LIBNAME}.so"
FINAL_LIBS="${SHLIB} lib${LIBNAME}.so"
fi
......@@ -442,6 +474,10 @@ case $ARCH in
exit 1
fi
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
if [ $CPLUSPLUS = 1 ] ; then
LINK="CC"
else
......@@ -449,7 +485,7 @@ case $ARCH in
fi
echo "mklib: Making IRIX " ${ABI} " shared library: " ${LIBNAME}
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
FINAL_LIBS=${LIBNAME}
fi
;;
......@@ -522,12 +558,16 @@ case $ARCH in
}
}' | sort -u >> ${EXPFILE}
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
# On AIX a shared library is linked differently when
# you want to dlopen the file
if [ $DLOPEN = "1" ] ; then
cc -G ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
cc -G ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
else
cc ${OPTS} -o ${OFILE} ${OBJECTS} ${DEPS}
cc ${OPTS} ${LDFLAGS} -o ${OFILE} ${OBJECTS} ${DEPS}
ar ${X64} -r ${LIBNAME} ${OFILE}
fi
......@@ -573,6 +613,9 @@ case $ARCH in
echo "mklib: Making Darwin static library: " ${LIBNAME}
LINK="ar"
OPTS="-ruvs"
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
FINAL_LIBS=${LIBNAME}
else
......@@ -584,19 +627,37 @@ case $ARCH in
LIBSUFFIX="dylib"
OPTS="${ARCHOPT} -dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0 -install_name lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
fi
LINKNAME="lib${LIBNAME}.${LIBSUFFIX}"
LIBNAME="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
if [ ${EXPORTS} ] ; then
OPTS="${OPTS} -exported_symbols_list ${EXPORTS}"
fi
LINKNAME="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
LINKNAME2="lib${LIBNAME}.${LIBSUFFIX}"
LIBNAME="lib${LIBNAME}.${MAJOR}.${MINOR}.${LIBSUFFIX}"
# examine first object to determine ABI
set ${OBJECTS}
ABI_PPC=`file $1 | grep 'object ppc'`
ABI_I386=`file $1 | grep 'object i386'`
if [ "${ABI_PPC}" ] ; then
OPTS="${OPTS} -arch ppc"
fi
if [ "${ABI_I386}" ] ; then
OPTS="${OPTS} -arch i386"
fi
ABI_PPC=`file $1 | grep ' ppc'`
ABI_I386=`file $1 | grep ' i386'`
ABI_PPC64=`file $1 | grep ' ppc64'`
ABI_X86_64=`file $1 | grep ' x86_64'`
if [ "${ABI_PPC}" ] ; then
OPTS="${OPTS} -arch ppc"
fi
if [ "${ABI_I386}" ] ; then
OPTS="${OPTS} -arch i386"
fi
if [ "${ABI_PPC64}" ] ; then
OPTS="${OPTS} -arch ppc64"
fi
if [ "${ABI_X86_64}" ] ; then
OPTS="${OPTS} -arch x86_64"
fi
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
# XXX can we always add -isysroot /Developer/SDKs/MacOSX10.4u.sdk
# to OPTS here?
......@@ -609,9 +670,11 @@ case $ARCH in
fi
echo "mklib: Making Darwin shared library: " ${LIBNAME}
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
ln -s ${LIBNAME} ${LINKNAME}
FINAL_LIBS="${LIBNAME} ${LINKNAME}"
ln -s ${LIBNAME} ${LINKNAME2}
FINAL_LIBS="${LIBNAME} ${LINKNAME} ${LINKNAME2}"
fi
;;
......@@ -663,6 +726,9 @@ case $ARCH in
echo "mklib: Making Intel ICC static library: " ${LIBNAME}.a
LINK="ar"
OPTS="-ruv"
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
# make lib
${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS}
# finish up
......@@ -673,6 +739,9 @@ case $ARCH in
else
OPTS="-shared"
fi
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
VERSION="${MAJOR}.${MINOR}.${PATCH}"
echo "mklib: Making Intel ICC shared library: " ${LIBNAME}.so.${VERSION}
......@@ -686,7 +755,7 @@ case $ARCH in
rm -f ${LIBNAME}.so.${MAJOR}
rm -f ${LIBNAME}.so
# make lib
${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
# make usual symlinks
ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR}
ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
......@@ -737,6 +806,9 @@ case $ARCH in
echo "mklib: Making" $ARCH "static library: " ${LIBNAME}.a
LINK="ar"
OPTS="-ru"
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
# make lib
${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS}
ranlib ${LIBNAME}.a
......@@ -744,6 +816,9 @@ case $ARCH in
FINAL_LIBS=${LIBNAME}.a
else
OPTS="-shared -Wl,-export-all -Wl,--out-implib=${LIBNAME}-${MAJOR}.dll.a"
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}-${MAJOR}.dll
if [ $CPLUSPLUS = 1 ] ; then
......@@ -758,7 +833,7 @@ case $ARCH in
rm -f ${LIBNAME}.a
# make lib
${LINK} ${OPTS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS}
${LINK} ${OPTS} ${LDFLAGS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS}
# make usual symlinks
ln -s ${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a
# finish up
......
This diff is collapsed.
......@@ -41,6 +41,7 @@
#define GL_CORE_SGI 1
#define GL_CORE_MESA 2
#define GL_CORE_APPLE 4
#define GL_CORE_WINDOWS 8
typedef struct __GLcontextRec __GLcontext;
......
......@@ -67,7 +67,6 @@ int __intel_debug = 0;
#define need_GL_NV_vertex_program
#include "extension_helper.h"
/**
* Extension strings exported by the intel driver.
*
......@@ -75,7 +74,7 @@ int __intel_debug = 0;
* It appears that ARB_texture_env_crossbar has "disappeared" compared to the
* old i830-specific driver.
*/
const struct dri_extension card_extensions[] = {
static const struct dri_extension card_extensions[] = {
{"GL_ARB_multisample", GL_ARB_multisample_functions},
{"GL_ARB_multitexture", NULL},
{"GL_ARB_point_parameters", GL_ARB_point_parameters_functions},
......@@ -86,22 +85,27 @@ const struct dri_extension card_extensions[] = {
{"GL_ARB_texture_env_combine", NULL},
{"GL_ARB_texture_env_dot3", NULL},
{"GL_ARB_texture_mirrored_repeat", NULL},
{"GL_ARB_texture_non_power_of_two", NULL },
{"GL_ARB_texture_rectangle", NULL},
{"GL_NV_texture_rectangle", NULL},
{"GL_EXT_texture_rectangle", NULL},
{"GL_ARB_point_parameters", NULL},
{"GL_ARB_vertex_buffer_object", GL_ARB_vertex_buffer_object_functions},
{"GL_ARB_pixel_buffer_object", NULL},
{"GL_ARB_vertex_program", GL_ARB_vertex_program_functions},
{"GL_ARB_window_pos", GL_ARB_window_pos_functions},
{"GL_EXT_blend_color", GL_EXT_blend_color_functions},
{"GL_EXT_blend_equation_separate", GL_EXT_blend_equation_separate_functions},
{"GL_EXT_blend_equation_separate",
GL_EXT_blend_equation_separate_functions},
{"GL_EXT_blend_func_separate", GL_EXT_blend_func_separate_functions},
{"GL_EXT_blend_minmax", GL_EXT_blend_minmax_functions},
{"GL_EXT_blend_logic_op", NULL},
{"GL_EXT_blend_subtract", NULL},
{"GL_EXT_cull_vertex", GL_EXT_cull_vertex_functions},
{"GL_EXT_fog_coord", GL_EXT_fog_coord_functions},
{"GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions},
{"GL_EXT_multi_draw_arrays", GL_EXT_multi_draw_arrays_functions},
#if 1 /* XXX FBO temporary? */
{"GL_EXT_packed_depth_stencil", NULL},
{"GL_EXT_pixel_buffer_object", NULL},
#endif
{"GL_EXT_secondary_color", GL_EXT_secondary_color_functions},
{"GL_EXT_stencil_wrap", NULL},
{"GL_EXT_texture_edge_clamp", NULL},
......@@ -116,10 +120,67 @@ const struct dri_extension card_extensions[] = {
{"GL_NV_blend_square", NULL},
{"GL_NV_vertex_program", GL_NV_vertex_program_functions},
{"GL_NV_vertex_program1_1", NULL},
{"GL_SGIS_generate_mipmap", NULL },
{ "GL_SGIS_generate_mipmap", NULL },
{NULL, NULL}
};
#if 0
static const struct dri_extension brw_extensions[] = {
{ "GL_ARB_shading_language_100", GL_VERSION_2_0_functions},
{ "GL_ARB_shading_language_120", GL_VERSION_2_1_functions},
{ "GL_ARB_shader_objects", GL_ARB_shader_objects_functions},
{ "GL_ARB_vertex_shader", GL_ARB_vertex_shader_functions},
{ "GL_ARB_point_sprite", NULL},
{ "GL_ARB_fragment_shader", NULL },
{ "GL_ARB_draw_buffers", NULL },
{ "GL_ARB_depth_texture", NULL },
{ "GL_ARB_fragment_program", NULL },
{ "GL_ARB_shadow", NULL },
{ "GL_EXT_shadow_funcs", NULL },
/* ARB extn won't work if not enabled */
{ "GL_SGIX_depth_texture", NULL },
{ "GL_ARB_texture_env_crossbar", NULL },
{ "GL_EXT_texture_sRGB", NULL},
{ NULL, NULL }
};
static const struct dri_extension arb_oc_extensions[] = {
{"GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions},
{NULL, NULL}
};
static const struct dri_extension ttm_extensions[] = {
{"GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions},
{"GL_ARB_pixel_buffer_object", NULL},
{NULL, NULL}
};
#endif
/**
* Initializes potential list of extensions if ctx == NULL, or actually enables
* extensions for a context.
*/
void intelInitExtensions(GLcontext *ctx, GLboolean enable_imaging)
{
/* Disable imaging extension until convolution is working in teximage paths.
*/
enable_imaging = GL_FALSE;
driInitExtensions(ctx, card_extensions, enable_imaging);
#if 0
if (intel == NULL || intel->ttm)
driInitExtensions(ctx, ttm_extensions, GL_FALSE);
if (intel == NULL ||
(IS_965(intel->intelScreen->deviceID) &&
intel->intelScreen->drmMinor >= 8))
driInitExtensions(ctx, arb_oc_extensions, GL_FALSE);
if (intel == NULL || IS_965(intel->intelScreen->deviceID))
driInitExtensions(ctx, brw_extensions, GL_FALSE);
#endif
}
#ifdef DEBUG
......@@ -204,10 +265,10 @@ intelCreateContext(const __GLcontextModes * visual,
/*
* memory pools
*/
DRM_LIGHT_LOCK(sPriv->fd, &sPriv->pSAREA->lock, driContextPriv->hHWContext);
DRM_LIGHT_LOCK(sPriv->fd, &sPriv->lock, driContextPriv->hHWContext);
// ZZZ JB should be per screen and not be done per context
havePools = intelCreatePools(sPriv);
DRM_UNLOCK(sPriv->fd, &sPriv->pSAREA->lock, driContextPriv->hHWContext);
DRM_UNLOCK(sPriv->fd, &sPriv->lock, driContextPriv->hHWContext);
if (!havePools)
return GL_FALSE;
......@@ -215,7 +276,7 @@ intelCreateContext(const __GLcontextModes * visual,
/* Dri stuff */
intel->hHWContext = driContextPriv->hHWContext;
intel->driFd = sPriv->fd;
intel->driHwLock = (drmLock *) & sPriv->pSAREA->lock;
intel->driHwLock = (drmLock *) & sPriv->lock;
fthrottle_mode = driQueryOptioni(&intel->optionCache, "fthrottle_mode");
intel->iw.irq_seq = -1;
......@@ -265,7 +326,7 @@ intelCreateContext(const __GLcontextModes * visual,
intel->st = st_create_context(pipe, visual, st_share);
driInitExtensions( intel->st->ctx, card_extensions, GL_TRUE );
intelInitExtensions( intel->st->ctx, GL_TRUE );
return GL_TRUE;
}
......
......@@ -60,7 +60,190 @@ static PFNGLXCREATECONTEXTMODES create_context_modes = NULL;
extern const struct dri_extension card_extensions[];
static GLboolean
intel_get_param(__DRIscreenPrivate *psp, int param, int *value)
{
int ret;
struct drm_i915_getparam gp;
gp.param = param;
gp.value = value;
ret = drmCommandWriteRead(psp->fd, DRM_I915_GETPARAM, &gp, sizeof(gp));
if (ret) {
fprintf(stderr, "drm_i915_getparam: %d\n", ret);
return GL_FALSE;
}
return GL_TRUE;
}
static void
intelSetTexOffset(__DRIcontext *pDRICtx, int texname,
unsigned long long offset, int depth, uint pitch)
{
abort();
#if 0
struct intel_context *intel = (struct intel_context*)
((__DRIcontextPrivate*)pDRICtx->private)->driverPrivate;
struct gl_texture_object *tObj = _mesa_lookup_texture(&intel->ctx, texname);
struct st_texture_object *stObj = st_texture_object(tObj);
if (!stObj)
return;
if (stObj->pt)
st->pipe->texture_release(intel->st->pipe, &stObj->pt);
stObj->imageOverride = GL_TRUE;
stObj->depthOverride = depth;
stObj->pitchOverride = pitch;
if (offset)
stObj->textureOffset = offset;
#endif
}
static void
intelHandleDrawableConfig(__DRIdrawablePrivate *dPriv,
__DRIcontextPrivate *pcp,
__DRIDrawableConfigEvent *event)
{
struct intel_framebuffer *intel_fb = dPriv->driverPrivate;
struct intel_region *region = NULL;
struct intel_renderbuffer *rb, *depth_rb, *stencil_rb;
struct intel_context *intel = pcp->driverPrivate;
struct intel_screen *intelScreen = intel_screen(dPriv->driScreenPriv);
int cpp, pitch;
#if 0
cpp = intelScreen->front.cpp;
pitch = ((cpp * dPriv->w + 63) & ~63) / cpp;
back_surf = st_get_framebuffer_surface(intel_fb->stfb,
ST_SURFACE_BACK_LEFT);
rb = intel_fb->color_rb[1];
if (rb) {
region = intel_region_alloc(intel, cpp, pitch, dPriv->h);
intel_renderbuffer_set_region(rb, region);
}
rb = intel_fb->color_rb[2];
if (rb) {
region = intel_region_alloc(intel, cpp, pitch, dPriv->h);
intel_renderbuffer_set_region(rb, region);
}
depth_rb = intel_get_renderbuffer(&intel_fb->Base, BUFFER_DEPTH);
stencil_rb = intel_get_renderbuffer(&intel_fb->Base, BUFFER_STENCIL);
if (depth_rb || stencil_rb)
region = intel_region_alloc(intel, cpp, pitch, dPriv->h);
if (depth_rb)
intel_renderbuffer_set_region(depth_rb, region);
if (stencil_rb)
intel_renderbuffer_set_region(stencil_rb, region);
/* FIXME: Tell the X server about the regions we just allocated and
* attached. */
#endif
}
#define BUFFER_FLAG_TILED 0x0100
static void
intelHandleBufferAttach(__DRIdrawablePrivate *dPriv,
__DRIcontextPrivate *pcp,
__DRIBufferAttachEvent *ba)
{
struct intel_screen *intelScreen = intel_screen(dPriv->driScreenPriv);
struct intel_framebuffer *intel_fb = dPriv->driverPrivate;
struct intel_renderbuffer *rb;
struct intel_region *region;
struct intel_context *intel = pcp->driverPrivate;
struct pipe_surface *surf;
GLuint tiled;
switch (ba->buffer.attachment) {
case DRI_DRAWABLE_BUFFER_FRONT_LEFT:
#if 0
intelScreen->front.width = ba->width;
intelScreen->front.height = ba->height;
intelScreen->front.offset = sarea->front_offset;
#endif
intelScreen->front.pitch = ba->buffer.pitch * ba->buffer.cpp;
#if 0
intelScreen->front.size = sarea->front_size;
#endif
driGenBuffers(intelScreen->base.staticPool, "front", 1, &intelScreen->front.buffer, 0, 0, 0);
driBOSetReferenced(intelScreen->front.buffer, ba->buffer.handle);
break;
#if 0
case DRI_DRAWABLE_BUFFER_BACK_LEFT:
rb = intel_fb->color_rb[0];
break;
case DRI_DRAWABLE_BUFFER_DEPTH:
rb = intel_get_renderbuffer(&intel_fb->Base, BUFFER_DEPTH);
break;
case DRI_DRAWABLE_BUFFER_STENCIL:
rb = intel_get_renderbuffer(&intel_fb->Base, BUFFER_STENCIL);
break;
#endif
case DRI_DRAWABLE_BUFFER_ACCUM:
default:
fprintf(stderr, "unhandled buffer attach event, attacment type %d\n",
ba->buffer.attachment);
return;
}
#if 0