mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-23 00:50:36 +02:00
radv/rt: Remove nir_intrinsic_execute_callable instrs in monolithic mode
It's allowed to place OpExecuteCallableKHR in a SPIR-V, even if the RT pipeline doesn't contain any callable shaders. Unreal hits this case and crashes. We can assume the intrinsic never gets executed, so we can simply remove it. Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32613>
This commit is contained in:
parent
1b1003ca6f
commit
0c02a7e8e8
1 changed files with 6 additions and 1 deletions
|
|
@ -1771,7 +1771,12 @@ lower_rt_instruction_monolithic(nir_builder *b, nir_instr *instr, void *data)
|
|||
|
||||
switch (intr->intrinsic) {
|
||||
case nir_intrinsic_execute_callable:
|
||||
unreachable("nir_intrinsic_execute_callable");
|
||||
/* It's allowed to place OpExecuteCallableKHR in a SPIR-V, even if the RT pipeline doesn't contain
|
||||
* any callable shaders. However, it's impossible to execute the instruction in a valid way, so just remove any
|
||||
* nir_intrinsic_execute_callable we encounter.
|
||||
*/
|
||||
nir_instr_remove(instr);
|
||||
return true;
|
||||
case nir_intrinsic_trace_ray: {
|
||||
vars->payload_offset = nir_src_as_uint(intr->src[10]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue