mirror of
https://github.com/PancakeTAS/lsfg-vk.git
synced 2026-05-10 19:21:42 +00:00
feat(bindless): Expose Vulkan instance & device
This commit is contained in:
parent
ff7dbb1ce9
commit
333522ac62
3 changed files with 25 additions and 1 deletions
|
|
@ -7,6 +7,10 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#ifdef LSFGVK_PRIV
|
||||
#include <vulkan/vulkan_core.h>
|
||||
#endif // LSFGVK_PRIV
|
||||
|
||||
namespace lsfgvk {
|
||||
|
||||
/// Forward declaration of implementation classes
|
||||
|
|
@ -40,6 +44,16 @@ namespace lsfgvk {
|
|||
bool allowFP16
|
||||
);
|
||||
|
||||
#ifdef LSFGVK_PRIV
|
||||
/// Get the underlying Vulkan instance handle
|
||||
/// @return Vulkan instance
|
||||
[[nodiscard]] VkInstance _instance() const;
|
||||
|
||||
/// Get the underlying Vulkan device handle
|
||||
/// @return Vulkan device
|
||||
[[nodiscard]] VkDevice _device() const;
|
||||
#endif // LSFGVK_PRIV
|
||||
|
||||
// Non-copyable, non-movable
|
||||
Instance(const Instance&) = delete;
|
||||
Instance& operator=(const Instance&) = delete;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
/* SPDX-License-Identifier: GPL-3.0-or-later */
|
||||
|
||||
#include "lsfg-vk/lsfgvk.hpp"
|
||||
#include "lsfgvk.hpp"
|
||||
#include "modules/library.hpp"
|
||||
#include "modules/pipeline.hpp"
|
||||
|
|
@ -228,4 +227,12 @@ Context::~Context() {
|
|||
}
|
||||
}
|
||||
|
||||
VkInstance Instance::_instance() const {
|
||||
return this->m_priv->vk.instance.get();
|
||||
}
|
||||
|
||||
VkDevice Instance::_device() const {
|
||||
return *this->m_priv->vk.device;
|
||||
}
|
||||
|
||||
Instance::~Instance() = default;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define LSFGVK_PRIV
|
||||
#include "lsfg-vk/lsfgvk.hpp" // IWYU pragma: export
|
||||
|
||||
#include "modules/pipeline.hpp"
|
||||
#include "modules/library.hpp"
|
||||
#include "utility/vkhelper.hpp"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue