Skip to content

d3d12: Do not convert new d3d12_resource objects to their DXGI typeless formats for video usage

Sil Vilerino requested to merge sivileri/mesa:d3d12_video_nodxgitypeless into main

When the d3d12 gallium driver creates a d3d12_resource, it converts its DXGI format to the typeless variant by default, but those typeless variants are not supported as Video Processor input/output as specified here in the docs.

Apps with VA workloads using VASurface objects with format VA_FOURCC_RGBA and similar must be created with DXGI_..._UNORM types, honoring the PIPE_..._UNORM format chosen by the VA frontend state tracker function VaFourccToPipeFormat.

To address this, PIPE_BIND_CUSTOM is used by the d3d12 video buffer when creating video resources to hint about this so the PIPE_..._UNORM input format is honored.

Merge request reports