nv50,nvc0: add PIPE_BIND_LINEAR support to is_format_supported
vdpau has recently come to rely on this, so make sure to check it properly. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
parent
e0e1683087
commit
df03be196a
2 changed files with 18 additions and 0 deletions
|
|
@ -67,9 +67,18 @@ nv50_screen_is_format_supported(struct pipe_screen *pscreen,
|
|||
break;
|
||||
}
|
||||
|
||||
if (bindings & PIPE_BIND_LINEAR)
|
||||
if (util_format_is_depth_or_stencil(format) ||
|
||||
(target != PIPE_TEXTURE_1D &&
|
||||
target != PIPE_TEXTURE_2D &&
|
||||
target != PIPE_TEXTURE_RECT) ||
|
||||
sample_count > 1)
|
||||
return false;
|
||||
|
||||
/* transfers & shared are always supported */
|
||||
bindings &= ~(PIPE_BIND_TRANSFER_READ |
|
||||
PIPE_BIND_TRANSFER_WRITE |
|
||||
PIPE_BIND_LINEAR |
|
||||
PIPE_BIND_SHARED);
|
||||
|
||||
return (( nv50_format_table[format].usage |
|
||||
|
|
|
|||
|
|
@ -57,9 +57,18 @@ nvc0_screen_is_format_supported(struct pipe_screen *pscreen,
|
|||
if (util_format_get_blocksizebits(format) == 3 * 32)
|
||||
return false;
|
||||
|
||||
if (bindings & PIPE_BIND_LINEAR)
|
||||
if (util_format_is_depth_or_stencil(format) ||
|
||||
(target != PIPE_TEXTURE_1D &&
|
||||
target != PIPE_TEXTURE_2D &&
|
||||
target != PIPE_TEXTURE_RECT) ||
|
||||
sample_count > 1)
|
||||
return false;
|
||||
|
||||
/* transfers & shared are always supported */
|
||||
bindings &= ~(PIPE_BIND_TRANSFER_READ |
|
||||
PIPE_BIND_TRANSFER_WRITE |
|
||||
PIPE_BIND_LINEAR |
|
||||
PIPE_BIND_SHARED);
|
||||
|
||||
return (( nvc0_format_table[format].usage |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue