Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2,699
    • Issues 2,699
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 910
    • Merge requests 910
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Mesa
  • mesamesa
  • Merge requests
  • !13689

virgl/drm: New optimization for uploading textures

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Maksym Wezdecki requested to merge mwezdeck/mesa:less_mem_usage_by_textures_2 into main Nov 05, 2021
  • Overview 23
  • Commits 1
  • Pipelines 20
  • Changes 8

virgl/drm: New optimization for uploading textures

  1. We can create resource with size of "1" on drm, because size is not passed to the renderer.
  2. We can't create resource with size of "1" on vtest, because shmem is created based on that.
  3. If renderer supports copy_transfer_from_host, then use staging buffer for transfer in both ways to and from host.

This will allow to reduce memory consumption in the guest.

v2:

  • add inline function for checking if we can use this optimization
  • add check in readback path. If renderer doesn't support copy transfer from host, then we need to go with previous path in readback (through transfer_get ioctl)

v3:

  • fix logic for readback

v4:

  • refactor the implementation to integrate it more to existing code base

v5:

  • reuse COPY_TRANSFER3D in both directions

v6:

  • encode direction in COPY_TRANSFER3D if host supports it

Reviewed-by: Gert Wollny gert.wollny@collabora.com

virglrenderer MR: 645

Edited Dec 01, 2021 by Maksym Wezdecki
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: less_mem_usage_by_textures_2