not totally sure what I did

This commit is contained in:
Greg Wells
2025-06-25 20:07:44 -04:00
parent dee0822779
commit 7ff6d7e744
4 changed files with 41 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
#include "gryphn_loader.h"
#include <validation_layers/function_loader/loader/function_loader.h>
#ifdef GN_API_VULKAN
#include <apis/vulkan/loader/vulkan_loader.h>
#endif
@@ -6,8 +7,9 @@
#include <apis/metal/loader/metal_loader.h>
#endif
gnInstanceFunctions loadInstanceFunctions(loaderInfo info) {
switch (info.api) {
// load the speedy API functions or something like that
gnInstanceFunctions loadAPIFunctions(gnRenderingAPI api) {
switch (api) {
case GN_RENDERINGAPI_NONE: return (gnInstanceFunctions){ NULL };
case GN_RENDERINGAPI_VULKAN: return loadVulkanInstanceFunctions(info);
@@ -22,6 +24,15 @@ gnInstanceFunctions loadInstanceFunctions(loaderInfo info) {
}
}
gnInstanceFunctions loadInstanceFunctions(loaderInfo info) {
gnInstanceFunctions apiFunctions = loadAPIFunctions(info.api);
if (info.validateIfLoaded)
return loadFunctionLoaderInstanceFunctions(&apiFunctions);
return apiFunctions;
}
gnDeviceFunctions loadDeviceFunctions(loaderInfo info) {
switch (info.api) {
case GN_RENDERINGAPI_NONE: return (gnDeviceFunctions){ NULL };