summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2013-04-23 19:40:05 +0100
committerJosé Fonseca <[email protected]>2013-04-23 19:42:47 +0100
commit2737abb44efebfa10ac84b183c20fc5818d1514e (patch)
tree32447cf1ab7291a489bca9dd770c3e424785dbd9 /src/mesa
parentb69207642079fe8ba33c594750415e8d9c66a06f (diff)
gallium: Replace gl_rasterization_rules with lower_left_origin and half_pixel_center.
Squashed commit of the following: commit 04c5fa2cbb8e89d6f2fa5a75af1cca03b1f6b852 Author: José Fonseca <[email protected]> Date: Tue Apr 23 17:37:18 2013 +0100 gallium: s/lower_left_origin/bottom_edge_rule/ commit 4dff4f64fa83b9737def136fffd161d55e4f1722 Author: José Fonseca <[email protected]> Date: Tue Apr 23 17:35:04 2013 +0100 gallium: Move diagram to docs. commit 442a63012c8c3c3797f45e03f2ca20ad5f399832 Author: James Benton <[email protected]> Date: Fri May 11 17:50:55 2012 +0100 gallium: Replace gl_rasterization_rules with lower_left_origin and half_pixel_center. This change is necessary to achieve correct results when using OpenGL FBOs. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_atom_rasterizer.c5
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap.c3
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c3
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c3
4 files changed, 10 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c
index 62464b4750b..561dc9accb8 100644
--- a/src/mesa/state_tracker/st_atom_rasterizer.c
+++ b/src/mesa/state_tracker/st_atom_rasterizer.c
@@ -228,7 +228,10 @@ static void update_raster_state( struct st_context *st )
/* _NEW_FRAG_CLAMP */
raster->clamp_fragment_color = !st->clamp_frag_color_in_shader &&
ctx->Color._ClampFragmentColor;
- raster->gl_rasterization_rules = 1;
+
+ raster->half_pixel_center = 1;
+ if (st_fb_orientation(ctx->DrawBuffer) == Y_0_TOP)
+ raster->bottom_edge_rule = 1;
/* _NEW_RASTERIZER_DISCARD */
raster->rasterizer_discard = ctx->RasterDiscard;
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c
index 456933621e2..e96f4b36ec4 100644
--- a/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/src/mesa/state_tracker/st_cb_bitmap.c
@@ -825,7 +825,8 @@ 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.half_pixel_center = 1;
+ st->bitmap.rasterizer.bottom_edge_rule = 1;
st->bitmap.rasterizer.depth_clip = 1;
/* find a usable texture format */
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index a5aa8f49602..566f4a76e14 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -67,7 +67,8 @@ st_init_clear(struct st_context *st)
{
memset(&st->clear, 0, sizeof(st->clear));
- st->clear.raster.gl_rasterization_rules = 1;
+ st->clear.raster.half_pixel_center = 1;
+ st->clear.raster.bottom_edge_rule = 1;
st->clear.raster.depth_clip = 1;
}
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index de7b91f281b..68359e8037b 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -710,7 +710,8 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
memset(&rasterizer, 0, sizeof(rasterizer));
rasterizer.clamp_fragment_color = !st->clamp_frag_color_in_shader &&
ctx->Color._ClampFragmentColor;
- rasterizer.gl_rasterization_rules = 1;
+ rasterizer.half_pixel_center = 1;
+ rasterizer.bottom_edge_rule = 1;
rasterizer.depth_clip = !ctx->Transform.DepthClamp;
rasterizer.scissor = ctx->Scissor.Enabled;
cso_set_rasterizer(cso, &rasterizer);