Commit 6f7ed99b authored by Alan Hourihane's avatar Alan Hourihane

revert the DRI2 commits

parent 2161b0fa
......@@ -34,7 +34,6 @@ MINOR=0
PATCH=""
DEPS=""
LINK=""
LDFLAGS=""
CPLUSPLUS=0
STATIC=0
DLOPEN=0
......@@ -64,14 +63,12 @@ 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'
......@@ -97,19 +94,12 @@ 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"
......@@ -138,10 +128,6 @@ do
shift 1;
ARCHOPT=$1
;;
'-altopts')
shift 1;
ALTOPTS=$1
;;
'-noprefix')
NOPREFIX=1
;;
......@@ -201,7 +187,7 @@ fi
#
case $ARCH in
'Linux' | 'OpenBSD' | 'DragonFly' | 'GNU' | GNU/*)
'Linux' | 'OpenBSD' | 'GNU' | GNU/*)
# we assume gcc
if [ "x$LINK" = "x" ] ; then
......@@ -232,13 +218,9 @@ case $ARCH in
OPTS="-m32 ${OPTS}"
fi
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
rm -f ${LIBNAME}
# make lib
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
# finish up
FINAL_LIBS="${LIBNAME}"
elif [ $STATIC = 1 ] ; then
......@@ -246,9 +228,6 @@ 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}
......@@ -284,9 +263,6 @@ 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}"
......@@ -302,7 +278,7 @@ case $ARCH in
rm -f ${LIBNAME}.so
# make lib
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
# make usual symlinks
ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR}
ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
......@@ -369,17 +345,15 @@ 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} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
else
rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
fi
FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}"
......@@ -402,11 +376,8 @@ 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} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
FINAL_LIBS=${LIBNAME}
elif [ $STATIC = 1 ] ; then
STLIB="lib${LIBNAME}.a"
......@@ -418,12 +389,9 @@ 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} ${LDFLAGS} -o ${SHLIB} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} -o ${SHLIB} ${OBJECTS} ${DEPS}
ln -sf ${SHLIB} "lib${LIBNAME}.so"
FINAL_LIBS="${SHLIB} lib${LIBNAME}.so"
fi
......@@ -474,10 +442,6 @@ case $ARCH in
exit 1
fi
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
if [ $CPLUSPLUS = 1 ] ; then
LINK="CC"
else
......@@ -485,7 +449,7 @@ case $ARCH in
fi
echo "mklib: Making IRIX " ${ABI} " shared library: " ${LIBNAME}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
FINAL_LIBS=${LIBNAME}
fi
;;
......@@ -558,16 +522,12 @@ 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} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
cc -G ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
else
cc ${OPTS} ${LDFLAGS} -o ${OFILE} ${OBJECTS} ${DEPS}
cc ${OPTS} -o ${OFILE} ${OBJECTS} ${DEPS}
ar ${X64} -r ${LIBNAME} ${OFILE}
fi
......@@ -613,9 +573,6 @@ 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
......@@ -627,37 +584,19 @@ 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
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}"
LINKNAME="lib${LIBNAME}.${LIBSUFFIX}"
LIBNAME="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
# examine first object to determine ABI
set ${OBJECTS}
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
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
# XXX can we always add -isysroot /Developer/SDKs/MacOSX10.4u.sdk
# to OPTS here?
......@@ -670,11 +609,9 @@ case $ARCH in
fi
echo "mklib: Making Darwin shared library: " ${LIBNAME}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
ln -s ${LIBNAME} ${LINKNAME}
ln -s ${LIBNAME} ${LINKNAME2}
FINAL_LIBS="${LIBNAME} ${LINKNAME} ${LINKNAME2}"
FINAL_LIBS="${LIBNAME} ${LINKNAME}"
fi
;;
......@@ -726,9 +663,6 @@ 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
......@@ -739,9 +673,6 @@ 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}
......@@ -755,7 +686,7 @@ case $ARCH in
rm -f ${LIBNAME}.so.${MAJOR}
rm -f ${LIBNAME}.so
# make lib
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
# make usual symlinks
ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR}
ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
......@@ -806,9 +737,6 @@ 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
......@@ -816,9 +744,6 @@ 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
......@@ -833,7 +758,7 @@ case $ARCH in
rm -f ${LIBNAME}.a
# make lib
${LINK} ${OPTS} ${LDFLAGS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS}
${LINK} ${OPTS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS}
# make usual symlinks
ln -s ${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a
# finish up
......
This diff is collapsed.
/*
* Copyright 2007 Red Hat, Inc
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* on the rights to use, copy, modify, merge, publish, distribute, sub
* license, and/or sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef DRI_SAREA_H
#define DRI_SAREA_H
#include <drm.h>
/* The DRI2 SAREA holds a list of self-describing blocks. Each block
* is 8 byte aligned and has a common 32-bit header word. The upper
* 16 bits describe the type of the block and the lower 16 bits the
* size. DRI2 only defines a couple of blocks and allows drivers to
* define driver specific blocks using type codes from 0x8000 and up.
* The type code 0x0000 defines the end of the sarea. */
#define DRI2_SAREA_BLOCK_HEADER(type, size) (((type) << 16) | (size))
#define DRI2_SAREA_BLOCK_TYPE(b) ((b) >> 16)
#define DRI2_SAREA_BLOCK_SIZE(b) ((b) & 0xffff)
#define DRI2_SAREA_BLOCK_NEXT(p) \
((void *) ((unsigned char *) (p) + \
DRI2_SAREA_BLOCK_SIZE(*(unsigned int *) p)))
#define DRI2_SAREA_BLOCK_END 0x0000
#define DRI2_SAREA_BLOCK_LOCK 0x0001
#define DRI2_SAREA_BLOCK_EVENT_BUFFER 0x0002
/* Chipset specific blocks start at 0x8000, 0xffff is reserved. */
typedef struct __DRILock __DRILock;
typedef struct __DRIEventBuffer __DRIEventBuffer;
typedef struct __DRIDrawableBuffer __DRIDrawableBuffer;
typedef struct __DRIDrawableConfigEvent __DRIDrawableConfigEvent;
typedef struct __DRIBufferAttachEvent __DRIBufferAttachEvent;
struct __DRILock {
unsigned int block_header;
drm_hw_lock_t lock;
/* We use this with DRM_CAS to allocate lock IDs for the real lock.*/
unsigned int next_id;
};
struct __DRIEventBuffer {
unsigned int block_header;
unsigned int head; /* last valid event */
unsigned int prealloc; /* event currently being written */
unsigned int size; /* size of data */
unsigned char data[0];
};
enum {
/* the four standard color buffers */
DRI_DRAWABLE_BUFFER_FRONT_LEFT = 0,
DRI_DRAWABLE_BUFFER_BACK_LEFT = 1,
DRI_DRAWABLE_BUFFER_FRONT_RIGHT = 2,
DRI_DRAWABLE_BUFFER_BACK_RIGHT = 3,
/* optional aux buffer */
DRI_DRAWABLE_BUFFER_AUX0 = 4,
DRI_DRAWABLE_BUFFER_AUX1 = 5,
DRI_DRAWABLE_BUFFER_AUX2 = 6,
DRI_DRAWABLE_BUFFER_AUX3 = 7,
DRI_DRAWABLE_BUFFER_DEPTH = 8,
DRI_DRAWABLE_BUFFER_STENCIL = 9,
DRI_DRAWABLE_BUFFER_ACCUM = 10,
/* generic renderbuffers */
DRI_DRAWABLE_BUFFER_COLOR0 = 11,
DRI_DRAWABLE_BUFFER_COLOR1 = 12,
DRI_DRAWABLE_BUFFER_COLOR2 = 13,
DRI_DRAWABLE_BUFFER_COLOR3 = 14,
DRI_DRAWABLE_BUFFER_COLOR4 = 15,
DRI_DRAWABLE_BUFFER_COLOR5 = 16,
DRI_DRAWABLE_BUFFER_COLOR6 = 17,
DRI_DRAWABLE_BUFFER_COLOR7 = 18,
DRI_DRAWABLE_BUFFER_COUNT = 19
};
struct __DRIDrawableBuffer {
unsigned int attachment;
unsigned int handle;
unsigned int pitch;
unsigned short cpp;
/* Upper 8 bits are driver specific, lower 8 bits generic. The
* bits can inidicate buffer properties such as tiled, swizzled etc. */
unsigned short flags;
};
#define DRI2_EVENT_HEADER(type, size) (((type) << 16) | (size))
#define DRI2_EVENT_TYPE(b) ((b) >> 16)
#define DRI2_EVENT_SIZE(b) ((b) & 0xffff)
#define DRI2_EVENT_PAD 0x0000
#define DRI2_EVENT_DRAWABLE_CONFIG 0x0001
#define DRI2_EVENT_BUFFER_ATTACH 0x0002
struct __DRIDrawableConfigEvent {
unsigned int event_header;
unsigned int drawable;
short x;
short y;
unsigned int width;
unsigned int height;
unsigned int num_rects;
struct drm_clip_rect rects[0];
};
struct __DRIBufferAttachEvent {
unsigned int event_header;
unsigned int drawable;
__DRIDrawableBuffer buffer;
};
#endif /* DRI_SAREA_H */
......@@ -41,7 +41,6 @@
#define GL_CORE_SGI 1
#define GL_CORE_MESA 2
#define GL_CORE_APPLE 4
#define GL_CORE_WINDOWS 8
typedef struct __GLcontextRec __GLcontext;
......
......@@ -28,8 +28,6 @@
#include "i830_dri.h"
#include "state_tracker/st_public.h"
#include "state_tracker/st_context.h"
#include "intel_screen.h"
#include "intel_context.h"
#include "intel_swapbuffers.h"
......@@ -38,6 +36,8 @@
#include "i915simple/i915_screen.h"
#include "state_tracker/st_public.h"
#include "state_tracker/st_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_context.h"
......@@ -67,6 +67,7 @@ int __intel_debug = 0;
#define need_GL_NV_vertex_program
#include "extension_helper.h"
/**
* Extension strings exported by the intel driver.
*
......@@ -74,7 +75,7 @@ int __intel_debug = 0;
* It appears that ARB_texture_env_crossbar has "disappeared" compared to the
* old i830-specific driver.
*/
static const struct dri_extension card_extensions[] = {
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},
......@@ -85,27 +86,22 @@ static 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},
#endif
{"GL_EXT_pixel_buffer_object", NULL},
{"GL_EXT_secondary_color", GL_EXT_secondary_color_functions},
{"GL_EXT_stencil_wrap", NULL},
{"GL_EXT_texture_edge_clamp", NULL},
......@@ -120,61 +116,10 @@ static 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},
{ "GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions},
{ "GL_ARB_pixel_buffer_object", NULL},
{ NULL, NULL }
};
static const struct dri_extension arb_oc_extensions[] = {
{"GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions},
{NULL, NULL}
};
#endif
/**
* Initializes potential list of extensions if ctx == NULL, or actually enables
* extensions for a context.
*/
void intelInitExtensions(struct intel_context *intel, GLboolean enable_imaging)
{
GLcontext *ctx = intel ? intel->st->ctx : NULL;
/* 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 ||
(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
......@@ -259,10 +204,10 @@ intelCreateContext(const __GLcontextModes * visual,
/*
* memory pools
*/
DRM_LIGHT_LOCK(sPriv->fd, &sPriv->lock, driContextPriv->hHWContext);
DRM_LIGHT_LOCK(sPriv->fd, &sPriv->pSAREA->lock, driContextPriv->hHWContext);
// ZZZ JB should be per screen and not be done per context
havePools = intelCreatePools(sPriv);
DRM_UNLOCK(sPriv->fd, &sPriv->lock, driContextPriv->hHWContext);
DRM_UNLOCK(sPriv->fd, &sPriv->pSAREA->lock, driContextPriv->hHWContext);
if (!havePools)
return GL_FALSE;
......@@ -270,7 +215,7 @@ intelCreateContext(const __GLcontextModes * visual,
/* Dri stuff */
intel->hHWContext = driContextPriv->hHWContext;
intel->driFd = sPriv->fd;
intel->driHwLock = (drmLock *) & sPriv->lock;
intel->driHwLock = (drmLock *) & sPriv->pSAREA->lock;
fthrottle_mode = driQueryOptioni(&intel->optionCache, "fthrottle_mode");
intel->iw.irq_seq = -1;
......@@ -320,7 +265,7 @@ intelCreateContext(const __GLcontextModes * visual,
intel->st = st_create_context(pipe, visual, st_share);
intelInitExtensions( intel, GL_TRUE );
driInitExtensions( intel->st->ctx, card_extensions, GL_TRUE );
return GL_TRUE;
}
......