Let the SimpleQuadRenderer own its shader resource bindings
The SimpleQuadRenderer fetched its srb from the shared srb cache using
bindings that only hold the texture and sampler. The texture is often
the output of a render pass, which is recreated when the view is
resized, so each resize added a new cache entry and left the previous
one behind, still referencing the deleted texture. A texture allocated
later at the same address could then pick up the stale srb.
Releasing the previous cache entry when the bindings change would not
be safe either, since the bindings carry nothing unique to the
renderer: two renderers showing the same texture share the entry, and
one of them switching texture would delete the srb the other one is
still using. Instead, keep the srb in the renderer, rebuild it when the
bindings change and delete it with the renderer.
Task-number: QTBUG-151125
Pick-to: 6.12
Change-Id: I94f245a9af13ab9080494935afffe8bf0797ebe3
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>