mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 02:30:18 +01:00
spirv: add workaround for Metro Exodus in spirv_to_nir
This is commit 4397c166c0 for spirv_to_nir, otherwise we hit
the same assert with anv driver.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21281>
This commit is contained in:
parent
888492ecd3
commit
effee24951
1 changed files with 9 additions and 0 deletions
|
|
@ -6797,6 +6797,15 @@ spirv_to_nir(const uint32_t *words, size_t word_count,
|
|||
}
|
||||
}
|
||||
|
||||
/* Work around applications that declare shader_call_data variables inside
|
||||
* ray generation shaders.
|
||||
*
|
||||
* https://gitlab.freedesktop.org/mesa/mesa/-/issues/5326
|
||||
*/
|
||||
if (stage == MESA_SHADER_RAYGEN)
|
||||
NIR_PASS(_, b->shader, nir_remove_dead_variables, nir_var_shader_call_data,
|
||||
NULL);
|
||||
|
||||
/* Unparent the shader from the vtn_builder before we delete the builder */
|
||||
ralloc_steal(NULL, b->shader);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue