key.st = st->has_shareable_shaders ? NULL : st;
key.bitmap = GL_TRUE;
key.clamp_color = st->clamp_frag_color_in_shader &&
- st->ctx->Color._ClampFragmentColor;
+ ctx->Color._ClampFragmentColor;
fpv = st_get_fp_variant(st, st->fp, &key);
struct st_context *st = ctx->st;
struct bitmap_cache *cache = st->bitmap.cache;
int px = -999, py = -999;
- const GLfloat z = st->ctx->Current.RasterPos[2];
+ const GLfloat z = ctx->Current.RasterPos[2];
if (width > BITMAP_CACHE_WIDTH ||
height > BITMAP_CACHE_HEIGHT)
py = y - cache->ypos;
if (px < 0 || px + width > BITMAP_CACHE_WIDTH ||
py < 0 || py + height > BITMAP_CACHE_HEIGHT ||
- !TEST_EQ_4V(st->ctx->Current.RasterColor, cache->color) ||
+ !TEST_EQ_4V(ctx->Current.RasterColor, cache->color) ||
((fabs(z - cache->zpos) > Z_EPSILON))) {
/* This bitmap would extend beyond cache bounds, or the bitmap
* color is changing
cache->ypos = y - py;
cache->zpos = z;
cache->empty = GL_FALSE;
- COPY_4FV(cache->color, st->ctx->Current.RasterColor);
+ COPY_4FV(cache->color, ctx->Current.RasterColor);
}
assert(px != -999);
if (sv) {
draw_bitmap_quad(ctx, x, y, ctx->Current.RasterPos[2],
- width, height, sv,
- st->ctx->Current.RasterColor);
+ width, height, sv, ctx->Current.RasterColor);
pipe_sampler_view_reference(&sv, NULL);
}
blend.rt[i].colormask |= PIPE_MASK_A;
}
- if (st->ctx->Color.DitherFlag)
+ if (ctx->Color.DitherFlag)
blend.dither = 1;
}
cso_set_blend(cso, &blend);
const float tTop = invertTex ? maxYcoord : 0.0f;
const float tBot = invertTex ? 0.0f : maxYcoord;
- if (!st_draw_quad(ctx->st, clip_x0, clip_y0, clip_x1, clip_y1, z,
+ if (!st_draw_quad(st, clip_x0, clip_y0, clip_x1, clip_y1, z,
sLeft, tBot, sRight, tTop, color, 0)) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glDrawPixels");
}
ctx->Pixel.AlphaScale != 1.0);
key.pixelMaps = ctx->Pixel.MapColorFlag;
key.clamp_color = st->clamp_frag_color_in_shader &&
- st->ctx->Color._ClampFragmentColor;
+ ctx->Color._ClampFragmentColor;
fpv = st_get_fp_variant(st, st->fp, &key);
{
struct st_context *st = ctx->st;
struct pipe_context *pipe = st->pipe;
- struct cso_context *cso = ctx->st->cso_context;
+ struct cso_context *cso = st->cso_context;
struct pipe_resource *vbuffer = NULL;
GLuint i, numTexCoords, numAttribs;
GLboolean emitColor;
/* positions (in clip coords) */
{
- const struct gl_framebuffer *fb = st->ctx->DrawBuffer;
+ const struct gl_framebuffer *fb = ctx->DrawBuffer;
const GLfloat fb_width = (GLfloat)fb->Width;
const GLfloat fb_height = (GLfloat)fb->Height;
/* viewport state: viewport matching window dims */
{
- const struct gl_framebuffer *fb = st->ctx->DrawBuffer;
+ const struct gl_framebuffer *fb = ctx->DrawBuffer;
const GLboolean invert = (st_fb_orientation(fb) == Y_0_TOP);
const GLfloat width = (GLfloat)fb->Width;
const GLfloat height = (GLfloat)fb->Height;
cb.buffer = NULL;
cb.user_buffer = NULL;
u_upload_data(st->constbuf_uploader, 0, sizeof(constants),
- st->ctx->Const.UniformBufferOffsetAlignment,
+ ctx->Const.UniformBufferOffsetAlignment,
&constants, &cb.buffer_offset, &cb.buffer);
if (!cb.buffer)
goto fail;
/* Need these flags:
*/
- st->ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE;
+ ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE;
- st->ctx->VertexProgram._MaintainTnlProgram = GL_TRUE;
+ ctx->VertexProgram._MaintainTnlProgram = GL_TRUE;
st->has_stencil_export =
screen->get_param(screen, PIPE_CAP_SHADER_STENCIL_EXPORT);
/* called after _mesa_create_context/_mesa_init_point, fix default user
* settable max point size up
*/
- st->ctx->Point.MaxSize = MAX2(ctx->Const.MaxPointSize,
- ctx->Const.MaxPointSizeAA);
+ ctx->Point.MaxSize = MAX2(ctx->Const.MaxPointSize,
+ ctx->Const.MaxPointSizeAA);
/* For vertex shaders, make sure not to emit saturate when SM 3.0 is not supported */
ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].EmitNoSat = !st->has_shader_model3;
pipe_sampler_view_reference(&st->pixel_xfer.pixelmap_sampler_view, NULL);
pipe_resource_reference(&st->pixel_xfer.pixelmap_texture, NULL);
- _vbo_DestroyContext(st->ctx);
+ _vbo_DestroyContext(ctx);
st_destroy_program_variants(st);