From 9d48a621d2a0e55a76a2cfd0aea3b773e907ed50 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Thu, 18 Mar 2010 10:24:10 +0000 Subject: [PATCH] llvmpipe: Fix crashes when there is no depth buffer bound. --- src/gallium/drivers/llvmpipe/lp_state_fs.c | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.30.2