Skip to content

venus: ignore pNext structs unknown to the renderer protocol

Yiwei Zhang requested to merge zzyiwei/mesa:ignore-struct into main

Per Vulkan spec:

Any component of the implementation (the loader, any enabled layers, and drivers) must skip over, without processing (other than reading the sType and pNext members) any extending structures in the chain not defined by core versions or extensions supported by that component.

When it comes to Venus, given the protocol cs buffer is not designed to hold byte size for each struct to be decoded (that would be much much bigger streaming overhead to properly store the sizes and skip in the renderer protocol encoder/decoder while figuring out whether there's pNext need to be further looked into), the renderer side protocol header must only see the known structs.

Since Venus has started supporting more and more extensions outside of the core, driver side protocol runs ahead of renderer side protocol with new extensions will be common (already happened when the renderer side uprev gets unexpected delayed causing cts failures around the structs from the new extensions: the test can chain unknown pnext and driver must ignore per spec). This MR together with the virglrenderer one will pass the renderer protocol supported extensions to the driver while teaching the driver side protocol headers to consume that extensions and core version infos to ignore any pNext structs that are unknown to the renderer protocol header.

protocol: https://gitlab.freedesktop.org/olv/venus-protocol/-/merge_requests/37

virglrenderer: virgl/virglrenderer!756 (merged) and virgl/virglrenderer!778 (merged)

TEST: Verified with logs and no perf/cts regressions.

Edited by Yiwei Zhang

Merge request reports