From: Dave Airlie Date: Tue, 10 Jan 2023 22:20:10 +0000 (+1000) Subject: nvk: enable sparse features X-Git-Tag: upstream/23.3.3~3763 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=921fc517ce1a4ae8f1d3072667bfd1e094621094;p=platform%2Fupstream%2Fmesa.git 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 Part-of: --- diff --git a/src/nouveau/vulkan/nvk_physical_device.c b/src/nouveau/vulkan/nvk_physical_device.c index 6f7d24e..b1f6acf 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};