diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2021-03-08 14:25:57 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2021-03-09 12:00:48 +0100 |
commit | 80029e0ca65d4bf4575f7a08d186c781ec6c2f0e (patch) | |
tree | 876115cce65a0a9e9db63b2dc94bcbaf3e8e241c /src/gui/rhi/qrhigles2_p_p.h | |
parent | 2f9a3352b25417845375c47382f6e5fe931c157a (diff) |
rhi: gl: Fix missing uniform data with certain command lists
Following patterns from the other backends is insufficient with OpenGL
because we do not use real uniform buffers. There is currently a
possibility that a shader program will be bound without following it
with setting uniforms. Correct this by having a second level of tracking
of the associated srb object in the pipelines.
Pick-to: 6.0 6.1
Fixes: QTBUG-91630
Change-Id: I74a012daade826dd22c436bde06381c1233bad11
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhigles2_p_p.h')
-rw-r--r-- | src/gui/rhi/qrhigles2_p_p.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhigles2_p_p.h b/src/gui/rhi/qrhigles2_p_p.h index dff2de3038..98f2f98b8a 100644 --- a/src/gui/rhi/qrhigles2_p_p.h +++ b/src/gui/rhi/qrhigles2_p_p.h @@ -293,6 +293,8 @@ struct QGles2GraphicsPipeline : public QRhiGraphicsPipeline QGles2UniformDescriptionVector uniforms; QGles2SamplerDescriptionVector samplers; QGles2UniformState uniformState[QGles2UniformState::MAX_TRACKED_LOCATION + 1]; + QRhiShaderResourceBindings *currentSrb = nullptr; + uint currentSrbGeneration = 0; uint generation = 0; friend class QRhiGles2; }; @@ -308,6 +310,8 @@ struct QGles2ComputePipeline : public QRhiComputePipeline QGles2UniformDescriptionVector uniforms; QGles2SamplerDescriptionVector samplers; QGles2UniformState uniformState[QGles2UniformState::MAX_TRACKED_LOCATION + 1]; + QRhiShaderResourceBindings *currentSrb = nullptr; + uint currentSrbGeneration = 0; uint generation = 0; friend class QRhiGles2; }; |