Re: [Mesa-dev] [PATCH v2 011/103] i965: fix subnr overflow in suboffset()

2016-10-19 Thread Iago Toral
On Tue, 2016-10-18 at 17:26 -0700, Ian Romanick wrote:
> Reviewed-by: Ian Romanick 
> 
> In the interest in reducing the number of patches in flight, I think
> this could land ahead of the others.

Will do, thanks!

> On 10/11/2016 02:01 AM, Iago Toral Quiroga wrote:
> > 
> > ---
> >  src/mesa/drivers/dri/i965/brw_reg.h | 13 +
> >  1 file changed, 5 insertions(+), 8 deletions(-)
> > 
> > diff --git a/src/mesa/drivers/dri/i965/brw_reg.h
> > b/src/mesa/drivers/dri/i965/brw_reg.h
> > index 3b46d27..8907c9c 100644
> > --- a/src/mesa/drivers/dri/i965/brw_reg.h
> > +++ b/src/mesa/drivers/dri/i965/brw_reg.h
> > @@ -520,14 +520,6 @@ sechalf(struct brw_reg reg)
> >  }
> >  
> >  static inline struct brw_reg
> > -suboffset(struct brw_reg reg, unsigned delta)
> > -{
> > -   reg.subnr += delta * type_sz(reg.type);
> > -   return reg;
> > -}
> > -
> > -
> > -static inline struct brw_reg
> >  offset(struct brw_reg reg, unsigned delta)
> >  {
> > reg.nr += delta;
> > @@ -544,6 +536,11 @@ byte_offset(struct brw_reg reg, unsigned
> > bytes)
> > return reg;
> >  }
> >  
> > +static inline struct brw_reg
> > +suboffset(struct brw_reg reg, unsigned delta)
> > +{
> > +   return byte_offset(reg, delta * type_sz(reg.type));
> > +}
> >  
> >  /** Construct unsigned word[16] register */
> >  static inline struct brw_reg
> > 
> 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH v2 011/103] i965: fix subnr overflow in suboffset()

2016-10-18 Thread Ian Romanick
Reviewed-by: Ian Romanick 

In the interest in reducing the number of patches in flight, I think
this could land ahead of the others.

On 10/11/2016 02:01 AM, Iago Toral Quiroga wrote:
> ---
>  src/mesa/drivers/dri/i965/brw_reg.h | 13 +
>  1 file changed, 5 insertions(+), 8 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_reg.h 
> b/src/mesa/drivers/dri/i965/brw_reg.h
> index 3b46d27..8907c9c 100644
> --- a/src/mesa/drivers/dri/i965/brw_reg.h
> +++ b/src/mesa/drivers/dri/i965/brw_reg.h
> @@ -520,14 +520,6 @@ sechalf(struct brw_reg reg)
>  }
>  
>  static inline struct brw_reg
> -suboffset(struct brw_reg reg, unsigned delta)
> -{
> -   reg.subnr += delta * type_sz(reg.type);
> -   return reg;
> -}
> -
> -
> -static inline struct brw_reg
>  offset(struct brw_reg reg, unsigned delta)
>  {
> reg.nr += delta;
> @@ -544,6 +536,11 @@ byte_offset(struct brw_reg reg, unsigned bytes)
> return reg;
>  }
>  
> +static inline struct brw_reg
> +suboffset(struct brw_reg reg, unsigned delta)
> +{
> +   return byte_offset(reg, delta * type_sz(reg.type));
> +}
>  
>  /** Construct unsigned word[16] register */
>  static inline struct brw_reg
> 

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH v2 011/103] i965: fix subnr overflow in suboffset()

2016-10-11 Thread Iago Toral Quiroga
---
 src/mesa/drivers/dri/i965/brw_reg.h | 13 +
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_reg.h 
b/src/mesa/drivers/dri/i965/brw_reg.h
index 3b46d27..8907c9c 100644
--- a/src/mesa/drivers/dri/i965/brw_reg.h
+++ b/src/mesa/drivers/dri/i965/brw_reg.h
@@ -520,14 +520,6 @@ sechalf(struct brw_reg reg)
 }
 
 static inline struct brw_reg
-suboffset(struct brw_reg reg, unsigned delta)
-{
-   reg.subnr += delta * type_sz(reg.type);
-   return reg;
-}
-
-
-static inline struct brw_reg
 offset(struct brw_reg reg, unsigned delta)
 {
reg.nr += delta;
@@ -544,6 +536,11 @@ byte_offset(struct brw_reg reg, unsigned bytes)
return reg;
 }
 
+static inline struct brw_reg
+suboffset(struct brw_reg reg, unsigned delta)
+{
+   return byte_offset(reg, delta * type_sz(reg.type));
+}
 
 /** Construct unsigned word[16] register */
 static inline struct brw_reg
-- 
2.7.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev