fixed vulkan (DOES NOT COMPILE)
This commit is contained in:
@@ -1,28 +1,24 @@
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS on)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
project(GryphnVulkanImpl)
|
||||
add_compile_definitions(GN_REVEAL_IMPL)
|
||||
|
||||
file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS
|
||||
"src/*.c" "src/*.h"
|
||||
)
|
||||
|
||||
file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS "src/*.c" "src/*.h")
|
||||
if (APPLE)
|
||||
file(GLOB_RECURSE METAL_FILES CONFIGURE_DEPENDS
|
||||
"src/*.m"
|
||||
)
|
||||
file(GLOB_RECURSE METAL_FILES CONFIGURE_DEPENDS "src/*.m")
|
||||
endif()
|
||||
|
||||
find_package(Vulkan REQUIRED)
|
||||
add_library(GryphnVulkanImpl STATIC ${SOURCE_FILES} ${METAL_FILES})
|
||||
target_link_libraries(GryphnVulkanImpl ${Vulkan_LIBRARY})
|
||||
|
||||
target_include_directories(GryphnVulkanImpl PUBLIC
|
||||
${Vulkan_INCLUDE_DIRS}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../../include/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../core/src/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../utils/
|
||||
src/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../../include/
|
||||
)
|
||||
add_compile_definitions(GN_REVEAL_IMPL)
|
||||
target_link_libraries(GryphnVulkanImpl ${Vulkan_LIBRARY})
|
||||
|
||||
if(WIN32)
|
||||
add_compile_definitions(GN_PLATFORM_WIN32)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include "vulkan_buffer.h"
|
||||
#include "core/buffers/gryphn_buffer.h"
|
||||
#include "core/output_device/gryphn_output_device.h"
|
||||
#include "buffers/gryphn_buffer.h"
|
||||
#include "output_device/gryphn_output_device.h"
|
||||
#include "output_device/vulkan_output_devices.h"
|
||||
#include "output_device/vulkan_physical_device.h"
|
||||
#include "commands/command_buffer/vulkan_command_buffer.h"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include <vulkan/vulkan.h>
|
||||
#include "utils/gryphn_bool.h"
|
||||
#include <core/buffers/gryphn_buffer.h>
|
||||
#include <buffers/gryphn_buffer.h>
|
||||
|
||||
typedef struct VkGryphnBuffer {
|
||||
VkBuffer buffer;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include "core/command/command_buffer/gryphn_command_buffer.h"
|
||||
#include "command/command_buffer/gryphn_command_buffer.h"
|
||||
#include "utils/gryphn_bool.h"
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include <vulkan/vulkan.h>
|
||||
#include "core/command/command_pool/gryphn_command_pool.h"
|
||||
#include "command/command_pool/gryphn_command_pool.h"
|
||||
|
||||
typedef struct gnPlatformCommandPool_t {
|
||||
VkCommandPool commandPool;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include <vulkan/vulkan.h>
|
||||
#include "core/command/commands/gryphn_command.h"
|
||||
#include "command/commands/gryphn_command.h"
|
||||
#include <renderpass/vulkan_render_pass_descriptor.h>
|
||||
#include "framebuffers/vulkan_framebuffer.h"
|
||||
#include "commands/command_buffer/vulkan_command_buffer.h"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include <vulkan/vulkan.h>
|
||||
#include <core/debugger/gryphn_debugger.h>
|
||||
#include <debugger/gryphn_debugger.h>
|
||||
|
||||
typedef struct gnPlatformDebugger_t {
|
||||
VkDebugUtilsMessengerEXT debugMessenger;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include "core/framebuffer/gryphn_framebuffer.h"
|
||||
#include "framebuffer/gryphn_framebuffer.h"
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
typedef struct gnPlatformFramebuffer_t {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include <vulkan/vulkan.h>
|
||||
#include "core/debugger/gryphn_debugger.h"
|
||||
#include "core/instance/gryphn_instance.h"
|
||||
#include "debugger/gryphn_debugger.h"
|
||||
#include "instance/gryphn_instance.h"
|
||||
|
||||
struct gnInstanceMessage {
|
||||
gnMessageSeverity severity;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#include <output_device/vulkan_physical_device.h>
|
||||
#include <output_device/vulkan_output_devices.h>
|
||||
#include "vulkan_device_extensions.h"
|
||||
#include "core/instance/gryphn_instance.h"
|
||||
#include "instance/gryphn_instance.h"
|
||||
#include "commands/command_buffer/vulkan_command_buffer.h"
|
||||
|
||||
gnReturnCode gnCreateOutputDeviceFn(gnOutputDeviceHandle outputDevice, gnInstanceHandle instance, gnOutputDeviceInfo deviceInfo) {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include <vulkan/vulkan.h>
|
||||
#include <core/output_device/gryphn_output_device.h>
|
||||
#include <output_device/gryphn_output_device.h>
|
||||
|
||||
typedef struct gnPlatformOutputDevice_t {
|
||||
VkDevice device;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include <vulkan/vulkan.h>
|
||||
#include <core/output_device/gryphn_physical_output_device.h>
|
||||
#include <output_device/gryphn_physical_output_device.h>
|
||||
|
||||
typedef struct gnPlatformPhysicalDevice_t {
|
||||
VkPhysicalDevice device;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <core/pipelines/graphics_pipeline/gryphn_graphics_pipeline.h>
|
||||
#include <pipelines/graphics_pipeline/gryphn_graphics_pipeline.h>
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
typedef struct gnPlatformGraphicsPipeline_t {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include "core/present/gryphn_present.h"
|
||||
#include "present/gryphn_present.h"
|
||||
#include "sync/semaphore/vulkan_semaphore.h"
|
||||
#include "presentation_queue/vulkan_presentation_queue.h"
|
||||
#include "output_device/vulkan_output_devices.h"
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#include "vulkan_swapchain_support.h"
|
||||
#include <output_device/vulkan_physical_device.h>
|
||||
#include "vulkan_surface/vulkan_surface.h"
|
||||
#include "core/debugger/gryphn_debugger.h"
|
||||
#include "debugger/gryphn_debugger.h"
|
||||
#include "textures/vulkan_texture.h"
|
||||
#include "sync/semaphore/vulkan_semaphore.h"
|
||||
#include "stdio.h"
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include "core/presentation_queue/gryphn_presentation_queue.h"
|
||||
#include "presentation_queue/gryphn_presentation_queue.h"
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
typedef struct gnPlatformPresentationQueue_t {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include "core/renderpass/gryphn_render_pass_descriptor.h"
|
||||
#include "renderpass/gryphn_render_pass_descriptor.h"
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
typedef struct gnPlatformRenderPassDescriptor_t {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <core/shader_module/gryphn_shader_module.h>
|
||||
#include <shader_module/gryphn_shader_module.h>
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
typedef struct gnPlatformShaderModule_t {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include <vulkan/vulkan.h>
|
||||
#include "core/submit/gryphn_submit.h"
|
||||
#include "submit/gryphn_submit.h"
|
||||
#include "sync/semaphore/vulkan_semaphore.h"
|
||||
#include "sync/fence/vulkan_fence.h"
|
||||
#include "commands/command_buffer/vulkan_command_buffer.h"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include <vulkan/vulkan.h>
|
||||
#include "core/sync/fence/gryphn_fence.h"
|
||||
#include "sync/fence/gryphn_fence.h"
|
||||
|
||||
typedef struct gnPlatformFence_t {
|
||||
VkFence fence;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include <vulkan/vulkan.h>
|
||||
#include "core/sync/semaphore/gryphn_semaphore.h"
|
||||
#include "sync/semaphore/gryphn_semaphore.h"
|
||||
|
||||
typedef struct gnPlatformSemaphore_t {
|
||||
VkSemaphore semaphore;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#include "vulkan_texture.h"
|
||||
#include "output_device/vulkan_output_devices.h"
|
||||
#include "output_device/vulkan_physical_device.h"
|
||||
#include "core/debugger/gryphn_debugger.h"
|
||||
#include "debugger/gryphn_debugger.h"
|
||||
|
||||
VkImageType vkGryphnTextureType(gnTextureType type) {
|
||||
switch(type) {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include <vulkan/vulkan.h>
|
||||
#include "core/textures/gryphn_texture.h"
|
||||
#include "textures/gryphn_texture.h"
|
||||
#include "buffers/vulkan_buffer.h"
|
||||
|
||||
typedef struct VkGryphnImage {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "vulkan_uniform.h"
|
||||
#include "buffers/vulkan_buffer.h"
|
||||
#include "output_device/vulkan_output_devices.h"
|
||||
#include "core/uniforms/gryphn_uniform_pool.h"
|
||||
#include "uniforms/gryphn_uniform_pool.h"
|
||||
#include "textures/vulkan_texture.h"
|
||||
|
||||
void gnUpdateBufferUniformFn(gnUniform uniform, gnBufferUniformInfo* info) {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include <vulkan/vulkan.h>
|
||||
#include "core/uniforms/gryphn_uniform.h"
|
||||
#include "uniforms/gryphn_uniform.h"
|
||||
|
||||
typedef struct gnPlatformUniform_t {
|
||||
VkDescriptorSet set;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include <vulkan/vulkan.h>
|
||||
#include <core/uniforms/gryphn_uniform_layout.h>
|
||||
#include <uniforms/gryphn_uniform_layout.h>
|
||||
|
||||
VkDescriptorSetLayout vkGryphnCreateSetLayouts(const gnUniformSet* set, VkDevice device);
|
||||
VkDescriptorType vkGryphnUniformType(gnUniformType type);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#include "vulkan_uniform_layout.h"
|
||||
#include "stdlib.h"
|
||||
#include "output_device/vulkan_output_devices.h"
|
||||
#include "core/uniforms/gryphn_uniform.h"
|
||||
#include "uniforms/gryphn_uniform.h"
|
||||
#include "vulkan_uniform.h"
|
||||
#include "stdio.h"
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include <vulkan/vulkan.h>
|
||||
#include <core/uniforms/gryphn_uniform_pool.h>
|
||||
#include <uniforms/gryphn_uniform_pool.h>
|
||||
|
||||
GN_ARRAY_LIST(VkDescriptorSetLayout);
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include <core/window_surface/gryphn_surface_create_functions.h>
|
||||
#include <window_surface/gryphn_surface_create_functions.h>
|
||||
#include <instance/vulkan_instance.h>
|
||||
#include "vulkan_surface.h"
|
||||
#include <output_device/vulkan_physical_device.h>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <core/window_surface/gryphn_surface.h>
|
||||
#include <window_surface/gryphn_surface.h>
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
typedef struct gnPlatformWindowSurface_t {
|
||||
|
Reference in New Issue
Block a user