mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-07 08:36:02 -10:00
An external submit hands the surface a payload with its pixels, and the completion frees it before release() runs - and still frees it when the owner freed the surface meanwhile and release() never comes. A still thumbnail's decoded image goes over that way, so a reset or an animation replacing the still's surface while its upload is in flight no longer strands the image; gfx_surface_free_adopt() is the same mechanism with free(). Submissions carry their format: gfx_surface_new() takes one gfx_surface_pixfmt bit and sizes slots and copies from it, the external submit takes a gfx_surface_src_t, and the texture key is layout plus channel order, so an in-place update never writes one layout into a texture made for another. 2101010 reaches the driver as 2101010, which restores 10-bit overlays and stills; a format the driver does not sample is refused rather than mislabelled, a slot is narrowed in place where it can be, and owners narrow their own images. submit_pixels() refuses a slotless surface. FP16 is no longer advertised from a scRGB framebuffer flag, since no texture path or menu composite carries it yet; the sizes and keys here already follow the format, so adding it is a driver change. image_texture_narrow_10bit() writes the order supports_rgba names, so the descriptor stays true and no caller swizzles after it in a second pass. threaded_video_test gains an external surface lane for the cancelled payload and the refused formats.