The open source OpenXR runtime
0
fork

Configure Feed

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

a/math, comp/main, comp/render: Change math_matrix_2x2_* to m_mat2x2_*

Moses 10cdde85 7d8d1ad8

+13 -15
+5 -7
src/xrt/auxiliary/math/m_matrix_2x2.h
··· 18 18 #endif 19 19 20 20 static inline void 21 - math_matrix_2x2_multiply(const struct xrt_matrix_2x2 *left, 22 - const struct xrt_matrix_2x2 *right, 23 - struct xrt_matrix_2x2 *result_out) 21 + m_mat2x2_multiply(const struct xrt_matrix_2x2 *left, 22 + const struct xrt_matrix_2x2 *right, 23 + struct xrt_matrix_2x2 *result_out) 24 24 { 25 25 const struct xrt_matrix_2x2 l = *left; 26 26 const struct xrt_matrix_2x2 r = *right; ··· 37 37 } 38 38 39 39 static inline void 40 - math_matrix_2x2_transform_vec2(const struct xrt_matrix_2x2 *left, 41 - const struct xrt_vec2 *right, 42 - struct xrt_vec2 *result_out) 40 + m_mat2x2_transform_vec2(const struct xrt_matrix_2x2 *left, const struct xrt_vec2 *right, struct xrt_vec2 *result_out) 43 41 { 44 42 const struct xrt_matrix_2x2 l = *left; 45 43 const struct xrt_vec2 r = *right; ··· 48 46 } 49 47 50 48 static inline void 51 - math_matrix_2x2_invert(const struct xrt_matrix_2x2 *matrix, struct xrt_matrix_2x2 *invertedMatrix) 49 + m_mat2x2_invert(const struct xrt_matrix_2x2 *matrix, struct xrt_matrix_2x2 *invertedMatrix) 52 50 { 53 51 float determinant = matrix->v[0] * matrix->v[3] - matrix->v[1] * matrix->v[2]; 54 52 invertedMatrix->v[0] = matrix->v[3] / determinant;
+6 -6
src/xrt/compositor/main/comp_renderer.c
··· 299 299 }}; 300 300 301 301 if (pre_rotate) { 302 - math_matrix_2x2_multiply(&distortion_data[0].vertex_rot, // 303 - &rotation_90_cw, // 304 - &distortion_data[0].vertex_rot); // 305 - math_matrix_2x2_multiply(&distortion_data[1].vertex_rot, // 306 - &rotation_90_cw, // 307 - &distortion_data[1].vertex_rot); // 302 + m_mat2x2_multiply(&distortion_data[0].vertex_rot, // 303 + &rotation_90_cw, // 304 + &distortion_data[0].vertex_rot); // 305 + m_mat2x2_multiply(&distortion_data[1].vertex_rot, // 306 + &rotation_90_cw, // 307 + &distortion_data[1].vertex_rot); // 308 308 } 309 309 310 310 render_gfx_update_distortion(rr, //
+2 -2
src/xrt/compositor/render/render_resources.c
··· 602 602 }}; 603 603 604 604 if (pre_rotate) { 605 - math_matrix_2x2_multiply(&rot, &rotation_90_cw, &rot); 605 + m_mat2x2_multiply(&rot, &rotation_90_cw, &rot); 606 606 } 607 607 608 608 VkDeviceSize size = sizeof(struct texture); ··· 631 631 632 632 // These need to go from -0.5 to 0.5 for the rotation 633 633 struct xrt_vec2 uv = {u - 0.5f, v - 0.5f}; 634 - math_matrix_2x2_transform_vec2(&rot, &uv, &uv); 634 + m_mat2x2_transform_vec2(&rot, &uv, &uv); 635 635 uv.x += 0.5f; 636 636 uv.y += 0.5f; 637 637