diff --git a/src/mbgl/renderer/layers/symbol_layer_tweaker.cpp b/src/mbgl/renderer/layers/symbol_layer_tweaker.cpp index 2ef06ead3ad..aded5a44acd 100644 --- a/src/mbgl/renderer/layers/symbol_layer_tweaker.cpp +++ b/src/mbgl/renderer/layers/symbol_layer_tweaker.cpp @@ -105,6 +105,12 @@ void SymbolLayerTweaker::execute(LayerGroupBase& layerGroup, const PaintParamete /*.pad1=*/0, /*.pad2=*/{0, 0}}; + if (!dynamicBuffer) { + dynamicBuffer = parameters.context.createUniformBuffer(&dynamicUBO, sizeof(dynamicUBO)); + } else { + dynamicBuffer->update(&dynamicUBO, sizeof(dynamicUBO)); + } + visitLayerGroupDrawables(layerGroup, [&](gfx::Drawable& drawable) { if (!drawable.getTileID() || !drawable.getData()) { return; @@ -124,12 +130,6 @@ void SymbolLayerTweaker::execute(LayerGroupBase& layerGroup, const PaintParamete iconPropertiesUpdated = false; } - if (!dynamicBuffer) { - dynamicBuffer = parameters.context.createUniformBuffer(&dynamicUBO, sizeof(dynamicUBO)); - } else { - dynamicBuffer->update(&dynamicUBO, sizeof(dynamicUBO)); - } - // from RenderTile::translatedMatrix const auto translate = isText ? evaluated.get() : evaluated.get(); const auto anchor = isText ? evaluated.get()