diff options
author | Ilia Mirkin <[email protected]> | 2016-08-31 00:54:17 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-08-31 01:17:55 -0400 |
commit | 8caf2cb0c06fe0a1dddff3aed56392f376fda424 (patch) | |
tree | 924c21a5710d3a1a5a6cd334facdb7a074f72e7b /src/gallium | |
parent | d82f8d9772813949d0f5455cd0edad9003be0fb0 (diff) |
nv30: only bail on color/depth bpp mismatch when surfaces are swizzled
The actual restriction is a little weaker than I originally thought. See
https://bugs.freedesktop.org/show_bug.cgi?id=92306#c17 for the
suggestion. This also explain why things weren't *always* failing
before, only sometimes. We will allocate a non-swizzled depth buffer for
NPOT winsys buffer sizes, which they almost always are.
Signed-off-by: Ilia Mirkin <[email protected]>
Cc: [email protected]
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/nouveau/nv30/nv30_state.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_state.c b/src/gallium/drivers/nouveau/nv30/nv30_state.c index 3655e0cb7f6..c6eddd0486c 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_state.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_state.c @@ -379,8 +379,9 @@ nv30_set_framebuffer_state(struct pipe_context *pipe, struct nv30_miptree *zeta_mt = nv30_miptree(fb->zsbuf->texture); if (color_mt->swizzled != zeta_mt->swizzled || - (util_format_get_blocksize(fb->zsbuf->format) > 2) != - (util_format_get_blocksize(fb->cbufs[0]->format) > 2)) { + (color_mt->swizzled && + (util_format_get_blocksize(fb->zsbuf->format) > 2) != + (util_format_get_blocksize(fb->cbufs[0]->format) > 2))) { nv30->framebuffer.zsbuf = NULL; debug_printf("Mismatched color and zeta formats, ignoring zeta.\n"); } |