Shader sampler binding issues lead to firefox pdf rendering artifacts
Viewing practically any PDF that contains text using firefox (tested with Mozilla Firefox 121.0.1 in Arch guest os) with virgl as the OpenGL driver leads to misrendering of text.
Sometimes it is immediately observable, and most of the expected text will be missing. Sometimes the text will be improperly masked as if by a stencil buffer matching some highly magnified character glyphs. Sometimes it will render properly, until changing the "zoom" factor of the view.
I've isolated the cause to the sampler view + sampler state dirty tracking mask in vrend. If I force the dirty mask to be fully set, there are no artifacts, so something is invalidating the rendering state without properly setting the appropriate dirty bits.
I have a draft MR !1333 (merged) with a brute force fix, that I'll be updating and marking ready-for-review shortly I have updated with a more thorough cleanup and fix.