Skip to content
This repository has been archived by the owner on May 29, 2023. It is now read-only.

ENHANCEMENT: Remove VkSurfaceKHR and SwapChain Extension code #40

Open
EasyIP2023 opened this issue Jul 21, 2020 · 2 comments
Open

ENHANCEMENT: Remove VkSurfaceKHR and SwapChain Extension code #40

EasyIP2023 opened this issue Jul 21, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request proposal Add new idea

Comments

@EasyIP2023
Copy link
Owner

EasyIP2023 commented Jul 21, 2020

Going to create gbm_bo and handle the presentation myself.

@EasyIP2023 EasyIP2023 added the enhancement New feature or request label Jul 21, 2020
@EasyIP2023 EasyIP2023 self-assigned this Jul 21, 2020
@EasyIP2023
Copy link
Owner Author

EasyIP2023 commented Jul 27, 2020

The Vk_KHR_display extension isn't going to be useful.

To my knowledge I may be wrong there is no way to import gmb_bo directly into Vulkan. If the wayland display protocol is used one can create the underlying wl_buffer with gbm and import the wl_buffer into Vulkan to get desired content. But i'm not using any display server protocol.

The VK_EXT_image_drm_format_modifier extension is still needed.

Thinking I should create gbm_bo's and gather plane FD's/GEM handles to assign plane info to a VkImageDrmFormatModifierExplicitCreateInfoEXT structure. Then create a VkImage object with this structures address assigned to the pNext chain of the VkImageCreateInfo.

The VK_KHR_external_memory extension may be more useful.

@EasyIP2023 EasyIP2023 added the proposal Add new idea label Jul 27, 2020
@EasyIP2023
Copy link
Owner Author

EasyIP2023 commented Aug 30, 2020

How I retrieve DMA BUF FD

  1. Create gbm_bo
  2. Retrieve number of GEM buffers with gbm_bo_get_plane_count. GEM buffers are wrapped by KMS framebuffers which contain metadata.
  3. Retrieve the GEM name (u32) with gbm_bo_get_handle_for_plane
  4. Create a prime fd from GEM name (u32) via struct drm_prime_handle prime_request and ioctl(2)
  5. Once one has a prime fd [DMA-BUF fd] extensions needed afterwards

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request proposal Add new idea
Projects
None yet
Development

No branches or pull requests

1 participant