bugfix
This commit is contained in:
parent
228fafbbbb
commit
d639159948
@ -21,8 +21,11 @@ namespace idk
|
|||||||
inline Res& ResourceManager::Get(const RscHandle<Res>& handle)
|
inline Res& ResourceManager::Get(const RscHandle<Res>& handle)
|
||||||
{
|
{
|
||||||
auto& table = GetTable<Res>();
|
auto& table = GetTable<Res>();
|
||||||
const auto itr = table.find(handle.guid);
|
auto itr = table.find(handle.guid);
|
||||||
if (itr == table.end())
|
if (itr == table.end() && handle.guid.Data1 == 0 && handle.guid.Data2 == 0) {
|
||||||
|
itr = table.begin();
|
||||||
|
}
|
||||||
|
if (itr == table.end())
|
||||||
return GetDefaultRes<Res>();
|
return GetDefaultRes<Res>();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -310,7 +310,7 @@ namespace idk::vkn
|
|||||||
{
|
{
|
||||||
result.present_family = static_cast<uint32_t>(i);
|
result.present_family = static_cast<uint32_t>(i);
|
||||||
}
|
}
|
||||||
if (family.queueFlags & vk::QueueFlagBits::eGraphics && family.queueCount>2)
|
if (family.queueFlags & vk::QueueFlagBits::eGraphics)
|
||||||
{
|
{
|
||||||
result.graphics_family = static_cast<uint32_t>(i);
|
result.graphics_family = static_cast<uint32_t>(i);
|
||||||
}
|
}
|
||||||
@ -406,7 +406,7 @@ namespace idk::vkn
|
|||||||
{
|
{
|
||||||
QueueFamilyIndices indices = findQueueFamilies(pdevice);
|
QueueFamilyIndices indices = findQueueFamilies(pdevice);
|
||||||
m_queue_family = indices;
|
m_queue_family = indices;
|
||||||
constexpr uint32_t num_queues = 2;//this be hack
|
constexpr uint32_t num_queues = 1;//this be hack
|
||||||
float queuePriority[num_queues] = {};
|
float queuePriority[num_queues] = {};
|
||||||
int num = 1;
|
int num = 1;
|
||||||
for (auto& queuePri : queuePriority)
|
for (auto& queuePri : queuePriority)
|
||||||
@ -455,7 +455,7 @@ namespace idk::vkn
|
|||||||
//m_device.~UniqueHandle();
|
//m_device.~UniqueHandle();
|
||||||
m_device = vk::UniqueDevice{ pdevice.createDevice(createInfo, nullptr, dispatcher) };
|
m_device = vk::UniqueDevice{ pdevice.createDevice(createInfo, nullptr, dispatcher) };
|
||||||
m_graphics_queue = m_device->getQueue(*m_queue_family.graphics_family, 0, dispatcher);
|
m_graphics_queue = m_device->getQueue(*m_queue_family.graphics_family, 0, dispatcher);
|
||||||
m_graphics_tex_queue = m_device->getQueue(*m_queue_family.graphics_family, 1, dispatcher);
|
m_graphics_tex_queue = m_graphics_queue;
|
||||||
m_present_queue = m_device->getQueue(*m_queue_family.present_family, 0, dispatcher);
|
m_present_queue = m_device->getQueue(*m_queue_family.present_family, 0, dispatcher);
|
||||||
//m_transfer_queue = m_device->getQueue(*m_queue_family.transfer_family, 0, dispatcher);
|
//m_transfer_queue = m_device->getQueue(*m_queue_family.transfer_family, 0, dispatcher);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user