UBO consolidation (#3089)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Alex Cristici
2025-01-08 17:41:29 +02:00
committed by GitHub
parent cf9f41cf61
commit f582327191
262 changed files with 6968 additions and 6928 deletions

View File

@@ -16,12 +16,12 @@ using namespace style;
using namespace shaders;
void HeatmapTextureLayerTweaker::execute(LayerGroupBase& layerGroup, const PaintParameters& parameters) {
const auto& evaluated = static_cast<const HeatmapLayerProperties&>(*evaluatedProperties).evaluated;
if (layerGroup.empty()) {
return;
}
const auto& evaluated = static_cast<const HeatmapLayerProperties&>(*evaluatedProperties).evaluated;
#if !defined(NDEBUG)
const auto label = layerGroup.getName() + "-update-uniforms";
const auto debugGroup = parameters.encoder->createDebugGroup(label.c_str());
@@ -35,9 +35,9 @@ void HeatmapTextureLayerTweaker::execute(LayerGroupBase& layerGroup, const Paint
const HeatmapTexturePropsUBO propsUBO = {/* .matrix = */ util::cast<float>(matrix),
/* .opacity = */ evaluated.get<HeatmapOpacity>(),
/* .pad1,2,3 = */ 0,
0,
0};
/* .pad1 = */ 0,
/* .pad2 = */ 0,
/* .pad3 = */ 0};
auto& layerUniforms = layerGroup.mutableUniformBuffers();
layerUniforms.createOrUpdate(idHeatmapTexturePropsUBO, &propsUBO, parameters.context);
}