Summary: | [bisected] piglit shaders_GLSL_link_two_programs,_global_initializer regressed | ||
---|---|---|---|
Product: | Mesa | Reporter: | fangxun <xunx.fang> |
Component: | glsl-compiler | Assignee: | Ian Romanick <idr> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | christophe.prigent |
Version: | git | ||
Hardware: | All | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
fangxun
2012-01-19 22:19:49 UTC
The comment around line 494 in linker.cpp explains the problem: /* FINISHME: This is wrong. The constant_value field should * FINISHME: not be modified! Imagine a case where a shader * FINISHME: without an initializer is linked in two different * FINISHME: programs with shaders that have differing * FINISHME: initializers. Linking with the first will * FINISHME: modify the shader, and linking with the second * FINISHME: will fail. */ This test case was created specifically to trigger this bug. Unfortunately, the fix is non-trival, and has no chance of making the 8.0 release. looks like not high priority bug to me. Looks to have been fixed by: commit 9bea01899433ca6a8047b4172ffec6e89afe7625 Author: Juan A. Suarez Romero <jasuarez@igalia.com> Date: Wed May 11 13:48:18 2016 +0200 glsl: use var with initializer on global var validation Currently, when cross validating global variables, all global variables seen in the shaders that are part of a program are saved in a table. When checking a variable this already exist in the table, we check both are initialized to the same value. If the already saved variable does not have an initializer, we copy it from the new variable. Unfortunately this is wrong, as we are modifying something it is constant. Also, if this modified variable is used in another program, it will keep the initializer, when it should have none. Instead of copying the initializer, this commit replaces the old variable with the new one. So if we see again the same variable with an initializer, we can compare if both are the same or not. v2: convert tabs in whitespaces (Kenenth Graunke) Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.