radv: ray cull mask

Lower the cull_mask system value to rt variable
load and advertise the corresponding capability.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16430>
This commit is contained in:
Konstantin Seurer 2022-05-10 16:15:02 +02:00 committed by Marge Bot
parent 2e0e150e69
commit d5dd0df65f
2 changed files with 7 additions and 0 deletions

View file

@ -647,6 +647,12 @@ lower_rt_instructions(nir_shader *shader, struct rt_variables *vars, unsigned ca
nir_ssa_def_rewrite_uses(&intr->dest.ssa, ret);
break;
}
case nir_intrinsic_load_cull_mask: {
b_shader.cursor = nir_instr_remove(instr);
nir_ssa_def *ret = nir_load_var(&b_shader, vars->cull_mask);
nir_ssa_def_rewrite_uses(&intr->dest.ssa, ret);
break;
}
case nir_intrinsic_ignore_ray_intersection: {
b_shader.cursor = nir_instr_remove(instr);
nir_store_var(&b_shader, vars->ahit_status, nir_imm_int(&b_shader, 1), 1);

View file

@ -666,6 +666,7 @@ radv_shader_spirv_to_nir(struct radv_device *device, const struct radv_pipeline_
.multiview = true,
.physical_storage_buffer_address = true,
.post_depth_coverage = true,
.ray_cull_mask = true,
.ray_query = true,
.ray_tracing = true,
.ray_traversal_primitive_culling = true,