lima: handle fp16 vertex formats

12128fb135 marked fp16 vertex formats supported, but they aren't actually handled
by lima_pipe_format_to_attrib_type(). Fix it by handling it there.
FP16 seems to be the only missing index which is 0x3.

Fixes: 12128fb135 ("lima: add natively supported vertex buffer formats")

Cc: 21.1 mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11872>
This commit is contained in:
Vasily Khoruzhick 2021-07-13 23:12:13 -07:00 committed by Marge Bot
parent 12d18abfe7
commit 4a3269dff6
1 changed files with 5 additions and 1 deletions

View File

@ -195,6 +195,7 @@ enum lima_attrib_type {
LIMA_ATTRIB_FLOAT = 0x000,
LIMA_ATTRIB_I32 = 0x001,
LIMA_ATTRIB_U32 = 0x002,
LIMA_ATTRIB_FP16 = 0x003,
LIMA_ATTRIB_I16 = 0x004,
LIMA_ATTRIB_U16 = 0x005,
LIMA_ATTRIB_I8 = 0x006,
@ -217,7 +218,10 @@ lima_pipe_format_to_attrib_type(enum pipe_format format)
switch (c->type) {
case UTIL_FORMAT_TYPE_FLOAT:
return LIMA_ATTRIB_FLOAT;
if (c->size == 16)
return LIMA_ATTRIB_FP16;
else
return LIMA_ATTRIB_FLOAT;
case UTIL_FORMAT_TYPE_FIXED:
return LIMA_ATTRIB_FIXED;
case UTIL_FORMAT_TYPE_SIGNED: