Merge commit 'origin/gallium-0.1' into gallium-0.2
authorKeith Whitwell <keith@tungstengraphics.com>
Fri, 10 Oct 2008 14:19:05 +0000 (15:19 +0100)
committerKeith Whitwell <keith@tungstengraphics.com>
Fri, 10 Oct 2008 14:23:36 +0000 (15:23 +0100)
Conflicts:

src/gallium/auxiliary/gallivm/instructionssoa.cpp
src/gallium/auxiliary/gallivm/soabuiltins.c
src/gallium/auxiliary/rtasm/rtasm_x86sse.c
src/gallium/auxiliary/rtasm/rtasm_x86sse.h
src/mesa/main/texenvprogram.c
src/mesa/shader/arbprogparse.c
src/mesa/shader/prog_statevars.c
src/mesa/state_tracker/st_draw.c
src/mesa/vbo/vbo_exec_draw.c

14 files changed:
1  2 
progs/trivial/Makefile
src/gallium/auxiliary/draw/draw_private.h
src/gallium/auxiliary/rtasm/rtasm_x86sse.c
src/gallium/auxiliary/rtasm/rtasm_x86sse.h
src/mesa/main/mfeatures.h
src/mesa/main/mtypes.h
src/mesa/main/state.c
src/mesa/main/texenvprogram.c
src/mesa/shader/prog_statevars.c
src/mesa/shader/prog_statevars.h
src/mesa/shader/program.c
src/mesa/state_tracker/st_cb_texture.c
src/mesa/vbo/vbo_exec_api.c
src/mesa/vbo/vbo_exec_draw.c

Simple merge
Simple merge
@@@ -3049,12 -3073,11 +3050,14 @@@ struct __GLcontextRe
     GLenum RenderMode;        /**< either GL_RENDER, GL_SELECT, GL_FEEDBACK */
     GLbitfield NewState;      /**< bitwise-or of _NEW_* flags */
  
+    GLbitfield varying_vp_inputs;  /**< mask of VERT_BIT_* flags */
     /** \name Derived state */
     /*@{*/
 -   GLbitfield _TriangleCaps;      /**< bitwise-or of DD_* flags */
 +   /** Bitwise-or of DD_* flags.  Note that this bitfield may be used before
 +    * state validation so they need to always be current.
 +    */
 +   GLbitfield _TriangleCaps;
     GLbitfield _ImageTransferState;/**< bitwise-or of IMAGE_*_BIT flags */
     GLfloat _EyeZDir[3];
     GLfloat _ModelViewInvScale;
Simple merge
Simple merge
@@@ -487,20 -494,10 +493,23 @@@ _mesa_fetch_state(GLcontext *ctx, cons
        case STATE_PCM_BIAS:
           COPY_4V(value, ctx->Pixel.PostColorMatrixBias);
           break;
 +      case STATE_SHADOW_AMBIENT:
 +         {
 +            const int unit = (int) state[2];
 +            const struct gl_texture_object *texObj
 +               = ctx->Texture.Unit[unit]._Current;
 +            if (texObj) {
 +               value[0] = texObj->ShadowAmbient;
 +               value[1] = texObj->ShadowAmbient;
 +               value[2] = texObj->ShadowAmbient;
 +               value[3] = texObj->ShadowAmbient;
 +            }
 +         }
 +         return;
  
+          /* XXX: make sure new tokens added here are also handled in the 
+           * _mesa_program_state_flags() switch, below.
+           */
        default:
           /* unknown state indexes are silently ignored
            *  should be handled by the driver.
@@@ -574,8 -571,13 +583,14 @@@ _mesa_program_state_flags(const gl_stat
  
     case STATE_INTERNAL:
        switch (state[1]) {
+       case STATE_CURRENT_ATTRIB:
+          return _NEW_CURRENT_ATTRIB;
+       case STATE_NORMAL_SCALE:
+          return _NEW_MODELVIEW;
        case STATE_TEXRECT_SCALE:
 +      case STATE_SHADOW_AMBIENT:
         return _NEW_TEXTURE;
        case STATE_FOG_PARAMS_OPTIMIZED:
         return _NEW_FOG;
Simple merge
Simple merge
Simple merge
@@@ -242,11 -246,12 +246,14 @@@ void vbo_exec_vtx_flush( struct vbo_exe
          */
         vbo_exec_bind_arrays( ctx );
  
 -
 -       ctx->Driver.UnmapBuffer(ctx, target, exec->vtx.bufferobj);
 -       exec->vtx.buffer_map = NULL;
+          if (ctx->NewState)
+             _mesa_update_state( ctx );
 +         /* if using a real VBO, unmap it before drawing */
 +         if (exec->vtx.bufferobj->Name) {
 +            ctx->Driver.UnmapBuffer(ctx, target, exec->vtx.bufferobj);
 +            exec->vtx.buffer_map = NULL;
 +         }
  
         vbo_context(ctx)->draw_prims( ctx, 
                                       exec->vtx.inputs,