Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
mesa
mesa
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2,316
    • Issues 2,316
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 639
    • Merge Requests 639
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Mesa
  • mesamesa
  • Merge Requests
  • !6714

Merged
Opened Sep 14, 2020 by Erico Nunes@enunesDeveloper

lima: add natively supported vertex buffer formats

  • Overview 5
  • Commits 1
  • Pipelines 8
  • Changes 2

With a simple perf profiling session with supertuxkart, I noticed that it was spending something on the order of ~10% of the time on u_vbuf_translate_begin. With some additional debugs, I noticed that it happens because it uses a "non-native" vertex format while drawing, which causes a translate to a native format. After some more digging, the root of it comes from the fact that until now lima supported only PIPE_FORMAT_R32G32B32_FLOAT for PIPE_BIND_VERTEX_BUFFER, but supertuxkart uses PIPE_FORMAT_R8G8B8A8_UNORM for drawing. Listing that format as supported for PIPE_BIND_VERTEX_BUFFER removes the u_vbuf_translate_begin usage and the application still works.

I found piglit test gl-2.0-vertexattribpointer which seems to stress multiple formats, and tried all formats listed in vbuf_format_fallbacks. Some seem to be indeed unsupported (32bit integer ones or 64bit ones) but many previously unlisted seem to be natively supported. With the list enabled in this patch, I don't get any regressions on gl-2.0-vertexattribpointer or deqp/piglit or any applications I tried.

This helps performance on supertuxkart. I noticed even Xorg was triggering many format translations, so this probably helps other applications too.

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: mesa/mesa!6714
Source branch: lima-vertex-buffer-formats