summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_rast.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-06-30 11:57:14 -0600
committerBrian Paul <[email protected]>2010-06-30 14:05:45 -0600
commit2b3e1ad731d2bd095a680d3120619972a7eb0242 (patch)
treeb1963207479242c9ba38c575d339424c0021d74c /src/gallium/drivers/llvmpipe/lp_rast.c
parenteffd33071e7b10bdd2f0c198fc34210202b574cc (diff)
llvmpipe: use dummy tile when out of memory
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_rast.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c
index 1fadb9cca1e..1a82dd5694e 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.c
+++ b/src/gallium/drivers/llvmpipe/lp_rast.c
@@ -81,7 +81,6 @@ lp_rast_begin( struct lp_rasterizer *rast,
zsbuf->zslice,
LP_TEX_USAGE_READ_WRITE,
LP_TEX_LAYOUT_NONE);
- assert(rast->zsbuf.map);
}
lp_scene_bin_iter_begin( scene );
@@ -188,7 +187,7 @@ lp_rast_tile_begin(struct lp_rasterizer_task *task,
/* Get actual pointer to the tile data. Note that depth/stencil
* data is tiled differently than color data.
*/
- task->depth_tile = lp_rast_get_depth_block_pointer(rast, x, y);
+ task->depth_tile = lp_rast_get_depth_block_pointer(task, x, y);
assert(task->depth_tile);
}
@@ -286,7 +285,10 @@ lp_rast_clear_zstencil(struct lp_rasterizer_task *task,
dst = task->depth_tile;
- assert(dst == lp_rast_get_depth_block_pointer(rast, task->x, task->y));
+ if (lp_is_dummy_tile(dst))
+ return;
+
+ assert(dst == lp_rast_get_depth_block_pointer(task, task->x, task->y));
switch (block_size) {
case 1:
@@ -442,7 +444,7 @@ lp_rast_shade_tile(struct lp_rasterizer_task *task,
tile_x + x, tile_y + y);
/* depth buffer */
- depth = lp_rast_get_depth_block_pointer(rast, tile_x + x, tile_y + y);
+ depth = lp_rast_get_depth_block_pointer(task, tile_x + x, tile_y + y);
/* run shader on 4x4 block */
variant->jit_function[RAST_WHOLE]( &state->jit_context,
@@ -494,7 +496,7 @@ void lp_rast_shade_quads( struct lp_rasterizer_task *task,
}
/* depth buffer */
- depth = lp_rast_get_depth_block_pointer(rast, x, y);
+ depth = lp_rast_get_depth_block_pointer(task, x, y);
assert(lp_check_alignment(state->jit_context.blend_color, 16));