UBO consolidation (#3089)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user