Example #1
0
void radeonInitSwtcl( struct gl_context *ctx )
{
   TNLcontext *tnl = TNL_CONTEXT(ctx);
   r100ContextPtr rmesa = R100_CONTEXT(ctx);
   static int firsttime = 1;

   if (firsttime) {
      init_rast_tab();
      firsttime = 0;
   }
   rmesa->radeon.swtcl.emit_prediction = 0;

   tnl->Driver.Render.Start = radeonRenderStart;
   tnl->Driver.Render.Finish = radeonRenderFinish;
   tnl->Driver.Render.PrimitiveNotify = radeonRenderPrimitive;
   tnl->Driver.Render.ResetLineStipple = radeonResetLineStipple;
   tnl->Driver.Render.BuildVertices = _tnl_build_vertices;
   tnl->Driver.Render.CopyPV = _tnl_copy_pv;
   tnl->Driver.Render.Interp = _tnl_interp;

   _tnl_init_vertices( ctx, ctx->Const.MaxArrayLockSize + 12, 
		       RADEON_MAX_TNL_VERTEX_SIZE);
   
   rmesa->radeon.swtcl.verts = (GLubyte *)tnl->clipspace.vertex_buf;
   rmesa->radeon.swtcl.RenderIndex = ~0;
   rmesa->radeon.swtcl.render_primitive = GL_TRIANGLES;
   rmesa->radeon.swtcl.hw_primitive = 0;
}
Example #2
0
void r300InitSwtcl(GLcontext *ctx)
{
	TNLcontext *tnl = TNL_CONTEXT(ctx);
	r300ContextPtr rmesa = R300_CONTEXT(ctx);
	static int firsttime = 1;
	radeon_print(RADEON_SWRENDER, RADEON_NORMAL, "%s\n", __func__);

	if (firsttime) {
		init_rast_tab();
		firsttime = 0;
	}
	rmesa->radeon.swtcl.emit_prediction = 0;

	tnl->Driver.Render.Start = r300RenderStart;
	tnl->Driver.Render.Finish = r300RenderFinish;
	tnl->Driver.Render.PrimitiveNotify = r300RenderPrimitive;
	tnl->Driver.Render.ResetLineStipple = r300ResetLineStipple;
	tnl->Driver.Render.BuildVertices = _tnl_build_vertices;
	tnl->Driver.Render.CopyPV = _tnl_copy_pv;
	tnl->Driver.Render.Interp = _tnl_interp;

	/* FIXME: what are these numbers? */
	_tnl_init_vertices( ctx, ctx->Const.MaxArrayLockSize + 12,
			    48 * sizeof(GLfloat) );

	rmesa->radeon.swtcl.verts = (GLubyte *)tnl->clipspace.vertex_buf;
	rmesa->radeon.swtcl.RenderIndex = ~0;
	rmesa->radeon.swtcl.render_primitive = GL_TRIANGLES;
	rmesa->radeon.swtcl.hw_primitive = 0;

	_tnl_invalidate_vertex_state( ctx, ~0 );
	_tnl_invalidate_vertices( ctx, ~0 );

	_tnl_need_projected_coords( ctx, GL_FALSE );
}
Example #3
0
File: i830_tris.c Project: aosm/X11
void i830InitTriFuncs( GLcontext *ctx )
{
   TNLcontext *tnl = TNL_CONTEXT(ctx);
   static int firsttime = 1;

   if (firsttime) {
      init_rast_tab();
      firsttime = 0;
   }

   tnl->Driver.RunPipeline = i830RunPipeline;
   tnl->Driver.Render.Start = i830RenderStart;
   tnl->Driver.Render.Finish = i830RenderFinish;
   tnl->Driver.Render.PrimitiveNotify = i830RenderPrimitive;
   tnl->Driver.Render.ResetLineStipple = _swrast_ResetLineStipple;
   tnl->Driver.Render.BuildVertices = i830BuildVertices;
}
Example #4
0
void intelInitTriFuncs( GLcontext *ctx )
{
   TNLcontext *tnl = TNL_CONTEXT(ctx);
   static int firsttime = 1;

   if (firsttime) {
      init_rast_tab();
      firsttime = 0;
   }

   tnl->Driver.RunPipeline = intelRunPipeline;
   tnl->Driver.Render.Start = intelRenderStart;
   tnl->Driver.Render.Finish = intelRenderFinish;
   tnl->Driver.Render.PrimitiveNotify = intelRenderPrimitive;
   tnl->Driver.Render.ResetLineStipple = _swrast_ResetLineStipple;
   tnl->Driver.Render.BuildVertices = _tnl_build_vertices;
   tnl->Driver.Render.CopyPV = _tnl_copy_pv;
   tnl->Driver.Render.Interp = _tnl_interp;
}
Example #5
0
void mgaDDInitTriFuncs( GLcontext *ctx )
{
   TNLcontext *tnl = TNL_CONTEXT(ctx);
   mgaContextPtr mmesa = MGA_CONTEXT(ctx);
   static int firsttime = 1;
   if (firsttime) {
      init_rast_tab();
      firsttime = 0;
   }

   mmesa->RenderIndex = ~0;
	
   tnl->Driver.Render.Start              = mgaCheckTexSizes;
   tnl->Driver.Render.Finish             = mgaRenderFinish; 
   tnl->Driver.Render.PrimitiveNotify    = mgaRenderPrimitive;
   tnl->Driver.Render.ResetLineStipple   = _swrast_ResetLineStipple;
   tnl->Driver.Render.BuildVertices      = mgaBuildVertices;
   tnl->Driver.Render.Multipass		 = NULL;
}
Example #6
0
void tridentDDInitTriFuncs( GLcontext *ctx )
{
   tridentContextPtr tmesa = TRIDENT_CONTEXT(ctx);
   TNLcontext *tnl = TNL_CONTEXT(ctx);
   static int firsttime = 1;

   if (firsttime) {
      init_rast_tab();
      firsttime = 0;
   }
   
   tmesa->RenderIndex = ~0;

   tnl->Driver.RunPipeline = tridentRunPipeline;
   tnl->Driver.Render.Start = tridentRenderStart;
   tnl->Driver.Render.Finish = tridentRenderFinish; 
   tnl->Driver.Render.PrimitiveNotify = tridentRenderPrimitive;
   tnl->Driver.Render.ResetLineStipple = tridentResetLineStipple;
   tnl->Driver.Render.BuildVertices = tridentBuildVertices;
}
Example #7
0
File: sis_tris.c Project: aosm/X11
void sisInitTriFuncs( GLcontext *ctx )
{
   sisContextPtr smesa = SIS_CONTEXT(ctx);
   TNLcontext *tnl = TNL_CONTEXT(ctx);
   static int firsttime = 1;

   if (firsttime) {
      init_rast_tab();
      firsttime = 0;

      sis_vert_init_none();
      sis_vert_init_s();
      sis_vert_init_t0();
      sis_vert_init_st0();
      sis_vert_init_t1();
      sis_vert_init_st1();
      sis_vert_init_t0t1();
      sis_vert_init_st0t1();
   }

   tnl->Driver.RunPipeline = sisRunPipeline;
   tnl->Driver.Render.Start = sisRenderStart;
   tnl->Driver.Render.Finish = sisRenderFinish;
   tnl->Driver.Render.PrimitiveNotify = sisRenderPrimitive;
   tnl->Driver.Render.ResetLineStipple = _swrast_ResetLineStipple;
   tnl->Driver.Render.BuildVertices = sisBuildVertices;
   tnl->Driver.Render.Multipass		= NULL;

   if (getenv("SIS_FORCE_FALLBACK") != NULL)
      sisFallback(ctx, SIS_FALLBACK_FORCE, 1);
   else
      sisFallback(ctx, SIS_FALLBACK_FORCE, 0);

   smesa->RenderIndex = ~0;
   smesa->NewGLState |= (_SIS_NEW_RENDER_STATE|
			 _SIS_NEW_VERTEX_STATE);
}
Example #8
0
File: ffb_tris.c Project: aosm/X11
void ffbDDInitRenderFuncs( GLcontext *ctx )
{
 	TNLcontext *tnl = TNL_CONTEXT(ctx);
	SWcontext *swrast = SWRAST_CONTEXT(ctx);
	static int firsttime = 1;

	if (firsttime) {
		init_rast_tab();
		init_tri_tab();
		init_render_tab();
		firsttime = 0;
	}

	tnl->Driver.RunPipeline = ffbRunPipeline;
	tnl->Driver.Render.Start = ffbRenderStart;
	tnl->Driver.Render.Finish = ffbRenderFinish; 
	tnl->Driver.Render.PrimitiveNotify = ffbRenderPrimitive;
	tnl->Driver.Render.ResetLineStipple = _swrast_ResetLineStipple;
	tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts;
	tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts;

	swrast->Driver.SpanRenderStart = ffbSWRenderStart;
	swrast->Driver.SpanRenderFinish = ffbSWRenderFinish;
}