The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

st/oxr: Populate oxr_system's blend modes list from the system compositor, not the device.

authored by

Ryan Pavlik and committed by
Moses Turner
b180b244 201765d3

+6 -10
+6 -10
src/xrt/state_trackers/oxr/oxr_system.c
··· 154 154 sys->views[1].maxSwapchainSampleCount = info->views[1].max.sample_count; 155 155 // clang-format on 156 156 157 - struct xrt_device *head = GET_XDEV_BY_ROLE(sys, head); 158 - 159 - assert(head->hmd->num_blend_modes <= XRT_MAX_DEVICE_BLEND_MODES); 160 - assert(head->hmd->num_blend_modes != 0); 157 + assert(info->num_supported_blend_modes <= ARRAY_SIZE(sys->blend_modes)); 158 + assert(info->num_supported_blend_modes != 0); 161 159 162 - for (size_t i = 0; i < head->hmd->num_blend_modes; i++) { 163 - assert(u_verify_blend_mode_valid(head->hmd->blend_modes[i])); 164 - sys->blend_modes[i] = (XrEnvironmentBlendMode)head->hmd->blend_modes[i]; 160 + for (uint8_t i = 0; i < info->num_supported_blend_modes; i++) { 161 + assert(u_verify_blend_mode_valid(info->supported_blend_modes[i])); 162 + sys->blend_modes[i] = (XrEnvironmentBlendMode)info->supported_blend_modes[i]; 165 163 } 166 - sys->num_blend_modes = (uint32_t)head->hmd->num_blend_modes; 167 - 168 - assert(sys->num_blend_modes <= ARRAY_SIZE(sys->blend_modes)); 164 + sys->num_blend_modes = (uint32_t)info->num_supported_blend_modes; 169 165 170 166 return XR_SUCCESS; 171 167 }