Skip to content

Commit 2ac6c9b

Browse files
committed
Merge branch 'master' of github.com:Devsh-Graphics-Programming/Nabla
2 parents 142f518 + d4acc27 commit 2ac6c9b

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

include/nbl/video/IGPUQueue.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class IGPUQueue : public core::Interface, public core::Unmovable
1515
public:
1616
enum E_CREATE_FLAGS : uint32_t
1717
{
18+
ECF_NONE = 0x0,
1819
ECF_PROTECTED_BIT = 0x01
1920
};
2021

include/nbl/video/IPhysicalDevice.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,8 @@ class NBL_API2 IPhysicalDevice : public core::Interface, public core::Unmovable
728728
} m_formatPromotionCache;
729729
};
730730

731+
NBL_ENUM_ADD_BITWISE_OPERATORS(IPhysicalDevice::E_QUEUE_FLAGS)
732+
731733
}
732734

733735
namespace std

include/nbl/video/utilities/SPhysicalDeviceFilter.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace nbl::video
2222
size_t size = 0ull;
2323
core::bitflag<IDeviceMemoryAllocation::E_MEMORY_PROPERTY_FLAGS> memoryFlags = IDeviceMemoryAllocation::E_MEMORY_PROPERTY_FLAGS::EMPF_NONE;
2424
};
25-
MemoryRequirement* memoryRequirements = nullptr;
25+
const MemoryRequirement* memoryRequirements = nullptr;
2626
uint32_t memoryRequirementsCount = 0u;
2727

2828
struct QueueRequirement
@@ -33,7 +33,7 @@ namespace nbl::video
3333
// family's transfer granularity needs to be <=
3434
asset::VkExtent3D maxImageTransferGranularity = {0x80000000u,0x80000000u,0x80000000u};
3535
};
36-
QueueRequirement* queueRequirements = nullptr;
36+
const QueueRequirement* queueRequirements = nullptr;
3737
uint32_t queueRequirementsCount = 0u;
3838

3939
// To determine whether a queue family of a physical device supports presentation to a given surface
@@ -49,9 +49,9 @@ namespace nbl::video
4949

5050

5151
// sift through multiple devices
52-
core::set<const IPhysicalDevice*> operator()(core::SRange<const IPhysicalDevice* const> physicalDevices) const
52+
core::set<IPhysicalDevice*> operator()(const core::SRange<IPhysicalDevice* const>& physicalDevices) const
5353
{
54-
core::set<const IPhysicalDevice*> ret;
54+
core::set<IPhysicalDevice*> ret;
5555
for (auto& physDev : physicalDevices)
5656
if (meetsRequirements(physDev))
5757
ret.insert(physDev);
@@ -168,9 +168,9 @@ namespace nbl::video
168168
if ((queueFamilyProps.queueFlags & queueReqs.disallowedFlags).value == 0)
169169
{
170170
// imageTransferGranularity
171-
if (queueReqs.maxImageTransferGranularity.width > queueFamilyProps.minImageTransferGranularity.width &&
172-
queueReqs.maxImageTransferGranularity.height > queueFamilyProps.minImageTransferGranularity.height &&
173-
queueReqs.maxImageTransferGranularity.depth > queueFamilyProps.minImageTransferGranularity.depth)
171+
if (queueReqs.maxImageTransferGranularity.width >= queueFamilyProps.minImageTransferGranularity.width &&
172+
queueReqs.maxImageTransferGranularity.height >= queueFamilyProps.minImageTransferGranularity.height &&
173+
queueReqs.maxImageTransferGranularity.depth >= queueFamilyProps.minImageTransferGranularity.depth)
174174
{
175175
queueCount = (queueFamilyProps.queueCount > queueCount) ? 0ull : queueCount - queueFamilyProps.queueCount;
176176
}

0 commit comments

Comments
 (0)