summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhid3d11_p_p.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2021-09-02 15:27:22 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2021-09-03 17:14:59 +0200
commit69065160048335b8f5e2e3d0ba254a2065c51c5d (patch)
tree865e572355c1f860562b2b4badadfe01639e6fe2 /src/gui/rhi/qrhid3d11_p_p.h
parentc104af4c44dcbe9be23f2cc0259d39fe4f2d1c70 (diff)
rhi: Add a way to tell an srb that only the resources have changed
Until now, after updating the bindings one had to always rebuild the srb, which can be heavy esp. on Vulkan (release old objects, create new layout object, descriptor sets). When updating the binding list in a way that it is fully isLayoutCompatible() == true with the previous list, this is an overkill. Internally, most notably in setShaderResources(), we already should have everything in place in all backends to recognize if the entries in the binding list refer to QRhiBuffer/Texture/Sampler objects that are different than before, and so apart from adding an alternative to create() in the API there is not much else needed here. Pick-to: 6.2 Change-Id: I2efdd4fd0b24c7ebba694a975ed83509744b044b Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhid3d11_p_p.h')
-rw-r--r--src/gui/rhi/qrhid3d11_p_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhid3d11_p_p.h b/src/gui/rhi/qrhid3d11_p_p.h
index 0695259612..63705ccd0e 100644
--- a/src/gui/rhi/qrhid3d11_p_p.h
+++ b/src/gui/rhi/qrhid3d11_p_p.h
@@ -213,6 +213,7 @@ struct QD3D11ShaderResourceBindings : public QRhiShaderResourceBindings
~QD3D11ShaderResourceBindings();
void destroy() override;
bool create() override;
+ void updateResources(UpdateFlags flags) override;
bool hasDynamicOffset = false;
QVarLengthArray<QRhiShaderResourceBinding, 8> sortedBindings;