mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-19 00:10:27 +01:00
radv: Handle NULL miss shaders
Fixes reflections in DOOM Eternal.
Fixes: 85580faa ("radv: Add ray traversal loop.")
Closes: #6210
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20270>
This commit is contained in:
parent
276236ed6d
commit
568fa71ef8
1 changed files with 5 additions and 0 deletions
|
|
@ -618,6 +618,11 @@ lower_rt_instructions(nir_shader *shader, struct rt_variables *vars, unsigned ca
|
|||
nir_store_var(&b_shader, vars->hit_kind, undef, 0x1);
|
||||
nir_ssa_def *miss_index = nir_load_var(&b_shader, vars->miss_index);
|
||||
load_sbt_entry(&b_shader, vars, miss_index, SBT_MISS, SBT_GENERAL_IDX);
|
||||
|
||||
/* In case of a NULL miss shader, do nothing and just return. */
|
||||
nir_push_if(&b_shader, nir_ieq_imm(&b_shader, nir_load_var(&b_shader, vars->idx), 0));
|
||||
insert_rt_return(&b_shader, vars);
|
||||
nir_pop_if(&b_shader, NULL);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue