summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nv50/nv50_screen.c
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2016-03-31 21:52:13 -0400
committerIlia Mirkin <[email protected]>2016-03-31 21:53:11 -0400
commitdf03be196abc34bdf29ff1119099e1477a991ad3 (patch)
tree1508b4736c1900939db4d6fb8af3582b0b5df9af /src/gallium/drivers/nouveau/nv50/nv50_screen.c
parente0e16830873b945a24880ae515466bf7f9165f42 (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv50/nv50_screen.c')
-rw-r--r--src/gallium/drivers/nouveau/nv50/nv50_screen.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
index 5836bb23764..57e28992727 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
@@ -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 |