Get everything to work
This commit is contained in:
@@ -27,4 +27,5 @@ endif()
|
||||
add_subdirectory(projects/loader) # build gryphn loader
|
||||
add_subdirectory(projects/core) # build gryphn core
|
||||
add_subdirectory(projects/platform) # build gryphn platform
|
||||
target_link_libraries(Gryphn INTERFACE GryphnCore GryphnLoader GryphnPlatform)
|
||||
add_subdirectory(projects/validation_layers/function_loader/)
|
||||
target_link_libraries(Gryphn INTERFACE GryphnCore GryphnLoader GryphnPlatform GryphnFunctionValidator)
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#include <commands/command_buffer/vulkan_command_buffer.h>
|
||||
#include <commands/commands/vulkan_commands.h>
|
||||
|
||||
gnCommandFunctions loadVulkanCommandFunctions(loaderInfo info) {
|
||||
gnCommandFunctions loadVulkanCommandFunctions() {
|
||||
return (gnCommandFunctions){
|
||||
._gnCommandPoolAllocateCommandBuffers = allocateCommandBuffers,
|
||||
._gnBeginCommandBuffer = beginCommandBuffer,
|
||||
|
@@ -15,7 +15,7 @@
|
||||
#include <submit/vulkan_submit.h>
|
||||
#include <output_device/vulkan_output_devices.h>
|
||||
|
||||
gnDeviceFunctions loadVulkanDeviceFunctions(loaderInfo info) {
|
||||
gnDeviceFunctions loadVulkanDeviceFunctions() {
|
||||
return (gnDeviceFunctions){
|
||||
._gnCreatePresentationQueue = createPresentationQueue,
|
||||
._gnPresentationQueueGetImage = getPresentQueueImage,
|
||||
|
@@ -4,7 +4,7 @@
|
||||
#include <output_device/vulkan_output_devices.h>
|
||||
#include <vulkan_surface/vulkan_surface.h>
|
||||
|
||||
gnInstanceFunctions loadVulkanInstanceFunctions(loaderInfo info) {
|
||||
gnInstanceFunctions loadVulkanInstanceFunctions() {
|
||||
return (gnInstanceFunctions){
|
||||
._gnCreateInstance = createInstance,
|
||||
._gnDestroyInstance = destroyInstance,
|
||||
|
@@ -2,8 +2,7 @@
|
||||
#include "loader/src/gryphn_instance_functions.h"
|
||||
#include "loader/src/gryphn_device_functions.h"
|
||||
#include "loader/src/gryphn_command_functions.h"
|
||||
#include "loader/src/gryphn_loader_info.h"
|
||||
|
||||
gnInstanceFunctions loadVulkanInstanceFunctions(loaderInfo info);
|
||||
gnDeviceFunctions loadVulkanDeviceFunctions(loaderInfo info);
|
||||
gnCommandFunctions loadVulkanCommandFunctions(loaderInfo info);
|
||||
gnInstanceFunctions loadVulkanInstanceFunctions();
|
||||
gnDeviceFunctions loadVulkanDeviceFunctions();
|
||||
gnCommandFunctions loadVulkanCommandFunctions();
|
||||
|
@@ -76,7 +76,7 @@ gnReturnCode createInstance(gnInstanceHandle instance, gnInstanceInfo instanceIn
|
||||
};
|
||||
|
||||
#ifdef GN_PLATFORM_MACOS
|
||||
createInfo.createFlags |= VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
|
||||
createInfo.flags |= VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
|
||||
#endif
|
||||
|
||||
if (instanceInfo.debugger != NULL) {
|
||||
|
@@ -11,7 +11,9 @@
|
||||
gnInstanceFunctions loadAPIFunctions(gnRenderingAPI api) {
|
||||
switch (api) {
|
||||
case GN_RENDERINGAPI_NONE: return (gnInstanceFunctions){ NULL };
|
||||
case GN_RENDERINGAPI_VULKAN: return loadVulkanInstanceFunctions(info);
|
||||
#ifdef GN_API_VULKAN
|
||||
case GN_RENDERINGAPI_VULKAN: return loadVulkanInstanceFunctions();
|
||||
#endif
|
||||
|
||||
case GN_RENDERINGAPI_SOFTWARE: return (gnInstanceFunctions){ NULL };
|
||||
case GN_RENDERINGAPI_DIRECTX11: return (gnInstanceFunctions){ NULL };
|
||||
@@ -36,7 +38,9 @@ gnInstanceFunctions loadInstanceFunctions(loaderInfo info) {
|
||||
gnDeviceFunctions loadDeviceFunctions(loaderInfo info) {
|
||||
switch (info.api) {
|
||||
case GN_RENDERINGAPI_NONE: return (gnDeviceFunctions){ NULL };
|
||||
case GN_RENDERINGAPI_VULKAN: return loadVulkanDeviceFunctions(info);
|
||||
#ifdef GN_API_VULKAN
|
||||
case GN_RENDERINGAPI_VULKAN: return loadVulkanDeviceFunctions();
|
||||
#endif
|
||||
|
||||
case GN_RENDERINGAPI_SOFTWARE: return (gnDeviceFunctions){ NULL };
|
||||
case GN_RENDERINGAPI_DIRECTX11: return (gnDeviceFunctions){ NULL };
|
||||
@@ -53,7 +57,9 @@ gnDeviceFunctions loadDeviceFunctions(loaderInfo info) {
|
||||
gnCommandFunctions loadCommandFunctions(loaderInfo info) {
|
||||
switch (info.api) {
|
||||
case GN_RENDERINGAPI_NONE: return (gnCommandFunctions){ NULL };
|
||||
case GN_RENDERINGAPI_VULKAN: return loadVulkanCommandFunctions(info);
|
||||
#ifdef GN_API_VULKAN
|
||||
case GN_RENDERINGAPI_VULKAN: return loadVulkanCommandFunctions();
|
||||
#endif
|
||||
|
||||
case GN_RENDERINGAPI_SOFTWARE: return (gnCommandFunctions){ NULL };
|
||||
case GN_RENDERINGAPI_DIRECTX11: return (gnCommandFunctions){ NULL };
|
||||
|
@@ -3,4 +3,5 @@
|
||||
|
||||
typedef struct loaderInfo {
|
||||
gnRenderingAPI api;
|
||||
gnBool validateIfLoaded;
|
||||
} loaderInfo;
|
||||
|
@@ -4,6 +4,6 @@ project(GryphnFunctionValidator)
|
||||
file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS "src/*.c")
|
||||
file(GLOB_RECURSE LOADER_FILES CONFIGURE_DEPENDS "loader/*.c")
|
||||
add_library(GryphnFunctionValidator STATIC ${SOURCE_FILES} ${LOADER_FILES})
|
||||
target_include_directories(GryphnFunctionValidator PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../utils)
|
||||
target_include_directories(GryphnFunctionValidator PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
|
||||
target_include_directories(GryphnFunctionValidator PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../core/src/)
|
||||
target_include_directories(GryphnFunctionValidator PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../utils)
|
||||
target_include_directories(GryphnFunctionValidator PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../)
|
||||
target_include_directories(GryphnFunctionValidator PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../core/src/)
|
||||
|
Reference in New Issue
Block a user