"fixed" metal impl
This commit is contained in:
@@ -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;
|
||||
|
@@ -13,4 +13,4 @@ void metalTextureData(gnTextureHandle texture, void* pixelData);
|
||||
void metalDestroyTexture(gnTexture texture);
|
||||
|
||||
|
||||
NSUInteger mtlSampleCount(gnMultisampleCountFlags flags);
|
||||
NSUInteger mtlSampleCount(gnSampleCountFlags flags);
|
||||
|
@@ -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; }
|
||||
|
Reference in New Issue
Block a user