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> |
||
---|---|---|
.. | ||
buildshaders.bat | ||
bwqt224_64_nomips.dds | ||
bwqt224_64.png | ||
color.frag | ||
color.frag.qsb | ||
color.vert | ||
color.vert.qsb | ||
cube.h | ||
dds_bc1.h | ||
examplefw.h | ||
OpenfootageNET_fieldairport-512.hdr | ||
qt256_bc1_9mips.dds | ||
qt256.png | ||
texture_ms4.frag | ||
texture_ms4.frag.qsb | ||
texture.frag | ||
texture.frag.qsb | ||
texture.vert | ||
texture.vert.qsb |