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