The open source OpenXR runtime
0
fork

Configure Feed

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

comp: Populate blend mode list in system compositor info from device

authored by

Ryan Pavlik and committed by
Moses Turner
201765d3 cd5ac5f1

+12
+12
src/xrt/compositor/main/comp_compositor.c
··· 53 53 #include "util/u_handles.h" 54 54 #include "util/u_trace_marker.h" 55 55 #include "util/u_distortion_mesh.h" 56 + #include "util/u_verify.h" 56 57 57 58 #include "util/comp_vulkan.h" 58 59 #include "main/comp_compositor.h" ··· 1255 1256 sys_info->views[1].max.height_pixels = h1_2; 1256 1257 sys_info->views[1].max.sample_count = 1; 1257 1258 // clang-format on 1259 + 1260 + // If we can add e.g. video pass-through capabilities, we may need to change (augment) this list. 1261 + // Just copying it directly right now. 1262 + assert(xdev->hmd->num_blend_modes <= XRT_MAX_DEVICE_BLEND_MODES); 1263 + assert(xdev->hmd->num_blend_modes != 0); 1264 + assert(xdev->hmd->num_blend_modes <= ARRAY_SIZE(sys_info->supported_blend_modes)); 1265 + for (size_t i = 0; i < xdev->hmd->num_blend_modes; ++i) { 1266 + assert(u_verify_blend_mode_valid(xdev->hmd->blend_modes[i])); 1267 + sys_info->supported_blend_modes[i] = xdev->hmd->blend_modes[i]; 1268 + } 1269 + sys_info->num_supported_blend_modes = (uint8_t)xdev->hmd->num_blend_modes; 1258 1270 1259 1271 u_var_add_root(c, "Compositor", true); 1260 1272 u_var_add_ro_f32(c, &c->compositor_frame_times.fps, "FPS (Compositor)");