summaryrefslogtreecommitdiffstats
path: root/src/vulkan/wsi/wsi_common.h
diff options
context:
space:
mode:
authorDaniel Stone <[email protected]>2017-07-20 11:51:48 +0100
committerJason Ekstrand <[email protected]>2017-12-04 10:04:19 -0800
commitc1163f7b1c3f56bb268f61205a67f019806ae785 (patch)
tree340277936ee22565d86fddae622a8efc266f7c42 /src/vulkan/wsi/wsi_common.h
parent2cbeb32555421ae302222e6e730b412c82742d74 (diff)
vulkan/wsi: Add a wsi_image structure
This is used to hold information about the allocated image, rather than an ever-growing function argument list. v2 (Jason Ekstrand): - Rename wsi_image_base to wsi_image Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/vulkan/wsi/wsi_common.h')
-rw-r--r--src/vulkan/wsi/wsi_common.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/vulkan/wsi/wsi_common.h b/src/vulkan/wsi/wsi_common.h
index 7be0182adfa..565219d4e26 100644
--- a/src/vulkan/wsi/wsi_common.h
+++ b/src/vulkan/wsi/wsi_common.h
@@ -30,6 +30,15 @@
#include <vulkan/vulkan.h>
#include <vulkan/vk_icd.h>
+struct wsi_image {
+ VkImage image;
+ VkDeviceMemory memory;
+ uint32_t size;
+ uint32_t offset;
+ uint32_t row_pitch;
+ int fd;
+};
+
struct wsi_device;
struct wsi_image_fns {
VkResult (*create_wsi_image)(VkDevice device_h,
@@ -37,16 +46,10 @@ struct wsi_image_fns {
const VkAllocationCallbacks *pAllocator,
bool needs_linear_copy,
bool linear,
- VkImage *image_p,
- VkDeviceMemory *memory_p,
- uint32_t *size_p,
- uint32_t *offset_p,
- uint32_t *row_pitch_p,
- int *fd_p);
+ struct wsi_image *image_p);
void (*free_wsi_image)(VkDevice device,
const VkAllocationCallbacks *pAllocator,
- VkImage image_h,
- VkDeviceMemory memory_h);
+ struct wsi_image *image);
};
struct wsi_swapchain {