31 lines
747 B
C++
31 lines
747 B
C++
// =============================================
|
|
// Aster: device.h
|
|
// Copyright (c) 2020-2024 Anish Bhobe
|
|
// =============================================
|
|
|
|
#pragma once
|
|
|
|
#include "global.h"
|
|
#include "physical_device.h"
|
|
|
|
struct QueueAllocation
|
|
{
|
|
u32 m_Family;
|
|
u32 m_Count;
|
|
};
|
|
|
|
struct Device final
|
|
{
|
|
using NameString = eastl::fixed_string<char, 32, false>;
|
|
|
|
NameString m_Name;
|
|
std::unique_ptr<PhysicalDevice> m_PhysicalDevice;
|
|
vk::Device m_Device = nullptr;
|
|
VmaAllocator m_Allocator = nullptr;
|
|
|
|
Device(const Context *context, PhysicalDevice &&physicalDevice, const vk::PhysicalDeviceFeatures *enabledFeatures,
|
|
const eastl::vector<QueueAllocation> &queueAllocations, NameString name);
|
|
|
|
~Device();
|
|
};
|