86876744f0
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> |
||
---|---|---|
.. | ||
compressedtexture_bc1 | ||
compressedtexture_bc1_subupload | ||
computebuffer | ||
computeimage | ||
cubemap | ||
cubemap_scissor | ||
floattexture | ||
hellominimalcrossgfxtriangle | ||
instancing | ||
mrt | ||
msaarenderbuffer | ||
msaatexture | ||
multiwindow | ||
multiwindow_threaded | ||
offscreen | ||
qrhiprof | ||
shadowmap | ||
shared | ||
texuploads | ||
triquadcube | ||
rhi.pro |