Re: [Mesa-dev] [PATCH] compiler/glsl: Fix uniform location counting.

2016-02-17 Thread Tapani Pälli
On 02/17/2016 04:27 PM, Manolova, Plamena wrote: Thank you for reviewing. The change has been run through both Piglit and CTS. I'll ask Tapani to take another look just in case. LGTM and passes all the tests, nice work! On Wed, Feb 17, 2016 at 4:20 PM, Ilia Mirkin

Re: [Mesa-dev] [PATCH] compiler/glsl: Fix uniform location counting.

2016-02-17 Thread Manolova, Plamena
Thank you for reviewing. The change has been run through both Piglit and CTS. I'll ask Tapani to take another look just in case. On Wed, Feb 17, 2016 at 4:20 PM, Ilia Mirkin wrote: > On Wed, Feb 17, 2016 at 8:49 AM, Plamena Manolova > wrote: > > This patch moves the calculation of current unifo

Re: [Mesa-dev] [PATCH] compiler/glsl: Fix uniform location counting.

2016-02-17 Thread Ilia Mirkin
On Wed, Feb 17, 2016 at 8:49 AM, Plamena Manolova wrote: > 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

[Mesa-dev] [PATCH] compiler/glsl: Fix uniform location counting.

2016-02-17 Thread Plamena Manolova
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. Th

Re: [Mesa-dev] [PATCH] compiler/glsl: Fix uniform location counting.

2016-02-17 Thread Manolova, Plamena
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 wrote: > On Wed, Feb 17, 2016 at 6:29 AM, Manolova, Plamena > wrote: > >>> > + if (entries_total > 0) > >>> > + entries_total -= 1; > >>> > >>

Re: [Mesa-dev] [PATCH] compiler/glsl: Fix uniform location counting.

2016-02-17 Thread Ilia Mirkin
On Wed, Feb 17, 2016 at 6:29 AM, Manolova, Plamena 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

Re: [Mesa-dev] [PATCH] compiler/glsl: Fix uniform location counting.

2016-02-17 Thread Manolova, Plamena
On Wed, Feb 17, 2016 at 1:22 PM, Manolova, Plamena < plamena.manol...@intel.com> wrote: > > > On Mon, Feb 15, 2016 at 10:50 PM, Ilia Mirkin > wrote: > >> In a few places your indentation is off -- please look at the 'git >> diff' output, it should be pretty obvious. You used 2 spaces instead >> o

Re: [Mesa-dev] [PATCH] compiler/glsl: Fix uniform location counting.

2016-02-17 Thread Manolova, Plamena
On Mon, Feb 15, 2016 at 10:50 PM, Ilia Mirkin wrote: > In a few places your indentation is off -- please look at the 'git > diff' output, it should be pretty obvious. You used 2 spaces instead > of 3 (in just a handful of places). > Thanks for spotting this, it must've slipped by me. > > On Fr

Re: [Mesa-dev] [PATCH] compiler/glsl: Fix uniform location counting.

2016-02-15 Thread Michel Dänzer
On 16.02.2016 06:38, Matt Turner wrote: > On Mon, Feb 15, 2016 at 12:50 PM, Ilia Mirkin wrote: >> In a few places your indentation is off -- please look at the 'git >> diff' output, it should be pretty obvious. You used 2 spaces instead >> of 3 (in just a handful of places). > > If you use vim, y

Re: [Mesa-dev] [PATCH] compiler/glsl: Fix uniform location counting.

2016-02-15 Thread Connor Abbott
On Mon, Feb 15, 2016 at 4:38 PM, Matt Turner wrote: > On Mon, Feb 15, 2016 at 12:50 PM, Ilia Mirkin wrote: >> In a few places your indentation is off -- please look at the 'git >> diff' output, it should be pretty obvious. You used 2 spaces instead >> of 3 (in just a handful of places). > > If yo

Re: [Mesa-dev] [PATCH] compiler/glsl: Fix uniform location counting.

2016-02-15 Thread Matt Turner
On Mon, Feb 15, 2016 at 12:50 PM, Ilia Mirkin wrote: > In a few places your indentation is off -- please look at the 'git > diff' output, it should be pretty obvious. You used 2 spaces instead > of 3 (in just a handful of places). If you use vim, you can put something like this in your ~/.vimrc:

Re: [Mesa-dev] [PATCH] compiler/glsl: Fix uniform location counting.

2016-02-15 Thread Ilia Mirkin
In a few places your indentation is off -- please look at the 'git diff' output, it should be pretty obvious. You used 2 spaces instead of 3 (in just a handful of places). On Fri, Feb 12, 2016 at 7:38 AM, Plamena Manolova wrote: > This patch moves the calculation of current uniforms to > link_uni

[Mesa-dev] [PATCH] compiler/glsl: Fix uniform location counting.

2016-02-12 Thread Plamena Manolova
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. Th

Re: [Mesa-dev] [PATCH] compiler/glsl: Fix uniform location counting.

2016-02-11 Thread Manolova, Plamena
Thanks for reviewing. I was actually hesitant about which list implementation to use since the changes affect src/mesa/main/mtypes.h too. Thank you for clearing this up. On Thu, Feb 11, 2016 at 8:02 PM, Matt Turner wrote: > On Thu, Feb 11, 2016 at 8:31 AM, Plamena Manolova > wrote: > > This pat

Re: [Mesa-dev] [PATCH] compiler/glsl: Fix uniform location counting.

2016-02-11 Thread Manolova, Plamena
Thanks, this if-statement looks tidier the way you suggested. I'll update the patch. On Thu, Feb 11, 2016 at 7:13 PM, Ilia Mirkin wrote: > On Thu, Feb 11, 2016 at 11:31 AM, Plamena Manolova > wrote: > > + struct empty_uniform_block *current_block = NULL; > > + unsigned prev_location = -1; >

Re: [Mesa-dev] [PATCH] compiler/glsl: Fix uniform location counting.

2016-02-11 Thread Matt Turner
On Thu, Feb 11, 2016 at 8:31 AM, Plamena Manolova wrote: > 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

Re: [Mesa-dev] [PATCH] compiler/glsl: Fix uniform location counting.

2016-02-11 Thread Manolova, Plamena
Thank you for the review. You're absolutely right, I'll go ahead fix this. On Thu, Feb 11, 2016 at 6:39 PM, Ilia Mirkin wrote: > On Thu, Feb 11, 2016 at 11:31 AM, Plamena Manolova > wrote: > > This patch moves the calculation of current uniforms to > > link_uniforms, which makes use of UniformR

Re: [Mesa-dev] [PATCH] compiler/glsl: Fix uniform location counting.

2016-02-11 Thread Ilia Mirkin
On Thu, Feb 11, 2016 at 11:31 AM, Plamena Manolova wrote: > + struct empty_uniform_block *current_block = NULL; > + unsigned prev_location = -1; > + > + for (unsigned i = 0; i < prog->NumUniformRemapTable; i++) { > + /* We found empty space in UniformRemapTable. */ > + if (prog->Un

Re: [Mesa-dev] [PATCH] compiler/glsl: Fix uniform location counting.

2016-02-11 Thread Ilia Mirkin
On Thu, Feb 11, 2016 at 11:31 AM, Plamena Manolova wrote: > 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 lef

[Mesa-dev] [PATCH] compiler/glsl: Fix uniform location counting.

2016-02-11 Thread Plamena Manolova
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. Th