summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-08-19 22:18:40 +0200
committerMarek Olšák <maraeo@gmail.com>2010-08-19 23:30:26 +0200
commit06991d87bedaaba5dde65027caa6fb49325b754e (patch)
treed55a1bee2406de0ffa5b772052b3325431f2d2d2 /src/gallium/drivers/r300
parent076c53879b90855ecf38602584f22e4ab6db7569 (diff)
r300g: do not use fastfill with 16-bit zbuffers
To my knowledge, there is no way to flush zmask and thus write the clear value. This fixes zbuffer reads, among other things.
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r--src/gallium/drivers/r300/r300_hyperz.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_hyperz.c b/src/gallium/drivers/r300/r300_hyperz.c
index a471b7353b..b2526d6e41 100644
--- a/src/gallium/drivers/r300/r300_hyperz.c
+++ b/src/gallium/drivers/r300/r300_hyperz.c
@@ -357,6 +357,10 @@ void r300_zmask_alloc_block(struct r300_context *r300, struct r300_surface *surf
tex->desc.b.b.target != PIPE_TEXTURE_2D)
return;
+ /* Cannot flush zmask of 16-bit zbuffers. */
+ if (util_format_get_blocksizebits(tex->desc.b.b.format) == 16)
+ return;
+
if (tex->zmask_mem[level])
return;