From: José Fonseca Date: Thu, 18 Mar 2010 10:24:10 +0000 (+0000) Subject: llvmpipe: Fix crashes when there is no depth buffer bound. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9d48a621d2a0e55a76a2cfd0aea3b773e907ed50;p=mesa.git llvmpipe: Fix crashes when there is no depth buffer bound. --- diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index b38e0f393dc..2cecf7e0974 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -152,6 +152,9 @@ generate_depth_stencil(LLVMBuilderRef builder, const struct util_format_description *format_desc; struct lp_type dst_type; + if (!key->depth.enabled && !key->stencil[0].enabled && !key->stencil[1].enabled) + return; + format_desc = util_format_description(key->zsbuf_format); assert(format_desc);