diff options
author | Patrice Mandin <[email protected]> | 2009-10-23 18:42:21 +0200 |
---|---|---|
committer | Patrice Mandin <[email protected]> | 2009-10-23 18:42:21 +0200 |
commit | d9014a13e72b6682a959217d38050f3252628edb (patch) | |
tree | 26dd979abf43f163c96f7fe44b7beb1cf7902dfc | |
parent | c84a05676497ff7263f3ea8203b868071c4f678f (diff) |
nouveau: nv30: Relax some limits. We can render to z24s8 buffer even if color buffer is 16 bits.
-rw-r--r-- | src/gallium/drivers/nv30/nv30_screen.c | 10 | ||||
-rw-r--r-- | src/gallium/drivers/nv30/nv30_state_fb.c | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/gallium/drivers/nv30/nv30_screen.c b/src/gallium/drivers/nv30/nv30_screen.c index bb40e1803d1..221ae1b5f88 100644 --- a/src/gallium/drivers/nv30/nv30_screen.c +++ b/src/gallium/drivers/nv30/nv30_screen.c @@ -102,13 +102,19 @@ nv30_screen_surface_format_supported(struct pipe_screen *pscreen, struct pipe_surface *front = ((struct nouveau_winsys *) pscreen->winsys)->front; if (tex_usage & PIPE_TEXTURE_USAGE_RENDER_TARGET) { - return (format == front->format); + switch (format) { + case PIPE_FORMAT_A8R8G8B8_UNORM: + case PIPE_FORMAT_R5G6B5_UNORM: + return TRUE; + default: + break; + } } else if (tex_usage & PIPE_TEXTURE_USAGE_DEPTH_STENCIL) { switch (format) { case PIPE_FORMAT_Z24S8_UNORM: case PIPE_FORMAT_Z24X8_UNORM: - return (front->format == PIPE_FORMAT_A8R8G8B8_UNORM); + return TRUE; case PIPE_FORMAT_Z16_UNORM: return (front->format == PIPE_FORMAT_R5G6B5_UNORM); default: diff --git a/src/gallium/drivers/nv30/nv30_state_fb.c b/src/gallium/drivers/nv30/nv30_state_fb.c index f90681b0f97..4d6a67e56df 100644 --- a/src/gallium/drivers/nv30/nv30_state_fb.c +++ b/src/gallium/drivers/nv30/nv30_state_fb.c @@ -92,7 +92,7 @@ nv30_state_framebuffer_validate(struct nv30_context *nv30) assert(0); } - if (colour_bits != zeta_bits) { + if (colour_bits > zeta_bits) { return FALSE; } |