Skip to content

vtest: Always hand out a new vtest resource ID when virgl is enabled

The vtest resource cache doesn't keep the actual OpenGL ressource, only the structures that allocate a vtest resource ID and a pointer to the real resource. So when re-using a vtest resource the GL resource will still be re-created, but with the cached resource ID. Since virglrenderer caches some binding info based on the resource ID in sub_ctx, re-binding a resources may actually be silently ignored, because the caching info contained stale binding info that was not cleared because we don't keep track of all binding points of a resource.

Instead, when virgl is enabled, hand out a new resource ID, so that each new GL resource created on the host gets a new ID. This is only relevant for protocol version 3 that uses server side resource IDs.

Edited by Gert Wollny

Merge request reports