mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-13 07:40:24 +01:00
lavapipe: implement VK_EXT_index_type_uint8
Since Gallium supports 8 bit indices, this extension is a simple matter of plumbing a value through, exposing a feature and flipping the switch for the extension. This lets zink avoid up-converting the index-buffer before drawing. Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8082>
This commit is contained in:
parent
2832cbea7a
commit
6526e6d11b
3 changed files with 11 additions and 1 deletions
|
|
@ -386,6 +386,13 @@ void lvp_GetPhysicalDeviceFeatures2(
|
|||
break;
|
||||
}
|
||||
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT: {
|
||||
VkPhysicalDeviceIndexTypeUint8FeaturesEXT *features =
|
||||
(VkPhysicalDeviceIndexTypeUint8FeaturesEXT *)ext;
|
||||
features->indexTypeUint8 = true;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1917,6 +1917,9 @@ static void handle_index_buffer(struct lvp_cmd_buffer_entry *cmd,
|
|||
{
|
||||
struct lvp_cmd_bind_index_buffer *ib = &cmd->u.index_buffer;
|
||||
switch (ib->index_type) {
|
||||
case VK_INDEX_TYPE_UINT8_EXT:
|
||||
state->index_size = 1;
|
||||
break;
|
||||
case VK_INDEX_TYPE_UINT16:
|
||||
state->index_size = 2;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ EXTENSIONS = [
|
|||
Extension('VK_EXT_external_memory_host', 1, False),
|
||||
Extension('VK_EXT_global_priority', 1, False),
|
||||
Extension('VK_EXT_host_query_reset', 1, False),
|
||||
Extension('VK_EXT_index_type_uint8', 1, False),
|
||||
Extension('VK_EXT_index_type_uint8', 1, True),
|
||||
Extension('VK_EXT_inline_uniform_block', 1, False),
|
||||
Extension('VK_EXT_memory_budget', 1, False),
|
||||
Extension('VK_EXT_memory_priority', 1, False),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue