I needed to add screen ref counting to vc4 driver, so rather than yet
another copy of the same fd hashing and ref counting code, I implemented
it in the pipe-loader. AFAICT, the pipe-loader is the only place the
winsys create screen functions are called and seemed to be the best
location to put
Clearly a good idea to move this into common code, but there is just one
important thing you are missing here.
We intentional export the *_winsys_create() in the created libraries to
have only one global file descriptor for all libraries. See the
following files as well:
src/gallium/targets/v