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; }