Lines Matching full:ctx
50 _swsetup_CreateContext( struct gl_context *ctx )
57 ctx->swsetup_context = swsetup;
60 _swsetup_trifuncs_init( ctx );
62 _tnl_init_vertices( ctx, ctx->Const.MaxArrayLockSize + 12,
70 _swsetup_DestroyContext( struct gl_context *ctx )
72 SScontext *swsetup = SWSETUP_CONTEXT(ctx);
76 ctx->swsetup_context = 0;
79 _tnl_free_vertices( ctx );
83 _swsetup_RenderPrimitive( struct gl_context *ctx, GLenum mode )
85 SWSETUP_CONTEXT(ctx)->render_prim = mode;
86 _swrast_render_primitive( ctx, mode );
111 setup_vertex_format(struct gl_context *ctx)
113 TNLcontext *tnl = TNL_CONTEXT(ctx);
114 SScontext *swsetup = SWSETUP_CONTEXT(ctx);
115 GLboolean intColors = !ctx->FragmentProgram._Current
116 && !ctx->ATIFragmentShader._Enabled
117 && ctx->RenderMode == GL_RENDER
142 const GLint emit = ctx->FragmentProgram._Current ? EMIT_4F : EMIT_1F;
158 for (i = 0; i < ctx->Const.MaxVarying; i++) {
169 _tnl_install_attrs( ctx, map, e,
170 ctx->Viewport._WindowMap.m,
183 _swsetup_RenderStart( struct gl_context *ctx )
185 SScontext *swsetup = SWSETUP_CONTEXT(ctx);
186 TNLcontext *tnl = TNL_CONTEXT(ctx);
190 _swsetup_choose_trifuncs(ctx);
200 _swrast_SetFacing(ctx, 0);
202 _swrast_render_start(ctx);
207 setup_vertex_format(ctx);
216 _swsetup_RenderFinish( struct gl_context *ctx )
218 _swrast_render_finish( ctx );
222 _swsetup_InvalidateState( struct gl_context *ctx, GLuint new_state )
224 SScontext *swsetup = SWSETUP_CONTEXT(ctx);
226 _tnl_invalidate_vertex_state( ctx, new_state );
231 _swsetup_Wakeup( struct gl_context *ctx )
233 TNLcontext *tnl = TNL_CONTEXT(ctx);
234 SScontext *swsetup = SWSETUP_CONTEXT(ctx);
253 _tnl_invalidate_vertices( ctx, ~0 );
254 _tnl_need_projected_coords( ctx, GL_TRUE );
255 _swsetup_InvalidateState( ctx, ~0 );
266 _swsetup_Translate( struct gl_context *ctx, const void *vertex, SWvertex *dest )
268 const GLfloat *m = ctx->Viewport._WindowMap.m;
272 _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_POS, tmp );
280 for (i = 0 ; i < ctx->Const.MaxTextureCoordUnits ; i++)
281 _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_TEX0 + i,
284 for (i = 0 ; i < ctx->Const.MaxVarying ; i++)
285 _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_GENERIC0 + i,
288 _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_COLOR0,
292 _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_COLOR1,
295 _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_FOG, tmp );
299 _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_POINTSIZE, tmp );