From 3a5ddac2c5ccb108836a2437e301a78c5f7e64a5 Mon Sep 17 00:00:00 2001 From: Gregory Wells Date: Wed, 1 Oct 2025 09:21:21 -0400 Subject: [PATCH] "fixed" metal impl --- projects/apis/metal/src/instance/metal_instance.m | 2 +- projects/apis/metal/src/texture/metal_texture.h | 2 +- projects/apis/metal/src/texture/metal_texture.m | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/apis/metal/src/instance/metal_instance.m b/projects/apis/metal/src/instance/metal_instance.m index 4cdaf31..1ad172e 100644 --- a/projects/apis/metal/src/instance/metal_instance.m +++ b/projects/apis/metal/src/instance/metal_instance.m @@ -9,7 +9,7 @@ gnReturnCode metalCreateInstance(gnInstanceHandle instance, gnInstanceCreateInfo return GN_SUCCESS; } gnReturnCode metalQueryDevices(gnInstanceHandle instance, uint32_t* count, gnPhysicalDeviceHandle* devices, gryphnInstanceFunctionLayers* next) { - if (instance == GN_NULL_HANDLE) return NULL; + if (instance == GN_NULL_HANDLE) return GN_INVALID_HANDLE; NSArray *metalDevices = MTLCopyAllDevices(); *count = (uint32_t)[metalDevices count]; if (devices == NULL) return GN_SUCCESS; diff --git a/projects/apis/metal/src/texture/metal_texture.h b/projects/apis/metal/src/texture/metal_texture.h index 891d36d..5dcf103 100644 --- a/projects/apis/metal/src/texture/metal_texture.h +++ b/projects/apis/metal/src/texture/metal_texture.h @@ -13,4 +13,4 @@ void metalTextureData(gnTextureHandle texture, void* pixelData); void metalDestroyTexture(gnTexture texture); -NSUInteger mtlSampleCount(gnMultisampleCountFlags flags); +NSUInteger mtlSampleCount(gnSampleCountFlags flags); diff --git a/projects/apis/metal/src/texture/metal_texture.m b/projects/apis/metal/src/texture/metal_texture.m index 1c53b98..7272d8c 100644 --- a/projects/apis/metal/src/texture/metal_texture.m +++ b/projects/apis/metal/src/texture/metal_texture.m @@ -2,7 +2,7 @@ #include "surface/metal_surface.h" #include "devices/metal_output_devices.h" -NSUInteger mtlSampleCount(gnMultisampleCountFlags flags) { +NSUInteger mtlSampleCount(gnSampleCountFlags flags) { if ((flags & GN_SAMPLE_BIT_64) == GN_SAMPLE_BIT_64) { return 64; } if ((flags & GN_SAMPLE_BIT_32) == GN_SAMPLE_BIT_32) { return 32; } if ((flags & GN_SAMPLE_BIT_16) == GN_SAMPLE_BIT_16) { return 16; }