/* Send all commands to the hardware.
 */
static void
sisFlush( GLcontext *ctx )
{
   sisContextPtr smesa = SIS_CONTEXT(ctx);

   SIS_FIREVERTICES(smesa);
}
Beispiel #2
0
static void sisRasterPrimitive( struct gl_context *ctx, GLuint hwprim )
{
   sisContextPtr smesa = SIS_CONTEXT(ctx);
   if (smesa->hw_primitive != hwprim) {
      SIS_FIREVERTICES(smesa);
      smesa->hw_primitive = hwprim;

      smesa->AGPParseSet &= ~(MASK_PsDataType | MASK_PsShadingMode);
      smesa->AGPParseSet |= hw_prim_agp_type[hwprim];

      if (smesa->is6326) {
	 smesa->dwPrimitiveSet &= ~(MASK_6326_DrawPrimitiveCommand |
	    MASK_6326_SetFirePosition | MASK_6326_ShadingMode);
	 smesa->dwPrimitiveSet |= hwprim | hw_prim_6326_mmio_fire[hwprim];
      } else {
	 smesa->dwPrimitiveSet &= ~(MASK_DrawPrimitiveCommand |
	    MASK_SetFirePosition | MASK_ShadingMode);
	 smesa->dwPrimitiveSet |= hwprim | hw_prim_mmio_fire[hwprim];
      }

      if (ctx->Light.ShadeModel == GL_FLAT) {
	 smesa->AGPParseSet |= hw_prim_agp_shade[hwprim];
	 smesa->dwPrimitiveSet |= hw_prim_mmio_shade[hwprim];
      } else {
	 smesa->AGPParseSet |= MASK_PsShadingSmooth;
	 if (smesa->is6326) {
	    smesa->dwPrimitiveSet |= OP_6326_3D_SHADE_FLAT_GOURAUD;
	 } else {
	    smesa->dwPrimitiveSet |= SHADE_GOURAUD;
	 }
      }
   }
}
void sisSpanRenderStart( GLcontext *ctx )
{
   sisContextPtr smesa = SIS_CONTEXT(ctx);

   SIS_FIREVERTICES(smesa);
   LOCK_HARDWARE();
   WaitEngIdle( smesa );
}
/* Make sure all commands have been sent to the hardware and have
 * completed processing.
 */
static void
sisFinish( GLcontext *ctx )
{
   sisContextPtr smesa = SIS_CONTEXT(ctx);

   SIS_FIREVERTICES(smesa);
   LOCK_HARDWARE();
   WaitEngIdle( smesa );
   UNLOCK_HARDWARE();
}
Beispiel #5
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);
}