mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
nouveau: nv30: Relax some limits. We can render to z24s8 buffer even if color buffer is 16 bits.
This commit is contained in:
parent
c84a056764
commit
d9014a13e7
2 changed files with 9 additions and 3 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue