Module: Mesa Branch: staging/22.3 Commit: a39a2fd5d3b04829729ce888cbde23a5b03e67cd URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a39a2fd5d3b04829729ce888cbde23a5b03e67cd
Author: Alyssa Rosenzweig <[email protected]> Date: Thu Jan 12 21:43:29 2023 -0500 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 151aa19c215 ("ttn: Set nir->info.separate_shader"), which fixed a similar issue with TGSI. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Emma Anholt <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20688> (cherry picked from commit 7e68cf91d74e6bd9a88c2b52417451d9afec4782) --- .pick_status.json | 2 +- src/mesa/program/prog_to_nir.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index db2852b977b..0b29ce4332c 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -418,7 +418,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 }, diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c index 16116f62ec3..a86df264a82 100644 --- a/src/mesa/program/prog_to_nir.c +++ b/src/mesa/program/prog_to_nir.c @@ -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;
