* Coords are clip coords with y=0=bottom.
*/
static void
-draw_quad(GLcontext *ctx,
+draw_quad(struct st_context *st,
float x0, float y0, float x1, float y1, GLfloat z,
const GLfloat color[4])
{
- struct st_context *st = ctx->st;
struct pipe_context *pipe = st->pipe;
/* XXX: Need to improve buffer_write to allow NO_WAIT (as well as
clear_with_quad(GLcontext *ctx,
GLboolean color, GLboolean depth, GLboolean stencil)
{
- struct st_context *st = ctx->st;
+ struct st_context *st = st_context(ctx);
const struct gl_framebuffer *fb = ctx->DrawBuffer;
const GLfloat fb_width = (GLfloat) fb->Width;
const GLfloat fb_height = (GLfloat) fb->Height;
cso_set_vertex_shader_handle(st->cso_context, st->clear.vs);
/* draw quad matching scissor rect (XXX verify coord round-off) */
- draw_quad(ctx, x0, y0, x1, y1,
+ draw_quad(st, x0, y0, x1, y1,
(GLfloat) ctx->Depth.Clear, ctx->Color.ClearColor);
/* Restore pipe state */
{
static const GLbitfield BUFFER_BITS_DS
= (BUFFER_BIT_DEPTH | BUFFER_BIT_STENCIL);
- struct st_context *st = ctx->st;
+ struct st_context *st = st_context(ctx);
struct gl_renderbuffer *depthRb
= ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Renderbuffer;
struct gl_renderbuffer *stencilRb
mask & BUFFER_BIT_DEPTH,
mask & BUFFER_BIT_STENCIL);
} else if (clear_buffers)
- ctx->st->pipe->clear(ctx->st->pipe, clear_buffers, ctx->Color.ClearColor,
- ctx->Depth.Clear, ctx->Stencil.Clear);
+ st->pipe->clear(st->pipe, clear_buffers, ctx->Color.ClearColor,
+ ctx->Depth.Clear, ctx->Stencil.Clear);
if (mask & BUFFER_BIT_ACCUM)
st_clear_accum_buffer(ctx,