mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-20 06:46:26 -04:00
vulkan: Device initialization
This initialized a Vulkan logical device according to compositor preference, but does not yet do anything with it.
This commit is contained in:
parent
9cf99ea4bf
commit
42caf8b387
5 changed files with 352 additions and 1 deletions
20
vulkan.h
Normal file
20
vulkan.h
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#pragma once
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
struct vulkan {
|
||||
VkInstance instance;
|
||||
VkPhysicalDevice *devices;
|
||||
uint32_t device_len;
|
||||
VkPhysicalDevice physical_device;
|
||||
|
||||
VkDevice device;
|
||||
|
||||
struct {
|
||||
PFN_vkGetMemoryFdKHR vkGetMemoryFdKHR;
|
||||
} api;
|
||||
};
|
||||
|
||||
void vulkan_destroy(struct vulkan *vk);
|
||||
struct vulkan *vulkan_create(dev_t preferred_device);
|
||||
Loading…
Add table
Add a link
Reference in a new issue