finish queryDevices function
This commit is contained in:
@@ -24,8 +24,14 @@ void checkDestroyInstance(gnInstanceHandle instance, gryphnInstanceFunctionLayer
|
||||
next->destroyInstance(instance, next->next, alloctors);
|
||||
}
|
||||
|
||||
gnPhysicalDevice* checkGetPhysicalDevices(gnInstanceHandle instance, uint32_t* count) {
|
||||
CHECK_RETURNED_FUNCTION(instance, _gnGetPhysicalDevices, instanceFunctions, NULL, instance, count);
|
||||
gnReturnCode checkQueryDevices(gnInstanceHandle instance, uint32_t* count, gnPhysicalDeviceHandle* devices, gryphnInstanceFunctionLayers* next) {
|
||||
if (next == NULL || next->queryDevices == 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->queryDevices(instance, count, devices, next->next);
|
||||
}
|
||||
gnBool checkCanDevicePresent(gnPhysicalDevice device, gnWindowSurfaceHandle windowSurface) {
|
||||
CHECK_RETURNED_FUNCTION(device->instance, _gnPhysicalDeviceCanPresentToSurface, instanceFunctions, GN_FALSE, device, windowSurface);
|
||||
|
@@ -3,9 +3,9 @@
|
||||
#include <core/src/window_surface/gryphn_surface_create_functions.h>
|
||||
|
||||
gnReturnCode checkCreateInstance(gnInstanceHandle instance, gnInstanceCreateInfo* info, gryphnInstanceFunctionLayers* next, gnAllocators* alloctors);
|
||||
gnReturnCode checkQueryDevices(gnInstanceHandle instance, uint32_t* count, gnPhysicalDeviceHandle* devices, gryphnInstanceFunctionLayers* next);
|
||||
void checkDestroyInstance(gnInstanceHandle instance, gryphnInstanceFunctionLayers* next, gnAllocators* alloctors);
|
||||
|
||||
gnPhysicalDevice* checkGetPhysicalDevices(gnInstanceHandle instance, uint32_t* count);
|
||||
gnBool checkCanDevicePresent(gnPhysicalDevice device, gnWindowSurfaceHandle windowSurface);
|
||||
|
||||
gnReturnCode checkCreateOutputDevice(gnInstanceHandle instance, gnOutputDeviceHandle device, gnOutputDeviceInfo deviceInfo);
|
||||
|
Reference in New Issue
Block a user