aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickopenglshadereffectnode.cpp
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2022-09-12 18:29:45 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2022-09-12 18:29:45 +0300
commitda0aac1057552048f59075beb31861a6cc076684 (patch)
tree020cd8784f01248ea051bbf70254b8bcb3100a23 /src/quick/items/qquickopenglshadereffectnode.cpp
parentf274d775774b78f6217c9770ae87045d969acbe1 (diff)
parent4757cac470edbeaeaceca4e63075d9f1139f546b (diff)
Merge remote-tracking branch 'origin/tqtc/lts-5.15.7' into tqtc/lts-5.15-opensourcev5.15.7-lts-lgpl
Diffstat (limited to 'src/quick/items/qquickopenglshadereffectnode.cpp')
-rw-r--r--src/quick/items/qquickopenglshadereffectnode.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/quick/items/qquickopenglshadereffectnode.cpp b/src/quick/items/qquickopenglshadereffectnode.cpp
index 5721f116e8..bc50099903 100644
--- a/src/quick/items/qquickopenglshadereffectnode.cpp
+++ b/src/quick/items/qquickopenglshadereffectnode.cpp
@@ -120,10 +120,13 @@ void QQuickCustomMaterialShader::updateState(const RenderState &state, QSGMateri
: QQuickShaderEffect::Error);
}
+ if (newEffect != oldEffect)
+ m_initialized = false;
+
int textureProviderIndex = 0;
if (!m_initialized) {
for (int shaderType = 0; shaderType < QQuickOpenGLShaderEffectMaterialKey::ShaderTypeCount; ++shaderType) {
- Q_ASSERT(m_uniformLocs[shaderType].isEmpty());
+ m_uniformLocs[shaderType].clear();
m_uniformLocs[shaderType].reserve(material->uniforms[shaderType].size());
for (int i = 0; i < material->uniforms[shaderType].size(); ++i) {
const UniformData &d = material->uniforms[shaderType].at(i);