From 64760504e79c3069d99b5e852688a2589ec22028 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 26 Nov 2019 12:43:56 +0100 Subject: rhi: Allow testing QRhiRenderPassDescriptors for compatibility For Metal and Vulkan this needs actual work because that's where the concept of renderpass descriptors is relevant. GL and D3D can just return true always. The big benefit of this is that Qt Quick can now compare renderpass descriptors via isCompatible() for its pipeline cache (similarly to how it is already using isLayoutCompatible() for srbs), and so renderpass descriptors for layers (Item.layer, ShaderEffect) will typically be compatible and so can pick up pipelines created by other layers from the cache. Also add autotests for shader resource binding and renderpass descriptor compatibility. Task-number: QTBUG-80318 Change-Id: I0008bc51c4ee13b0113d2c8caf799e1257f18a18 Reviewed-by: Paul Olav Tvete --- src/gui/rhi/qrhimetal_p_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui/rhi/qrhimetal_p_p.h') diff --git a/src/gui/rhi/qrhimetal_p_p.h b/src/gui/rhi/qrhimetal_p_p.h index 2be86db5c8..7876539fcd 100644 --- a/src/gui/rhi/qrhimetal_p_p.h +++ b/src/gui/rhi/qrhimetal_p_p.h @@ -138,6 +138,7 @@ struct QMetalRenderPassDescriptor : public QRhiRenderPassDescriptor QMetalRenderPassDescriptor(QRhiImplementation *rhi); ~QMetalRenderPassDescriptor(); void release() override; + bool isCompatible(const QRhiRenderPassDescriptor *other) const override; // there is no MTLRenderPassDescriptor here as one will be created for each pass in beginPass() -- cgit v1.2.3