summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_clear.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-04-23 12:39:38 +1000
committerBen Skeggs <skeggsb@gmail.com>2008-04-23 12:39:38 +1000
commit104ff59585ad1888c8cef5ad9de0e2fdb3f48c21 (patch)
tree9128984eef4a90cc6177d336759ce795b835d71f /src/mesa/state_tracker/st_cb_clear.c
parentb20acef90695d6e5975f538b6e9cb812b05f0cf6 (diff)
parent6fc530ccda2971a5d99a955ad90ae9762238040f (diff)
Merge branch 'upstream-gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'src/mesa/state_tracker/st_cb_clear.c')
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index fa9f986f11..dac346a06c 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -195,7 +195,6 @@ clear_with_quad(GLcontext *ctx,
GLboolean color, GLboolean depth, GLboolean stencil)
{
struct st_context *st = ctx->st;
- struct pipe_context *pipe = st->pipe;
const GLfloat x0 = ctx->DrawBuffer->_Xmin;
const GLfloat x1 = ctx->DrawBuffer->_Xmax;
GLfloat y0, y1;
@@ -222,6 +221,8 @@ clear_with_quad(GLcontext *ctx,
cso_save_depth_stencil_alpha(st->cso_context);
cso_save_rasterizer(st->cso_context);
cso_save_viewport(st->cso_context);
+ cso_save_fragment_shader(st->cso_context);
+ cso_save_vertex_shader(st->cso_context);
/* blend state: RGBA masking */
{
@@ -273,8 +274,8 @@ clear_with_quad(GLcontext *ctx,
cso_set_rasterizer(st->cso_context, &st->clear.raster);
cso_set_viewport(st->cso_context, &st->clear.viewport);
- pipe->bind_fs_state(pipe, st->clear.fs);
- pipe->bind_vs_state(pipe, st->clear.vs);
+ cso_set_fragment_shader_handle(st->cso_context, st->clear.fs);
+ 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, ctx->Depth.Clear, ctx->Color.ClearColor);
@@ -284,9 +285,8 @@ clear_with_quad(GLcontext *ctx,
cso_restore_depth_stencil_alpha(st->cso_context);
cso_restore_rasterizer(st->cso_context);
cso_restore_viewport(st->cso_context);
- /* these don't go through cso yet */
- pipe->bind_fs_state(pipe, st->fp->driver_shader);
- pipe->bind_vs_state(pipe, st->vp->driver_shader);
+ cso_restore_fragment_shader(st->cso_context);
+ cso_restore_vertex_shader(st->cso_context);
}
@@ -406,7 +406,7 @@ clear_color_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
/* clear whole buffer w/out masking */
struct st_renderbuffer *strb = st_renderbuffer(rb);
uint clearValue;
- util_pack_color(ctx->Color.ClearColor, strb->surface->format, &clearValue);
+ util_pack_color(ctx->Color.ClearColor, PIPE_FORMAT_A8R8G8B8_UNORM, &clearValue);
ctx->st->pipe->clear(ctx->st->pipe, strb->surface, clearValue);
}
}