summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2010-02-24 16:41:18 +0100
committerMichal Krol <[email protected]>2010-02-24 16:41:18 +0100
commita9aa811af01273cef8a73118abdc87313f365ad3 (patch)
treed6dbd61fb999060c6128c92feba988dd0d3514fd /src
parent5b3f8369c693e75d1dbc7587e4e0d77934c0cd77 (diff)
st/mesa: Reset clip state when clearing with quads.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c6
-rw-r--r--src/mesa/state_tracker/st_context.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index 5edab55ccab..9e66eed3634 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -62,7 +62,8 @@ st_init_clear(struct st_context *st)
{
struct pipe_context *pipe = st->pipe;
- memset(&st->clear.raster, 0, sizeof(st->clear.raster));
+ memset(&st->clear, 0, sizeof(st->clear));
+
st->clear.raster.gl_rasterization_rules = 1;
/* fragment shader state: color pass-through program */
@@ -209,6 +210,7 @@ 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_clip(st->cso_context);
cso_save_fragment_shader(st->cso_context);
cso_save_vertex_shader(st->cso_context);
@@ -279,6 +281,7 @@ clear_with_quad(GLcontext *ctx,
cso_set_viewport(st->cso_context, &vp);
}
+ cso_set_clip(st->cso_context, &st->clear.clip);
cso_set_fragment_shader_handle(st->cso_context, st->clear.fs);
cso_set_vertex_shader_handle(st->cso_context, st->clear.vs);
@@ -291,6 +294,7 @@ 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);
+ cso_restore_clip(st->cso_context);
cso_restore_fragment_shader(st->cso_context);
cso_restore_vertex_shader(st->cso_context);
}
diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h
index 13b7b0e22d7..045c029c305 100644
--- a/src/mesa/state_tracker/st_context.h
+++ b/src/mesa/state_tracker/st_context.h
@@ -166,6 +166,7 @@ struct st_context
struct {
struct pipe_rasterizer_state raster;
struct pipe_viewport_state viewport;
+ struct pipe_clip_state clip;
void *vs;
void *fs;
float vertices[4][2][4]; /**< vertex pos + color */