summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-08-11 16:03:17 -0700
committerEric Anholt <[email protected]>2014-08-12 14:19:49 -0700
commite1ce61089999905b35e15b2720311d54b80eeccc (patch)
tree98c1853f2bc9ec98337447db55b67a67f0b5472a /src/gallium
parent8e504ce4207b6ca7863700b0f41f0985f4bbe7d0 (diff)
vc4: Declare what vertex formats we actually support.
We will support more than this eventually, but for now this makes u_vbuf format-convert a few things (32-bit snorm and scaled, doubles) for us.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/vc4/vc4_screen.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c
index 62c5b2b4972..4c83db33165 100644
--- a/src/gallium/drivers/vc4/vc4_screen.c
+++ b/src/gallium/drivers/vc4/vc4_screen.c
@@ -338,8 +338,13 @@ vc4_screen_is_format_supported(struct pipe_screen *pscreen,
return FALSE;
}
- if (usage & PIPE_BIND_VERTEX_BUFFER)
- retval |= PIPE_BIND_VERTEX_BUFFER; /* XXX */
+ if (usage & PIPE_BIND_VERTEX_BUFFER &&
+ (format == PIPE_FORMAT_R32G32B32A32_FLOAT ||
+ format == PIPE_FORMAT_R32G32B32_FLOAT ||
+ format == PIPE_FORMAT_R32G32_FLOAT ||
+ format == PIPE_FORMAT_R32_FLOAT)) {
+ retval |= PIPE_BIND_VERTEX_BUFFER;
+ }
if ((usage & PIPE_BIND_RENDER_TARGET) &&
(format == PIPE_FORMAT_B8G8R8A8_UNORM ||