llvmpipe: Fix null pointer dereference when no depth buffer is bound.
This commit is contained in:
parent
5e6a900510
commit
ba33fed610
|
@ -139,6 +139,9 @@ lp_rast_depth_pointer( struct lp_rasterizer *rast,
|
|||
void * depth;
|
||||
assert((x % TILE_VECTOR_WIDTH) == 0);
|
||||
assert((y % TILE_VECTOR_HEIGHT) == 0);
|
||||
if(!rast->zsbuf_map)
|
||||
return NULL;
|
||||
assert(rast->zsbuf_transfer);
|
||||
depth = rast->zsbuf_map +
|
||||
y*rast->zsbuf_transfer->stride +
|
||||
TILE_VECTOR_HEIGHT*x*util_format_get_blocksize(rast->zsbuf_transfer->texture->format);
|
||||
|
|
Loading…
Reference in New Issue