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