mesa: clear program info when updating program string

The program info contains all sorts of flags concerning the compilation state of
the program, and those need to be reset when the program is going to be recompiled
when its source changes.

For example, before this change, after info.flrp_lowered got set following the
first call to glProgramStringARB, flrp lowering would not happen for any subsequent
updates to the program string, leading to compilation failures.

Signed-off-by: Charlotte Pabst <cpabst@codeweavers.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35523>
This commit is contained in:
Charlotte Pabst 2025-06-13 23:09:55 +02:00 committed by Marge Bot
parent 10ef9c6a80
commit be6b49449c

View file

@ -379,6 +379,14 @@ set_program_string(struct gl_program *prog, GLenum target, GLenum format, GLsize
return;
}
/* clear info */
shader_info new_info = { 0 };
new_info.name = prog->info.name;
new_info.label = prog->info.label;
new_info.stage = prog->info.stage;
new_info.use_legacy_math_rules = prog->info.use_legacy_math_rules;
prog->info = new_info;
#ifdef ENABLE_SHADER_CACHE
GLcharARB *replacement;