Browse Source

Vk: rename private Device member for clarity.

pull/491/head
Vladimír Vondruš 5 years ago
parent
commit
71b2fca3d8
  1. 8
      src/Magnum/Vk/Device.cpp
  2. 4
      src/Magnum/Vk/Device.h

8
src/Magnum/Vk/Device.cpp

@ -423,7 +423,7 @@ Device::Device(NoCreateT): _handle{}, _functionPointers{} {}
Device::Device(Device&& other) noexcept: _handle{other._handle}, Device::Device(Device&& other) noexcept: _handle{other._handle},
_flags{other._flags}, _version{other._version}, _flags{other._flags}, _version{other._version},
_extensionStatus{other._extensionStatus}, _properties{std::move(other._properties)}, _state{std::move(other._state)}, _enabledExtensions{other._enabledExtensions}, _properties{std::move(other._properties)}, _state{std::move(other._state)},
/* Can't use {} with GCC 4.8 here because it tries to initialize the first /* Can't use {} with GCC 4.8 here because it tries to initialize the first
member instead of doing a copy */ member instead of doing a copy */
_functionPointers(other._functionPointers) _functionPointers(other._functionPointers)
@ -442,7 +442,7 @@ Device& Device::operator=(Device&& other) noexcept {
swap(other._handle, _handle); swap(other._handle, _handle);
swap(other._flags, _flags); swap(other._flags, _flags);
swap(other._version, _version); swap(other._version, _version);
swap(other._extensionStatus, _extensionStatus); swap(other._enabledExtensions, _enabledExtensions);
swap(other._properties, _properties); swap(other._properties, _properties);
swap(other._state, _state); swap(other._state, _state);
swap(other._functionPointers, _functionPointers); swap(other._functionPointers, _functionPointers);
@ -462,7 +462,7 @@ template<class T> void Device::initializeExtensions(const Containers::ArrayView<
return a.string() < static_cast<const Containers::StringView&>(b); return a.string() < static_cast<const Containers::StringView&>(b);
}); });
if(found->string() != extension) continue; if(found->string() != extension) continue;
_extensionStatus.set(found->index(), true); _enabledExtensions.set(found->index(), true);
} }
} }
} }
@ -477,7 +477,7 @@ void Device::initialize(Instance& instance, const Version version) {
} }
bool Device::isExtensionEnabled(const Extension& extension) const { bool Device::isExtensionEnabled(const Extension& extension) const {
return _extensionStatus[extension.index()]; return _enabledExtensions[extension.index()];
} }
VkDevice Device::release() { VkDevice Device::release() {

4
src/Magnum/Vk/Device.h

@ -289,7 +289,7 @@ class MAGNUM_VK_EXPORT Device {
*/ */
template<class E> bool isExtensionEnabled() const { template<class E> bool isExtensionEnabled() const {
static_assert(Implementation::IsExtension<E>::value, "expected a Vulkan device extension"); static_assert(Implementation::IsExtension<E>::value, "expected a Vulkan device extension");
return _extensionStatus[E::Index]; return _enabledExtensions[E::Index];
} }
/** @overload */ /** @overload */
@ -352,7 +352,7 @@ class MAGNUM_VK_EXPORT Device {
VkDevice _handle; VkDevice _handle;
HandleFlags _flags; HandleFlags _flags;
Version _version; Version _version;
Math::BoolVector<Implementation::ExtensionCount> _extensionStatus; Math::BoolVector<Implementation::ExtensionCount> _enabledExtensions;
Containers::Pointer<DeviceProperties> _properties; Containers::Pointer<DeviceProperties> _properties;
Containers::Pointer<Implementation::DeviceState> _state; Containers::Pointer<Implementation::DeviceState> _state;

Loading…
Cancel
Save