mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 12:46:12 +00:00
comp: Bind the correct GL texture for importing memory objects
This commit is contained in:
parent
1b179306dc
commit
b249af9415
|
@ -90,12 +90,11 @@ client_gl_memobj_swapchain_create(struct xrt_compositor *xc,
|
|||
struct xrt_swapchain_gl *xscgl = &sc->base.base;
|
||||
|
||||
glGenTextures(native_xsc->num_images, xscgl->images);
|
||||
for (uint32_t i = 0; i < native_xsc->num_images; i++) {
|
||||
glBindTexture(tex_target, xscgl->images[i]);
|
||||
}
|
||||
|
||||
glCreateMemoryObjectsEXT(native_xsc->num_images, &sc->memory[0]);
|
||||
for (uint32_t i = 0; i < native_xsc->num_images; i++) {
|
||||
glBindTexture(tex_target, xscgl->images[i]);
|
||||
|
||||
GLint dedicated = xscn->images[i].use_dedicated_allocation ? GL_TRUE : GL_FALSE;
|
||||
glMemoryObjectParameterivEXT(sc->memory[i], GL_DEDICATED_MEMORY_OBJECT_EXT, &dedicated);
|
||||
glImportMemoryFdEXT(sc->memory[i], xscn->images[i].size, GL_HANDLE_TYPE_OPAQUE_FD_EXT,
|
||||
|
|
Loading…
Reference in a new issue