cocoa: untested vulkan code

This commit is contained in:
IoI_xD 2026-04-14 20:03:59 -07:00
commit 065b0d824c
4 changed files with 43 additions and 0 deletions

View file

@ -2,6 +2,11 @@
#include "../../external/stb_ds.h"
#include "Mw/LowLevel/Cocoa.h"
#ifdef MW_VULKAN
#include <vulkan/vulkan_core.h>
#include <vulkan/vulkan_metal.h>
#endif
#ifdef __clang__
#pragma clang push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@ -1087,5 +1092,17 @@ static int MwLLCocoaCallInitImpl(void) {
return 0;
}
#ifdef MW_VULKAN
VkMetalSurfaceCreateInfoEXT MwCocoaGetMetalSurfaceCreateInfo(MwWidget handle) {
VkMetalSurfaceCreateInfoEXT createInfo = {
.sType = VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT,
.pNext = NULL,
.flags = 0,
.pLayer = (CAMetalLayer*)[handle->lowlevel->cocoa.real->view layer],
};
return createInfo;
};
#endif
#include "call.c"
CALL(Cocoa);