Esempio n. 1
0
File: sis_tris.c Progetto: aosm/X11
static void sisRunPipeline( GLcontext *ctx )
{
   sisContextPtr smesa = SIS_CONTEXT( ctx );

   LOCK_HARDWARE();
   sisUpdateHWState( ctx );

   if (smesa->AGPCmdModeEnabled) {
      AGP_WritePtr = (GLfloat *)smesa->AGPCmdBufBase + *smesa->pAGPCmdBufNext;
      AGP_StartPtr = AGP_WritePtr;
      AGP_ReadPtr = (GLfloat *)((long)MMIO_READ(REG_3D_AGPCmBase) -
         (long)smesa->AGPCmdBufAddr + (long)smesa->AGPCmdBufBase);
      sisUpdateAGP( smesa );
   }

   if (!smesa->Fallback && smesa->NewGLState) {
      if (smesa->NewGLState & _SIS_NEW_VERTEX_STATE)
	 sisChooseVertexState( ctx );

      if (smesa->NewGLState & (_SIS_NEW_RENDER_STATE | _NEW_TEXTURE))
	 sisChooseRenderState( ctx );

      smesa->NewGLState = 0;
   }

   _tnl_run_pipeline( ctx );

   if (smesa->AGPCmdModeEnabled)
      sisFireVertsAGP( smesa );
   else
      mEndPrimitive();
   UNLOCK_HARDWARE();
}
Esempio n. 2
0
static void mgaRunPipeline( GLcontext *ctx )
{
   mgaContextPtr mmesa = MGA_CONTEXT(ctx);

   if (mmesa->new_state) {
      mgaDDUpdateHwState( ctx );
   }

   if (!mmesa->Fallback && mmesa->new_gl_state) {
      if (mmesa->new_gl_state & _MGA_NEW_RASTERSETUP)
	 mgaChooseVertexState( ctx );
      
      if (mmesa->new_gl_state & _MGA_NEW_RENDERSTATE)
	 mgaChooseRenderState( ctx );
      
      mmesa->new_gl_state = 0;

      /* Circularity: mgaDDUpdateHwState can affect mmesa->Fallback,
       * but mgaChooseVertexState can affect mmesa->new_state.  Hence
       * the second check.  (Fix this...)
       */
      if (mmesa->new_state) {
	 mgaDDUpdateHwState( ctx );
      }
   }

   _tnl_run_pipeline( ctx );
}
Esempio n. 3
0
static void tridentRunPipeline( GLcontext *ctx )
{
   tridentContextPtr tmesa = TRIDENT_CONTEXT(ctx);

   if ( tmesa->new_state )
      tridentDDUpdateHWState( ctx );

   if (tmesa->new_gl_state) {
#if 0
      if (tmesa->new_gl_state & _NEW_TEXTURE)
	 tridentUpdateTextureState( ctx );
#endif

   if (!tmesa->Fallback) {
      if (tmesa->new_gl_state & _TRIDENT_NEW_VERTEX)
	 tridentChooseVertexState( ctx );
      
      if (tmesa->new_gl_state & _TRIDENT_NEW_RENDER_STATE)
	 tridentChooseRenderState( ctx );
   }
      
      tmesa->new_gl_state = 0;
   }

   _tnl_run_pipeline( ctx );
}
Esempio n. 4
0
static void
intelRunPipeline(GLcontext * ctx)
{
   struct intel_context *intel = intel_context(ctx);

   _mesa_lock_context_textures(ctx);
   
   if (ctx->NewState)
      _mesa_update_state_locked(ctx);

   if (intel->NewGLState) {
      if (intel->NewGLState & _NEW_TEXTURE) {
         intel->vtbl.update_texture_state(intel);
      }

      if (!intel->Fallback) {
         if (intel->NewGLState & _INTEL_NEW_RENDERSTATE)
            intelChooseRenderState(ctx);
      }

      intel->NewGLState = 0;
   }

   _tnl_run_pipeline(ctx);

   _mesa_unlock_context_textures(ctx);
}
Esempio n. 5
0
void nouveauRunPipeline( GLcontext *ctx )
{
	struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx);

	if (nmesa->new_state) {
		nmesa->new_render_state |= nmesa->new_state;
	}

	_tnl_run_pipeline( ctx );
}
Esempio n. 6
0
static void mgaRunPipeline( GLcontext *ctx )
{
   mgaContextPtr mmesa = MGA_CONTEXT(ctx);

   if (mmesa->NewGLState) {
      mgaDDValidateState( ctx );
   }

   if (mmesa->dirty) {
       mgaEmitHwStateLocked( mmesa );
   }

   _tnl_run_pipeline( ctx );
}
Esempio n. 7
0
static void r128RunPipeline( GLcontext *ctx )
{
   r128ContextPtr rmesa = R128_CONTEXT(ctx);

   if (rmesa->new_state || rmesa->NewGLState & _NEW_TEXTURE)
      r128DDUpdateHWState( ctx );

   if (!rmesa->Fallback && rmesa->NewGLState) {
      if (rmesa->NewGLState & _R128_NEW_RENDER_STATE)
	 r128ChooseRenderState( ctx );

      rmesa->NewGLState = 0;
   }

   _tnl_run_pipeline( ctx );
}
Esempio n. 8
0
static void intelRunPipeline( GLcontext *ctx )
{
   intelContextPtr intel = INTEL_CONTEXT(ctx);

   if (intel->NewGLState) {
      if (intel->NewGLState & _NEW_TEXTURE) {
	 intel->vtbl.update_texture_state( intel ); 
      }

      if (!intel->Fallback) {
	 if (intel->NewGLState & _INTEL_NEW_RENDERSTATE)
	    intelChooseRenderState( ctx );
      }

      intel->NewGLState = 0;
   }

   _tnl_run_pipeline( ctx );
}
Esempio n. 9
0
static void i810RunPipeline( GLcontext *ctx )
{
   i810ContextPtr imesa = I810_CONTEXT(ctx);

   if (imesa->new_state) {
      if (imesa->new_state & _NEW_TEXTURE)
	 i810UpdateTextureState( ctx );	/* may modify imesa->new_state */

      if (!imesa->Fallback) {
	 if (imesa->new_state & _I810_NEW_VERTEX)
	    i810ChooseVertexState( ctx );

	 if (imesa->new_state & _I810_NEW_RENDERSTATE)
	    i810ChooseRenderState( ctx );
      }

      imesa->new_state = 0;
   }

   _tnl_run_pipeline( ctx );
}
Esempio n. 10
0
File: ffb_tris.c Progetto: aosm/X11
static void ffbRunPipeline(GLcontext *ctx)
{
	ffbContextPtr fmesa = FFB_CONTEXT(ctx);

	if (fmesa->bad_fragment_attrs == 0 &&
	    fmesa->new_gl_state) {
		if (fmesa->new_gl_state & _FFB_NEW_TRIANGLE)
			ffbChooseTriangleState(ctx);
		if (fmesa->new_gl_state & _FFB_NEW_LINE)
			ffbChooseLineState(ctx);
		if (fmesa->new_gl_state & _FFB_NEW_POINT)
			ffbChoosePointState(ctx);
		if (fmesa->new_gl_state & _FFB_NEW_RENDER)
			ffbChooseRenderState(ctx);
		if (fmesa->new_gl_state & _FFB_NEW_VERTEX)
			ffbChooseVertexState(ctx);

		fmesa->new_gl_state = 0;
	}

	_tnl_run_pipeline(ctx);
}
Esempio n. 11
0
static void sisRunPipeline( struct gl_context *ctx )
{
   sisContextPtr smesa = SIS_CONTEXT( ctx );

   if (smesa->NewGLState) {
      SIS_FIREVERTICES(smesa);
      if (smesa->NewGLState & _NEW_TEXTURE) {
	 sisUpdateTextureState(ctx);
      }

      if (smesa->NewGLState & _SIS_NEW_RENDER_STATE)
	 sisChooseRenderState( ctx );

      smesa->NewGLState = 0;
   }

   _tnl_run_pipeline( ctx );

   /* XXX: If we put flushing in sis_state.c and friends, we can avoid this.
    * Is it worth it?
    */
   SIS_FIREVERTICES(smesa);
}
Esempio n. 12
0
File: i830_tris.c Progetto: aosm/X11
static void i830RunPipeline( GLcontext *ctx )
{
   i830ContextPtr imesa = I830_CONTEXT(ctx);

   if (imesa->NewGLState) {
      if (imesa->NewGLState & _NEW_TEXTURE) {
	 I830_FIREVERTICES( imesa );
	 i830UpdateTextureState( ctx ); /* may modify imesa->NewGLState */
      }

      if (!imesa->Fallback) {
	 if (imesa->NewGLState & _I830_NEW_VERTEX)
	    i830ChooseVertexState( ctx );

	 if (imesa->NewGLState & _I830_NEW_RENDERSTATE)
	    i830ChooseRenderState( ctx );
      }

      imesa->NewGLState = 0;
   }

   _tnl_run_pipeline( ctx );
}