Separate out the generic memory stuff

This commit is contained in:
Bill Currie 2020-02-10 18:33:29 +09:00
parent 9fdc15c439
commit 43e37aa31e
4 changed files with 13 additions and 8 deletions

View file

@ -6,11 +6,6 @@ typedef struct qfv_buffer_s {
VkBuffer buffer;
} qfv_buffer_t;
typedef struct qfv_memory_s {
struct qfv_device_s *device;
VkDeviceMemory object;
} qfv_memory_t;
typedef struct qfv_buffertransition_s {
qfv_buffer_t *buffer;
VkAccessFlags srcAccess;
@ -41,11 +36,11 @@ qfv_buffer_t *QFV_CreateBuffer (struct qfv_device_s *device,
VkDeviceSize size,
VkBufferUsageFlags usage);
qfv_memory_t *QFV_AllocBufferMemory (qfv_buffer_t *buffer,
struct qfv_memory_s *QFV_AllocBufferMemory (qfv_buffer_t *buffer,
VkMemoryPropertyFlags properties,
VkDeviceSize size, VkDeviceSize offset);
int QFV_BindBufferMemory (qfv_buffer_t *buffer, qfv_memory_t *memory,
int QFV_BindBufferMemory (qfv_buffer_t *buffer, struct qfv_memory_s *memory,
VkDeviceSize offset);
qfv_bufferbarrierset_t *

View file

@ -0,0 +1,9 @@
#ifndef __QF_Vulkan_memory_h
#define __QF_Vulkan_memory_h
typedef struct qfv_memory_s {
struct qfv_device_s *device;
VkDeviceMemory object;
} qfv_memory_t;
#endif//__QF_Vulkan_memory_h

View file

@ -52,6 +52,7 @@
#include "QF/Vulkan/buffer.h"
#include "QF/Vulkan/device.h"
#include "QF/Vulkan/instance.h"
#include "QF/Vulkan/memory.h"
#include "compat.h"
#include "d_iface.h"

View file

@ -49,10 +49,10 @@
#include "QF/va.h"
#include "QF/vid.h"
#include "QF/Vulkan/qf_vid.h"
#include "QF/Vulkan/buffer.h"//FIXME qfv_memory_t
#include "QF/Vulkan/device.h"
#include "QF/Vulkan/image.h"
#include "QF/Vulkan/instance.h"
#include "QF/Vulkan/memory.h"
#include "compat.h"
#include "d_iface.h"