1#ifndef NNGN_GRAPHICS_VULKAN_DEVICE_H
2#define NNGN_GRAPHICS_VULKAN_DEVICE_H
23 VkDevice
id(
void)
const {
return this->
h; }
41 std::span<const char *const> extensions,
42 std::span<const char *const> layers,
43 const VkPhysicalDeviceFeatures &features);
45 VkFilter filter, VkSamplerAddressMode addr_mode, VkBorderColor border,
46 VkSamplerMipmapMode mip_mode, std::uint32_t mip_levels)
const;
50 std::string_view
name, std::span<const std::uint8_t> src)
const;
52 VkPhysicalDevice
ph = {};
60 VkPhysicalDevice
dev = {};
65 void init(VkSurfaceKHR
s, VkPhysicalDevice d);
73 std::tuple<bool, std::uint32_t, std::uint32_t>
find_queues()
const;
75 bool can_present(VkSurfaceKHR surface, std::size_t queue_family)
const;
name
Definition cathedral.lua:11
Owning wrapper for a VkDevice.
Definition device.h:16
VkDevice h
Definition device.h:53
VkQueue graphics_queue(void) const
Queue used for graphics operations.
Definition device.h:29
VkSampler create_sampler(VkFilter filter, VkSamplerAddressMode addr_mode, VkBorderColor border, VkSamplerMipmapMode mip_mode, std::uint32_t mip_levels) const
Definition device.cpp:96
VkQueue graphics
Definition device.h:55
VkQueue present_queue(void) const
Queue used for presentation, may be the same as graphics_queue.
Definition device.h:31
VkShaderModule create_shader(const Instance &inst, std::string_view name, std::span< const std::uint8_t > src) const
Compiles and names a shader module from source.
Definition device.cpp:120
struct nngn::Device::@13 queues
std::uint32_t present
Definition device.h:54
std::uint32_t graphics
Definition device.h:54
struct nngn::Device::@12 families
std::uint32_t graphics_family(void) const
Family of the queue returned by graphics_queue.
Definition device.h:78
VkPhysicalDevice physical_dev(void) const
Definition device.h:22
VkDevice id(void) const
Definition device.h:23
std::uint32_t present_family(void) const
Family of the queue returned by present_queue.
Definition device.h:82
VkPhysicalDevice ph
Definition device.h:52
Owning wrapper for a Vulkan instance.
Definition instance.h:19
init
Definition img_common.lua:34
#define NNGN_MOVE_ONLY(x)
Definition utils.h:39
Aggregate type for information about a physical device.
Definition device.h:59
std::vector< Graphics::Extension > extensions
Definition device.h:62
Graphics::DeviceInfo info
Definition device.h:61
std::tuple< bool, std::uint32_t, std::uint32_t > find_queues() const
Finds queue families that support graphics and presentation.
Definition device.cpp:180
std::vector< Graphics::QueueFamily > queue_families
Definition device.h:63
bool can_present(VkSurfaceKHR surface, std::size_t queue_family) const
Definition device.cpp:204
VkPhysicalDevice dev
Definition device.h:60
Definition graphics.h:185
std::chrono::seconds s
Definition timing.cpp:6