GithubHelp home page GithubHelp logo

Comments (12)

stonesthrow avatar stonesthrow commented on July 22, 2024

You should be able to create EGLImages in second process with https://registry.khronos.org/EGL/extensions/EXT/EGL_EXT_image_dma_buf_import.txt
But
https://registry.khronos.org/OpenGL/extensions/OES/OES_EGL_image.txt
and
https://registry.khronos.org/OpenGL/extensions/EXT/EXT_EGL_image_array.txt
Don't allow you to target a cubmap/face.
So a new extension would need to be crafted. It needs interest enough to create a proposal and draft extension. If you get support from other companies it can be a EXT extension.
Extending OES_EGL_image.txt to add more targets seems like the simple way. But you need to get support from driver implementers to get this added to platform you need.

from egl-registry.

cubanismo avatar cubanismo commented on July 22, 2024

As usual, I have to ask, why can't you use the Vulkan+GL interop extensions, which already support arbitrary texture types, instead of trying to force something through EGLImage?

from egl-registry.

bl4ckb0ne avatar bl4ckb0ne commented on July 22, 2024

@cubanismo the reason is the same as #133 (same project), I'd like to avoid Vulkan because the whole project is already heavily using OpenGL and it would be a lot of work to rewrite everything for this particular case. I'm already able to exchange regular 2D textures using the same process, I'd prefer to work towards being able to do the same with cubemap.

from egl-registry.

bl4ckb0ne avatar bl4ckb0ne commented on July 22, 2024

@stonesthrow I don't mind going with a MESA extension at first, as it is my main target.

If I get everything correctly, I would need to draft an extension for EGL (EGL_MESA_gl_texture_cubemap_image) to transform a given cubemap texture into an EGLImage, and an extension for GL (MESA_EGL_image_cubemap) to import the EGLImage into a GL_TEXTURE_CUBE_MAP texture. Prefixes might change depending on the feedback from vendors.

from egl-registry.

cubanismo avatar cubanismo commented on July 22, 2024

You don't have to rewrite everything in Vulkan to use the GL memory object extension. It just means using GL memory objects instead of EGLImage. Vulkan's the best way to allocate memory objects, but you don't have to rewrite any of your GL code.

from egl-registry.

stonesthrow avatar stonesthrow commented on July 22, 2024

The wiki has instructions: https://github.com/KhronosGroup/EGL-Registry/wiki

from egl-registry.

bl4ckb0ne avatar bl4ckb0ne commented on July 22, 2024

@cubanismo I'm already heavily depending on EGL for both process, and bound to wayland to exchange buffers. Can the GL memory objects can be sent through DMABUFs?

from egl-registry.

stonesthrow avatar stonesthrow commented on July 22, 2024

Memory Objects as per suggested by Cubanismo:
https://registry.khronos.org/OpenGL/extensions/EXT/EXT_external_objects.txt
https://registry.khronos.org/OpenGL/extensions/EXT/EXT_external_objects_fd.txt
I was not familiar either

from egl-registry.

cubanismo avatar cubanismo commented on July 22, 2024

Memory object FDs are not necessarily dma-bufs (They can be), but they can be sent through protocol just like any other FD. If both consumer and producer are GL/EGL and you're using memory objects on both sides, does it matter what type of FD they are?

If, for some reason, they really have to be a dma-buf FD, you can extend memory objects to add a dma-buf handle type much easier than you can extend EGLImage to support cube maps.

from egl-registry.

bl4ckb0ne avatar bl4ckb0ne commented on July 22, 2024

If both consumer and producer are GL/EGL and you're using memory objects on both sides, does it matter what type of FD they are?

I'm bound to Wayland so I'm using the linux-dmabuf protocol to exchange between the two process. I could use something else but the regular GL_TEXTURE_2D are using this already.

What are the other options for memory allocation to use the memory objects? To use Vulkan I would need a whole setup (instance/physical device/device) right?

from egl-registry.

stonesthrow avatar stonesthrow commented on July 22, 2024

Merged patch, sufficient to close issue?

from egl-registry.

bl4ckb0ne avatar bl4ckb0ne commented on July 22, 2024

#165 is still pending review but I think having the MR open is sufficient enough to close.

from egl-registry.

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.