summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2010-03-18 10:24:10 +0000
committerJosé Fonseca <[email protected]>2010-03-18 10:24:10 +0000
commit9d48a621d2a0e55a76a2cfd0aea3b773e907ed50 (patch)
tree2b2802996ac8e5efb4042abfc29916acb1a844fc /src
parent6de8e563ac4dad818fc2bfea23f557919ed36234 (diff)
llvmpipe: Fix crashes when there is no depth buffer bound.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_fs.c3
1 files changed, 3 insertions, 0 deletions
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);