summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2023-01-11 08:20:10 +1000
committerMarge Bot <emma+marge@anholt.net>2023-08-04 21:32:07 +0000
commit921fc517ce1a4ae8f1d3072667bfd1e094621094 (patch)
treeef380c912f7fec15bd9519bfc10cea048bee22ca
parent9a0a5f8561939c0787798cc22e008c9ccc0d5bb6 (diff)
nvk: enable sparse features
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>
-rw-r--r--src/nouveau/vulkan/nvk_physical_device.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/nouveau/vulkan/nvk_physical_device.c b/src/nouveau/vulkan/nvk_physical_device.c
index 6f7d24effaf..b1f6acfbdd6 100644
--- a/src/nouveau/vulkan/nvk_physical_device.c
+++ b/src/nouveau/vulkan/nvk_physical_device.c
@@ -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};