projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e6a900
)
llvmpipe: Fix null pointer dereference when no depth buffer is bound.
author
José Fonseca
<jfonseca@vmware.com>
Wed, 10 Feb 2010 11:25:26 +0000
(11:25 +0000)
committer
José Fonseca
<jfonseca@vmware.com>
Wed, 10 Feb 2010 11:25:26 +0000
(11:25 +0000)
src/gallium/drivers/llvmpipe/lp_rast_priv.h
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/llvmpipe/lp_rast_priv.h
b/src/gallium/drivers/llvmpipe/lp_rast_priv.h
index 4760d337c645505aedb16b08f39072646aec6020..5c5497e0929996a698a9b7a58519b6e43487383f 100644
(file)
--- a/
src/gallium/drivers/llvmpipe/lp_rast_priv.h
+++ b/
src/gallium/drivers/llvmpipe/lp_rast_priv.h
@@
-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);