instance suitability functions

This commit is contained in:
Gregory Wells
2025-09-10 13:26:18 -04:00
parent 0310652abc
commit a446d6e75f
10 changed files with 36 additions and 34 deletions

View File

@@ -24,6 +24,16 @@ void checkDestroyInstance(gnInstanceHandle instance, gryphnInstanceFunctionLayer
next->destroyInstance(instance, next->next, alloctors);
}
gnBool checkIsInstanceSuitable(gnInstanceHandle instance, gnSuitableField field, gryphnInstanceFunctionLayers* next) {
if (next == NULL || next->isSuitable == NULL) {
gnDebuggerSetErrorMessage(instance->debugger, (gnMessageData){
.message = gnCreateString("Failed to load gnCreateInstance this indicates a bug within gryphn")
});
return GN_FAILED_TO_LOAD_FUNCTION;
}
return next->isSuitable(instance, field, next);
}
gnReturnCode checkQueryDevices(gnInstanceHandle instance, uint32_t* count, gnPhysicalDeviceHandle* devices, gryphnInstanceFunctionLayers* next) {
if (next == NULL || next->queryDevices == NULL) {
gnDebuggerSetErrorMessage(instance->debugger, (gnMessageData){