コード例 #1
0
ファイル: sis6326_state.c プロジェクト: emcmanus/FlashMesa3D
/* Called before beginning of rendering. */
void
sis6326UpdateHWState( GLcontext *ctx )
{
   sisContextPtr smesa = SIS_CONTEXT(ctx);
   __GLSiSHardware *prev = &smesa->prev;
   __GLSiSHardware *current = &smesa->current;

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

   if (current->hwCapEnable ^ prev->hwCapEnable) {
      prev->hwCapEnable = current->hwCapEnable;
      smesa->GlobalFlag |= GFLAG_ENABLESETTING;
   }

   if (smesa->GlobalFlag & GFLAG_RENDER_STATES)
      sis_update_render_state( smesa );

   if (smesa->GlobalFlag & GFLAG_TEXTURE_STATES)
      sis_update_texture_state( smesa );
}
コード例 #2
0
ファイル: sis_tris.c プロジェクト: GunioRobot/mesa-7.10.2-PS3
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);
}