Re: [Mesa-dev] [PATCH 20/29] intel/isl/format: Add field locations informations to channel_layout
ping On Tue, Mar 6, 2018 at 9:53 AM, Jason Ekstrand wrote: > On Tue, Mar 6, 2018 at 9:46 AM, Pohjolainen, Topi < > topi.pohjolai...@gmail.com> wrote: > >> On Tue, Mar 06, 2018 at 09:11:18AM -0800, Jason Ekstrand wrote: >> > On Tue, Mar 6, 2018 at 1:54 AM, Pohjolainen, Topi < >> > topi.pohjolai...@gmail.com> wrote: >> > >> > > On Fri, Jan 26, 2018 at 05:59:49PM -0800, Jason Ekstrand wrote: >> > > > class Format(object): >> > > > @@ -160,7 +163,14 @@ class Format(object): >> > > > self.l = Channel(line[9]) >> > > > self.i = Channel(line[10]) >> > > > self.p = Channel(line[11]) >> > > > -self.order = line[12] >> > > > + >> > > > +# Set the start bit value for each channel >> > > > +order = line[12].strip() >> > > >> > > You aren't setting "self.order" anymore? >> > > >> > >> > No. Nothing was using it. It doesn't really matter to me whether we >> store >> > it in the Format object or not. >> >> So it is not really needed in the previous patch then? >> > > Correct. > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 20/29] intel/isl/format: Add field locations informations to channel_layout
On Tue, Mar 6, 2018 at 9:46 AM, Pohjolainen, Topi < topi.pohjolai...@gmail.com> wrote: > On Tue, Mar 06, 2018 at 09:11:18AM -0800, Jason Ekstrand wrote: > > On Tue, Mar 6, 2018 at 1:54 AM, Pohjolainen, Topi < > > topi.pohjolai...@gmail.com> wrote: > > > > > On Fri, Jan 26, 2018 at 05:59:49PM -0800, Jason Ekstrand wrote: > > > > class Format(object): > > > > @@ -160,7 +163,14 @@ class Format(object): > > > > self.l = Channel(line[9]) > > > > self.i = Channel(line[10]) > > > > self.p = Channel(line[11]) > > > > -self.order = line[12] > > > > + > > > > +# Set the start bit value for each channel > > > > +order = line[12].strip() > > > > > > You aren't setting "self.order" anymore? > > > > > > > No. Nothing was using it. It doesn't really matter to me whether we > store > > it in the Format object or not. > > So it is not really needed in the previous patch then? > Correct. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 20/29] intel/isl/format: Add field locations informations to channel_layout
On Tue, Mar 06, 2018 at 09:11:18AM -0800, Jason Ekstrand wrote: > On Tue, Mar 6, 2018 at 1:54 AM, Pohjolainen, Topi < > topi.pohjolai...@gmail.com> wrote: > > > On Fri, Jan 26, 2018 at 05:59:49PM -0800, Jason Ekstrand wrote: > > > --- > > > src/intel/isl/gen_format_layout.py | 16 +--- > > > src/intel/isl/isl.h| 1 + > > > 2 files changed, 14 insertions(+), 3 deletions(-) > > > > > > diff --git a/src/intel/isl/gen_format_layout.py > > b/src/intel/isl/gen_format_layout.py > > > index 535f38c..633498b 100644 > > > --- a/src/intel/isl/gen_format_layout.py > > > +++ b/src/intel/isl/gen_format_layout.py > > > @@ -76,7 +76,7 @@ isl_format_layouts[] = { > > > % for mask in ['r', 'g', 'b', 'a', 'l', 'i', 'p']: > > ><% channel = getattr(format, mask, None) %>\\ > > >% if channel.type is not None: > > > -.${mask} = { ISL_${channel.type}, ${channel.size} }, > > > +.${mask} = { ISL_${channel.type}, ${channel.start}, > > ${channel.size} }, > > >% else: > > > .${mask} = {}, > > >% endif > > > @@ -139,7 +139,10 @@ class Channel(object): > > > else: > > > grouped = self._splitter.match(line) > > > self.type = self._types[grouped.group('type')].upper() > > > -self.size = grouped.group('size') > > > +self.size = int(grouped.group('size')) > > > + > > > +# Default the start big to -1 > > > >bit > > > > > +self.start = -1; > > > > > > > > > class Format(object): > > > @@ -160,7 +163,14 @@ class Format(object): > > > self.l = Channel(line[9]) > > > self.i = Channel(line[10]) > > > self.p = Channel(line[11]) > > > -self.order = line[12] > > > + > > > +# Set the start bit value for each channel > > > +order = line[12].strip() > > > > You aren't setting "self.order" anymore? > > > > No. Nothing was using it. It doesn't really matter to me whether we store > it in the Format object or not. So it is not really needed in the previous patch then? > > > > > +bit = 0 > > > +for c in order: > > > +chan = getattr(self, c) > > > +chan.start = bit; > > > +bit = bit + chan.size > > > > > > # alpha doesn't have a colorspace of it's own. > > > self.colorspace = line[13].strip().upper() > > > diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h > > > index 277998f..04d0f0b 100644 > > > --- a/src/intel/isl/isl.h > > > +++ b/src/intel/isl/isl.h > > > @@ -975,6 +975,7 @@ struct isl_extent4d { > > > > > > struct isl_channel_layout { > > > enum isl_base_type type; > > > + uint8_t start_bit; /**< Bit at which this channel starts */ > > > uint8_t bits; /**< Size in bits */ > > > }; > > > > > > -- > > > 2.5.0.400.gff86faf > > > > > > ___ > > > 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 20/29] intel/isl/format: Add field locations informations to channel_layout
On Tue, Mar 6, 2018 at 1:54 AM, Pohjolainen, Topi < topi.pohjolai...@gmail.com> wrote: > On Fri, Jan 26, 2018 at 05:59:49PM -0800, Jason Ekstrand wrote: > > --- > > src/intel/isl/gen_format_layout.py | 16 +--- > > src/intel/isl/isl.h| 1 + > > 2 files changed, 14 insertions(+), 3 deletions(-) > > > > diff --git a/src/intel/isl/gen_format_layout.py > b/src/intel/isl/gen_format_layout.py > > index 535f38c..633498b 100644 > > --- a/src/intel/isl/gen_format_layout.py > > +++ b/src/intel/isl/gen_format_layout.py > > @@ -76,7 +76,7 @@ isl_format_layouts[] = { > > % for mask in ['r', 'g', 'b', 'a', 'l', 'i', 'p']: > ><% channel = getattr(format, mask, None) %>\\ > >% if channel.type is not None: > > -.${mask} = { ISL_${channel.type}, ${channel.size} }, > > +.${mask} = { ISL_${channel.type}, ${channel.start}, > ${channel.size} }, > >% else: > > .${mask} = {}, > >% endif > > @@ -139,7 +139,10 @@ class Channel(object): > > else: > > grouped = self._splitter.match(line) > > self.type = self._types[grouped.group('type')].upper() > > -self.size = grouped.group('size') > > +self.size = int(grouped.group('size')) > > + > > +# Default the start big to -1 > >bit > > > +self.start = -1; > > > > > > class Format(object): > > @@ -160,7 +163,14 @@ class Format(object): > > self.l = Channel(line[9]) > > self.i = Channel(line[10]) > > self.p = Channel(line[11]) > > -self.order = line[12] > > + > > +# Set the start bit value for each channel > > +order = line[12].strip() > > You aren't setting "self.order" anymore? > No. Nothing was using it. It doesn't really matter to me whether we store it in the Format object or not. > > +bit = 0 > > +for c in order: > > +chan = getattr(self, c) > > +chan.start = bit; > > +bit = bit + chan.size > > > > # alpha doesn't have a colorspace of it's own. > > self.colorspace = line[13].strip().upper() > > diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h > > index 277998f..04d0f0b 100644 > > --- a/src/intel/isl/isl.h > > +++ b/src/intel/isl/isl.h > > @@ -975,6 +975,7 @@ struct isl_extent4d { > > > > struct isl_channel_layout { > > enum isl_base_type type; > > + uint8_t start_bit; /**< Bit at which this channel starts */ > > uint8_t bits; /**< Size in bits */ > > }; > > > > -- > > 2.5.0.400.gff86faf > > > > ___ > > 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 20/29] intel/isl/format: Add field locations informations to channel_layout
On Fri, Jan 26, 2018 at 05:59:49PM -0800, Jason Ekstrand wrote: > --- > src/intel/isl/gen_format_layout.py | 16 +--- > src/intel/isl/isl.h| 1 + > 2 files changed, 14 insertions(+), 3 deletions(-) > > diff --git a/src/intel/isl/gen_format_layout.py > b/src/intel/isl/gen_format_layout.py > index 535f38c..633498b 100644 > --- a/src/intel/isl/gen_format_layout.py > +++ b/src/intel/isl/gen_format_layout.py > @@ -76,7 +76,7 @@ isl_format_layouts[] = { > % for mask in ['r', 'g', 'b', 'a', 'l', 'i', 'p']: ><% channel = getattr(format, mask, None) %>\\ >% if channel.type is not None: > -.${mask} = { ISL_${channel.type}, ${channel.size} }, > +.${mask} = { ISL_${channel.type}, ${channel.start}, ${channel.size} > }, >% else: > .${mask} = {}, >% endif > @@ -139,7 +139,10 @@ class Channel(object): > else: > grouped = self._splitter.match(line) > self.type = self._types[grouped.group('type')].upper() > -self.size = grouped.group('size') > +self.size = int(grouped.group('size')) > + > +# Default the start big to -1 bit > +self.start = -1; > > > class Format(object): > @@ -160,7 +163,14 @@ class Format(object): > self.l = Channel(line[9]) > self.i = Channel(line[10]) > self.p = Channel(line[11]) > -self.order = line[12] > + > +# Set the start bit value for each channel > +order = line[12].strip() You aren't setting "self.order" anymore? > +bit = 0 > +for c in order: > +chan = getattr(self, c) > +chan.start = bit; > +bit = bit + chan.size > > # alpha doesn't have a colorspace of it's own. > self.colorspace = line[13].strip().upper() > diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h > index 277998f..04d0f0b 100644 > --- a/src/intel/isl/isl.h > +++ b/src/intel/isl/isl.h > @@ -975,6 +975,7 @@ struct isl_extent4d { > > struct isl_channel_layout { > enum isl_base_type type; > + uint8_t start_bit; /**< Bit at which this channel starts */ > uint8_t bits; /**< Size in bits */ > }; > > -- > 2.5.0.400.gff86faf > > ___ > 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