diff options
author | Eric Anholt <[email protected]> | 2014-08-22 15:02:52 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-09-23 13:40:10 -0700 |
commit | 2e48b286bf21501ac06832799a4b7957bb8ac893 (patch) | |
tree | 2abbc37c478504db4b699b1f8251f51b66800aa4 /src/gallium/drivers/vc4/vc4_screen.c | |
parent | b7edf30191cae945b4836d683762d0ebed6efbfe (diff) |
vc4: Add support for 8-bit unorm/snorm vertex inputs.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_screen.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_screen.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c index 58d5f711376..4a5ce4feee7 100644 --- a/src/gallium/drivers/vc4/vc4_screen.c +++ b/src/gallium/drivers/vc4/vc4_screen.c @@ -327,12 +327,25 @@ vc4_screen_is_format_supported(struct pipe_screen *pscreen, return FALSE; } - 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_VERTEX_BUFFER) { + switch (format) { + case PIPE_FORMAT_R32G32B32A32_FLOAT: + case PIPE_FORMAT_R32G32B32_FLOAT: + case PIPE_FORMAT_R32G32_FLOAT: + case PIPE_FORMAT_R32_FLOAT: + case PIPE_FORMAT_R8G8B8A8_UNORM: + case PIPE_FORMAT_R8G8B8_UNORM: + case PIPE_FORMAT_R8G8_UNORM: + case PIPE_FORMAT_R8_UNORM: + case PIPE_FORMAT_R8G8B8A8_SNORM: + case PIPE_FORMAT_R8G8B8_SNORM: + case PIPE_FORMAT_R8G8_SNORM: + case PIPE_FORMAT_R8_SNORM: + retval |= PIPE_BIND_VERTEX_BUFFER; + break; + default: + break; + } } if ((usage & PIPE_BIND_RENDER_TARGET) && |