summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_rast.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-06-22 13:06:40 -0600
committerBrian Paul <[email protected]>2012-06-25 08:14:33 -0600
commit45df3eb1db7147aca31134723972e1de4f6a7a16 (patch)
tree9fcb364d4c707c0a2e3dbe633f0d35f4bdb57b42 /src/gallium/drivers/llvmpipe/lp_rast.c
parent37d699a296ac1d63b9276224847df4b645b53fe2 (diff)
llvmpipe: fix the LP_NO_RAST debug option
It was only no-oping the clear() function, not actual triangle rasterization. Move the no_rast field from lp_context down into lp_rasterizer so it's accessible where it's needed. Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_rast.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.c36
1 files changed, 21 insertions, 15 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c
index efa5024717e..7e9405567b3 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.c
+++ b/src/gallium/drivers/llvmpipe/lp_rast.c
@@ -701,28 +701,32 @@ rasterize_scene(struct lp_rasterizer_task *task,
struct lp_scene *scene)
{
task->scene = scene;
- /* loop over scene bins, rasterize each */
+
+ if (!task->rast->no_rast) {
+ /* loop over scene bins, rasterize each */
#if 0
- {
- unsigned i, j;
- for (i = 0; i < scene->tiles_x; i++) {
- for (j = 0; j < scene->tiles_y; j++) {
- struct cmd_bin *bin = lp_scene_get_bin(scene, i, j);
- rasterize_bin(task, bin, i, j);
+ {
+ unsigned i, j;
+ for (i = 0; i < scene->tiles_x; i++) {
+ for (j = 0; j < scene->tiles_y; j++) {
+ struct cmd_bin *bin = lp_scene_get_bin(scene, i, j);
+ rasterize_bin(task, bin, i, j);
+ }
}
}
- }
#else
- {
- struct cmd_bin *bin;
+ {
+ struct cmd_bin *bin;
- assert(scene);
- while ((bin = lp_scene_bin_iter_next(scene))) {
- if (!is_empty_bin( bin ))
- rasterize_bin(task, bin);
+ assert(scene);
+ while ((bin = lp_scene_bin_iter_next(scene))) {
+ if (!is_empty_bin( bin ))
+ rasterize_bin(task, bin);
+ }
}
- }
#endif
+ }
+
if (scene->fence) {
lp_fence_signal(scene->fence);
@@ -896,6 +900,8 @@ lp_rast_create( unsigned num_threads )
rast->num_threads = num_threads;
+ rast->no_rast = debug_get_bool_option("LP_NO_RAST", FALSE);
+
create_rast_threads(rast);
/* for synchronizing rasterization threads */