The open source OpenXR runtime

c/client: Scale for non-power-of-two textures

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2619>

authored by

Gareth Morgan and committed by
Marge Bot
458b1197 c25d7c18

+5
+5
src/xrt/compositor/client/comp_d3d12_client.cpp
··· 1 1 // Copyright 2019-2024, Collabora, Ltd. 2 + // Copyright 2025, NVIDIA CORPORATION. 2 3 // SPDX-License-Identifier: BSL-1.0 3 4 /*! 4 5 * @file ··· 801 802 } 802 803 struct xrt_layer_data d = *data; 803 804 805 + // Scale to compensate for power-of-two texture sizes. 806 + for (uint32_t i = 0; i < data->view_count; ++i) { 807 + client_d3d12_swapchain_scale_rect(xsc[i], &d.proj.v[i].sub.norm_rect); 808 + } 804 809 // No flip required: D3D12 swapchain image convention matches Vulkan. 805 810 return xrt_comp_layer_projection(&c->xcn->base, xdev, xscn, &d); 806 811 }