qt5base-lts/tests/manual/rhi
Laszlo Agocs 86876744f0 Ensure drawable size atomicity within a frame
Revert surfacePixelSize() to be a getter only. With Metal this will
mean returning the "live" layer size (and so not the
layer.drawableSize), which is in line with what we expect with other
backends.

Instead, we leave it to the swapchain's buildOrResize() to "commit"
the size by setting drawableSize on the layer. With typical
application or Qt Quick logic this ensures that layer.drawableSize is
set once and stays static until we get to process the next resize - on
the rendering thread.

This of course would still mean that there was a race when a client
queries surfacePixelSize() to set the depth-stencil buffer size that
is associated with a swapchain. (because that must happen before
calling buildOrResize() according to the current semantics)

That can however be solved in a quite elegant way, it turns out,
because we already have a flag that indicates if a QRhiRenderBuffer is
used in combination with (and only in combination with) a
swapchain. If we simply say that setting the UsedWithSwapChainOnly
flag provides automatic sizing as well (so no setPixelSize() call is
needed), clients can simply get rid of the problematic
surfacePixelSize() query and everything works.

Task-number: QTBUG-78641
Change-Id: Ib1bfc9ef8531bcce033d1f1e5d4d5b4984d6d69f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-29 22:16:55 +02:00
..
compressedtexture_bc1 rhi: Add a --transparent option to manual tests 2019-09-26 17:02:12 +02:00
compressedtexture_bc1_subupload rhi: Add a --transparent option to manual tests 2019-09-26 17:02:12 +02:00
computebuffer rhi: Add a --transparent option to manual tests 2019-09-26 17:02:12 +02:00
computeimage rhi: Add a --transparent option to manual tests 2019-09-26 17:02:12 +02:00
cubemap rhi: Add a --transparent option to manual tests 2019-09-26 17:02:12 +02:00
cubemap_scissor rhi: Add a --transparent option to manual tests 2019-09-26 17:02:12 +02:00
floattexture rhi: Add a --transparent option to manual tests 2019-09-26 17:02:12 +02:00
hellominimalcrossgfxtriangle Ensure drawable size atomicity within a frame 2019-09-29 22:16:55 +02:00
instancing rhi: Add a --transparent option to manual tests 2019-09-26 17:02:12 +02:00
mrt rhi: Add a --transparent option to manual tests 2019-09-26 17:02:12 +02:00
msaarenderbuffer rhi: Add a --transparent option to manual tests 2019-09-26 17:02:12 +02:00
msaatexture rhi: Add a --transparent option to manual tests 2019-09-26 17:02:12 +02:00
multiwindow Ensure drawable size atomicity within a frame 2019-09-29 22:16:55 +02:00
multiwindow_threaded Ensure drawable size atomicity within a frame 2019-09-29 22:16:55 +02:00
offscreen rhi: Fix clear value in offscreen test 2019-07-31 09:04:49 +02:00
qrhiprof Introduce the Qt graphics abstraction as private QtGui helpers 2019-06-13 10:13:45 +02:00
shadowmap rhi: Add a --transparent option to manual tests 2019-09-26 17:02:12 +02:00
shared Ensure drawable size atomicity within a frame 2019-09-29 22:16:55 +02:00
texuploads rhi: Add a --transparent option to manual tests 2019-09-26 17:02:12 +02:00
triquadcube rhi: Add a --transparent option to manual tests 2019-09-26 17:02:12 +02:00
rhi.pro rhi: Unify handling of special cases for scissor and viewport rects 2019-09-26 17:02:05 +02:00