gnIsExtensionSupported
This commit is contained in:
@@ -25,6 +25,8 @@
|
|||||||
#include <core/src/uniforms/gryphn_uniform.h>
|
#include <core/src/uniforms/gryphn_uniform.h>
|
||||||
|
|
||||||
// extenions
|
// extenions
|
||||||
|
#include <loader/src/gryphn_extension_loader.h>
|
||||||
|
|
||||||
#include <extensions/synchronization/fence/gryphn_fence.h>
|
#include <extensions/synchronization/fence/gryphn_fence.h>
|
||||||
#include <extensions/synchronization/semaphore/gryphn_semaphore.h>
|
#include <extensions/synchronization/semaphore/gryphn_semaphore.h>
|
||||||
#include <extensions/synchronization/gryphn_synced_presentation_queue.h>
|
#include <extensions/synchronization/gryphn_synced_presentation_queue.h>
|
||||||
|
6
projects/apis/metal/loader/metal_extensions.m
Normal file
6
projects/apis/metal/loader/metal_extensions.m
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#include "metal_loader.h"
|
||||||
|
|
||||||
|
gnBool metalIsExtensionSupported(gnExtension extension) {
|
||||||
|
if (extension == GN_EXT_SYNCHRONIZATION) return gnTrue;
|
||||||
|
return gnFalse;
|
||||||
|
}
|
@@ -3,8 +3,11 @@
|
|||||||
#include "loader/src/gryphn_device_functions.h"
|
#include "loader/src/gryphn_device_functions.h"
|
||||||
#include "loader/src/gryphn_command_functions.h"
|
#include "loader/src/gryphn_command_functions.h"
|
||||||
#include "extensions/synchronization/loader/sync_functions.h"
|
#include "extensions/synchronization/loader/sync_functions.h"
|
||||||
|
#include "core/gryphn_extensions.h"
|
||||||
|
|
||||||
gnInstanceFunctions loadMetalInstanceFunctions();
|
gnInstanceFunctions loadMetalInstanceFunctions();
|
||||||
gnDeviceFunctions loadMetalDeviceFunctions();
|
gnDeviceFunctions loadMetalDeviceFunctions();
|
||||||
gnCommandFunctions loadMetalCommandFunctions();
|
gnCommandFunctions loadMetalCommandFunctions();
|
||||||
gnSyncExtFunctions loadMetalSyncFunctions();
|
gnSyncExtFunctions loadMetalSyncFunctions();
|
||||||
|
|
||||||
|
gnBool metalIsExtensionSupported(gnExtension extension);
|
||||||
|
6
projects/apis/vulkan/loader/vulkan_extensions.c
Normal file
6
projects/apis/vulkan/loader/vulkan_extensions.c
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#include "vulkan_loader.h"
|
||||||
|
|
||||||
|
gnBool vulkanIsExtensionSupported(gnExtension extension){
|
||||||
|
if (extension == GN_EXT_SYNCHRONIZATION) return gnTrue;
|
||||||
|
return gnFalse;
|
||||||
|
}
|
@@ -3,8 +3,11 @@
|
|||||||
#include "loader/src/gryphn_device_functions.h"
|
#include "loader/src/gryphn_device_functions.h"
|
||||||
#include "loader/src/gryphn_command_functions.h"
|
#include "loader/src/gryphn_command_functions.h"
|
||||||
#include "extensions/synchronization/loader/sync_functions.h"
|
#include "extensions/synchronization/loader/sync_functions.h"
|
||||||
|
#include "core/gryphn_extensions.h"
|
||||||
|
|
||||||
gnInstanceFunctions loadVulkanInstanceFunctions();
|
gnInstanceFunctions loadVulkanInstanceFunctions();
|
||||||
gnDeviceFunctions loadVulkanDeviceFunctions();
|
gnDeviceFunctions loadVulkanDeviceFunctions();
|
||||||
gnCommandFunctions loadVulkanCommandFunctions();
|
gnCommandFunctions loadVulkanCommandFunctions();
|
||||||
gnSyncExtFunctions loadVulkanSyncFunctions();
|
gnSyncExtFunctions loadVulkanSyncFunctions();
|
||||||
|
|
||||||
|
gnBool vulkanIsExtensionSupported(gnExtension extension);
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
#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 <gryphn_extensions.h>
|
#include <gryphn_extensions.h>
|
||||||
|
|
||||||
typedef struct gnInstanceInfo {
|
typedef struct gnInstanceInfo {
|
||||||
@@ -21,6 +20,7 @@ typedef struct gnInstanceInfo {
|
|||||||
} gnInstanceInfo;
|
} gnInstanceInfo;
|
||||||
|
|
||||||
#ifdef GN_REVEAL_IMPL
|
#ifdef GN_REVEAL_IMPL
|
||||||
|
#include <loader/src/gryphn_loader.h>
|
||||||
struct gnInstance_t {
|
struct gnInstance_t {
|
||||||
struct gnPlatformInstance_t* instance;
|
struct gnPlatformInstance_t* instance;
|
||||||
gnBool valid;
|
gnBool valid;
|
||||||
|
36
projects/loader/src/gryphn_extension_loader.c
Normal file
36
projects/loader/src/gryphn_extension_loader.c
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
#include "gryphn_extension_loader.h"
|
||||||
|
|
||||||
|
#ifdef GN_API_VULKAN
|
||||||
|
#include <apis/vulkan/loader/vulkan_loader.h>
|
||||||
|
#endif
|
||||||
|
#ifdef GN_API_METAL
|
||||||
|
#include <apis/metal/loader/metal_loader.h>
|
||||||
|
#endif
|
||||||
|
#ifdef GN_API_OPENGL
|
||||||
|
#include <apis/opengl/loader/opengl_loader.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
gnBool gnIsExtensionSuppoted(gnRenderingAPI api, gnExtension extension) {
|
||||||
|
switch (api) {
|
||||||
|
case GN_RENDERINGAPI_NONE: return gnFalse;
|
||||||
|
#ifdef GN_API_VULKAN
|
||||||
|
case GN_RENDERINGAPI_VULKAN: return vulkanIsExtensionSupported(extension);
|
||||||
|
#endif
|
||||||
|
#ifdef GN_API_SOFTWARE
|
||||||
|
case GN_RENDERINGAPI_SOFTWARE: return softwareIsExtensionSupported(extension);
|
||||||
|
#endif
|
||||||
|
#ifdef GN_API_DX11
|
||||||
|
case GN_RENDERINGAPI_DIRECTX11: return dx11IsExtensionSupported(extension);
|
||||||
|
#endif
|
||||||
|
#ifdef GN_API_DX12
|
||||||
|
case GN_RENDERINGAPI_DIRECTX12: return dx12IsExtensionSupported(extension);
|
||||||
|
#endif
|
||||||
|
#ifdef GN_API_OPENGL
|
||||||
|
case GN_RENDERINGAPI_OPENGL: return openglIsExtensionSupported(extension);
|
||||||
|
#endif
|
||||||
|
#ifdef GN_API_METAL
|
||||||
|
case GN_RENDERINGAPI_METAL: return metalIsExtensionSupported(extension);
|
||||||
|
#endif
|
||||||
|
default: return gnFalse;
|
||||||
|
}
|
||||||
|
}
|
6
projects/loader/src/gryphn_extension_loader.h
Normal file
6
projects/loader/src/gryphn_extension_loader.h
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <utils/gryphn_bool.h>
|
||||||
|
#include <core/src/gryphn_rendering_api.h>
|
||||||
|
#include <core/gryphn_extensions.h>
|
||||||
|
|
||||||
|
gnBool gnIsExtensionSuppoted(gnRenderingAPI api, gnExtension extension);
|
Reference in New Issue
Block a user