diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-11-26 12:43:56 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-11-27 19:07:36 +0100 |
commit | 64760504e79c3069d99b5e852688a2589ec22028 (patch) | |
tree | 05524e084cbd5f9b08108b072d87209409d74e47 /src/gui/rhi/qrhimetal_p_p.h | |
parent | 48d2ffd39786b2decad76132158aeba172a3b8a8 (diff) |
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 <paul.tvete@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhimetal_p_p.h')
-rw-r--r-- | src/gui/rhi/qrhimetal_p_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
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() |