summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-03-13 16:04:52 +0000
committerKeith Whitwell <keithw@vmware.com>2009-03-13 16:42:57 +0000
commit683e7091a953204c9aee1410ac44be3b69bae9fc (patch)
tree53e22c5452e1cfed4ecb6fb2c0dd68f372ec7667 /src/mesa/state_tracker
parentfa0f48504a32642d688d4b81f62eea54c693b23f (diff)
gallium: consolidate bypass_vs and bypass_clipping flags
The draw module provides a similar interface to the driver which is retained as various bits of hardware may be able to take on incremental parts of the vertex pipeline. However, there's no need to advertise all this complexity to the state tracker. There are basically two modes now - normal and passthrough/screen-coords.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap.c1
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c23
2 files changed, 6 insertions, 18 deletions
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c
index f9f1780ba8..2d547dd072 100644
--- a/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/src/mesa/state_tracker/st_cb_bitmap.c
@@ -787,7 +787,6 @@ st_init_bitmap(struct st_context *st)
/* init baseline rasterizer state once */
memset(&st->bitmap.rasterizer, 0, sizeof(st->bitmap.rasterizer));
st->bitmap.rasterizer.gl_rasterization_rules = 1;
- st->bitmap.rasterizer.bypass_vs = 1;
/* find a usable texture format */
if (screen->is_format_supported(screen, PIPE_FORMAT_I8_UNORM, PIPE_TEXTURE_2D,
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index 8206733f76..dd9ba2881f 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -60,20 +60,11 @@ st_init_clear(struct st_context *st)
{
struct pipe_context *pipe = st->pipe;
- /* rasterizer state: bypass clipping */
memset(&st->clear.raster, 0, sizeof(st->clear.raster));
st->clear.raster.gl_rasterization_rules = 1;
- st->clear.raster.bypass_clipping = 1;
-
- /* viewport state: identity since we're drawing in window coords */
- st->clear.viewport.scale[0] = 1.0;
- st->clear.viewport.scale[1] = 1.0;
- st->clear.viewport.scale[2] = 1.0;
- st->clear.viewport.scale[3] = 1.0;
- st->clear.viewport.translate[0] = 0.0;
- st->clear.viewport.translate[1] = 0.0;
- st->clear.viewport.translate[2] = 0.0;
- st->clear.viewport.translate[3] = 0.0;
+
+ /* rasterizer state: bypass vertex shader, clipping and viewport */
+ st->clear.raster.bypass_vs_clip_and_viewport = 1;
/* fragment shader state: color pass-through program */
st->clear.fs =
@@ -125,8 +116,9 @@ is_depth_stencil_format(enum pipe_format pipeFormat)
/**
* Draw a screen-aligned quadrilateral.
- * Coords are window coords with y=0=bottom. These coords will be transformed
- * by the vertex shader and viewport transform (which will flip Y if needed).
+ * Coords are window coords with y=0=bottom. These will be passed
+ * through unmodified to the rasterizer as we have set
+ * rasterizer->bypass_vs_clip_and_viewport.
*/
static void
draw_quad(GLcontext *ctx,
@@ -226,7 +218,6 @@ clear_with_quad(GLcontext *ctx,
cso_save_blend(st->cso_context);
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);
@@ -278,7 +269,6 @@ clear_with_quad(GLcontext *ctx,
}
cso_set_rasterizer(st->cso_context, &st->clear.raster);
- cso_set_viewport(st->cso_context, &st->clear.viewport);
cso_set_fragment_shader_handle(st->cso_context, st->clear.fs);
cso_set_vertex_shader_handle(st->cso_context, st->clear.vs);
@@ -290,7 +280,6 @@ clear_with_quad(GLcontext *ctx,
cso_restore_blend(st->cso_context);
cso_restore_depth_stencil_alpha(st->cso_context);
cso_restore_rasterizer(st->cso_context);
- cso_restore_viewport(st->cso_context);
cso_restore_fragment_shader(st->cso_context);
cso_restore_vertex_shader(st->cso_context);
}