Re: [Mesa-dev] [PATCH 1/5] i965: wrap assert param in #ifndef NDEBUG
On Tue, 2016-10-04 at 22:38 +1100, Timothy Arceri wrote: > On Tue, 2016-10-04 at 10:33 +0200, Iago Toral wrote: > > > > The series is: > > > > Reviewed-by: Iago Toral Quiroga> Thanks for taking a look. Are you happy with me changing patch 1 and > 4 > to use MAYBE_UNUSED as suggested by Gražvydas? Sure, that actually looks better to me as well. > > > > > > On Tue, 2016-10-04 at 11:15 +1100, Timothy Arceri wrote: > > > > > > > > > This fixes an unused variable warning on release builds. > > > --- > > > src/mesa/drivers/dri/i965/brw_fs.cpp | 4 > > > 1 file changed, 4 insertions(+) > > > > > > diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp > > > b/src/mesa/drivers/dri/i965/brw_fs.cpp > > > index dc000d9..ccf311d 100644 > > > --- a/src/mesa/drivers/dri/i965/brw_fs.cpp > > > +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp > > > @@ -5866,7 +5866,9 @@ fs_visitor::allocate_registers(bool > > > allow_spilling) > > > schedule_instructions(SCHEDULE_POST); > > > > > > if (last_scratch > 0) { > > > +#ifndef NDEBUG > > > unsigned max_scratch_size = 2 * 1024 * 1024; > > > +#endif > > > > > > prog_data->total_scratch = > > > brw_get_scratch_size(last_scratch); > > > > > > @@ -5884,7 +5886,9 @@ fs_visitor::allocate_registers(bool > > > allow_spilling) > > > * size linearly with a range of [1kB, 12kB] and 1kB > > > granularity. > > > */ > > > prog_data->total_scratch = ALIGN(last_scratch, > > > 1024); > > > +#ifndef NDEBUG > > > max_scratch_size = 12 * 1024; > > > +#endif > > > } > > > } > > > > > ___ > > mesa-dev mailing list > > mesa-dev@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/5] i965: wrap assert param in #ifndef NDEBUG
On Tue, 2016-10-04 at 10:33 +0200, Iago Toral wrote: > The series is: > > Reviewed-by: Iago Toral QuirogaThanks for taking a look. Are you happy with me changing patch 1 and 4 to use MAYBE_UNUSED as suggested by Gražvydas? > > On Tue, 2016-10-04 at 11:15 +1100, Timothy Arceri wrote: > > > > This fixes an unused variable warning on release builds. > > --- > > src/mesa/drivers/dri/i965/brw_fs.cpp | 4 > > 1 file changed, 4 insertions(+) > > > > diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp > > b/src/mesa/drivers/dri/i965/brw_fs.cpp > > index dc000d9..ccf311d 100644 > > --- a/src/mesa/drivers/dri/i965/brw_fs.cpp > > +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp > > @@ -5866,7 +5866,9 @@ fs_visitor::allocate_registers(bool > > allow_spilling) > > schedule_instructions(SCHEDULE_POST); > > > > if (last_scratch > 0) { > > +#ifndef NDEBUG > > unsigned max_scratch_size = 2 * 1024 * 1024; > > +#endif > > > > prog_data->total_scratch = > > brw_get_scratch_size(last_scratch); > > > > @@ -5884,7 +5886,9 @@ fs_visitor::allocate_registers(bool > > allow_spilling) > > * size linearly with a range of [1kB, 12kB] and 1kB > > granularity. > > */ > > prog_data->total_scratch = ALIGN(last_scratch, 1024); > > +#ifndef NDEBUG > > max_scratch_size = 12 * 1024; > > +#endif > > } > > } > > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/5] i965: wrap assert param in #ifndef NDEBUG
On Tue, Oct 4, 2016 at 3:15 AM, Timothy Arceriwrote: > This fixes an unused variable warning on release builds. > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 4 > 1 file changed, 4 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp > b/src/mesa/drivers/dri/i965/brw_fs.cpp > index dc000d9..ccf311d 100644 > --- a/src/mesa/drivers/dri/i965/brw_fs.cpp > +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp > @@ -5866,7 +5866,9 @@ fs_visitor::allocate_registers(bool allow_spilling) > schedule_instructions(SCHEDULE_POST); > > if (last_scratch > 0) { > +#ifndef NDEBUG >unsigned max_scratch_size = 2 * 1024 * 1024; > +#endif What about using MAYBE_UNUSED instead? Gražvydas ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/5] i965: wrap assert param in #ifndef NDEBUG
The series is: Reviewed-by: Iago Toral QuirogaOn Tue, 2016-10-04 at 11:15 +1100, Timothy Arceri wrote: > This fixes an unused variable warning on release builds. > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 4 > 1 file changed, 4 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp > b/src/mesa/drivers/dri/i965/brw_fs.cpp > index dc000d9..ccf311d 100644 > --- a/src/mesa/drivers/dri/i965/brw_fs.cpp > +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp > @@ -5866,7 +5866,9 @@ fs_visitor::allocate_registers(bool > allow_spilling) > schedule_instructions(SCHEDULE_POST); > > if (last_scratch > 0) { > +#ifndef NDEBUG > unsigned max_scratch_size = 2 * 1024 * 1024; > +#endif > > prog_data->total_scratch = brw_get_scratch_size(last_scratch); > > @@ -5884,7 +5886,9 @@ fs_visitor::allocate_registers(bool > allow_spilling) > * size linearly with a range of [1kB, 12kB] and 1kB > granularity. > */ > prog_data->total_scratch = ALIGN(last_scratch, 1024); > +#ifndef NDEBUG > max_scratch_size = 12 * 1024; > +#endif > } > } > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/5] i965: wrap assert param in #ifndef NDEBUG
This fixes an unused variable warning on release builds. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index dc000d9..ccf311d 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -5866,7 +5866,9 @@ fs_visitor::allocate_registers(bool allow_spilling) schedule_instructions(SCHEDULE_POST); if (last_scratch > 0) { +#ifndef NDEBUG unsigned max_scratch_size = 2 * 1024 * 1024; +#endif prog_data->total_scratch = brw_get_scratch_size(last_scratch); @@ -5884,7 +5886,9 @@ fs_visitor::allocate_registers(bool allow_spilling) * size linearly with a range of [1kB, 12kB] and 1kB granularity. */ prog_data->total_scratch = ALIGN(last_scratch, 1024); +#ifndef NDEBUG max_scratch_size = 12 * 1024; +#endif } } -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev