Adding transparency support

This commit is contained in:
Dynamitos
2024-06-20 21:57:26 +02:00
parent 2dc9d57c71
commit bd63b14260
27 changed files with 578 additions and 282 deletions
+4 -1
View File
@@ -22,13 +22,15 @@ class BufferAllocation : public CommandBoundResource {
VmaAllocationInfo info = VmaAllocationInfo();
VkMemoryPropertyFlags properties = 0;
uint64 size = 0;
std::string name;
VkDeviceAddress deviceAddress;
Gfx::QueueType owner;
};
DEFINE_REF(BufferAllocation);
class Buffer {
public:
Buffer(PGraphics graphics, uint64 size, VkBufferUsageFlags usage, Gfx::QueueType initialOwner, bool dynamic, std::string name, uint32 clearValue = 0);
Buffer(PGraphics graphics, uint64 size, VkBufferUsageFlags usage, Gfx::QueueType initialOwner, bool dynamic, std::string name,
bool createCleared = false, uint32 clearValue = 0);
virtual ~Buffer();
VkBuffer getHandle() const { return buffers[currentBuffer]->buffer; }
VkDeviceAddress getDeviceAddress() const { return buffers[currentBuffer]->deviceAddress; }
@@ -44,6 +46,7 @@ class Buffer {
Array<OBufferAllocation> buffers;
VkBufferUsageFlags usage;
bool dynamic;
bool createCleared;
std::string name;
uint32 clearValue;
void rotateBuffer(uint64 size, bool preserveContents = false);