summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_setup.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_setup.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/gallium/drivers/softpipe/sp_setup.c b/src/gallium/drivers/softpipe/sp_setup.c
index ffe49260b9a..a91e4f588c8 100644
--- a/src/gallium/drivers/softpipe/sp_setup.c
+++ b/src/gallium/drivers/softpipe/sp_setup.c
@@ -390,17 +390,6 @@ setup_sort_vertices(struct setup_context *setup,
return FALSE;
}
-
- /* Prepare pixel offset for rasterisation:
- * - pixel center (0.5, 0.5) for GL, or
- * - assume (0.0, 0.0) for other APIs.
- */
- if (setup->softpipe->rasterizer->half_pixel_center) {
- setup->pixel_offset = 0.5f;
- } else {
- setup->pixel_offset = 0.0f;
- }
-
return TRUE;
}
@@ -1476,6 +1465,16 @@ sp_setup_prepare(struct setup_context *setup)
}
}
+ /* Prepare pixel offset for rasterisation:
+ * - pixel center (0.5, 0.5) for GL, or
+ * - assume (0.0, 0.0) for other APIs.
+ */
+ if (setup->softpipe->rasterizer->half_pixel_center) {
+ setup->pixel_offset = 0.5f;
+ } else {
+ setup->pixel_offset = 0.0f;
+ }
+
setup->max_layer = max_layer;
sp->quad.first->begin( sp->quad.first );