diff options
author | Brian Paul <[email protected]> | 2010-06-30 11:57:14 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-06-30 14:05:45 -0600 |
commit | 2b3e1ad731d2bd095a680d3120619972a7eb0242 (patch) | |
tree | b1963207479242c9ba38c575d339424c0021d74c /src/gallium/drivers/llvmpipe/lp_setup.c | |
parent | effd33071e7b10bdd2f0c198fc34210202b574cc (diff) |
llvmpipe: use dummy tile when out of memory
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c index 158f9e88ccf..2597fa8f71b 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_setup.c @@ -40,6 +40,7 @@ #include "util/u_memory.h" #include "util/u_pack_color.h" #include "lp_context.h" +#include "lp_memory.h" #include "lp_scene.h" #include "lp_scene_queue.h" #include "lp_texture.h" @@ -622,6 +623,17 @@ lp_setup_set_fragment_sampler_views(struct lp_setup_context *setup, LP_TEX_LAYOUT_LINEAR); jit_tex->row_stride[j] = lp_tex->row_stride[j]; jit_tex->img_stride[j] = lp_tex->img_stride[j]; + + if (!jit_tex->data[j]) { + /* out of memory - use dummy tile memory */ + jit_tex->data[j] = lp_get_dummy_tile(); + jit_tex->width = TILE_SIZE; + jit_tex->height = TILE_SIZE; + jit_tex->depth = 1; + jit_tex->last_level = 0; + jit_tex->row_stride[j] = 0; + jit_tex->img_stride[j] = 0; + } } } else { |