diff options
author | Brian <[email protected]> | 2007-01-26 18:55:12 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2007-01-26 18:55:12 -0700 |
commit | 1d74e565dbfc1a69c49fe67eed9c91f10d0ad2fc (patch) | |
tree | eecbf78b41dfdea04cac65ce1fa61aad23822148 /src/mesa/main | |
parent | 7e85b0a025a82c3ffed060a757a3b4adae03d269 (diff) | |
parent | 5a3d9853958993174f13c8cff6bcf11993a48f65 (diff) |
Merge branch 'master' of git+ssh://[email protected]/git/mesa/mesa
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/context.c | 15 | ||||
-rw-r--r-- | src/mesa/main/imports.c | 34 | ||||
-rw-r--r-- | src/mesa/main/imports.h | 3 |
3 files changed, 28 insertions, 24 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 7ff45cffe8b..99f4dc9dfd4 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -292,13 +292,8 @@ _mesa_forceCurrent(__GLcontext *gc) GLboolean _mesa_notifyResize(__GLcontext *gc) { - GLint x, y; - GLuint width, height; - __GLdrawablePrivate *d = gc->imports.getDrawablePrivate(gc); - if (!d || !d->getDrawableSize) - return GL_FALSE; - d->getDrawableSize( d, &x, &y, &width, &height ); /* update viewport, resize software buffers, etc. */ + (void) gc; return GL_TRUE; } @@ -1083,14 +1078,8 @@ _mesa_init_constants( GLcontext *ctx ) ctx->Const.MaxProgramMatrices = MAX_PROGRAM_MATRICES; ctx->Const.MaxProgramMatrixStackDepth = MAX_PROGRAM_MATRIX_STACK_DEPTH; - /* If we're running in the X server, do bounds checking to prevent - * segfaults and server crashes! - */ -#if defined(XFree86Server) - ctx->Const.CheckArrayBounds = GL_TRUE; -#else + /* CheckArrayBounds is overriden by drivers/x11 for X server */ ctx->Const.CheckArrayBounds = GL_FALSE; -#endif /* GL_ARB_draw_buffers */ ctx->Const.MaxDrawBuffers = MAX_DRAW_BUFFERS; diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index ed809acbe2a..ad77373075b 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -574,6 +574,27 @@ _mesa_ffs(int i) #endif } +int +_mesa_ffsll(long long val) +{ +#ifdef ffsll + return ffsll(val); +#else + int bit; + + assert(sizeof(val) == 8); + + bit = ffs(val); + if (bit != 0) + return bit; + + bit = ffs(val >> 32); + if (bit != 0) + return 32 + bit; + + return 0; +#endif +} /** * Return number of bits set in given GLuint. @@ -1176,16 +1197,6 @@ default_fprintf(__GLcontext *gc, void *stream, const char *fmt, ...) return r; } -/** - * \todo this really is driver-specific and can't be here - */ -static __GLdrawablePrivate * -default_GetDrawablePrivate(__GLcontext *gc) -{ - (void) gc; - return NULL; -} - /*@}*/ @@ -1222,6 +1233,7 @@ _mesa_init_default_imports(__GLimports *imports, void *driverCtx) imports->fopen = default_fopen; imports->fclose = default_fclose; imports->fprintf = default_fprintf; - imports->getDrawablePrivate = default_GetDrawablePrivate; + imports->getDrawablePrivate = NULL; /* driver-specific */ + imports->getReadablePrivate = NULL; /* driver-specific */ imports->other = driverCtx; } diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index 19a9478f76a..d9885dbeec4 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -688,6 +688,9 @@ _mesa_pow(double x, double y); extern int _mesa_ffs(int i); +extern int +_mesa_ffsll(long long i); + extern unsigned int _mesa_bitcount(unsigned int n); |