From 6f5ef7a0cbe976e31232353f9b1cc9d5dfcb2e52 Mon Sep 17 00:00:00 2001 From: Lubosz Sarnecki Date: Thu, 14 Mar 2019 16:23:32 +0100 Subject: [PATCH] comp: Rename ubo_data to ubo_pano. --- src/xrt/compositor/main/comp_distortion.c | 34 +++++++++++------------ src/xrt/compositor/main/comp_distortion.h | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/xrt/compositor/main/comp_distortion.c b/src/xrt/compositor/main/comp_distortion.c index f3d55c6c8..bdcfa6f1d 100644 --- a/src/xrt/compositor/main/comp_distortion.c +++ b/src/xrt/compositor/main/comp_distortion.c @@ -546,23 +546,23 @@ comp_distortion_update_uniform_buffer_warp(struct comp_distortion *d, */ // clang-format off - d->ubo_data.hmd_warp_param[0] = c->xdev->distortion.pano.distortion_k[0]; - d->ubo_data.hmd_warp_param[1] = c->xdev->distortion.pano.distortion_k[1]; - d->ubo_data.hmd_warp_param[2] = c->xdev->distortion.pano.distortion_k[2]; - d->ubo_data.hmd_warp_param[3] = c->xdev->distortion.pano.distortion_k[3]; - d->ubo_data.aberr[0] = c->xdev->distortion.pano.aberration_k[0]; - d->ubo_data.aberr[1] = c->xdev->distortion.pano.aberration_k[1]; - d->ubo_data.aberr[2] = c->xdev->distortion.pano.aberration_k[2]; - d->ubo_data.aberr[3] = c->xdev->distortion.pano.aberration_k[3]; - d->ubo_data.lens_center[0][0] = c->xdev->views[0].lens_center.x_meters; - d->ubo_data.lens_center[0][1] = c->xdev->views[0].lens_center.y_meters; - d->ubo_data.lens_center[1][0] = c->xdev->views[1].lens_center.x_meters; - d->ubo_data.lens_center[1][1] = c->xdev->views[1].lens_center.y_meters; - d->ubo_data.viewport_scale[0] = c->xdev->views[0].display.w_meters; - d->ubo_data.viewport_scale[1] = c->xdev->views[0].display.h_meters; - d->ubo_data.warp_scale = c->xdev->distortion.pano.warp_scale; + d->ubo_pano.hmd_warp_param[0] = c->xdev->distortion.pano.distortion_k[0]; + d->ubo_pano.hmd_warp_param[1] = c->xdev->distortion.pano.distortion_k[1]; + d->ubo_pano.hmd_warp_param[2] = c->xdev->distortion.pano.distortion_k[2]; + d->ubo_pano.hmd_warp_param[3] = c->xdev->distortion.pano.distortion_k[3]; + d->ubo_pano.aberr[0] = c->xdev->distortion.pano.aberration_k[0]; + d->ubo_pano.aberr[1] = c->xdev->distortion.pano.aberration_k[1]; + d->ubo_pano.aberr[2] = c->xdev->distortion.pano.aberration_k[2]; + d->ubo_pano.aberr[3] = c->xdev->distortion.pano.aberration_k[3]; + d->ubo_pano.lens_center[0][0] = c->xdev->views[0].lens_center.x_meters; + d->ubo_pano.lens_center[0][1] = c->xdev->views[0].lens_center.y_meters; + d->ubo_pano.lens_center[1][0] = c->xdev->views[1].lens_center.x_meters; + d->ubo_pano.lens_center[1][1] = c->xdev->views[1].lens_center.y_meters; + d->ubo_pano.viewport_scale[0] = c->xdev->views[0].display.w_meters; + d->ubo_pano.viewport_scale[1] = c->xdev->views[0].display.h_meters; + d->ubo_pano.warp_scale = c->xdev->distortion.pano.warp_scale; - memcpy(d->ubo_handle.mapped, &d->ubo_data, sizeof(d->ubo_data)); + memcpy(d->ubo_handle.mapped, &d->ubo_pano, sizeof(d->ubo_pano)); // clang-format on @@ -685,7 +685,7 @@ comp_distortion_init_uniform_buffer(struct comp_distortion *d, // Warp UBO in deferred fragment shader ret = _create_buffer(vk, usage_flags, memory_property_flags, - &d->ubo_handle, sizeof(d->ubo_data), NULL); + &d->ubo_handle, sizeof(d->ubo_pano), NULL); if (ret != VK_SUCCESS) { VK_DEBUG(vk, "Failed to create warp ubo buffer!"); } diff --git a/src/xrt/compositor/main/comp_distortion.h b/src/xrt/compositor/main/comp_distortion.h index b70ea626a..7955eada6 100644 --- a/src/xrt/compositor/main/comp_distortion.h +++ b/src/xrt/compositor/main/comp_distortion.h @@ -63,7 +63,7 @@ struct comp_distortion float lens_center[2][4]; float viewport_scale[2]; float warp_scale; - } ubo_data; + } ubo_pano; struct {