glsl: add a is_implicit_initializer flag
Shared globals and glsl_zero_init can cause linker errors if the variable is only initialized in 1 place. This commit adds a flag to variables that have been implicitely initialized to be able in this situation to keep the explicit initialization value. Without this change the global-single-initializer-2-shaders piglit test fails when using glsl_zero_init. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4607>
This commit is contained in:
@@ -758,6 +758,11 @@ public:
|
||||
*/
|
||||
unsigned has_initializer:1;
|
||||
|
||||
/**
|
||||
* Is the initializer created by the compiler (glsl_zero_init)
|
||||
*/
|
||||
unsigned is_implicit_initializer:1;
|
||||
|
||||
/**
|
||||
* Is this variable a generic output or input that has not yet been matched
|
||||
* up to a variable in another stage of the pipeline?
|
||||
|
Reference in New Issue
Block a user