* virtio-gpu: Get FD for texture
@ 2021-09-27 10:21 Antonio Caggiano
2021-09-29 13:54 ` Antonio Caggiano
0 siblings, 1 reply; 3+ messages in thread
From: Antonio Caggiano @ 2021-09-27 10:21 UTC (permalink / raw)
To: qemu-devel; +Cc: kraxel, vivek.kasireddy
Hi,
I am trying to support a Vulkan application in the guest
(GTKGlArea+VirGL+venus) which needs to import a GL texture from a GL
context.
Before doing that, I need to get a FD for that texture, therefore I
tried with calling egl-helpers.h:egl_get_fd_for_texture() but I get an
epoxy error:
> No provider of eglCreateImageKHR found. Requires one of:
> EGL_KHR_image
> EGL_KHR_image_base
This is a bit weird to me as I am sure I am running QEMU with iris and
according to eglinfo both of these extensions are available.
Do you think my approach makes sense or I am doing something wrong
somewhere?
Kind regards,
Antonio Caggiano
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: virtio-gpu: Get FD for texture
2021-09-27 10:21 virtio-gpu: Get FD for texture Antonio Caggiano
@ 2021-09-29 13:54 ` Antonio Caggiano
2021-09-29 23:32 ` Kasireddy, Vivek
0 siblings, 1 reply; 3+ messages in thread
From: Antonio Caggiano @ 2021-09-29 13:54 UTC (permalink / raw)
To: qemu-devel; +Cc: kraxel, vivek.kasireddy
I am starting to believe that the error is due to the fact that no
EGLContext is active on the current thread (the one running the Vulkan
application).
Trying to call eglMakeCurrent within this thread gives me an
EGL_BAD_ACCESS error as the EGLContext associated to the GL texture
belongs to a different thread.
Does that make sense?
Kind regards,
Antonio Caggiano
On 27/09/21 12:21, Antonio Caggiano wrote:
> Hi,
>
> I am trying to support a Vulkan application in the guest
> (GTKGlArea+VirGL+venus) which needs to import a GL texture from a GL
> context.
>
> Before doing that, I need to get a FD for that texture, therefore I
> tried with calling egl-helpers.h:egl_get_fd_for_texture() but I get an
> epoxy error:
>
> > No provider of eglCreateImageKHR found. Requires one of:
>
> > EGL_KHR_image
>
> > EGL_KHR_image_base
>
> This is a bit weird to me as I am sure I am running QEMU with iris and
> according to eglinfo both of these extensions are available.
>
> Do you think my approach makes sense or I am doing something wrong
> somewhere?
>
>
> Kind regards,
> Antonio Caggiano
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: virtio-gpu: Get FD for texture
2021-09-29 13:54 ` Antonio Caggiano
@ 2021-09-29 23:32 ` Kasireddy, Vivek
0 siblings, 0 replies; 3+ messages in thread
From: Kasireddy, Vivek @ 2021-09-29 23:32 UTC (permalink / raw)
To: Antonio Caggiano, qemu-devel; +Cc: kraxel
Hi Antonio,
>
> I am starting to believe that the error is due to the fact that no EGLContext is active on the
> current thread (the one running the Vulkan application).
[Kasireddy, Vivek] Which UI module (and Host environment) are you testing with?
gtk? egl-headless? Could you please provide more details about the environment and
the use-case?
>
> Trying to call eglMakeCurrent within this thread gives me an EGL_BAD_ACCESS error
> as the EGLContext associated to the GL texture belongs to a different thread.
[Kasireddy, Vivek] IIUC, contexts can only be bound to one thread at a time. So you either
need to release the context in the other thread (eglMakeCurrent(NULL, NULL) before making
it current in your current thread or create a shared context between both the threads to be able
to share textures.
Thanks,
Vivek
>
> Does that make sense?
>
> Kind regards,
> Antonio Caggiano
>
> On 27/09/21 12:21, Antonio Caggiano wrote:
> > Hi,
> >
> > I am trying to support a Vulkan application in the guest
> > (GTKGlArea+VirGL+venus) which needs to import a GL texture from a GL
> > context.
> >
> > Before doing that, I need to get a FD for that texture, therefore I
> > tried with calling egl-helpers.h:egl_get_fd_for_texture() but I get an
> > epoxy error:
> >
> > > No provider of eglCreateImageKHR found. Requires one of:
> >
> > > EGL_KHR_image
> >
> > > EGL_KHR_image_base
> >
> > This is a bit weird to me as I am sure I am running QEMU with iris and
> > according to eglinfo both of these extensions are available.
> >
> > Do you think my approach makes sense or I am doing something wrong
> > somewhere?
> >
> >
> > Kind regards,
> > Antonio Caggiano
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-29 23:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 10:21 virtio-gpu: Get FD for texture Antonio Caggiano
2021-09-29 13:54 ` Antonio Caggiano
2021-09-29 23:32 ` Kasireddy, Vivek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.