From 249652fc1ec801a0d7070679161c27cf9fff7747 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 28 Jan 2021 15:03:04 -0600 Subject: [PATCH] lavapipe: Drop some wrappers in favor of common code Part-of: --- src/gallium/frontends/lavapipe/lvp_device.c | 34 ------------------------- src/gallium/frontends/lavapipe/lvp_formats.c | 37 ---------------------------- 2 files changed, 71 deletions(-) diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c index 2a2e261..0193fbf 100644 --- a/src/gallium/frontends/lavapipe/lvp_device.c +++ b/src/gallium/frontends/lavapipe/lvp_device.c @@ -1224,23 +1224,6 @@ VkResult lvp_BindBufferMemory2(VkDevice _device, return VK_SUCCESS; } -VkResult lvp_BindBufferMemory( - VkDevice _device, - VkBuffer _buffer, - VkDeviceMemory _memory, - VkDeviceSize memoryOffset) -{ - LVP_FROM_HANDLE(lvp_device, device, _device); - LVP_FROM_HANDLE(lvp_device_memory, mem, _memory); - LVP_FROM_HANDLE(lvp_buffer, buffer, _buffer); - - device->pscreen->resource_bind_backing(device->pscreen, - buffer->bo, - mem->pmem, - memoryOffset); - return VK_SUCCESS; -} - VkResult lvp_BindImageMemory2(VkDevice _device, uint32_t bindInfoCount, const VkBindImageMemoryInfo *pBindInfos) @@ -1258,23 +1241,6 @@ VkResult lvp_BindImageMemory2(VkDevice _device, return VK_SUCCESS; } -VkResult lvp_BindImageMemory( - VkDevice _device, - VkImage _image, - VkDeviceMemory _memory, - VkDeviceSize memoryOffset) -{ - LVP_FROM_HANDLE(lvp_device, device, _device); - LVP_FROM_HANDLE(lvp_device_memory, mem, _memory); - LVP_FROM_HANDLE(lvp_image, image, _image); - - device->pscreen->resource_bind_backing(device->pscreen, - image->bo, - mem->pmem, - memoryOffset); - return VK_SUCCESS; -} - VkResult lvp_QueueBindSparse( VkQueue queue, uint32_t bindInfoCount, diff --git a/src/gallium/frontends/lavapipe/lvp_formats.c b/src/gallium/frontends/lavapipe/lvp_formats.c index 3deafa5..0c0d9e6 100644 --- a/src/gallium/frontends/lavapipe/lvp_formats.c +++ b/src/gallium/frontends/lavapipe/lvp_formats.c @@ -236,18 +236,6 @@ lvp_physical_device_get_format_properties(struct lvp_physical_device *physical_d return; } -void lvp_GetPhysicalDeviceFormatProperties( - VkPhysicalDevice physicalDevice, - VkFormat format, - VkFormatProperties* pFormatProperties) -{ - LVP_FROM_HANDLE(lvp_physical_device, physical_device, physicalDevice); - - lvp_physical_device_get_format_properties(physical_device, - format, - pFormatProperties); -} - void lvp_GetPhysicalDeviceFormatProperties2( VkPhysicalDevice physicalDevice, VkFormat format, @@ -382,31 +370,6 @@ static VkResult lvp_get_image_format_properties(struct lvp_physical_device *phys return VK_ERROR_FORMAT_NOT_SUPPORTED; } -VkResult lvp_GetPhysicalDeviceImageFormatProperties( - VkPhysicalDevice physicalDevice, - VkFormat format, - VkImageType type, - VkImageTiling tiling, - VkImageUsageFlags usage, - VkImageCreateFlags createFlags, - VkImageFormatProperties* pImageFormatProperties) -{ - LVP_FROM_HANDLE(lvp_physical_device, physical_device, physicalDevice); - - const VkPhysicalDeviceImageFormatInfo2 info = { - .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2, - .pNext = NULL, - .format = format, - .type = type, - .tiling = tiling, - .usage = usage, - .flags = createFlags, - }; - - return lvp_get_image_format_properties(physical_device, &info, - pImageFormatProperties); -} - VkResult lvp_GetPhysicalDeviceImageFormatProperties2( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2 *base_info, -- 2.7.4