mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 20:58:04 +02:00
v3dv: add missing bounds check in VK_EXT_4444_formats
Fixes: fbe4d7ccf4 ("v3dv: implement VK_EXT_4444_formats")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29481>
This commit is contained in:
parent
d1b794685f
commit
8f483caffb
1 changed files with 4 additions and 1 deletions
|
|
@ -266,7 +266,10 @@ v3dX(get_format)(VkFormat format)
|
|||
|
||||
switch (ext_number) {
|
||||
case _VK_EXT_4444_formats_number:
|
||||
return &format_table_4444[enum_offset];
|
||||
if (enum_offset < ARRAY_SIZE(format_table_4444))
|
||||
return &format_table_4444[enum_offset];
|
||||
else
|
||||
return NULL;
|
||||
case _VK_KHR_sampler_ycbcr_conversion_number:
|
||||
if (enum_offset < ARRAY_SIZE(format_table_ycbcr))
|
||||
return &format_table_ycbcr[enum_offset];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue