From: Jason Ekstrand Date: Wed, 8 Jul 2015 16:04:16 +0000 (-0700) Subject: vk/vulkan.h: Switch BindObjectMemory to a device function and remove the index X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bb6567f5d157983d2de2a6a863f217eba6506593;p=mesa.git vk/vulkan.h: Switch BindObjectMemory to a device function and remove the index --- diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index ee8e4114509..c0e087aae06 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -1917,7 +1917,7 @@ typedef VkResult (VKAPI *PFN_vkUnmapMemory)(VkDevice device, VkDeviceMemory mem) typedef VkResult (VKAPI *PFN_vkFlushMappedMemoryRanges)(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges); typedef VkResult (VKAPI *PFN_vkInvalidateMappedMemoryRanges)(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges); typedef VkResult (VKAPI *PFN_vkDestroyObject)(VkDevice device, VkObjectType objType, VkObject object); -typedef VkResult (VKAPI *PFN_vkQueueBindObjectMemory)(VkQueue queue, VkObjectType objType, VkObject object, uint32_t allocationIdx, VkDeviceMemory mem, VkDeviceSize offset); +typedef VkResult (VKAPI *PFN_vkBindObjectMemory)(VkDevice device, VkObjectType objType, VkObject object, VkDeviceMemory mem, VkDeviceSize memOffset); typedef VkResult (VKAPI *PFN_vkGetObjectMemoryRequirements)(VkDevice device, VkObjectType objType, VkObject object, VkMemoryRequirements* pMemoryRequirements); typedef VkResult (VKAPI *PFN_vkQueueBindObjectMemoryRange)(VkQueue queue, VkObjectType objType, VkObject object, uint32_t allocationIdx, VkDeviceSize rangeOffset, VkDeviceSize rangeSize, VkDeviceMemory mem, VkDeviceSize memOffset); typedef VkResult (VKAPI *PFN_vkQueueBindImageMemoryRange)(VkQueue queue, VkImage image, uint32_t allocationIdx, const VkImageMemoryBindInfo* pBindInfo, VkDeviceMemory mem, VkDeviceSize memOffset); @@ -2113,11 +2113,10 @@ VkResult VKAPI vkDestroyObject( VkObjectType objType, VkObject object); -VkResult VKAPI vkQueueBindObjectMemory( - VkQueue queue, +VkResult VKAPI vkBindObjectMemory( + VkDevice device, VkObjectType objType, VkObject object, - uint32_t allocationIdx, VkDeviceMemory mem, VkDeviceSize memOffset); diff --git a/src/vulkan/device.c b/src/vulkan/device.c index 22fbb0e6431..0963acf9856 100644 --- a/src/vulkan/device.c +++ b/src/vulkan/device.c @@ -1118,11 +1118,10 @@ VkResult anv_GetObjectMemoryRequirements( return VK_SUCCESS; } -VkResult anv_QueueBindObjectMemory( - VkQueue queue, +VkResult anv_BindObjectMemory( + VkDevice device, VkObjectType objType, VkObject object, - uint32_t allocationIdx, VkDeviceMemory _mem, VkDeviceSize memOffset) { @@ -1144,7 +1143,7 @@ VkResult anv_QueueBindObjectMemory( default: break; } - + return VK_SUCCESS; } diff --git a/src/vulkan/x11.c b/src/vulkan/x11.c index a98d5e2607b..ee9cdcdd51c 100644 --- a/src/vulkan/x11.c +++ b/src/vulkan/x11.c @@ -147,10 +147,10 @@ VkResult anv_CreateSwapChainWSI( }, (VkDeviceMemory *) &memory); - anv_QueueBindObjectMemory(VK_NULL_HANDLE, - VK_OBJECT_TYPE_IMAGE, - (VkImage) image, 0, - (VkDeviceMemory) memory, 0); + anv_BindObjectMemory(VK_NULL_HANDLE, + VK_OBJECT_TYPE_IMAGE, + (VkImage) image, + (VkDeviceMemory) memory, 0); ret = anv_gem_set_tiling(device, memory->bo.gem_handle, surface->stride, I915_TILING_X);