nvk: Enable 8 and 16-bit integer types

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26348>
This commit is contained in:
Faith Ekstrand 2023-11-23 11:12:03 -06:00 committed by Faith Ekstrand
parent bda208665f
commit f9c7f33613
3 changed files with 17 additions and 3 deletions

View file

@ -422,7 +422,7 @@ Vulkan 1.0 -- all DONE: anv, dzn, lvp, nvk, radv, tu, v3dv, vn
Vulkan 1.1 -- all DONE: anv, lvp, radv, tu, vn
VK_KHR_16bit_storage DONE (anv/gen8+, dzn, hasvk, lvp, radv, tu/a650, v3dv, vn)
VK_KHR_16bit_storage DONE (anv/gen8+, dzn, hasvk, lvp, nvk, radv, tu/a650, v3dv, vn)
VK_KHR_bind_memory2 DONE (anv, dzn, hasvk, lvp, nvk, pvr, radv, tu, v3dv, vn)
VK_KHR_dedicated_allocation DONE (anv, dzn, hasvk, lvp, nvk, radv, tu, v3dv, vn)
VK_KHR_descriptor_update_template DONE (anv, dzn, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn)
@ -448,7 +448,7 @@ Vulkan 1.1 -- all DONE: anv, lvp, radv, tu, vn
Vulkan 1.2 -- all DONE: anv, tu, vn
VK_KHR_8bit_storage DONE (anv/gen8+, dzn, hasvk, lvp, radv, v3dv, vn)
VK_KHR_8bit_storage DONE (anv/gen8+, dzn, hasvk, lvp, nvk, radv, v3dv, vn)
VK_KHR_buffer_device_address DONE (anv/gen8+, hasvk, lvp, nvk, radv, tu, v3dv, vn)
VK_KHR_create_renderpass2 DONE (anv, dzn, hasvk, lvp, nvk, radv, tu, v3dv, vn)
VK_KHR_depth_stencil_resolve DONE (anv, dzn, hasvk, lvp, nvk, radv, tu, v3dv, vn)

View file

@ -75,6 +75,8 @@ nvk_get_device_extensions(const struct nv_device_info *info,
struct vk_device_extension_table *ext)
{
*ext = (struct vk_device_extension_table) {
.KHR_8bit_storage = true,
.KHR_16bit_storage = true,
.KHR_bind_memory2 = true,
.KHR_buffer_device_address = true,
.KHR_copy_commands2 = true,
@ -112,6 +114,7 @@ nvk_get_device_extensions(const struct nv_device_info *info,
.KHR_separate_depth_stencil_layouts = true,
.KHR_shader_clock = true,
.KHR_shader_draw_parameters = true,
.KHR_shader_float16_int8 = true,
.KHR_shader_non_semantic_info = true,
.KHR_shader_terminate_invocation =
(nvk_nak_stages(info) & VK_SHADER_STAGE_FRAGMENT_BIT) != 0,
@ -220,7 +223,7 @@ nvk_get_device_features(const struct nv_device_info *info,
.shaderCullDistance = true,
/* TODO: shaderFloat64 */
/* TODO: shaderInt64 */
/* TODO: shaderInt16 */
.shaderInt16 = true,
/* TODO: shaderResourceResidency */
.shaderResourceMinLod = true,
.sparseBinding = true,
@ -231,6 +234,9 @@ nvk_get_device_features(const struct nv_device_info *info,
.inheritedQueries = true,
/* Vulkan 1.1 */
.storageBuffer16BitAccess = true,
.uniformAndStorageBuffer16BitAccess = true,
.storagePushConstant16 = true,
.multiview = true,
.multiviewGeometryShader = true,
.multiviewTessellationShader = true,
@ -243,6 +249,10 @@ nvk_get_device_features(const struct nv_device_info *info,
.samplerMirrorClampToEdge = true,
.descriptorIndexing = true,
.drawIndirectCount = info->cls_eng3d >= TURING_A,
.storageBuffer8BitAccess = true,
.uniformAndStorageBuffer8BitAccess = true,
.storagePushConstant8 = true,
.shaderInt8 = true,
.shaderInputAttachmentArrayDynamicIndexing = true,
.shaderUniformTexelBufferArrayDynamicIndexing = true,
.shaderStorageTexelBufferArrayDynamicIndexing = true,

View file

@ -144,12 +144,16 @@ nvk_physical_device_spirv_options(const struct nvk_physical_device *pdev,
.geometry_streams = true,
.image_read_without_format = true,
.image_write_without_format = true,
.int8 = true,
.int16 = true,
.min_lod = true,
.multiview = true,
.physical_storage_buffer_address = true,
.runtime_descriptor_array = true,
.shader_clock = true,
.shader_viewport_index_layer = true,
.storage_8bit = true,
.storage_16bit = true,
.subgroup_arithmetic = true,
.subgroup_ballot = true,
.subgroup_basic = true,