zink: enable KHR_shader_draw_parameters on Vulkan <1.2

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9021>
This commit is contained in:
Hoe Hao Cheng
2021-02-13 04:56:23 +08:00
committed by Marge Bot
parent efe6f00e34
commit 93ff47eb19
3 changed files with 16 additions and 4 deletions

View File

@@ -131,13 +131,22 @@ are required:
OpenGL 4.2
^^^^^^^^^^
For OpenGL 4.2 support, Vulkan 1.2 is required, plus the following additional
For OpenGL 4.2 support, the following additional
requirements needs to be supported:
* ``VkPhysicalDeviceVulkan11Features``:
* For Vulkan 1.2 and above:
* ``VkPhysicalDeviceVulkan11Features``:
* ``shaderDrawParameters``
* For Vulkan 1.1 and below:
* Device extensions:
* `VK_KHR_shader_draw_parameters`_
* Formats features:
* ```VK_FORMAT_BC7_UNORM_BLOCK```: ```VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT```
@@ -193,3 +202,4 @@ questions, don't hesitate to visit `#zink on FreeNode
.. _VK_EXT_vertex_attribute_divisor: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_EXT_vertex_attribute_divisor.html
.. _VK_KHR_maintenance2: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_maintenance2.html
.. _VK_KHR_vulkan_memory_model: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_vulkan_memory_model.html
.. _VK_KHR_shader_draw_parameters: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_shader_draw_parameters.html

View File

@@ -69,6 +69,7 @@ EXTENSIONS = [
alias="driver",
properties=True),
Extension("VK_KHR_draw_indirect_count"),
Extension("VK_KHR_shader_draw_parameters"),
Extension("VK_EXT_conditional_rendering",
alias="cond_render",
features=True,

View File

@@ -192,7 +192,8 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
return screen->info.have_KHR_draw_indirect_count;
case PIPE_CAP_START_INSTANCE:
return screen->info.feats11.shaderDrawParameters;
return (screen->info.have_vulkan12 && screen->info.feats11.shaderDrawParameters) ||
screen->info.have_KHR_shader_draw_parameters;
case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
return screen->info.have_EXT_vertex_attribute_divisor;