mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
lima: handle fp16 vertex formats
12128fb135marked 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> (cherry picked from commit4a3269dff6)
This commit is contained in:
parent
dc26c3f690
commit
53d04c4f8b
2 changed files with 6 additions and 2 deletions
|
|
@ -1885,7 +1885,7 @@
|
|||
"description": "lima: handle fp16 vertex formats",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "12128fb1351eee6ec681039fe8483b3c39db7c8e"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue