Vulkan/Device: Add getter for Physical Device
Former-commit-id: c880f3681186f73e1a08088949906b8cd0c04665 [formerly ee7385031b738cc97ba3657d68d62083745d5e63] Former-commit-id: 34779bccda27d0c601240e1f3b0ad2f4e0afec6c
This commit is contained in:
parent
f3f46b71fb
commit
99b6338aef
|
|
@ -39,6 +39,7 @@ namespace Nz
|
||||||
inline Instance& GetInstance();
|
inline Instance& GetInstance();
|
||||||
inline const Instance& GetInstance() const;
|
inline const Instance& GetInstance() const;
|
||||||
inline VkResult GetLastErrorCode() const;
|
inline VkResult GetLastErrorCode() const;
|
||||||
|
inline VkPhysicalDevice GetPhysicalDevice() const;
|
||||||
|
|
||||||
inline bool IsExtensionLoaded(const String& extensionName);
|
inline bool IsExtensionLoaded(const String& extensionName);
|
||||||
inline bool IsLayerLoaded(const String& layerName);
|
inline bool IsLayerLoaded(const String& layerName);
|
||||||
|
|
@ -190,6 +191,7 @@ namespace Nz
|
||||||
Instance& m_instance;
|
Instance& m_instance;
|
||||||
VkAllocationCallbacks m_allocator;
|
VkAllocationCallbacks m_allocator;
|
||||||
VkDevice m_device;
|
VkDevice m_device;
|
||||||
|
VkPhysicalDevice m_physicalDevice;
|
||||||
VkResult m_lastErrorCode;
|
VkResult m_lastErrorCode;
|
||||||
std::unordered_set<String> m_loadedExtensions;
|
std::unordered_set<String> m_loadedExtensions;
|
||||||
std::unordered_set<String> m_loadedLayers;
|
std::unordered_set<String> m_loadedLayers;
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,11 @@ namespace Nz
|
||||||
return m_lastErrorCode;
|
return m_lastErrorCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline VkPhysicalDevice Device::GetPhysicalDevice() const
|
||||||
|
{
|
||||||
|
return m_physicalDevice;
|
||||||
|
}
|
||||||
|
|
||||||
inline bool Device::IsExtensionLoaded(const String& extensionName)
|
inline bool Device::IsExtensionLoaded(const String& extensionName)
|
||||||
{
|
{
|
||||||
return m_loadedExtensions.count(extensionName) > 0;
|
return m_loadedExtensions.count(extensionName) > 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue