From 9f43b44bf06c61735dbab7e8e508642315bd93d1 Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Tue, 24 Nov 2020 23:02:54 +0100 Subject: [PATCH] radv: Enable sparse buffer and image support. Reviewed-by: Samuel Pitoiset Part-of: --- docs/relnotes/new_features.txt | 1 + src/amd/vulkan/radv_device.c | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt index 4cb3086..117dfa7 100644 --- a/docs/relnotes/new_features.txt +++ b/docs/relnotes/new_features.txt @@ -10,3 +10,4 @@ VK_KHR_fragment_shading_rate on RADV (RDNA2 only) Freedreno a6xx exposes GL 3.3 Classic swrast dri driver removed in favor of gallium swrast (llvmpipe or softpipe) Panfrost t760/t860 exposes GL 3.0 +Sparse memory support on RADV diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 6a7cb1c..6fe7eca 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -1011,8 +1011,12 @@ void radv_GetPhysicalDeviceFeatures( .shaderInt64 = true, .shaderInt16 = true, .sparseBinding = true, + .sparseResidencyBuffer = pdevice->rad_info.chip_class >= GFX8, + .sparseResidencyImage2D = pdevice->rad_info.chip_class >= GFX8, + .sparseResidencyAliased = pdevice->rad_info.chip_class >= GFX8, .variableMultisampleRate = true, .shaderResourceMinLod = true, + .shaderResourceResidency = true, .inheritedQueries = true, }; } @@ -1655,7 +1659,10 @@ void radv_GetPhysicalDeviceProperties( .deviceID = pdevice->rad_info.pci_id, .deviceType = pdevice->rad_info.has_dedicated_vram ? VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU : VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU, .limits = limits, - .sparseProperties = {0}, + .sparseProperties = { + .residencyNonResidentStrict = pdevice->rad_info.chip_class >= GFX8, + .residencyStandard2DBlockShape = pdevice->rad_info.chip_class >= GFX8, + }, }; strcpy(pProperties->deviceName, pdevice->name); -- 2.7.4