Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • V virglrenderer
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 90
    • Issues 90
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 33
    • Merge requests 33
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • virgl
  • virglrenderer
  • Merge requests
  • !631

vkr: get rid of FORCE_ENABLE_DMABUF

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Chia-I Wu requested to merge olv/virglrenderer:vkr-dirty-secrets into master Oct 12, 2021
  • Overview 6
  • Commits 3
  • Pipelines 6
  • Changes 3

This MR is untested and is for discussion only. With this MR, a VkImage is external only when the guest guest makes it external. That happens when the guest app explicitly uses external memory extensions, or when the guest driver allocates swapchain images. Most VkImage becomes non-external as a result.

In other words, before this MR, vkr forces all VkImage and VkDeviceMemory to be external. That is a spec violation because vkr does not call vkGetPhysicalDeviceImageFormatProperties2 to check if an VkImage can be external. In fact, for most drivers, most images cannot be external. That is a major spec violation.

After this MR, most VkImage are non-external while most VkDeviceMemory are external. We still violate the spec by binding an external memory to a non-external image. But I think that is much more minor. In fact, I think it is possible to come up with a Vulkan extension such that what vkr does after this MR is legal.

I expect significant GPU performance improvement after this MR in many workloads, because non-external VkImage can be "compressed" (e.g., have aux surfaces on ANV). I also plan to update https://docs.mesa3d.org/drivers/venus.html#vk-memory-property-host-visible-bit to clearly spell out the expectations on the host drivers.

/cc @zzyiwei @ryanneph

Edited Oct 15, 2021 by Chia-I Wu
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: vkr-dirty-secrets