Skip to content

Commit

Permalink
Merge pull request godotengine#97304 from kroketio/metal-return-logic…
Browse files Browse the repository at this point in the history
…al-device-handle

Metal: Implement `texture_create_from_extension`
  • Loading branch information
akien-mga committed Oct 4, 2024
2 parents 36837bf + 0ad1820 commit f032af7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/metal/rendering_device_driver_metal.mm
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,11 @@ _FORCE_INLINE_ MTLSize mipmapLevelSizeFromSize(MTLSize p_size, NSUInteger p_leve
}

RDD::TextureID RenderingDeviceDriverMetal::texture_create_from_extension(uint64_t p_native_texture, TextureType p_type, DataFormat p_format, uint32_t p_array_layers, bool p_depth_stencil) {
ERR_FAIL_V_MSG(RDD::TextureID(), "not implemented");
id<MTLTexture> obj = (__bridge id<MTLTexture>)(void *)(uintptr_t)p_native_texture;

// We only need to create a RDD::TextureID for an existing, natively-provided texture.

return rid::make(obj);
}

RDD::TextureID RenderingDeviceDriverMetal::texture_create_shared(TextureID p_original_texture, const TextureView &p_view) {
Expand Down

0 comments on commit f032af7

Please sign in to comment.