On Tue Sep 2 14:26:18 2025 +0000, Conor McCarthy wrote:
Anything to do here?
This still looks like a bunch of workarounds. Existing helpers media_engine_transfer_to_d3d11_texture() and media_engine_transfer_d3d11() are already split too much. media_engine_transfer_to_d3d11_texture() won't work if device_manager == NULL, yet it's used in this case.
I think what we need is to check formats in media_engine_transfer_d3d11() if provided destination texture has same format, we'll use CopySubresourceRegion(), otherwise go through rendering. Regarding higher depth format, I think we might as well try if topology resolves with given MF_MEDIA_ENGINE_VIDEO_OUTPUT_FORMAT, if it doesn't we should fall back to something that always works like DXGI_FORMAT_B8G8R8A8_UNORM. After that for TransferVideoFrame() same logic will apply - if destination texture format does not match, we go through rendering. We don't have to check manually for every possible output format, and 'format_mismatch' will differ depending on destination texture format in Transfer() call, which could be different every time.