Re: [Mesa-dev] [PATCH] i965: Fix calculation of layers array length for isl_view

2018-09-10 Thread Danylo Piliaiev
Thank you Józef and Ilia for pointing this out! I believe I have fully understood what's happening here and I'll send a final version of the fix soon. On 9/7/18 7:47 PM, Józef Kucia wrote: On Fri, Sep 7, 2018 at 6:44 PM Ilia Mirkin wrote: On Fri, Sep 7, 2018 at 12:35 PM, Józef Kucia wrote:

Re: [Mesa-dev] [PATCH] i965: Fix calculation of layers array length for isl_view

2018-09-07 Thread Józef Kucia
On Fri, Sep 7, 2018 at 6:44 PM Ilia Mirkin wrote: > > On Fri, Sep 7, 2018 at 12:35 PM, Józef Kucia wrote: > > On Fri, Sep 7, 2018 at 4:42 PM Danylo Piliaiev > > wrote: > > > >> @@ -1546,8 +1548,8 @@ update_image_surface(struct brw_context *brw, > >> .format = format, > >>

Re: [Mesa-dev] [PATCH] i965: Fix calculation of layers array length for isl_view

2018-09-07 Thread Ilia Mirkin
On Fri, Sep 7, 2018 at 12:35 PM, Józef Kucia wrote: > On Fri, Sep 7, 2018 at 4:42 PM Danylo Piliaiev > wrote: > >> @@ -1546,8 +1548,8 @@ update_image_surface(struct brw_context *brw, >> .format = format, >> .base_level = obj->MinLevel + u->Level, >> .levels

Re: [Mesa-dev] [PATCH] i965: Fix calculation of layers array length for isl_view

2018-09-07 Thread Józef Kucia
On Fri, Sep 7, 2018 at 4:42 PM Danylo Piliaiev wrote: > @@ -1546,8 +1548,8 @@ update_image_surface(struct brw_context *brw, > .format = format, > .base_level = obj->MinLevel + u->Level, > .levels = 1, > -.base_array_layer = obj->MinLayer + u->_La

Re: [Mesa-dev] [PATCH] i965: Fix calculation of layers array length for isl_view

2018-09-07 Thread Lionel Landwerlin
On 07/09/2018 16:32, Ilia Mirkin wrote: On Fri, Sep 7, 2018 at 11:09 AM, Danylo Piliaiev wrote: On 9/7/18 5:48 PM, Ilia Mirkin wrote: On Fri, Sep 7, 2018 at 10:41 AM, Danylo Piliaiev wrote: Comment for array_len field states: "Indicates the number of array elements starting at Base A

Re: [Mesa-dev] [PATCH] i965: Fix calculation of layers array length for isl_view

2018-09-07 Thread Ilia Mirkin
On Fri, Sep 7, 2018 at 11:09 AM, Danylo Piliaiev wrote: > > On 9/7/18 5:48 PM, Ilia Mirkin wrote: >> >> On Fri, Sep 7, 2018 at 10:41 AM, Danylo Piliaiev >> wrote: >>> >>> Comment for array_len field states: >>> "Indicates the number of array elements starting at >>> Base Array Layer." >>> >

Re: [Mesa-dev] [PATCH] i965: Fix calculation of layers array length for isl_view

2018-09-07 Thread Danylo Piliaiev
On 9/7/18 5:48 PM, Ilia Mirkin wrote: On Fri, Sep 7, 2018 at 10:41 AM, Danylo Piliaiev wrote: Comment for array_len field states: "Indicates the number of array elements starting at Base Array Layer." And most usages of array_len expect it to be equal or less than total layers - base

Re: [Mesa-dev] [PATCH] i965: Fix calculation of layers array length for isl_view

2018-09-07 Thread Ilia Mirkin
On Fri, Sep 7, 2018 at 10:41 AM, Danylo Piliaiev wrote: > Comment for array_len field states: > "Indicates the number of array elements starting at >Base Array Layer." > > And most usages of array_len expect it to be equal or less than > total layers - base layer > > Fixes: 5a8c8903 > Bugzil

[Mesa-dev] [PATCH] i965: Fix calculation of layers array length for isl_view

2018-09-07 Thread Danylo Piliaiev
Comment for array_len field states: "Indicates the number of array elements starting at Base Array Layer." And most usages of array_len expect it to be equal or less than total layers - base layer Fixes: 5a8c8903 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107856 Signed-off-by: D