Re: [Mesa-dev] [PATCH 6/7] nir: add shader reference counting

2015-11-05 Thread Rob Clark
On Thu, Nov 5, 2015 at 7:24 PM, Kenneth Graunke wrote: > On Saturday, October 24, 2015 01:07:59 PM Rob Clark wrote: >> From: Rob Clark >> >> For gallium, at least, we'll need this to manage shader's lifetimes, >> since in some cases both the driver and the state tracker will need >> to hold on to

Re: [Mesa-dev] [PATCH 6/7] nir: add shader reference counting

2015-11-05 Thread Rob Clark
On Thu, Nov 5, 2015 at 5:58 PM, Jason Ekstrand wrote: > On Thu, Nov 5, 2015 at 10:53 AM, Rob Clark wrote: >> On Thu, Nov 5, 2015 at 1:13 PM, Jason Ekstrand wrote: >>> On Sat, Oct 24, 2015 at 10:07 AM, Rob Clark wrote: From: Rob Clark For gallium, at least, we'll need this to man

Re: [Mesa-dev] [PATCH 6/7] nir: add shader reference counting

2015-11-05 Thread Kenneth Graunke
On Saturday, October 24, 2015 01:07:59 PM Rob Clark wrote: > From: Rob Clark > > For gallium, at least, we'll need this to manage shader's lifetimes, > since in some cases both the driver and the state tracker will need > to hold on to a reference for variant managing. > > Use nir_shader_mutable

Re: [Mesa-dev] [PATCH 6/7] nir: add shader reference counting

2015-11-05 Thread Jason Ekstrand
On Thu, Nov 5, 2015 at 10:53 AM, Rob Clark wrote: > On Thu, Nov 5, 2015 at 1:13 PM, Jason Ekstrand wrote: >> On Sat, Oct 24, 2015 at 10:07 AM, Rob Clark wrote: >>> From: Rob Clark >>> >>> For gallium, at least, we'll need this to manage shader's lifetimes, >>> since in some cases both the drive

Re: [Mesa-dev] [PATCH 6/7] nir: add shader reference counting

2015-11-05 Thread Rob Clark
On Thu, Nov 5, 2015 at 1:13 PM, Jason Ekstrand wrote: > On Sat, Oct 24, 2015 at 10:07 AM, Rob Clark wrote: >> From: Rob Clark >> >> For gallium, at least, we'll need this to manage shader's lifetimes, >> since in some cases both the driver and the state tracker will need >> to hold on to a refer

Re: [Mesa-dev] [PATCH 6/7] nir: add shader reference counting

2015-11-05 Thread Jason Ekstrand
On Sat, Oct 24, 2015 at 10:07 AM, Rob Clark wrote: > From: Rob Clark > > For gallium, at least, we'll need this to manage shader's lifetimes, > since in some cases both the driver and the state tracker will need > to hold on to a reference for variant managing. > > Use nir_shader_mutable() before

[Mesa-dev] [PATCH 6/7] nir: add shader reference counting

2015-10-24 Thread Rob Clark
From: Rob Clark For gallium, at least, we'll need this to manage shader's lifetimes, since in some cases both the driver and the state tracker will need to hold on to a reference for variant managing. Use nir_shader_mutable() before doing any IR opt/lowering/etc, to ensure you are not modifying