From 5e0b8334ec108dd42cca1a6ab1d8fe8a580ead32 Mon Sep 17 00:00:00 2001 From: Konstantin Seurer Date: Tue, 12 Mar 2024 16:44:17 +0100 Subject: [PATCH] lavapipe: Pass lvp_ray_flags into lvp_aabb_intersection_cb Reviewed-By: Mike Blumenkrantz Part-of: --- src/gallium/frontends/lavapipe/lvp_nir_lower_ray_queries.c | 3 ++- src/gallium/frontends/lavapipe/lvp_nir_ray_tracing.c | 2 +- src/gallium/frontends/lavapipe/lvp_nir_ray_tracing.h | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gallium/frontends/lavapipe/lvp_nir_lower_ray_queries.c b/src/gallium/frontends/lavapipe/lvp_nir_lower_ray_queries.c index ddb2b730ac2..2eb6d5bce43 100644 --- a/src/gallium/frontends/lavapipe/lvp_nir_lower_ray_queries.c +++ b/src/gallium/frontends/lavapipe/lvp_nir_lower_ray_queries.c @@ -453,7 +453,8 @@ struct traversal_data { static void handle_candidate_aabb(nir_builder *b, struct lvp_leaf_intersection *intersection, - const struct lvp_ray_traversal_args *args) + const struct lvp_ray_traversal_args *args, + const struct lvp_ray_flags *ray_flags) { struct traversal_data *data = args->data; struct ray_query_vars *vars = data->vars; diff --git a/src/gallium/frontends/lavapipe/lvp_nir_ray_tracing.c b/src/gallium/frontends/lavapipe/lvp_nir_ray_tracing.c index 1cc20784b56..1e29dc95e21 100644 --- a/src/gallium/frontends/lavapipe/lvp_nir_ray_tracing.c +++ b/src/gallium/frontends/lavapipe/lvp_nir_ray_tracing.c @@ -343,7 +343,7 @@ lvp_build_aabb_case(nir_builder *b, const struct lvp_ray_traversal_args *args, not_cull = nir_iand(b, not_cull, ray_flags->no_skip_aabbs); nir_push_if(b, not_cull); { - args->aabb_cb(b, &intersection, args); + args->aabb_cb(b, &intersection, args, ray_flags); } nir_pop_if(b, NULL); } diff --git a/src/gallium/frontends/lavapipe/lvp_nir_ray_tracing.h b/src/gallium/frontends/lavapipe/lvp_nir_ray_tracing.h index 3a60c350498..80ba660efec 100644 --- a/src/gallium/frontends/lavapipe/lvp_nir_ray_tracing.h +++ b/src/gallium/frontends/lavapipe/lvp_nir_ray_tracing.h @@ -36,7 +36,8 @@ struct lvp_leaf_intersection { }; typedef void (*lvp_aabb_intersection_cb)(nir_builder *b, struct lvp_leaf_intersection *intersection, - const struct lvp_ray_traversal_args *args); + const struct lvp_ray_traversal_args *args, + const struct lvp_ray_flags *ray_flags); struct lvp_triangle_intersection { struct lvp_leaf_intersection base;