[core] Don't crash when attribute count is exceeded
This commit is contained in:
committed by
Lauren Budorick
parent
f6da3ba9be
commit
c3346f473a
@@ -62,19 +62,34 @@ void RenderLineLayer::render(PaintParameters& parameters, RenderSource*) {
|
||||
LineBucket& bucket = *reinterpret_cast<LineBucket*>(tile.tile.getBucket(*baseImpl));
|
||||
|
||||
auto draw = [&] (auto& program, auto&& uniformValues) {
|
||||
program.get(evaluated).draw(
|
||||
auto& programInstance = program.get(evaluated);
|
||||
|
||||
const auto& paintPropertyBinders = bucket.paintPropertyBinders.at(getID());
|
||||
|
||||
const auto allUniformValues = programInstance.computeAllUniformValues(
|
||||
std::move(uniformValues),
|
||||
paintPropertyBinders,
|
||||
evaluated,
|
||||
parameters.state.getZoom()
|
||||
);
|
||||
const auto allAttributeBindings = programInstance.computeAllAttributeBindings(
|
||||
*bucket.vertexBuffer,
|
||||
paintPropertyBinders,
|
||||
evaluated
|
||||
);
|
||||
|
||||
checkRenderability(parameters, programInstance.activeBindingCount(allAttributeBindings));
|
||||
|
||||
programInstance.draw(
|
||||
parameters.context,
|
||||
gl::Triangles(),
|
||||
parameters.depthModeForSublayer(0, gl::DepthMode::ReadOnly),
|
||||
parameters.stencilModeForClipping(tile.clip),
|
||||
parameters.colorModeForRenderPass(),
|
||||
std::move(uniformValues),
|
||||
*bucket.vertexBuffer,
|
||||
*bucket.indexBuffer,
|
||||
bucket.segments,
|
||||
bucket.paintPropertyBinders.at(getID()),
|
||||
evaluated,
|
||||
parameters.state.getZoom(),
|
||||
allUniformValues,
|
||||
allAttributeBindings,
|
||||
getID()
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user