mesa: 4de25fa7b050a296b2f1a4504e568dfce5d0a295 (master 11.3.0-devel) $ ./bin/glsl-arb-fragment-coord-conventions -auto Regular gl_FragCoord Failed to link: error: count of uniform locations > MAX_UNIFORM_LOCATIONS(4294967295 > 98304) Probe color at (0,0) Expected: 0.000000 0.000000 0.000000 Observed: 1.000000 1.000000 1.000000 Probe color at (99,99) Expected: 1.000000 1.000000 0.000000 Observed: 1.000000 1.000000 1.000000 Pixel center half integer Failed to link: error: count of uniform locations > MAX_UNIFORM_LOCATIONS(4294967295 > 98304) Probe color at (0,0) Expected: 0.750000 0.750000 0.500000 Observed: 1.000000 1.000000 1.000000 Probe color at (99,99) Expected: 0.750000 0.750000 1.000000 Observed: 1.000000 1.000000 1.000000 Pixel center integer Failed to link: error: count of uniform locations > MAX_UNIFORM_LOCATIONS(4294967295 > 98304) Probe color at (0,0) Expected: 0.250000 0.250000 0.000000 Observed: 1.000000 1.000000 1.000000 Probe color at (99,99) Expected: 0.250000 0.250000 1.000000 Observed: 1.000000 1.000000 1.000000 Pixel origin upper left Failed to link: error: count of uniform locations > MAX_UNIFORM_LOCATIONS(4294967295 > 98304) Probe color at (0,60) Expected: 0.000000 1.000000 0.000000 Observed: 1.000000 1.000000 1.000000 Probe color at (99,159) Expected: 1.000000 0.000000 0.000000 Observed: 1.000000 1.000000 1.000000 Pixel origin upper left and pixel center integer Failed to link: error: count of uniform locations > MAX_UNIFORM_LOCATIONS(4294967295 > 98304) Probe color at (0,60) Expected: 0.125000 0.372500 0.000000 Observed: 1.000000 1.000000 1.000000 Probe color at (99,159) Expected: 0.372500 0.125000 0.000000 Observed: 1.000000 1.000000 1.000000 PIGLIT: {"result": "fail" } 65dfb3048e8291675ca33581aeff8921f7ea509d is the first bad commit commit 65dfb3048e8291675ca33581aeff8921f7ea509d Author: Plamena Manolova <plamena.manolova@intel.com> Date: Thu Feb 11 15:00:02 2016 +0200 compiler/glsl: Fix uniform location counting. This patch moves the calculation of current uniforms to link_uniforms, which makes use of UniformRemapTable which stores all the reserved uniform locations. Location assignment for implicit uniforms now tries to use any gaps left in the table after the location assignment for explicit uniforms. This gives us more space to store more uniforms. Patch is based on earlier patch with following changes/additions: 1: Move the counting of explicit locations to check_explicit_uniform_locations and then pass the number to link_assign_uniform_locations. 2: Count the number of empty slots in UniformRemapTable and store them in a list_head. 3: Try to find an empty slot for implicit locations from the list, if that fails resize UniformRemapTable. Fixes following CTS tests: ES31-CTS.explicit_uniform_location.uniform-loc-mix-with-implicit-max ES31-CTS.explicit_uniform_location.uniform-loc-mix-with-implicit-max-array Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Signed-off-by: Plamena Manolova <plamena.manolova@intel.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93696 :040000 040000 5848c556c369c2c798c1c1e036c70c740b56a97a 25915fac71a54954aafd0139a55045ba394969e6 M src bisect run success
Created attachment 122339 [details] [review] Proposed Patch
Hi Vinson, Could you please give the proposed patch a go?
(In reply to Plamena Manolova from comment #2) > Hi Vinson, > Could you please give the proposed patch a go? The patch fixes the glsl-arb-fragment-coord-convention regression on swrast. Tested-by: Vinson Lee <vlee@freedesktop.org>
commit e25c24c6389e5dbbb7ebf59c302659e5d6417ed4 Author: Lars Hamre <chemecse@gmail.com> Date: Fri Apr 8 10:06:23 2016 -0400 glsl: handle unsigned int wraparound in link_shaders() v2: change check_explicit_uniform_locations() to return an unsigned 0 (Timothy Arceri) We were storing the int result of check_explicit_uniform_locations() in num_explicit_uniform_locs as an unsigned int which caused it to be 4294967295 when a -1 was returned. This in turn would cause the following error during linking: error: count of uniform locations > MAX_UNIFORM_LOCATIONS(4294967295 > 98304) Results from running piglit tests/all with this patch and when ARB_explicit_uniform_location disabled: changes: 178 fixes: 176 regressions: 2 The two regressions are for the following tests: glean@glsl1-matrix column check (1) glean@glsl1-matrix column check (2) which regress from FAIL to CRASH. The regressions are acceptable because the tests are currently failing due to the aforementioned linker error. Signed-off-by: Lars Hamre <chemecse@gmail.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
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.