[Mesa-dev] [PATCH 8/8] radv: Enable sparseBinding feature.

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Sun Feb 5 11:43:59 UTC 2017


Signed-off-by: Bas Nieuwenhuizen <basni at google.com>
---
 src/amd/vulkan/radv_device.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index d501be3793f..4db58929a42 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -471,6 +471,7 @@ void radv_GetPhysicalDeviceFeatures(
 		.shaderInt64                              = false,
 		.shaderInt16                              = false,
 		.alphaToOne                               = true,
+		.sparseBinding                            = true,
 		.variableMultisampleRate                  = false,
 		.inheritedQueries                         = false,
 	};
@@ -502,7 +503,7 @@ void radv_GetPhysicalDeviceProperties(
 		.maxMemoryAllocationCount                 = UINT32_MAX,
 		.maxSamplerAllocationCount                = 64 * 1024,
 		.bufferImageGranularity                   = 64, /* A cache line */
-		.sparseAddressSpaceSize                   = 0,
+		.sparseAddressSpaceSize                   = 0xffffffffu, /* buffer max size */
 		.maxBoundDescriptorSets                   = MAX_SETS,
 		.maxPerStageDescriptorSamplers            = 64,
 		.maxPerStageDescriptorUniformBuffers      = 64,
@@ -648,8 +649,9 @@ void radv_GetPhysicalDeviceQueueFamilyProperties(
 	if (*pCount >= 1) {
 		pQueueFamilyProperties[idx] = (VkQueueFamilyProperties) {
 			.queueFlags = VK_QUEUE_GRAPHICS_BIT |
-			VK_QUEUE_COMPUTE_BIT |
-			VK_QUEUE_TRANSFER_BIT,
+			              VK_QUEUE_COMPUTE_BIT |
+			              VK_QUEUE_TRANSFER_BIT |
+			              VK_QUEUE_SPARSE_BINDING_BIT,
 			.queueCount = 1,
 			.timestampValidBits = 64,
 			.minImageTransferGranularity = (VkExtent3D) { 1, 1, 1 },
@@ -662,7 +664,9 @@ void radv_GetPhysicalDeviceQueueFamilyProperties(
 	    !(pdevice->instance->debug_flags & RADV_DEBUG_NO_COMPUTE_QUEUE)) {
 		if (*pCount > idx) {
 			pQueueFamilyProperties[idx] = (VkQueueFamilyProperties) {
-				.queueFlags = VK_QUEUE_COMPUTE_BIT | VK_QUEUE_TRANSFER_BIT,
+				.queueFlags = VK_QUEUE_COMPUTE_BIT |
+				              VK_QUEUE_TRANSFER_BIT |
+				              VK_QUEUE_SPARSE_BINDING_BIT,
 				.queueCount = pdevice->rad_info.compute_rings,
 				.timestampValidBits = 64,
 				.minImageTransferGranularity = (VkExtent3D) { 1, 1, 1 },
-- 
2.11.0



More information about the mesa-dev mailing list