summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_clear.c
diff options
context:
space:
mode:
authorZack Rusin <zack@tungstengraphics.com>2007-09-14 04:08:58 -0400
committerZack Rusin <zack@tungstengraphics.com>2007-09-18 06:31:22 -0400
commit9780327c5d95586a88fce94d7b47342355ead118 (patch)
tree9007ea135504d8fd90b49a391a43fa579b9374b5 /src/mesa/state_tracker/st_cb_clear.c
parentffacb1c12a77d71613e8171e31ffc348959881e4 (diff)
First stab at immutable state objects (create/bind/delete)
We want our state objects to be immutable, handled via the create/bind/delete calls instead of struct propagation. Only implementing the blend state to see how it would look like and work.
Diffstat (limited to 'src/mesa/state_tracker/st_cb_clear.c')
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index fa222df2a4..dc8a84af08 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -49,6 +49,8 @@
#include "pipe/tgsi/mesa/mesa_to_tgsi.h"
+#include "cso_cache/cso_cache.h"
+
#include "vf/vf.h"
@@ -295,7 +297,8 @@ clear_with_quad(GLcontext *ctx,
if (st->ctx->Color.DitherFlag)
blend.dither = 1;
}
- pipe->set_blend_state(pipe, &blend);
+ const struct pipe_blend_state *state = cso_cached_blend_state(st, &blend);
+ pipe->bind_blend_state(pipe, state);
}
/* depth state: always pass */
@@ -390,7 +393,7 @@ clear_with_quad(GLcontext *ctx,
/* Restore pipe state */
pipe->set_alpha_test_state(pipe, &st->state.alpha_test);
- pipe->set_blend_state(pipe, &st->state.blend);
+ pipe->bind_blend_state(pipe, st->state.blend);
pipe->set_depth_state(pipe, &st->state.depth);
pipe->set_fs_state(pipe, &st->state.fs);
pipe->set_vs_state(pipe, &st->state.vs);