From f1f95b218bd7fded95e7f80fef86a44c3dcea676 Mon Sep 17 00:00:00 2001 From: jcm <6864788+jcm93@users.noreply.github.com> Date: Thu, 15 Jan 2026 13:20:50 -0600 Subject: [PATCH] libobs-opengl: Support texture creation from IOSurface using RGBA64Half --- libobs-opengl/gl-cocoa.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libobs-opengl/gl-cocoa.m b/libobs-opengl/gl-cocoa.m index 309411eba..853d2aa83 100644 --- a/libobs-opengl/gl-cocoa.m +++ b/libobs-opengl/gl-cocoa.m @@ -495,6 +495,12 @@ gs_texture_t *device_texture_create_from_iosurface(gs_device_t *device, void *io texture_type = GL_UNSIGNED_INT_8_8_8_8_REV; break; } + case kCVPixelFormatType_64RGBAHalf: { + color_format = GL_RGBA; + internal_format = GL_RGBA_FLOAT16_APPLE; + texture_type = GL_HALF_APPLE; + break; + } default: blog(LOG_ERROR, "Unexpected pixel format: %d (%c%c%c%c)", pixelFormat, pixelFormat >> 24, pixelFormat >> 16, pixelFormat >> 8, pixelFormat); @@ -579,6 +585,7 @@ bool gs_texture_rebind_iosurface(gs_texture_t *texture, void *iosurf) switch (pixelFormat) { case kCVPixelFormatType_ARGB2101010LEPacked: case kCVPixelFormatType_32BGRA: + case kCVPixelFormatType_64RGBAHalf: break; case 0: blog(LOG_ERROR, "Invalid IOSurface Buffer");