mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 12:46:12 +00:00
c/client: Expose size limit for swapchains
This commit is contained in:
parent
900c43a6e2
commit
8f70291cad
|
@ -597,6 +597,13 @@ client_gl_compositor_init(struct client_gl_compositor *c,
|
|||
}
|
||||
c->base.base.info.format_count = count;
|
||||
|
||||
// Get max texture size.
|
||||
GLint max_texture_size = 0;
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size);
|
||||
if (max_texture_size > 0) {
|
||||
c->base.base.info.max_tetxure_size = (uint32_t)max_texture_size;
|
||||
}
|
||||
|
||||
os_mutex_init(&c->context_mutex);
|
||||
|
||||
return true;
|
||||
|
|
|
@ -836,6 +836,14 @@ client_vk_compositor_create(struct xrt_compositor_native *xcn,
|
|||
}
|
||||
#endif
|
||||
|
||||
// Get max texture size.
|
||||
{
|
||||
struct vk_bundle *vk = &c->vk;
|
||||
VkPhysicalDeviceProperties pdp;
|
||||
vk->vkGetPhysicalDeviceProperties(vk->physical_device, &pdp);
|
||||
c->base.base.info.max_tetxure_size = pdp.limits.maxImageDimension2D;
|
||||
}
|
||||
|
||||
return c;
|
||||
|
||||
err_pool:
|
||||
|
|
Loading…
Reference in a new issue