// or project specific include files. //we will add our main reusable types here #pragma once #include #include #include #include #include #include #include #include #include // #include #include #include #include #include #define VK_CHECK(x)\ do {\ VkResult err = x;\ if (err) {\ std::println("Detected Vulkan error: {}", int(err));\ }\ } while (0) constexpr unsigned int FRAME_OVERLAP=2; struct AllocatedBuffer { VkBuffer buffer; VmaAllocation allocation; VmaAllocationInfo info; }; struct AllocatedImage { VkImage image; VkImageView imageView; VmaAllocation allocation; VkExtent3D imageExtent; VkFormat imageFormat; }; struct ComputePushConstants { glm::vec4 data1; glm::vec4 data2; glm::vec4 data3; glm::vec4 data4; }; struct ComputeEffect { const char *name; VkPipeline pipeline; VkPipelineLayout layout; ComputePushConstants data; }; struct Vertex { glm::vec3 position; float uv_x; glm::vec3 normal; float uv_y; glm::vec4 color; }; struct GPUMeshBuffers { AllocatedBuffer indexBuffer; AllocatedBuffer vertexBuffer; VkDeviceAddress vertexBufferAddress; }; struct GPUDrawPushConstants { glm::mat4 worldMatrix; VkDeviceAddress vertexBuffer; };