fix can device present function

This commit is contained in:
Gregory Wells
2025-10-01 11:41:08 -04:00
parent 63ec31216e
commit 5ce0ff3350
8 changed files with 9 additions and 10 deletions

View File

@@ -23,7 +23,7 @@ struct gnPlatformOutputDevice_t {
} gnPlatformOutputDevice;
gnPhysicalDevice* getMetalDevices(gnInstanceHandle instance, uint32_t* deviceCount);
gnBool metalCanDevicePresent(gnPhysicalDevice device, gnWindowSurface windowSurface);
gnBool metalCanDevicePresent(gnInstance instance, gnPhysicalDevice device, gnWindowSurface windowSurface);
gnReturnCode createMetalOutputDevice(gnInstanceHandle instance, gnOutputDeviceHandle outputDevice, gnOutputDeviceInfo deviceInfo);
void waitForMetalDevice(gnOutputDeviceHandle device);

View File

@@ -23,7 +23,7 @@ gnPhysicalDeviceProperties metalQueryPhysicalDeviceProperties(gnInstance instanc
};
}
gnBool metalCanDevicePresent(gnPhysicalDevice device, gnWindowSurface windowSurface) {
gnBool metalCanDevicePresent(gnInstance instance, gnPhysicalDevice device, gnWindowSurface windowSurface) {
if (device == GN_NULL_HANDLE || windowSurface == GN_NULL_HANDLE) return GN_FALSE;
return GN_TRUE; // I belive that a window should always be able to present to a surface in metal
}