mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 11:40:10 +01:00
vtn: Remove dead shader_call_data from all RT stages
Having multiple shader_call_data can cause incorrect behavior since the compiler expects there to be only one shader_call_data variable. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11585 Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30468>
This commit is contained in:
parent
fb03aed435
commit
cbf07628bc
1 changed files with 4 additions and 2 deletions
|
|
@ -7058,11 +7058,13 @@ spirv_to_nir(const uint32_t *words, size_t word_count,
|
|||
}
|
||||
|
||||
/* Work around applications that declare shader_call_data variables inside
|
||||
* ray generation shaders.
|
||||
* ray generation shaders or multiple shader_call_data variables in callable
|
||||
* shaders.
|
||||
*
|
||||
* https://gitlab.freedesktop.org/mesa/mesa/-/issues/5326
|
||||
* https://gitlab.freedesktop.org/mesa/mesa/-/issues/11585
|
||||
*/
|
||||
if (stage == MESA_SHADER_RAYGEN)
|
||||
if (gl_shader_stage_is_rt(b->shader->info.stage))
|
||||
NIR_PASS(_, b->shader, nir_remove_dead_variables, nir_var_shader_call_data,
|
||||
NULL);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue