c/util: Prefix compute helpers with cs

This commit is contained in:
Jakob Bornecrantz 2023-10-10 23:31:03 +01:00
parent 8f7c58e70a
commit b97ca79b5e
3 changed files with 190 additions and 191 deletions

View file

@ -1126,7 +1126,7 @@ dispatch_compute(struct comp_renderer *r, struct render_compute *crc)
// Start the compute pipeline. // Start the compute pipeline.
render_compute_begin(crc); render_compute_begin(crc);
comp_render_dispatch_compute( // comp_render_cs_dispatch( //
crc, // crc crc, // crc
&r->scratch, // rsi &r->scratch, // rsi
world_poses, // world_poses world_poses, // world_poses

View file

@ -137,12 +137,12 @@ set_post_transform_rect(const struct xrt_layer_data *data,
/* /*
* *
* Layer data builders. * Compute layer data builders.
* *
*/ */
static inline void static inline void
do_projection_layer(const struct xrt_layer_data *data, do_cs_projection_layer(const struct xrt_layer_data *data,
const struct comp_layer *layer, const struct comp_layer *layer,
const struct xrt_pose *world_pose, const struct xrt_pose *world_pose,
uint32_t view_index, uint32_t view_index,
@ -204,7 +204,7 @@ do_projection_layer(const struct xrt_layer_data *data,
} }
static inline void static inline void
do_quad_layer(const struct xrt_layer_data *data, do_cs_quad_layer(const struct xrt_layer_data *data,
const struct comp_layer *layer, const struct comp_layer *layer,
const struct xrt_matrix_4x4 *eye_view_mat, const struct xrt_matrix_4x4 *eye_view_mat,
const struct xrt_matrix_4x4 *world_view_mat, const struct xrt_matrix_4x4 *world_view_mat,
@ -286,15 +286,14 @@ do_quad_layer(const struct xrt_layer_data *data,
} }
/* /*
* *
* Distortion helpers. * Compute distortion helpers.
* *
*/ */
static void static void
do_distortion_for_scratch(struct render_compute *crc, do_cs_distortion_for_scratch(struct render_compute *crc,
struct render_scratch_images *rsi, struct render_scratch_images *rsi,
VkImage target_image, VkImage target_image,
VkImageView target_image_view, VkImageView target_image_view,
@ -325,7 +324,7 @@ do_distortion_for_scratch(struct render_compute *crc,
} }
static void static void
do_distortion_for_layer(struct render_compute *crc, do_cs_distortion_for_layer(struct render_compute *crc,
const struct xrt_pose world_poses[2], const struct xrt_pose world_poses[2],
const struct comp_layer *layer, const struct comp_layer *layer,
const struct xrt_layer_projection_view_data *lvd, const struct xrt_layer_projection_view_data *lvd,
@ -397,12 +396,12 @@ do_distortion_for_layer(struct render_compute *crc,
/* /*
* *
* 'Exported' helpers. * 'Exported' compute helpers.
* *
*/ */
void void
comp_render_layer(struct render_compute *crc, comp_render_cs_layer(struct render_compute *crc,
uint32_t view_index, uint32_t view_index,
const struct comp_layer *layers, const struct comp_layer *layers,
const uint32_t layer_count, const uint32_t layer_count,
@ -471,7 +470,7 @@ comp_render_layer(struct render_compute *crc,
switch (data->type) { switch (data->type) {
case XRT_LAYER_STEREO_PROJECTION_DEPTH: case XRT_LAYER_STEREO_PROJECTION_DEPTH:
case XRT_LAYER_STEREO_PROJECTION: { case XRT_LAYER_STEREO_PROJECTION: {
do_projection_layer( // do_cs_projection_layer( //
data, // data data, // data
layer, // layer layer, // layer
world_pose, // world_pose world_pose, // world_pose
@ -487,7 +486,7 @@ comp_render_layer(struct render_compute *crc,
&cur_image); // out_cur_image &cur_image); // out_cur_image
} break; } break;
case XRT_LAYER_QUAD: { case XRT_LAYER_QUAD: {
do_quad_layer( // do_cs_quad_layer( //
data, // data data, // data
layer, // layer layer, // layer
&eye_view_mat, // eye_view_mat &eye_view_mat, // eye_view_mat
@ -545,7 +544,7 @@ comp_render_layer(struct render_compute *crc,
} }
void void
comp_render_stereo_layers(struct render_compute *crc, comp_render_cs_stereo_layers(struct render_compute *crc,
const struct comp_layer *layers, const struct comp_layer *layers,
const uint32_t layer_count, const uint32_t layer_count,
const struct xrt_normalized_rect pre_transforms[2], const struct xrt_normalized_rect pre_transforms[2],
@ -588,7 +587,7 @@ comp_render_stereo_layers(struct render_compute *crc,
} }
for (uint32_t view_index = 0; view_index < 2; view_index++) { for (uint32_t view_index = 0; view_index < 2; view_index++) {
comp_render_layer( // comp_render_cs_layer( //
crc, // crc, //
view_index, // view_index, //
layers, // layers, //
@ -630,7 +629,7 @@ comp_render_stereo_layers(struct render_compute *crc,
} }
void void
comp_render_stereo_layers_to_scratch(struct render_compute *crc, comp_render_cs_stereo_layers_to_scratch(struct render_compute *crc,
const struct xrt_normalized_rect pre_transforms[2], const struct xrt_normalized_rect pre_transforms[2],
struct xrt_pose world_poses[2], struct xrt_pose world_poses[2],
struct xrt_pose eye_poses[2], struct xrt_pose eye_poses[2],
@ -655,7 +654,7 @@ comp_render_stereo_layers_to_scratch(struct render_compute *crc,
rsi->color[1].unorm_view, rsi->color[1].unorm_view,
}; };
comp_render_stereo_layers( // comp_render_cs_stereo_layers( //
crc, // crc crc, // crc
layers, // layers layers, // layers
layer_count, // layer_count layer_count, // layer_count
@ -670,7 +669,7 @@ comp_render_stereo_layers_to_scratch(struct render_compute *crc,
} }
void void
comp_render_dispatch_compute(struct render_compute *crc, comp_render_cs_dispatch(struct render_compute *crc,
struct render_scratch_images *rsi, struct render_scratch_images *rsi,
struct xrt_pose world_poses[2], struct xrt_pose world_poses[2],
struct xrt_pose eye_poses[2], struct xrt_pose eye_poses[2],
@ -700,7 +699,7 @@ comp_render_dispatch_compute(struct render_compute *crc,
const struct xrt_layer_projection_view_data *lvd = &stereo->l; const struct xrt_layer_projection_view_data *lvd = &stereo->l;
const struct xrt_layer_projection_view_data *rvd = &stereo->r; const struct xrt_layer_projection_view_data *rvd = &stereo->r;
do_distortion_for_layer( // do_cs_distortion_for_layer( //
crc, // crc crc, // crc
world_poses, // world_poses world_poses, // world_poses
layer, // layer layer, // layer
@ -717,7 +716,7 @@ comp_render_dispatch_compute(struct render_compute *crc,
const struct xrt_layer_projection_view_data *lvd = &stereo->l; const struct xrt_layer_projection_view_data *lvd = &stereo->l;
const struct xrt_layer_projection_view_data *rvd = &stereo->r; const struct xrt_layer_projection_view_data *rvd = &stereo->r;
do_distortion_for_layer( // do_cs_distortion_for_layer( //
crc, // crc crc, // crc
world_poses, // world_poses world_poses, // world_poses
layer, // layer layer, // layer
@ -728,7 +727,7 @@ comp_render_dispatch_compute(struct render_compute *crc,
views, // views views, // views
do_timewarp); // do_timewarp do_timewarp); // do_timewarp
} else if (layer_count > 0) { } else if (layer_count > 0) {
comp_render_stereo_layers_to_scratch( // comp_render_cs_stereo_layers_to_scratch( //
crc, // crc, //
pre_transforms, // pre_transforms, //
world_poses, // world_poses, //
@ -739,7 +738,7 @@ comp_render_dispatch_compute(struct render_compute *crc,
transition_to, // transition_to, //
do_timewarp); // do_timewarp); //
do_distortion_for_scratch( // do_cs_distortion_for_scratch( //
crc, // crc, //
rsi, // rsi, //
target_image, // target_image, //

View file

@ -35,7 +35,7 @@ struct comp_layer;
* * Target images: VK_IMAGE_LAYOUT_GENERAL * * Target images: VK_IMAGE_LAYOUT_GENERAL
*/ */
void void
comp_render_layer(struct render_compute *crc, comp_render_cs_layer(struct render_compute *crc,
uint32_t view_index, uint32_t view_index,
const struct comp_layer *layers, const struct comp_layer *layers,
const uint32_t layer_count, const uint32_t layer_count,
@ -65,7 +65,7 @@ comp_render_layer(struct render_compute *crc,
* @ingroup comp_util * @ingroup comp_util
*/ */
void void
comp_render_stereo_layers(struct render_compute *crc, comp_render_cs_stereo_layers(struct render_compute *crc,
const struct comp_layer *layers, const struct comp_layer *layers,
const uint32_t layer_count, const uint32_t layer_count,
const struct xrt_normalized_rect pre_transforms[2], const struct xrt_normalized_rect pre_transforms[2],
@ -94,7 +94,7 @@ comp_render_stereo_layers(struct render_compute *crc,
* @ingroup comp_util * @ingroup comp_util
*/ */
void void
comp_render_stereo_layers_to_scratch(struct render_compute *crc, comp_render_cs_stereo_layers_to_scratch(struct render_compute *crc,
const struct xrt_normalized_rect pre_transforms[2], const struct xrt_normalized_rect pre_transforms[2],
struct xrt_pose world_poses[2], struct xrt_pose world_poses[2],
struct xrt_pose eye_poses[2], struct xrt_pose eye_poses[2],
@ -124,7 +124,7 @@ comp_render_stereo_layers_to_scratch(struct render_compute *crc,
* @ingroup comp_util * @ingroup comp_util
*/ */
void void
comp_render_dispatch_compute(struct render_compute *crc, comp_render_cs_dispatch(struct render_compute *crc,
struct render_scratch_images *rsi, struct render_scratch_images *rsi,
struct xrt_pose world_poses[2], struct xrt_pose world_poses[2],
struct xrt_pose eye_poses[2], struct xrt_pose eye_poses[2],