From fd2756006a0baf63f60548d8f509de5b9a143608 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Mon, 30 Oct 2006 20:16:35 +0000 Subject: Move edgeflag into the VERT_ATTRIB_SEVEN slot. This means that our NV_vertex_program implementation has slightly incorrect aliasing behaviour. I think this is reasonable given the simplification and the fact that the mainstream ARB_vp continues to have the correct behaviour. --- src/mesa/main/context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa/main/context.c') diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index e0630c33d0..15b69db595 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -967,8 +967,8 @@ _mesa_init_current( GLcontext *ctx ) ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_COLOR0], 1.0, 1.0, 1.0, 1.0 ); ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_COLOR1], 0.0, 0.0, 0.0, 1.0 ); ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_FOG], 0.0, 0.0, 0.0, 0.0 ); - ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0] = 1.0; - ctx->Current.EdgeFlag = GL_TRUE; + ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX], 1.0, 0.0, 0.0, 1.0 ); + ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_EDGEFLAG], 1.0, 0.0, 0.0, 1.0 ); } -- cgit v1.2.3 From 6d104cb932080c5c0d951fbc0ec6d30fb7ebef45 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Thu, 2 Nov 2006 12:02:13 +0000 Subject: merge current trunk into vbo branch --- src/mesa/main/context.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/mesa/main/context.c') diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 15b69db595..91f3af3c91 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -735,6 +735,10 @@ alloc_shared_state( GLcontext *ctx ) ss->DefaultCubeMap->RefCount += MAX_TEXTURE_IMAGE_UNITS; ss->DefaultRect->RefCount += MAX_TEXTURE_IMAGE_UNITS; + _glthread_INIT_MUTEX(ss->TexMutex); + ss->TextureStateStamp = 0; + + #if FEATURE_EXT_framebuffer_object ss->FrameBuffers = _mesa_NewHashTable(); if (!ss->FrameBuffers) @@ -1048,6 +1052,7 @@ _mesa_init_constants( GLcontext *ctx ) ctx->Const.VertexProgram.MaxLocalParams = MAX_PROGRAM_LOCAL_PARAMS; ctx->Const.VertexProgram.MaxEnvParams = MAX_NV_VERTEX_PROGRAM_PARAMS; ctx->Const.VertexProgram.MaxAddressRegs = MAX_VERTEX_PROGRAM_ADDRESS_REGS; + ctx->Const.VertexProgram.MaxUniformComponents = MAX_VERTEX_UNIFORM_COMPONENTS; init_natives(&ctx->Const.VertexProgram); #endif #if FEATURE_ARB_fragment_program @@ -1061,6 +1066,7 @@ _mesa_init_constants( GLcontext *ctx ) ctx->Const.FragmentProgram.MaxLocalParams = MAX_PROGRAM_LOCAL_PARAMS; ctx->Const.FragmentProgram.MaxEnvParams = MAX_NV_FRAGMENT_PROGRAM_PARAMS; ctx->Const.FragmentProgram.MaxAddressRegs = MAX_FRAGMENT_PROGRAM_ADDRESS_REGS; + ctx->Const.FragmentProgram.MaxUniformComponents = MAX_FRAGMENT_UNIFORM_COMPONENTS; init_natives(&ctx->Const.FragmentProgram); #endif ctx->Const.MaxProgramMatrices = MAX_PROGRAM_MATRICES; @@ -1087,6 +1093,11 @@ _mesa_init_constants( GLcontext *ctx ) ctx->Const.MaxRenderbufferSize = MAX_WIDTH; #endif +#if FEATURE_ARB_vertex_shader + ctx->Const.MaxVertexTextureImageUnits = MAX_VERTEX_TEXTURE_IMAGE_UNITS; + ctx->Const.MaxVaryingFloats = MAX_VARYING_FLOATS; +#endif + /* sanity checks */ ASSERT(ctx->Const.MaxTextureUnits == MIN2(ctx->Const.MaxTextureImageUnits, ctx->Const.MaxTextureCoordUnits)); -- cgit v1.2.3 From 6ff9b48fe2bb2113689e45c89a7c643e44906d67 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Mon, 15 Jan 2007 14:30:16 +0000 Subject: Don't special-case FOG attribute initialization. Initial fog value was being set to {0,0,0,0}. This results in vector size 4, but isn't necessary. The regular {0,0,0,1} works fine. --- src/mesa/main/context.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/mesa/main/context.c') diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 91f3af3c91..94d0ff6307 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -970,7 +970,6 @@ _mesa_init_current( GLcontext *ctx ) ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_NORMAL], 0.0, 0.0, 1.0, 1.0 ); ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_COLOR0], 1.0, 1.0, 1.0, 1.0 ); ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_COLOR1], 0.0, 0.0, 0.0, 1.0 ); - ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_FOG], 0.0, 0.0, 0.0, 0.0 ); ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX], 1.0, 0.0, 0.0, 1.0 ); ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_EDGEFLAG], 1.0, 0.0, 0.0, 1.0 ); } -- cgit v1.2.3 From c9b33ecd7c07cace0a6553ccfdaf7b021959c934 Mon Sep 17 00:00:00 2001 From: George Sapountzis Date: Wed, 6 Dec 2006 06:43:23 +0200 Subject: Drop old (pre-AIGLX) GLcore interface. The old GLcore interface was replaced in Xorg 7.1 with the addition of AIGLX, it is only used by DDX's which are known not to work with the new DIX glx code. --- Bug 9285: misc glcore, xmesa cleanups ACKed by Ian Romanick. --- src/mesa/main/context.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/mesa/main/context.c') diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 7ff45cffe8..b2bd1d8a8e 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; } -- cgit v1.2.3 From 507167d7e2cf3bc64d1c112d927efeb1baa3b495 Mon Sep 17 00:00:00 2001 From: George Sapountzis Date: Wed, 6 Dec 2006 06:54:13 +0200 Subject: Override Const.CheckArrayBounds for Xserver in XMesaCreateContext(). This leaves one last XFree86Server ifdef in Mesa core. --- Bug 9285: misc glcore, xmesa cleanups ACKed by Ian Romanick. --- src/mesa/main/context.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/mesa/main/context.c') diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index b2bd1d8a8e..99f4dc9dfd 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1078,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; -- cgit v1.2.3