glsl: evaluate switch expression once
v2: intialize test_val in constructor Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5185 Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Cc: mesa-stable Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12234>
This commit is contained in:
committed by
Marge Bot
parent
3f2c54a27f
commit
bdae3c366e
@@ -1595,6 +1595,7 @@ ast_switch_statement::ast_switch_statement(ast_expression *test_expression,
|
||||
{
|
||||
this->test_expression = test_expression;
|
||||
this->body = body;
|
||||
this->test_val = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user