You're right, changing the if statement to a > b would be less confusing, I'll go ahead and do that.
On Wed, Feb 17, 2016 at 2:35 PM, Ilia Mirkin <imir...@alum.mit.edu> wrote: > On Wed, Feb 17, 2016 at 6:29 AM, Manolova, Plamena > <plamena.manol...@intel.com> wrote: > >>> > + if (entries_total > 0) > >>> > + entries_total -= 1; > >>> > >>> This seems weird... why are you doing that? > > > > > > According to the spec: > > https://www.opengl.org/registry/specs/ARB/explicit_uniform_location.txt: > > "The explicitly defined locations > > and the generated locations must be in the range of 0 to > > MAX_UNIFORM_LOCATIONS minus one.", which means that the uniforms must fit > > between array slots 0 - 98303, however if we use total_entries without > > subtracting 1 we will be comparing to the range 1 - 98304 which will > trigger > > an error. > > But that's just a question of changing a >= into a > right? As it is, > you're saying that entries_total == 0 and entries_total == 1 are the > same thing (by subtracting 1). This is very odd. > > -ilia > --------------------------------------------------------------------- > Intel Corporation (UK) Limited > Registered No. 1134945 (England) > Registered Office: Pipers Way, Swindon SN3 1RJ > VAT No: 860 2173 47 > > This e-mail and any attachments may contain confidential material for > the sole use of the intended recipient(s). Any review or distribution > by others is strictly prohibited. If you are not the intended > recipient, please contact the sender and delete all copies. >
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev