Add checks for zero indexes on fill patterns to match fills. (#1638)
Co-authored-by: Bart Louwers <bart@emeel.net> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -23,7 +23,10 @@ runs:
|
||||
let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
|
||||
return artifact.name == "${{ inputs.artifact-name }}"
|
||||
})[0];
|
||||
if (!matchArtifact) throw new Error("Could not find artifact ${{ inputs.artifact-name }}");
|
||||
if (!matchArtifact) {
|
||||
console.log("Could not find artifact '${{ inputs.artifact-name }}'");
|
||||
return;
|
||||
}
|
||||
let download = await github.rest.actions.downloadArtifact({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
@@ -33,8 +36,15 @@ runs:
|
||||
let fs = require('fs');
|
||||
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/${{ inputs.artifact-name }}.zip`, Buffer.from(download.data));
|
||||
|
||||
- name: "Check .zip file existence"
|
||||
id: zip_exists
|
||||
uses: andstor/file-existence-action@v2.0.0
|
||||
with:
|
||||
files: ${{ inputs.artifact-name }}.zip
|
||||
|
||||
- name: Unzip artifact
|
||||
shell: bash
|
||||
if: steps.zip_exists.outputs.files_exists == 'true'
|
||||
run: unzip ${{ inputs.artifact-name }}.zip
|
||||
|
||||
- name: "Check file existence"
|
||||
|
||||
4
.github/workflows/android-ci.yml
vendored
4
.github/workflows/android-ci.yml
vendored
@@ -45,6 +45,10 @@ jobs:
|
||||
IS_LOCAL_DEVELOPMENT: false
|
||||
MLN_ANDROID_STL: c++_static
|
||||
steps:
|
||||
- name: Update Apt Package Cache
|
||||
run: sudo apt-get update
|
||||
working-directory: .
|
||||
|
||||
- name: Free Disk Space (Ubuntu)
|
||||
uses: jlumbroso/free-disk-space@main
|
||||
with:
|
||||
|
||||
@@ -374,8 +374,10 @@ public:
|
||||
using Attribute = typename DataDrivenPaintProperty::Attribute;
|
||||
using Type = typename Attribute::Type; // ::mbgl::gfx::AttributeType<type_, n_>
|
||||
using InterpType = ZoomInterpolatedAttributeType<Type>;
|
||||
#if !defined(NDEBUG)
|
||||
using Value = typename Type::Value; // std::array<T, N>
|
||||
using InterpValue = typename InterpType::Value; // std::array<T, 2*N>
|
||||
#endif
|
||||
|
||||
const auto vertexCount = binder->getVertexCount();
|
||||
const auto isConstant = evaluated.template get<DataDrivenPaintProperty>().isConstant();
|
||||
|
||||
@@ -167,7 +167,10 @@ void DrawableBuilder::setSegments(const gfx::DrawMode mode,
|
||||
gfx::IndexVectorBasePtr indexes,
|
||||
const SegmentBase* segments,
|
||||
const std::size_t segmentCount) {
|
||||
assert(indexes && indexes->elements());
|
||||
if (!indexes || !indexes->elements()) {
|
||||
assert("Missing segment indexes");
|
||||
return;
|
||||
}
|
||||
impl->sharedIndexes = std::move(indexes);
|
||||
for (std::size_t i = 0; i < segmentCount; ++i) {
|
||||
const auto& seg = segments[i];
|
||||
|
||||
@@ -210,10 +210,12 @@ void DrawableGL::upload(gfx::UploadPass& uploadPass) {
|
||||
|
||||
if (!glSeg.getVertexArray().isValid()) {
|
||||
auto vertexArray = glContext.createVertexArray();
|
||||
IndexBufferGL& indexBuffer = *static_cast<IndexBufferGL*>(impl->indexes->getBuffer());
|
||||
const auto& indexBuffer = static_cast<IndexBufferGL&>(*impl->indexes->getBuffer());
|
||||
vertexArray.bind(glContext, *indexBuffer.buffer, bindings);
|
||||
assert(vertexArray.isValid());
|
||||
glSeg.setVertexArray(std::move(vertexArray));
|
||||
if (vertexArray.isValid()) {
|
||||
glSeg.setVertexArray(std::move(vertexArray));
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -706,7 +706,7 @@ void RenderFillLayer::update(gfx::ShaderRegistry& shaders,
|
||||
}
|
||||
};
|
||||
|
||||
if (patternBuilder) {
|
||||
if (patternBuilder && bucket.sharedTriangles->elements()) {
|
||||
patternBuilder->setShader(fillShader);
|
||||
patternBuilder->setRenderPass(renderPass);
|
||||
if (outlinePatternBuilder) {
|
||||
@@ -726,7 +726,7 @@ void RenderFillLayer::update(gfx::ShaderRegistry& shaders,
|
||||
"FillPatternTilePropsUBO",
|
||||
getFillPatternTilePropsUBO());
|
||||
}
|
||||
if (outlinePatternBuilder) {
|
||||
if (outlinePatternBuilder && bucket.sharedLines->elements()) {
|
||||
outlinePatternBuilder->setShader(outlineShader);
|
||||
outlinePatternBuilder->setRenderPass(renderPass);
|
||||
outlinePatternBuilder->setVertexAttributes(std::move(vertexAttrs));
|
||||
|
||||
@@ -233,10 +233,15 @@ constexpr auto Image0UniformName = "u_image0";
|
||||
constexpr auto Image1UniformName = "u_image1";
|
||||
|
||||
void RenderRasterLayer::updateLayerTweaker() {
|
||||
if (layerGroup) {
|
||||
if (layerGroup || imageLayerGroup) {
|
||||
tweaker = std::make_shared<RasterLayerTweaker>(getID(), evaluatedProperties);
|
||||
tweaker->enableOverdrawInspector(overdrawInspector);
|
||||
layerGroup->setLayerTweaker(tweaker);
|
||||
if (layerGroup) {
|
||||
layerGroup->setLayerTweaker(tweaker);
|
||||
}
|
||||
if (imageLayerGroup) {
|
||||
imageLayerGroup->setLayerTweaker(tweaker);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user