summaryrefslogtreecommitdiff
path: root/src/mesa/main/texobj.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2001-01-29 20:47:39 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2001-01-29 20:47:39 +0000
commit5c1e7fa6ee72f4403d9ec9d12830dd689b966e71 (patch)
tree8cb11c26af178632b05de9c5b2f53c32331475c5 /src/mesa/main/texobj.c
parent4b90e68ac6d0fe4ffca5e2cd51794bb4350cac28 (diff)
Removed knowledge of swrast Clear/Bitmap/Accum/Draw/Read/CopyPixels
functions from core mesa -- if drivers need these fallbacks they must now call them themselves. Introduced hooks for clip-vertex-interpolation and the rendering of clipped lines and polygons. Allows drivers to interpolate their hardware-format vertices directly. Used in dri drivers to replace fastpath code. Slight optimizations to pipeline build/run routines.
Diffstat (limited to 'src/mesa/main/texobj.c')
-rw-r--r--src/mesa/main/texobj.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 1204668dc3..0ce694ae1d 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -1,4 +1,4 @@
-/* $Id: texobj.c,v 1.37 2000/12/26 05:09:29 keithw Exp $ */
+/* $Id: texobj.c,v 1.38 2001/01/29 20:47:39 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -54,8 +54,8 @@
* Return: pointer to new texture object
*/
struct gl_texture_object *
-_mesa_alloc_texture_object( struct gl_shared_state *shared, GLuint name,
- GLuint dimensions)
+_mesa_alloc_texture_object( struct gl_shared_state *shared,
+ GLuint name, GLuint dimensions )
{
struct gl_texture_object *obj;
@@ -177,7 +177,7 @@ _mesa_test_texobj_completeness( const GLcontext *ctx,
struct gl_texture_object *t )
{
const GLint baseLevel = t->BaseLevel;
- GLint maxLog2;
+ GLint maxLog2 = 0;
t->Complete = GL_TRUE; /* be optimistic */
@@ -446,7 +446,7 @@ _mesa_GenTextures( GLsizei n, GLuint *texName )
for (i=0;i<n;i++) {
GLuint name = first + i;
GLuint dims = 0;
- (void) _mesa_alloc_texture_object(ctx->Shared, name, dims);
+ (void) _mesa_alloc_texture_object( ctx->Shared, name, dims);
}
_glthread_UNLOCK_MUTEX(GenTexturesLock);
@@ -522,7 +522,7 @@ _mesa_BindTexture( GLenum target, GLuint texName )
GLuint unit = ctx->Texture.CurrentUnit;
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
struct gl_texture_object *oldTexObj;
- struct gl_texture_object *newTexObj;
+ struct gl_texture_object *newTexObj = 0;
GLuint targetDim;
ASSERT_OUTSIDE_BEGIN_END(ctx);
@@ -594,7 +594,8 @@ _mesa_BindTexture( GLenum target, GLuint texName )
}
else {
/* if this is a new texture id, allocate a texture object now */
- newTexObj = _mesa_alloc_texture_object(ctx->Shared, texName, targetDim);
+ newTexObj = _mesa_alloc_texture_object( ctx->Shared, texName,
+ targetDim);
if (!newTexObj) {
gl_error(ctx, GL_OUT_OF_MEMORY, "glBindTexture");
return;