metal is instance suitable
This commit is contained in:
@@ -8,7 +8,7 @@ gryphnInstanceFunctionLayers metalLoadAPILayer(void) {
|
||||
.createInstance = metalCreateInstance,
|
||||
.queryDevices = metalQueryDevices,
|
||||
.destroyInstance = metalDestroyInstance,
|
||||
// .isSuitable = metalIsInstanceSuitable,
|
||||
.isSuitable = metalIsInstanceSuitable,
|
||||
.getPhysicalDeviceProperties = metalQueryPhysicalDeviceProperties,
|
||||
.next = NULL
|
||||
};
|
||||
|
@@ -9,4 +9,5 @@ typedef struct gnPlatformInstance_t {
|
||||
|
||||
gnReturnCode metalCreateInstance(gnInstanceHandle instance, gnInstanceCreateInfo* instanceInfo, gryphnInstanceFunctionLayers* next, gnAllocators* allocators);
|
||||
gnReturnCode metalQueryDevices(gnInstanceHandle instance, uint32_t* count, gnPhysicalDeviceHandle* devices, gryphnInstanceFunctionLayers* next);
|
||||
gnBool metalIsInstanceSuitable(gnInstanceHandle instance, gnSuitableField field, gryphnInstanceFunctionLayers* next);
|
||||
void metalDestroyInstance(gnInstance instance, gryphnInstanceFunctionLayers* next, gnAllocators* allocators);
|
||||
|
@@ -17,6 +17,11 @@ gnReturnCode metalQueryDevices(gnInstanceHandle instance, uint32_t* count, gnPhy
|
||||
devices[i] = (uint64_t)metalDevices[i];
|
||||
return GN_SUCCESS;
|
||||
}
|
||||
gnBool metalIsInstanceSuitable(gnInstanceHandle instance, gnSuitableField field, gryphnInstanceFunctionLayers* next) {
|
||||
switch (field) {
|
||||
case GN_NON_EXISTANT_PHYSICAL_DEVICE: return GN_FALSE;
|
||||
}
|
||||
}
|
||||
void metalDestroyInstance(gnInstanceHandle instance, gryphnInstanceFunctionLayers* next, gnAllocators* allocators) {
|
||||
if (next != NULL) return;
|
||||
allocators->free(instance->instance, allocators->userData);
|
||||
|
Reference in New Issue
Block a user