mesa: Set info.separate_shader for ARB programs

ARB programs are logically separate, and Mesa will happily mix and match them.
We need to alert backends of this fact, by setting nir->info.separate_shader.
Otherwise, backends may link shaders invalidly.

Fixes fp-abs-01 on Bifrost. (We don't use separate_shader for anything on
Valhall, so the issue doesn't appear there.)

Compare 151aa19c21 ("ttn: Set nir->info.separate_shader"), which fixed a
similar issue with TGSI.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20688>
This commit is contained in:
Alyssa Rosenzweig
2023-01-12 21:43:29 -05:00
committed by Marge Bot
parent 696069bc0d
commit 7e68cf91d7

View File

@@ -1036,7 +1036,7 @@ prog_to_nir(const struct gl_context *ctx, const struct gl_program *prog,
s->info.uses_texture_gather = false;
s->info.clip_distance_array_size = 0;
s->info.cull_distance_array_size = 0;
s->info.separate_shader = false;
s->info.separate_shader = true;
s->info.io_lowered = false;
s->info.internal = false;