summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_clear.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2008-04-21 17:51:39 +0100
committerMichel Dänzer <michel@tungstengraphics.com>2008-04-21 17:51:39 +0100
commit65efe807b9067aa07b382e3c4d9cea6222c5fc6b (patch)
tree637ef0a2f4768167766c1c1ad7b5f818d2b58665 /src/mesa/state_tracker/st_cb_clear.c
parent0824fb1d6afc651c0ab814e96f08326c706de216 (diff)
gallium: Use CSO cache for shaders.
Diffstat (limited to 'src/mesa/state_tracker/st_cb_clear.c')
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index 6469511c6f..bb27faad21 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(st->cso_context, st->clear.fs);
+ cso_set_vertex_shader(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);
}