nvk: enable sparse features
authorDave Airlie <airlied@redhat.com>
Tue, 10 Jan 2023 22:20:10 +0000 (08:20 +1000)
committerMarge Bot <emma+marge@anholt.net>
Fri, 4 Aug 2023 21:32:07 +0000 (21:32 +0000)
There is a bug on my turing with
dEQP-VK.sparse_resources.buffer.ssbo.sparse_residency.buffer_size_2_24
but none of the others and we aren't seeing it on some other devices.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

src/nouveau/vulkan/nvk_physical_device.c

index 6f7d24e..b1f6acf 100644 (file)
@@ -161,8 +161,12 @@ nvk_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice,
          .standardSampleLocations = true,
          .optimalBufferCopyOffsetAlignment = 1,
          .optimalBufferCopyRowPitchAlignment = 1,
+         .bufferImageGranularity = 1,
+         .sparseAddressSpaceSize = UINT32_MAX,
+      },
+      .sparseProperties = {
+         .residencyNonResidentStrict = true,
       },
-
       /* More properties */
    };
 
@@ -462,6 +466,9 @@ nvk_get_device_features(const struct nv_device_info *info,
       /* TODO: shaderInt16 */
       /* TODO: shaderResourceResidency */
       .shaderResourceMinLod = true,
+#if NVK_NEW_UAPI == 1
+      .sparseBinding = true,
+#endif
       /* TODO: sparseResidency* */
       /* TODO: variableMultisampleRate */
       /* TODO: inheritedQueries */
@@ -853,6 +860,9 @@ nvk_GetPhysicalDeviceQueueFamilyProperties2(
       p->queueFamilyProperties.queueFlags = VK_QUEUE_GRAPHICS_BIT |
                                             VK_QUEUE_COMPUTE_BIT |
                                             VK_QUEUE_TRANSFER_BIT;
+#if NVK_NEW_UAPI == 1
+      p->queueFamilyProperties.queueFlags |= VK_QUEUE_SPARSE_BINDING_BIT;
+#endif
       p->queueFamilyProperties.queueCount = 1;
       p->queueFamilyProperties.timestampValidBits = 64;
       p->queueFamilyProperties.minImageTransferGranularity = (VkExtent3D){1, 1, 1};