mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
c/client: Use correct format in get_swapchain_create_properties funtions
This commit is contained in:
parent
94c9c8a253
commit
1adf46b02a
|
@ -691,7 +691,16 @@ client_d3d11_compositor_get_swapchain_create_properties(struct xrt_compositor *x
|
|||
{
|
||||
struct client_d3d11_compositor *c = as_client_d3d11_compositor(xc);
|
||||
|
||||
return xrt_comp_get_swapchain_create_properties(&c->xcn->base, info, xsccp);
|
||||
int64_t vk_format = d3d_dxgi_format_to_vk((DXGI_FORMAT)info->format);
|
||||
if (vk_format == 0) {
|
||||
D3D_ERROR(c, "Invalid format!");
|
||||
return XRT_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED;
|
||||
}
|
||||
|
||||
struct xrt_swapchain_create_info xinfo = *info;
|
||||
xinfo.format = vk_format;
|
||||
|
||||
return xrt_comp_get_swapchain_create_properties(&c->xcn->base, &xinfo, xsccp);
|
||||
}
|
||||
|
||||
static xrt_result_t
|
||||
|
|
|
@ -791,7 +791,16 @@ client_d3d12_compositor_get_swapchain_create_properties(struct xrt_compositor *x
|
|||
{
|
||||
struct client_d3d12_compositor *c = as_client_d3d12_compositor(xc);
|
||||
|
||||
return xrt_comp_get_swapchain_create_properties(&c->xcn->base, info, xsccp);
|
||||
int64_t vk_format = d3d_dxgi_format_to_vk((DXGI_FORMAT)info->format);
|
||||
if (vk_format == 0) {
|
||||
D3D_ERROR(c, "Invalid format!");
|
||||
return XRT_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED;
|
||||
}
|
||||
|
||||
struct xrt_swapchain_create_info xinfo = *info;
|
||||
xinfo.format = vk_format;
|
||||
|
||||
return xrt_comp_get_swapchain_create_properties(&c->xcn->base, &xinfo, xsccp);
|
||||
}
|
||||
|
||||
static xrt_result_t
|
||||
|
|
|
@ -398,6 +398,15 @@ client_gl_compositor_get_swapchain_create_properties(struct xrt_compositor *xc,
|
|||
{
|
||||
struct client_gl_compositor *c = client_gl_compositor(xc);
|
||||
|
||||
int64_t vk_format = gl_format_to_vk(info->format);
|
||||
if (vk_format == 0) {
|
||||
U_LOG_E("Invalid format!");
|
||||
return XRT_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED;
|
||||
}
|
||||
|
||||
struct xrt_swapchain_create_info vkinfo = *info;
|
||||
vkinfo.format = vk_format;
|
||||
|
||||
return xrt_comp_get_swapchain_create_properties(&c->xcn->base, info, xsccp);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue