fixed a good couple of metal warnings

This commit is contained in:
Gregory Wells
2025-08-03 15:44:09 -04:00
parent 2a6d3a108a
commit a49a0a5a3e
12 changed files with 65 additions and 54 deletions

View File

@@ -2,9 +2,13 @@
// metal instances are kinda useless
gnReturnCode metalCreateInstance(gnInstanceHandle instance, gnInstanceCreateInfo* instanceInfo, gryphnInstanceFunctionLayers* next) {
if (instance->instance == NULL) instance->instance = malloc(sizeof(gnPlatformInstance));
if (next != NULL) return GN_SUCCESS;
if (instanceInfo == NULL) return GN_INCOMPLETE;
instance->instance = malloc(sizeof(gnPlatformInstance));
return GN_SUCCESS;
}
void metalDestroyInstance(gnInstanceHandle instance, gryphnInstanceFunctionLayers* next) {
if (next != NULL) return;
free(instance->instance);
}