gnIsExtensionSupported
This commit is contained in:
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_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);
|
||||
|
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_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);
|
||||
|
@@ -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;
|
||||
|
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