예제 #1
0
파일: sis_tris.c 프로젝트: 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();
}
예제 #2
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);
}