diff options
author | Jere Tuliniemi <jere.tuliniemi@qt.io> | 2020-03-11 10:52:59 +0200 |
---|---|---|
committer | Jere Tuliniemi <jere.tuliniemi@qt.io> | 2020-03-23 11:25:08 +0200 |
commit | 941250a6c2e5868abbec44d3cabff66daec638fb (patch) | |
tree | eb7d54a15624c182ff2dabd7ee44d7f212660a8b | |
parent | e97bf0e6be6a22a6f7feb074841058291b917d33 (diff) |
Disable temporal AA when layer texture size changes
Turns off temporal AA on frames during which the layer texture size
has changed. The texture change would cause temporal AA to leak memory.
It also would make the antialiasing invalid since the temporal AA
properties wouldn't apply anymore to the resized texture.
Task-number: QT3DS-4079
Task-number: QT3DS-4080
Change-Id: Ia6dab001a63c2fcff591e7bc812260c1991639e9
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r-- | src/runtimerender/rendererimpl/Qt3DSRendererImplLayerRenderData.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/runtimerender/rendererimpl/Qt3DSRendererImplLayerRenderData.cpp b/src/runtimerender/rendererimpl/Qt3DSRendererImplLayerRenderData.cpp index 9f47d47..e41a738 100644 --- a/src/runtimerender/rendererimpl/Qt3DSRendererImplLayerRenderData.cpp +++ b/src/runtimerender/rendererimpl/Qt3DSRendererImplLayerRenderData.cpp @@ -1551,10 +1551,12 @@ void SLayerRenderData::RunRenderPass(TRenderRenderableFunction inRenderFn, aaFactorIndex = (m_ProgressiveAAPassIndex - 1); theVertexOffsets = s_VertexOffsets[aaFactorIndex]; } else { - if (temporalAATexture.GetTexture()) - theLastLayerTexture.StealTexture(temporalAATexture); - else if (hadLayerTexture) - theLastLayerTexture.StealTexture(m_LayerTexture); + if (hadLayerTexture) { + if (temporalAATexture.GetTexture()) + theLastLayerTexture.StealTexture(temporalAATexture); + else + theLastLayerTexture.StealTexture(m_LayerTexture); + } theVertexOffsets = s_TemporalVertexOffsets[m_TemporalAAPassIndex]; ++m_TemporalAAPassIndex; |