This commit is contained in:
Greg Wells
2025-06-29 07:50:50 -04:00
parent 076aba13cf
commit bb6b1c175d
2 changed files with 17 additions and 10 deletions

View File

@@ -6,8 +6,11 @@
gnReturnCode checkCreateInstance(gnInstanceHandle instance, gnInstanceInfo info) {
loaderLayer* nextLayer = loaderGetNextLayer(instance);
if (nextLayer->instanceFunctions._gnCreateInstance == NULL) {
return GN_FAILED_TO_LOAD_FUNCTION;
gnDebuggerSetErrorMessage(instance->debugger, (gnMessageData){
.message = gnCreateString("Failed to load create instance function")
});
resetLayer(instance);
return GN_FAILED_TO_LOAD_FUNCTION;
}
return nextLayer->instanceFunctions._gnCreateInstance(instance, info);
}
@@ -19,8 +22,9 @@ void checkDestroyInstance(gnInstance instance) {
.message = gnCreateString("Failed to load destroy instance function")
});
resetLayer(instance);
return;
}
return nextLayer->instanceFunctions._gnDestroyInstance(instance);
nextLayer->instanceFunctions._gnDestroyInstance(instance);
}
gnPhysicalDevice* checkGetPhysicalDevices(gnInstanceHandle instance, uint32_t* count) {