mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 02:20:11 +01:00
lavapipe: Do not emit aabb handling if no isec shader is used
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34003>
This commit is contained in:
parent
7113620625
commit
985f5e0875
1 changed files with 12 additions and 0 deletions
|
|
@ -550,6 +550,18 @@ lvp_handle_aabb_intersection(nir_builder *b, struct lvp_leaf_intersection *inter
|
|||
struct lvp_ray_tracing_pipeline_compiler *compiler = args->data;
|
||||
struct lvp_ray_tracing_state *state = &compiler->state;
|
||||
|
||||
bool has_isec = false;
|
||||
for (uint32_t i = 0; i < compiler->pipeline->rt.group_count; i++) {
|
||||
struct lvp_ray_tracing_group *group = compiler->pipeline->rt.groups + i;
|
||||
if (group->isec_index != VK_SHADER_UNUSED_KHR) {
|
||||
has_isec = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!has_isec)
|
||||
return;
|
||||
|
||||
nir_store_var(b, state->accept, nir_imm_false(b), 0x1);
|
||||
nir_store_var(b, state->terminate, ray_flags->terminate_on_first_hit, 0x1);
|
||||
nir_store_var(b, state->opaque, intersection->opaque, 0x1);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue