Fix cleaning up after texture or buffer readback


The resource update in the render pass wasn't cleared when the mode
changed leaving old resource update pointer with destroyed resources.
Store the pointer in the oitRenderContext instead, which gets cleared
when the mode changes.

Also store the pending and completed QRhiReadbackResults in
oitRenderContext and deallocate them when calling reset().

Also dedup the readback code in renderPass between buffers and images.

Pick-to: 6.12
Change-Id: Ie1113caad2c48b6964f42ff3e6f213cf169f22e1
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
commitf6f469c8f9af8084a2d4e12c9e3a6699f4fa3d39
parentb8e9c90ad06a02919f30e0974c34caeb95eaffe2
authorAntti Määttä <antti.maatta@qt.io>
committerAntti Määttä <antti.maatta@qt.io>
commit timeTue, 6 Oct 2026 09:59:27 +0000