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>
(cherry picked from commit 7e68cf91d7)
This commit is contained in:
Alyssa Rosenzweig 2023-01-12 21:43:29 -05:00 committed by Eric Engestrom
parent e020f913bb
commit 9f4d8d7595
2 changed files with 2 additions and 2 deletions

View file

@ -3334,7 +3334,7 @@
"description": "mesa: Set info.separate_shader for ARB programs",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

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;