start the process of making sync objects an extension
This commit is contained in:
@@ -28,9 +28,10 @@ if (APPLE)
|
|||||||
endif()
|
endif()
|
||||||
add_subdirectory(projects/loader) # build gryphn loader
|
add_subdirectory(projects/loader) # build gryphn loader
|
||||||
add_subdirectory(projects/core) # build gryphn core
|
add_subdirectory(projects/core) # build gryphn core
|
||||||
|
add_subdirectory(projects/extensions)
|
||||||
add_subdirectory(projects/platform) # build gryphn platform
|
add_subdirectory(projects/platform) # build gryphn platform
|
||||||
add_subdirectory(projects/validation_layers/function_loader/)
|
add_subdirectory(projects/validation_layers/function_loader/)
|
||||||
target_link_libraries(Gryphn INTERFACE GryphnCore GryphnLoader GryphnPlatform GryphnFunctionValidator)
|
target_link_libraries(Gryphn INTERFACE GryphnCore GryphnLoader GryphnPlatform GryphnFunctionValidator GryphnExtensions)
|
||||||
|
|
||||||
if (VULKAN_BUILT)
|
if (VULKAN_BUILT)
|
||||||
target_link_libraries(Gryphn INTERFACE GryphnVulkanImpl)
|
target_link_libraries(Gryphn INTERFACE GryphnVulkanImpl)
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#define GRYPHN_INCLUDE
|
#define GRYPHN_INCLUDE
|
||||||
|
|
||||||
|
// core functionality
|
||||||
#include <core/src/instance/gryphn_instance.h>
|
#include <core/src/instance/gryphn_instance.h>
|
||||||
#include <core/src/debugger/gryphn_debugger.h>
|
#include <core/src/debugger/gryphn_debugger.h>
|
||||||
#include <core/src/output_device/gryphn_physical_output_device.h>
|
#include <core/src/output_device/gryphn_physical_output_device.h>
|
||||||
@@ -16,10 +18,12 @@
|
|||||||
#include <core/src/command/command_buffer/gryphn_command_buffer.h>
|
#include <core/src/command/command_buffer/gryphn_command_buffer.h>
|
||||||
#include <core/src/command/commands/gryphn_command.h>
|
#include <core/src/command/commands/gryphn_command.h>
|
||||||
#include <core/src/renderpass/gryphn_render_pass.h>
|
#include <core/src/renderpass/gryphn_render_pass.h>
|
||||||
#include <core/src/sync/semaphore/gryphn_semaphore.h>
|
|
||||||
#include <core/src/sync/fence/gryphn_fence.h>
|
|
||||||
#include <core/src/submit/gryphn_submit.h>
|
#include <core/src/submit/gryphn_submit.h>
|
||||||
#include <core/src/present/gryphn_present.h>
|
#include <core/src/present/gryphn_present.h>
|
||||||
#include <core/src/buffers/gryphn_buffer.h>
|
#include <core/src/buffers/gryphn_buffer.h>
|
||||||
#include <core/src/uniforms/gryphn_uniform_pool.h>
|
#include <core/src/uniforms/gryphn_uniform_pool.h>
|
||||||
#include <core/src/uniforms/gryphn_uniform.h>
|
#include <core/src/uniforms/gryphn_uniform.h>
|
||||||
|
|
||||||
|
// extenions
|
||||||
|
#include <extensions/synchronization/fence/gryphn_fence.h>
|
||||||
|
#include <extensions/synchronization/semaphore/gryphn_semaphore.h>
|
||||||
|
@@ -16,6 +16,8 @@ target_include_directories(GryphnVulkanImpl PUBLIC
|
|||||||
${Vulkan_INCLUDE_DIRS}
|
${Vulkan_INCLUDE_DIRS}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/
|
${CMAKE_CURRENT_SOURCE_DIR}/src/
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../../core/src/
|
${CMAKE_CURRENT_SOURCE_DIR}/../../core/src/
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/../../core/
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/../../extensions/
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../../utils/
|
${CMAKE_CURRENT_SOURCE_DIR}/../../utils/
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../../platform/
|
${CMAKE_CURRENT_SOURCE_DIR}/../../platform/
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../../
|
${CMAKE_CURRENT_SOURCE_DIR}/../../
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
gnDeviceFunctions loadVulkanDeviceFunctions() {
|
gnDeviceFunctions loadVulkanDeviceFunctions() {
|
||||||
return (gnDeviceFunctions){
|
return (gnDeviceFunctions){
|
||||||
._gnCreatePresentationQueue = createPresentationQueue,
|
._gnCreatePresentationQueue = createPresentationQueue,
|
||||||
._gnPresentationQueueGetImage = getPresentQueueImage,
|
._gnPresentationQueueGetImageAsync = getPresentQueueImageAsync,
|
||||||
._gnDestroyPresentationQueue = destroyPresentationQueue,
|
._gnDestroyPresentationQueue = destroyPresentationQueue,
|
||||||
|
|
||||||
._gnCreateShaderModule = createShaderModule,
|
._gnCreateShaderModule = createShaderModule,
|
||||||
|
@@ -81,7 +81,7 @@ gnReturnCode createPresentationQueue(gnPresentationQueueHandle presentationQueue
|
|||||||
return GN_SUCCESS;
|
return GN_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
gnReturnCode getPresentQueueImage(gnPresentationQueueHandle presentationQueue, uint64_t timeout, gnSemaphore semaphore, uint32_t* imageIndex) {
|
gnReturnCode getPresentQueueImageAsync(gnPresentationQueueHandle presentationQueue, uint64_t timeout, gnSemaphore semaphore, uint32_t* imageIndex) {
|
||||||
VkResult result = vkAcquireNextImageKHR(
|
VkResult result = vkAcquireNextImageKHR(
|
||||||
presentationQueue->outputDevice->outputDevice->device,
|
presentationQueue->outputDevice->outputDevice->device,
|
||||||
presentationQueue->presentationQueue->swapChain,
|
presentationQueue->presentationQueue->swapChain,
|
||||||
|
@@ -10,5 +10,5 @@ typedef struct gnPlatformPresentationQueue_t {
|
|||||||
} gnPlatformPresentationQueue;
|
} gnPlatformPresentationQueue;
|
||||||
|
|
||||||
gnReturnCode createPresentationQueue(gnPresentationQueueHandle presentationQueue, const gnDevice device, gnPresentationQueueInfo presentationInfo);
|
gnReturnCode createPresentationQueue(gnPresentationQueueHandle presentationQueue, const gnDevice device, gnPresentationQueueInfo presentationInfo);
|
||||||
gnReturnCode getPresentQueueImage(gnPresentationQueueHandle presentationQueue, uint64_t timeout, gnSemaphore semaphore, uint32_t* imageIndex);
|
gnReturnCode getPresentQueueImageAsync(gnPresentationQueueHandle presentationQueue, uint64_t timeout, gnSemaphore semaphore, uint32_t* imageIndex);
|
||||||
void destroyPresentationQueue(gnPresentationQueueHandle queue);
|
void destroyPresentationQueue(gnPresentationQueueHandle queue);
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <vulkan/vulkan.h>
|
#include <vulkan/vulkan.h>
|
||||||
#include "sync/fence/gryphn_fence.h"
|
#include "synchronization/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 "sync/semaphore/gryphn_semaphore.h"
|
#include "synchronization/semaphore/gryphn_semaphore.h"
|
||||||
|
|
||||||
typedef struct gnPlatformSemaphore_t {
|
typedef struct gnPlatformSemaphore_t {
|
||||||
VkSemaphore semaphore;
|
VkSemaphore semaphore;
|
||||||
|
@@ -11,6 +11,7 @@ add_library(GryphnCore ${SOURCE_FILES} ${METAL_FILES})
|
|||||||
|
|
||||||
target_include_directories(GryphnCore PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
|
target_include_directories(GryphnCore PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
|
||||||
target_include_directories(GryphnCore PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src/)
|
target_include_directories(GryphnCore PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src/)
|
||||||
|
target_include_directories(GryphnCore PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/)
|
||||||
target_include_directories(GryphnCore PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../include/)
|
target_include_directories(GryphnCore PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../include/)
|
||||||
target_include_directories(GryphnCore PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../utils)
|
target_include_directories(GryphnCore PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../utils)
|
||||||
target_include_directories(GryphnCore PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../platform/)
|
target_include_directories(GryphnCore PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../platform/)
|
||||||
|
5
projects/core/gryphn_extensions.h
Normal file
5
projects/core/gryphn_extensions.h
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "stdint.h"
|
||||||
|
|
||||||
|
typedef uint32_t gnExtension;
|
||||||
|
#define GN_EXT_SYNCHRONIZATION 0
|
@@ -1,8 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
#include <gryphn/gryphn_utils.h>
|
|
||||||
|
|
||||||
typedef enum gnFeature {
|
|
||||||
GN_DYNAMIC_STATES, GN_SYNC_OBJECTS
|
|
||||||
} gnFeature;
|
|
||||||
|
|
||||||
inline gnBool (*gnAPISupports)(gnFeature feature);
|
|
@@ -3,6 +3,7 @@
|
|||||||
#include <loader/src/gryphn_instance_functions.h>
|
#include <loader/src/gryphn_instance_functions.h>
|
||||||
#include "loader/src/gryphn_loader.h"
|
#include "loader/src/gryphn_loader.h"
|
||||||
#include "debugger/gryphn_debugger.h"
|
#include "debugger/gryphn_debugger.h"
|
||||||
|
#include "loader/src/gryphn_loader.h"
|
||||||
|
|
||||||
gnReturnCode gnCreateInstance(gnInstanceHandle* instance, gnInstanceInfo info) {
|
gnReturnCode gnCreateInstance(gnInstanceHandle* instance, gnInstanceInfo info) {
|
||||||
*instance = malloc(sizeof(struct gnInstance_t));
|
*instance = malloc(sizeof(struct gnInstance_t));
|
||||||
|
@@ -3,7 +3,8 @@
|
|||||||
#include "core/src/gryphn_handles.h"
|
#include "core/src/gryphn_handles.h"
|
||||||
#include "utils/gryphn_version.h"
|
#include "utils/gryphn_version.h"
|
||||||
#include "utils/gryphn_error_code.h"
|
#include "utils/gryphn_error_code.h"
|
||||||
#include "loader/src/gryphn_loader.h"
|
#include <loader/src/gryphn_loader.h>
|
||||||
|
#include <gryphn_extensions.h>
|
||||||
|
|
||||||
typedef struct gnInstanceInfo {
|
typedef struct gnInstanceInfo {
|
||||||
gnString applicationName;
|
gnString applicationName;
|
||||||
@@ -14,6 +15,9 @@ typedef struct gnInstanceInfo {
|
|||||||
|
|
||||||
gnRenderingAPI renderingAPI;
|
gnRenderingAPI renderingAPI;
|
||||||
gnDebuggerHandle debugger;
|
gnDebuggerHandle debugger;
|
||||||
|
|
||||||
|
uint32_t extensionCount;
|
||||||
|
gnExtension* extensions;
|
||||||
} gnInstanceInfo;
|
} gnInstanceInfo;
|
||||||
|
|
||||||
#ifdef GN_REVEAL_IMPL
|
#ifdef GN_REVEAL_IMPL
|
||||||
|
@@ -7,8 +7,8 @@ gnReturnCode gnCreatePresentationQueue(gnPresentationQueueHandle* presentationQu
|
|||||||
return device->instance->callingLayer->deviceFunctions._gnCreatePresentationQueue(*presentationQueue, device, presentationInfo);
|
return device->instance->callingLayer->deviceFunctions._gnCreatePresentationQueue(*presentationQueue, device, presentationInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
gnReturnCode gnPresentationQueueGetImage(gnPresentationQueueHandle presentationQueue, uint64_t timeout, gnSemaphoreHandle semaphore, uint32_t* imageIndex) {
|
gnReturnCode gnPresentationQueueGetImageAsync(gnPresentationQueueHandle presentationQueue, uint64_t timeout, gnSemaphoreHandle semaphore, uint32_t* imageIndex) {
|
||||||
return presentationQueue->outputDevice->instance->callingLayer->deviceFunctions._gnPresentationQueueGetImage(presentationQueue, timeout, semaphore, imageIndex);
|
return presentationQueue->outputDevice->instance->callingLayer->deviceFunctions._gnPresentationQueueGetImageAsync(presentationQueue, timeout, semaphore, imageIndex);
|
||||||
}
|
}
|
||||||
uint32_t gnGetPresentationQueueImageCount(gnPresentationQueueHandle presentationQueue) { return presentationQueue->imageCount; }
|
uint32_t gnGetPresentationQueueImageCount(gnPresentationQueueHandle presentationQueue) { return presentationQueue->imageCount; }
|
||||||
gnTextureHandle gnGetPresentationQueueImage(gnPresentationQueueHandle presentationQueue, uint32_t index) {
|
gnTextureHandle gnGetPresentationQueueImage(gnPresentationQueueHandle presentationQueue, uint32_t index) {
|
||||||
|
@@ -2,7 +2,6 @@
|
|||||||
#include <utils/gryphn_image_format.h>
|
#include <utils/gryphn_image_format.h>
|
||||||
#include <output_device/gryphn_output_device.h>
|
#include <output_device/gryphn_output_device.h>
|
||||||
#include <window_surface/gryphn_surface.h>
|
#include <window_surface/gryphn_surface.h>
|
||||||
#include <sync/semaphore/gryphn_semaphore.h>
|
|
||||||
#include "gryphn_handles.h"
|
#include "gryphn_handles.h"
|
||||||
|
|
||||||
typedef struct gnPresentationQueueInfo {
|
typedef struct gnPresentationQueueInfo {
|
||||||
@@ -29,7 +28,8 @@ struct gnPresentationQueue_t {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
gnReturnCode gnCreatePresentationQueue(gnPresentationQueueHandle* presentationQueue, gnOutputDeviceHandle device, gnPresentationQueueInfo presentationInfo);
|
gnReturnCode gnCreatePresentationQueue(gnPresentationQueueHandle* presentationQueue, gnOutputDeviceHandle device, gnPresentationQueueInfo presentationInfo);
|
||||||
gnReturnCode gnPresentationQueueGetImage(gnPresentationQueueHandle presentationQueue, uint64_t timeout, gnSemaphoreHandle semaphore, uint32_t* imageIndex);
|
gnReturnCode gnPresentationQueueGetImageAsync(gnPresentationQueueHandle presentationQueue, uint64_t timeout, gnSemaphoreHandle semaphore, uint32_t* imageIndex);
|
||||||
|
gnReturnCode gnPresentationQueueGetImage(gnPresentationQueue presentationQueue, uint32_t* imageIndex);
|
||||||
uint32_t gnGetPresentationQueueImageCount(gnPresentationQueueHandle presentationQueue);
|
uint32_t gnGetPresentationQueueImageCount(gnPresentationQueueHandle presentationQueue);
|
||||||
gnTextureHandle gnGetPresentationQueueImage(gnPresentationQueueHandle presentationQueue, uint32_t index);
|
gnTextureHandle gnGetPresentationQueueImage(gnPresentationQueueHandle presentationQueue, uint32_t index);
|
||||||
void gnDestroyPresentationQueue(gnPresentationQueueHandle presentationQueue);
|
void gnDestroyPresentationQueue(gnPresentationQueueHandle presentationQueue);
|
||||||
|
10
projects/extensions/CMakeLists.txt
Normal file
10
projects/extensions/CMakeLists.txt
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
set(CMAKE_EXPORT_COMPILE_COMMANDS on)
|
||||||
|
project(GryphnExtensions)
|
||||||
|
add_compile_definitions(GN_REVEAL_IMPL)
|
||||||
|
|
||||||
|
file(GLOB_RECURSE SYNC_EXT_SRC CONFIGURE_DEPENDS "synchronization/*.c")
|
||||||
|
add_library(GryphnExtensions ${SYNC_EXT_SRC})
|
||||||
|
target_include_directories(GryphnExtensions PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../utils/)
|
||||||
|
target_include_directories(GryphnExtensions PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../core/)
|
||||||
|
target_include_directories(GryphnExtensions PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../core/src/)
|
||||||
|
target_include_directories(GryphnExtensions PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
|
@@ -1,3 +1,5 @@
|
|||||||
|
// #ifdef GN_EXT_GN_EXT_SYNCHRONIZATION
|
||||||
|
|
||||||
#include "gryphn_fence.h"
|
#include "gryphn_fence.h"
|
||||||
#include "output_device/gryphn_output_device.h"
|
#include "output_device/gryphn_output_device.h"
|
||||||
#include "instance/gryphn_instance.h"
|
#include "instance/gryphn_instance.h"
|
||||||
@@ -22,3 +24,5 @@ void gnResetFence(gnFenceHandle fence) {
|
|||||||
void gnDestroyFence(gnFenceHandle fence) {
|
void gnDestroyFence(gnFenceHandle fence) {
|
||||||
fence->device->instance->callingLayer->deviceFunctions._gnDestroyFence(fence);
|
fence->device->instance->callingLayer->deviceFunctions._gnDestroyFence(fence);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// #endif
|
@@ -1,5 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "stdint.h"
|
|
||||||
#include <utils/gryphn_bool.h>
|
#include <utils/gryphn_bool.h>
|
||||||
#include "utils/gryphn_error_code.h"
|
#include "utils/gryphn_error_code.h"
|
||||||
#include "utils/lists/gryphn_array_list.h"
|
#include "utils/lists/gryphn_array_list.h"
|
@@ -1,3 +1,5 @@
|
|||||||
|
// #ifdef GN_EXT_SYNCHRONIZATION
|
||||||
|
|
||||||
#include "gryphn_semaphore.h"
|
#include "gryphn_semaphore.h"
|
||||||
#include "output_device/gryphn_output_device.h"
|
#include "output_device/gryphn_output_device.h"
|
||||||
#include "instance/gryphn_instance.h"
|
#include "instance/gryphn_instance.h"
|
||||||
@@ -10,3 +12,5 @@ gnReturnCode gnCreateSemaphore(gnSemaphore* semaphore, struct gnOutputDevice_t*
|
|||||||
void gnDestroySemaphore(struct gnSemaphore_t* semaphore) {
|
void gnDestroySemaphore(struct gnSemaphore_t* semaphore) {
|
||||||
semaphore->device->instance->callingLayer->deviceFunctions._gnDestroySemaphore(semaphore);
|
semaphore->device->instance->callingLayer->deviceFunctions._gnDestroySemaphore(semaphore);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// #endif
|
@@ -6,3 +6,4 @@ add_library(GryphnLoader STATIC ${SOURCE_FILES})
|
|||||||
target_include_directories(GryphnLoader PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../utils)
|
target_include_directories(GryphnLoader PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../utils)
|
||||||
target_include_directories(GryphnLoader PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
|
target_include_directories(GryphnLoader PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
|
||||||
target_include_directories(GryphnLoader PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../core/src/)
|
target_include_directories(GryphnLoader PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../core/src/)
|
||||||
|
target_include_directories(GryphnLoader PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../core/)
|
||||||
|
@@ -21,7 +21,8 @@ typedef struct gnPresentInfo gnPresentInfo;
|
|||||||
|
|
||||||
typedef struct gnDeviceFunctions {
|
typedef struct gnDeviceFunctions {
|
||||||
gnReturnCode (*_gnCreatePresentationQueue)(gnPresentationQueueHandle presentationQueue, const gnOutputDeviceHandle device, gnPresentationQueueInfo presentationInfo);
|
gnReturnCode (*_gnCreatePresentationQueue)(gnPresentationQueueHandle presentationQueue, const gnOutputDeviceHandle device, gnPresentationQueueInfo presentationInfo);
|
||||||
gnReturnCode (*_gnPresentationQueueGetImage)(gnPresentationQueueHandle presentationQueue, uint64_t timeout, gnSemaphoreHandle semaphore, uint32_t* imageIndex);
|
gnReturnCode (*_gnPresentationQueueGetImageAsync)(gnPresentationQueueHandle presentationQueue, uint64_t timeout, gnSemaphoreHandle semaphore, uint32_t* imageIndex);
|
||||||
|
gnReturnCode (*_gnPresentationQueueGetImage)(gnPresentationQueueHandle presentationQueue, uint32_t* imageIndex);
|
||||||
void (*_gnDestroyPresentationQueue)(gnPresentationQueueHandle presentationQueue);
|
void (*_gnDestroyPresentationQueue)(gnPresentationQueueHandle presentationQueue);
|
||||||
|
|
||||||
gnReturnCode (*_gnCreateShaderModule)(gnShaderModuleHandle module, gnOutputDeviceHandle device, gnShaderModuleInfo shaderModuleInfo);
|
gnReturnCode (*_gnCreateShaderModule)(gnShaderModuleHandle module, gnOutputDeviceHandle device, gnShaderModuleInfo shaderModuleInfo);
|
||||||
|
@@ -4,8 +4,10 @@ project(GryphnFunctionValidator)
|
|||||||
file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS "src/*.c")
|
file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS "src/*.c")
|
||||||
file(GLOB_RECURSE LOADER_FILES CONFIGURE_DEPENDS "loader/*.c")
|
file(GLOB_RECURSE LOADER_FILES CONFIGURE_DEPENDS "loader/*.c")
|
||||||
add_library(GryphnFunctionValidator STATIC ${SOURCE_FILES} ${LOADER_FILES})
|
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}/../../)
|
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}/../../core/src/)
|
||||||
target_include_directories(GryphnFunctionValidator PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../platform/)
|
target_include_directories(GryphnFunctionValidator PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../platform/)
|
||||||
target_include_directories(GryphnFunctionValidator PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/)
|
target_include_directories(GryphnFunctionValidator PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../utils)
|
||||||
|
target_include_directories(GryphnFunctionValidator PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../core/)
|
||||||
|
target_include_directories(GryphnFunctionValidator PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../extensions/)
|
||||||
|
@@ -40,6 +40,7 @@ gnInstanceFunctions loadFunctionLoaderInstanceFunctions() {
|
|||||||
gnDeviceFunctions loadFunctionLoaderDeviceFunctions() {
|
gnDeviceFunctions loadFunctionLoaderDeviceFunctions() {
|
||||||
return (gnDeviceFunctions){
|
return (gnDeviceFunctions){
|
||||||
._gnCreatePresentationQueue = checkCreatePresentationQueue,
|
._gnCreatePresentationQueue = checkCreatePresentationQueue,
|
||||||
|
._gnPresentationQueueGetImageAsync = checkPresentationQueueGetImageAsync,
|
||||||
._gnPresentationQueueGetImage = checkPresentationQueueGetImage,
|
._gnPresentationQueueGetImage = checkPresentationQueueGetImage,
|
||||||
._gnDestroyPresentationQueue = checkDestroyPresentationQueue,
|
._gnDestroyPresentationQueue = checkDestroyPresentationQueue,
|
||||||
|
|
||||||
|
@@ -10,7 +10,8 @@
|
|||||||
#include "core/src/buffers/gryphn_buffer.h"
|
#include "core/src/buffers/gryphn_buffer.h"
|
||||||
#include "core/src/uniforms/gryphn_uniform_pool.h"
|
#include "core/src/uniforms/gryphn_uniform_pool.h"
|
||||||
#include "core/src/textures/gryphn_texture.h"
|
#include "core/src/textures/gryphn_texture.h"
|
||||||
#include "core/src/sync/fence/gryphn_fence.h"
|
#include "synchronization/fence/gryphn_fence.h"
|
||||||
|
#include "synchronization/semaphore/gryphn_semaphore.h"
|
||||||
#include "core/src/submit/gryphn_submit.h"
|
#include "core/src/submit/gryphn_submit.h"
|
||||||
#include "core/src/present/gryphn_present.h"
|
#include "core/src/present/gryphn_present.h"
|
||||||
|
|
||||||
@@ -25,16 +26,11 @@ gnReturnCode checkCreatePresentationQueue(gnPresentationQueueHandle presentation
|
|||||||
}
|
}
|
||||||
return nextLayer->deviceFunctions._gnCreatePresentationQueue(presentationQueue, device, presentationInfo);
|
return nextLayer->deviceFunctions._gnCreatePresentationQueue(presentationQueue, device, presentationInfo);
|
||||||
}
|
}
|
||||||
gnReturnCode checkPresentationQueueGetImage(gnPresentationQueueHandle presentationQueue, uint64_t timeout, gnSemaphoreHandle semaphore, uint32_t* imageIndex) {
|
gnReturnCode checkPresentationQueueGetImageAsync(gnPresentationQueueHandle presentationQueue, uint64_t timeout, gnSemaphoreHandle semaphore, uint32_t* imageIndex) {
|
||||||
loaderLayer* nextLayer = loaderGetNextLayer(presentationQueue->outputDevice->instance);
|
CHECK_FUNCTION_WITH_RETURN_CODE(presentationQueue->outputDevice->instance, _gnPresentationQueueGetImageAsync, presentationQueue, timeout, semaphore, imageIndex);
|
||||||
if (nextLayer->deviceFunctions._gnPresentationQueueGetImage == NULL) {
|
|
||||||
gnDebuggerSetErrorMessage(presentationQueue->outputDevice->instance->debugger, (gnMessageData){
|
|
||||||
.message = gnCreateString("Failed to load presentation queue get image function")
|
|
||||||
});
|
|
||||||
resetLayer(presentationQueue->outputDevice->instance);
|
|
||||||
return GN_FAILED_TO_LOAD_FUNCTION;
|
|
||||||
}
|
}
|
||||||
return nextLayer->deviceFunctions._gnPresentationQueueGetImage(presentationQueue, timeout, semaphore, imageIndex);
|
gnReturnCode checkPresentationQueueGetImage(gnPresentationQueueHandle presentationQueue, uint32_t *imageIndex) {
|
||||||
|
CHECK_FUNCTION_WITH_RETURN_CODE(presentationQueue->outputDevice->instance, _gnPresentationQueueGetImage, presentationQueue, imageIndex);
|
||||||
}
|
}
|
||||||
void checkDestroyPresentationQueue(gnPresentationQueueHandle presentationQueue) {
|
void checkDestroyPresentationQueue(gnPresentationQueueHandle presentationQueue) {
|
||||||
loaderLayer* nextLayer = loaderGetNextLayer(presentationQueue->outputDevice->instance);
|
loaderLayer* nextLayer = loaderGetNextLayer(presentationQueue->outputDevice->instance);
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
#include "loader/src/gryphn_device_functions.h"
|
#include "loader/src/gryphn_device_functions.h"
|
||||||
|
|
||||||
gnReturnCode checkCreatePresentationQueue(gnPresentationQueueHandle presentationQueue, const gnOutputDeviceHandle device, gnPresentationQueueInfo presentationInfo);
|
gnReturnCode checkCreatePresentationQueue(gnPresentationQueueHandle presentationQueue, const gnOutputDeviceHandle device, gnPresentationQueueInfo presentationInfo);
|
||||||
gnReturnCode checkPresentationQueueGetImage(gnPresentationQueueHandle presentationQueue, uint64_t timeout, gnSemaphoreHandle semaphore, uint32_t* imageIndex);
|
gnReturnCode checkPresentationQueueGetImageAsync(gnPresentationQueueHandle presentationQueue, uint64_t timeout, gnSemaphoreHandle semaphore, uint32_t* imageIndex);
|
||||||
|
gnReturnCode checkPresentationQueueGetImage(gnPresentationQueueHandle presentationQueue, uint32_t *imageIndex);
|
||||||
void checkDestroyPresentationQueue(gnPresentationQueueHandle presentationQueue);
|
void checkDestroyPresentationQueue(gnPresentationQueueHandle presentationQueue);
|
||||||
|
|
||||||
gnReturnCode checkCreateShaderModule(gnShaderModuleHandle module, gnOutputDeviceHandle device, gnShaderModuleInfo shaderModuleInfo);
|
gnReturnCode checkCreateShaderModule(gnShaderModuleHandle module, gnOutputDeviceHandle device, gnShaderModuleInfo shaderModuleInfo);
|
||||||
|
Reference in New Issue
Block a user