mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-18 19:10:32 +01:00
radeonsi: preserve derivatives after discards for ARB shaders
Contrary to the GLSL spec, the ARB fp spec doesn't explicitely states that derivatives are undefined after discards. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5018 Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11972>
This commit is contained in:
parent
8cd2e82c89
commit
bdcefb8ec4
1 changed files with 2 additions and 1 deletions
|
|
@ -837,7 +837,8 @@ static void si_lower_nir(struct si_screen *sscreen, struct nir_shader *nir)
|
|||
NIR_PASS_V(nir, nir_lower_subgroups, &subgroups_options);
|
||||
|
||||
NIR_PASS_V(nir, nir_lower_discard_or_demote,
|
||||
sscreen->debug_flags & DBG(FS_CORRECT_DERIVS_AFTER_KILL));
|
||||
(sscreen->debug_flags & DBG(FS_CORRECT_DERIVS_AFTER_KILL)) ||
|
||||
nir->info.is_arb_asm);
|
||||
|
||||
/* Lower load constants to scalar and then clean up the mess */
|
||||
NIR_PASS_V(nir, nir_lower_load_const_to_scalar);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue