Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • kicad kicad
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 1,502
    • Issues 1,502
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 48
    • Merge requests 48
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • KiCadKiCad
  • KiCad Source CodeKiCad Source Code
  • kicadkicad
  • Issues
  • #3777
Closed
Open
Issue created Jan 17, 2020 by Lukas F. Hartmann@mntmnContributor

Accelerated pcbnew canvas on etnaviv

Description

etnaviv is the open source GPU driver (in kernel and mesa) for Vivante/Verisilicon IP like GC3000, GC7000 etc. used in NXP i.MX6, i.MX8 and other ARM SoC families. We're building an open hardware laptop based on i.MX8M and we're running KiCAD on it. The current mesa development version yields desktop OpenGL 2.1 and GLES 2.0, which are sufficient for the accelerated canvas of pcbnew. But the "overlay" implementation in KiCAD is currently not compatible because it wants to allocate multiple framebuffers.

OPENGL_COMPOSITOR::CreateBuffer currently errors with:

"Cannot create more framebuffers. OpenGL rendering backend requires at least 3 framebuffers. You may try to update/change your graphic drivers."

I made an experimental patch that works around this problem by no allocating a separate overlay for the framebuffer, but that draws overlay graphics to the mainBuffer as well.

kicad_fix_etnaviv_accelerated_canvas_WIP.patch

I got the overlay to update correctly (without leaving trails) by calling m_view->MarkDirty() in every call of EDA_DRAW_PANEL_GAL::onPaint(). This is of course more wasteful than the overlay blitting approach, but on i.MX8M this is still a lot faster than using software rendering, and making KiCAD usable on this platform.

This patch is just meant as a proof-of-concept. I'd like some feedback/guidance of how to implement this cleanly as an option/fallback in the case of multiple framebuffers not being supported on a platform. I would like to take this as my issue to work on at the KiCAD development event before FOSDEM on Jan 31st, 2020.

Steps to reproduce

  1. Get a Linux machine with Vivante/Verisilicon GPU and etnaviv
  2. In pcbnew, switch on "Accelerated Graphics" in Preferences.

KiCad Version

Application: Pcbnew
Version: (5.99.0-663-gfd0d5fdb3-dirty), debug build
Libraries:
    wxWidgets 3.0.4
Platform: Linux 5.4.0-rc6-next-20191108+ aarch64, 64 bit, Little endian, wxGTK
Build Info:
    Build date: Jan  8 2020 20:23:27
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
    Boost: 1.67.0
    Compiler: GCC 8.3.0 with C++ ABI 1013

Build settings:
    KICAD_SCRIPTING=OFF
    KICAD_SCRIPTING_MODULES=OFF
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=OFF
    BUILD_GITHUB_PLUGIN=OFF
    KICAD_USE_OCE=OFF
    KICAD_USE_OCC=OFF
    KICAD_SPICE=OFF
    KICAD_STDLIB_DEBUG=OFF
    KICAD_STDLIB_LIGHT_DEBUG=OFF
    KICAD_SANITIZE=OFF
Assignee
Assign to
Time tracking