Code Monkey home page Code Monkey logo

Comments (2)

EasyIP2023 avatar EasyIP2023 commented on September 26, 2024

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.

from lucurious.

EasyIP2023 avatar EasyIP2023 commented on September 26, 2024

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

from lucurious.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.