initial commit

This commit is contained in:
Johanness
2026-05-18 00:03:06 +03:00
commit ea7e73d6a4
183 changed files with 34479 additions and 0 deletions
+73
View File
@@ -0,0 +1,73 @@
#pragma once
#include <vulkan/vulkan.h>
#include <cstdint>
uint32_t findMemoryType(
VkPhysicalDevice physicalDevice,
uint32_t typeFilter,
VkMemoryPropertyFlags properties);
void createBuffer(
VkDevice device,
VkPhysicalDevice physicalDevice,
VkDeviceSize size,
VkBufferUsageFlags usage,
VkMemoryPropertyFlags properties,
VkBuffer& buffer,
VkDeviceMemory& bufferMemory);
VkCommandBuffer beginSingleTimeCommands(
VkDevice device,
VkCommandPool commandPool);
void endSingleTimeCommands(
VkDevice device,
VkCommandPool commandPool,
VkQueue graphicsQueue,
VkCommandBuffer commandBuffer);
void createImage(
VkDevice device,
VkPhysicalDevice physicalDevice,
uint32_t width,
uint32_t height,
VkFormat format,
VkImageTiling tiling,
VkImageUsageFlags usage,
VkMemoryPropertyFlags properties,
VkImage& image,
VkDeviceMemory& imageMemory);
void recordImageLayoutTransition(
VkCommandBuffer commandBuffer,
VkImage image,
VkFormat format,
VkImageLayout oldLayout,
VkImageLayout newLayout);
void transitionImageLayout(
VkDevice device,
VkCommandPool commandPool,
VkQueue graphicsQueue,
VkImage image,
VkFormat format,
VkImageLayout oldLayout,
VkImageLayout newLayout);
void recordCopyBufferToImage(
VkCommandBuffer commandBuffer,
VkBuffer buffer,
VkImage image,
uint32_t width,
uint32_t height);
void copyBufferToImage(
VkDevice device,
VkCommandPool commandPool,
VkQueue graphicsQueue,
VkBuffer buffer,
VkImage image,
uint32_t width,
uint32_t height);