vk/vulkan.h: Switch BindObjectMemory to a device function and remove the index
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 8 Jul 2015 16:04:16 +0000 (09:04 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 8 Jul 2015 16:04:16 +0000 (09:04 -0700)
include/vulkan/vulkan.h
src/vulkan/device.c
src/vulkan/x11.c

index ee8e41145092350292f33ca8a733af35ca00e37c..c0e087aae06548dd5bef881eac2bb42d8b5f1e89 100644 (file)
@@ -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);
 
index 22fbb0e6431f379e3559b5215e1240bc2ef798b5..0963acf9856239eadda05f80dc0909e58479685d 100644 (file)
@@ -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;
 }
 
index a98d5e2607b431bed61ee39988b17aa1c5853ffa..ee9cdcdd51c0b4d164d089562fbf8a8dbc4309a2 100644 (file)
@@ -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);