gnIsExtensionSupported

This commit is contained in:
Greg Wells
2025-07-15 09:06:17 -04:00
parent af480745e5
commit 7722467ceb
8 changed files with 63 additions and 1 deletions

View File

@@ -25,6 +25,8 @@
#include <core/src/uniforms/gryphn_uniform.h>
// extenions
#include <loader/src/gryphn_extension_loader.h>
#include <extensions/synchronization/fence/gryphn_fence.h>
#include <extensions/synchronization/semaphore/gryphn_semaphore.h>
#include <extensions/synchronization/gryphn_synced_presentation_queue.h>

View File

@@ -0,0 +1,6 @@
#include "metal_loader.h"
gnBool metalIsExtensionSupported(gnExtension extension) {
if (extension == GN_EXT_SYNCHRONIZATION) return gnTrue;
return gnFalse;
}

View File

@@ -3,8 +3,11 @@
#include "loader/src/gryphn_device_functions.h"
#include "loader/src/gryphn_command_functions.h"
#include "extensions/synchronization/loader/sync_functions.h"
#include "core/gryphn_extensions.h"
gnInstanceFunctions loadMetalInstanceFunctions();
gnDeviceFunctions loadMetalDeviceFunctions();
gnCommandFunctions loadMetalCommandFunctions();
gnSyncExtFunctions loadMetalSyncFunctions();
gnBool metalIsExtensionSupported(gnExtension extension);

View File

@@ -0,0 +1,6 @@
#include "vulkan_loader.h"
gnBool vulkanIsExtensionSupported(gnExtension extension){
if (extension == GN_EXT_SYNCHRONIZATION) return gnTrue;
return gnFalse;
}

View File

@@ -3,8 +3,11 @@
#include "loader/src/gryphn_device_functions.h"
#include "loader/src/gryphn_command_functions.h"
#include "extensions/synchronization/loader/sync_functions.h"
#include "core/gryphn_extensions.h"
gnInstanceFunctions loadVulkanInstanceFunctions();
gnDeviceFunctions loadVulkanDeviceFunctions();
gnCommandFunctions loadVulkanCommandFunctions();
gnSyncExtFunctions loadVulkanSyncFunctions();
gnBool vulkanIsExtensionSupported(gnExtension extension);

View File

@@ -3,7 +3,6 @@
#include "core/src/gryphn_handles.h"
#include "utils/gryphn_version.h"
#include "utils/gryphn_error_code.h"
#include <loader/src/gryphn_loader.h>
#include <gryphn_extensions.h>
typedef struct gnInstanceInfo {
@@ -21,6 +20,7 @@ typedef struct gnInstanceInfo {
} gnInstanceInfo;
#ifdef GN_REVEAL_IMPL
#include <loader/src/gryphn_loader.h>
struct gnInstance_t {
struct gnPlatformInstance_t* instance;
gnBool valid;

View 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;
}
}

View 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);