Lines Matching refs:ctx
41 _swrast_use_fragment_program(struct gl_context *ctx)
43 struct gl_fragment_program *fp = ctx->FragmentProgram._Current;
44 return fp && !(fp == ctx->FragmentProgram._TexEnvProgram
79 fetch_texel_lod( struct gl_context *ctx, const GLfloat texcoord[4], GLfloat lambda,
82 const struct gl_texture_object *texObj = ctx->Texture.Unit[unit]._Current;
85 SWcontext *swrast = SWRAST_CONTEXT(ctx);
87 const struct gl_sampler_object *samp = _mesa_get_samplerobj(ctx, unit);
91 swrast->TextureSample[unit](ctx, samp, ctx->Texture.Unit[unit]._Current,
110 fetch_texel_deriv( struct gl_context *ctx, const GLfloat texcoord[4],
114 SWcontext *swrast = SWRAST_CONTEXT(ctx);
115 const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
123 const struct gl_sampler_object *samp = _mesa_get_samplerobj(ctx, unit);
140 swrast->TextureSample[unit](ctx, samp, ctx->Texture.Unit[unit]._Current,
161 init_machine(struct gl_context *ctx, struct gl_program_machine *machine,
174 wpos[1] = ctx->DrawBuffer->Height - 1 - wpos[1];
190 if (ctx->Shader.CurrentFragmentProgram) {
215 run_program(struct gl_context *ctx, SWspan *span, GLuint start, GLuint end)
217 SWcontext *swrast = SWRAST_CONTEXT(ctx);
218 const struct gl_fragment_program *program = ctx->FragmentProgram._Current;
225 init_machine(ctx, machine, program, span, i);
227 if (_mesa_execute_program(ctx, &program->Base, machine)) {
240 for (buf = 0; buf < ctx->DrawBuffer->_NumColorDrawBuffers; buf++) {
254 span->array->z[i] = ctx->DrawBuffer->_DepthMax;
257 (GLuint) (depth * ctx->DrawBuffer->_DepthMaxF + 0.5F);
275 _swrast_exec_fragment_program( struct gl_context *ctx, SWspan *span )
277 const struct gl_fragment_program *program = ctx->FragmentProgram._Current;
284 run_program(ctx, span, 0, span->end);