Re: [Mesa-dev] [PATCH 03/22] i965/miptree: Switch to isl_surf::tiling

2017-07-19 Thread Pohjolainen, Topi
On Tue, Jul 18, 2017 at 09:35:54PM +0100, Daniel Stone wrote:
> Hi,
> 
> On 18 July 2017 at 21:30, Kenneth Graunke  wrote:
> > On Tuesday, July 18, 2017 1:46:13 AM PDT Topi Pohjolainen wrote:
> > [snip]
> >> diff --git a/src/mesa/drivers/dri/i965/intel_blit.h 
> >> b/src/mesa/drivers/dri/i965/intel_blit.h
> >> index 5e4d1f5eb4..90514dc893 100644
> >> --- a/src/mesa/drivers/dri/i965/intel_blit.h
> >> +++ b/src/mesa/drivers/dri/i965/intel_blit.h
> >> @@ -41,17 +41,32 @@ isl_tiling_to_bufmgr_tiling(enum isl_tiling tiling)
> >> return I915_TILING_NONE;
> >>  }
> >>
> >> +static inline enum isl_tiling
> >> +bufmgr_tiling_to_isl_tiling(unsigned tiling)
> >> +{
> >> +   switch (tiling) {
> >> +   case I915_TILING_NONE:
> >> +  return ISL_TILING_LINEAR;
> >> +   case I915_TILING_X:
> >> +  return ISL_TILING_X;
> >> +   case I915_TILING_Y:
> >> +  return ISL_TILING_Y0;
> >> +   }
> >> +
> >> +   unreachable("Invalid tiling mode");
> >> +}
> >> +
> >
> > This doesn't appear to be used at this point.  If it's used later, great,
> > but I'm not sure why you'd need a converter in this direction?
> 
> It also belongs aside isl_tiling_to_i915_tiling() inside isl itself;
> that function can itself replace isl_tiling_to_bufmgr_tiling().

Thanks for pointing that out, v2 on its way.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 03/22] i965/miptree: Switch to isl_surf::tiling

2017-07-18 Thread Jason Ekstrand
On Tue, Jul 18, 2017 at 1:30 PM, Kenneth Graunke 
wrote:

> On Tuesday, July 18, 2017 1:46:13 AM PDT Topi Pohjolainen wrote:
> [snip]
> > diff --git a/src/mesa/drivers/dri/i965/intel_blit.h
> b/src/mesa/drivers/dri/i965/intel_blit.h
> > index 5e4d1f5eb4..90514dc893 100644
> > --- a/src/mesa/drivers/dri/i965/intel_blit.h
> > +++ b/src/mesa/drivers/dri/i965/intel_blit.h
> > @@ -41,17 +41,32 @@ isl_tiling_to_bufmgr_tiling(enum isl_tiling tiling)
> > return I915_TILING_NONE;
> >  }
> >
> > +static inline enum isl_tiling
> > +bufmgr_tiling_to_isl_tiling(unsigned tiling)
> > +{
> > +   switch (tiling) {
> > +   case I915_TILING_NONE:
> > +  return ISL_TILING_LINEAR;
> > +   case I915_TILING_X:
> > +  return ISL_TILING_X;
> > +   case I915_TILING_Y:
> > +  return ISL_TILING_Y0;
> > +   }
> > +
> > +   unreachable("Invalid tiling mode");
> > +}
> > +
>
> This doesn't appear to be used at this point.  If it's used later, great,
> but I'm not sure why you'd need a converter in this direction?
>

It's used in miptree_create_for_bo

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


Re: [Mesa-dev] [PATCH 03/22] i965/miptree: Switch to isl_surf::tiling

2017-07-18 Thread Daniel Stone
Hi,

On 18 July 2017 at 21:30, Kenneth Graunke  wrote:
> On Tuesday, July 18, 2017 1:46:13 AM PDT Topi Pohjolainen wrote:
> [snip]
>> diff --git a/src/mesa/drivers/dri/i965/intel_blit.h 
>> b/src/mesa/drivers/dri/i965/intel_blit.h
>> index 5e4d1f5eb4..90514dc893 100644
>> --- a/src/mesa/drivers/dri/i965/intel_blit.h
>> +++ b/src/mesa/drivers/dri/i965/intel_blit.h
>> @@ -41,17 +41,32 @@ isl_tiling_to_bufmgr_tiling(enum isl_tiling tiling)
>> return I915_TILING_NONE;
>>  }
>>
>> +static inline enum isl_tiling
>> +bufmgr_tiling_to_isl_tiling(unsigned tiling)
>> +{
>> +   switch (tiling) {
>> +   case I915_TILING_NONE:
>> +  return ISL_TILING_LINEAR;
>> +   case I915_TILING_X:
>> +  return ISL_TILING_X;
>> +   case I915_TILING_Y:
>> +  return ISL_TILING_Y0;
>> +   }
>> +
>> +   unreachable("Invalid tiling mode");
>> +}
>> +
>
> This doesn't appear to be used at this point.  If it's used later, great,
> but I'm not sure why you'd need a converter in this direction?

It also belongs aside isl_tiling_to_i915_tiling() inside isl itself;
that function can itself replace isl_tiling_to_bufmgr_tiling().

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


Re: [Mesa-dev] [PATCH 03/22] i965/miptree: Switch to isl_surf::tiling

2017-07-18 Thread Kenneth Graunke
On Tuesday, July 18, 2017 1:46:13 AM PDT Topi Pohjolainen wrote:
[snip]
> diff --git a/src/mesa/drivers/dri/i965/intel_blit.h 
> b/src/mesa/drivers/dri/i965/intel_blit.h
> index 5e4d1f5eb4..90514dc893 100644
> --- a/src/mesa/drivers/dri/i965/intel_blit.h
> +++ b/src/mesa/drivers/dri/i965/intel_blit.h
> @@ -41,17 +41,32 @@ isl_tiling_to_bufmgr_tiling(enum isl_tiling tiling)
> return I915_TILING_NONE;
>  }
>  
> +static inline enum isl_tiling
> +bufmgr_tiling_to_isl_tiling(unsigned tiling)
> +{
> +   switch (tiling) {
> +   case I915_TILING_NONE:
> +  return ISL_TILING_LINEAR;
> +   case I915_TILING_X:
> +  return ISL_TILING_X;
> +   case I915_TILING_Y:
> +  return ISL_TILING_Y0;
> +   }
> +
> +   unreachable("Invalid tiling mode");
> +}
> +

This doesn't appear to be used at this point.  If it's used later, great,
but I'm not sure why you'd need a converter in this direction?

Patches 1-3 are:
Reviewed-by: Kenneth Graunke 

signature.asc
Description: This is a digitally signed message part.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev