Re: [Mesa-dev] [PATCH 1/3] nir: Add asserts to the casting functions

2016-10-06 Thread Jason Ekstrand
Pushed! Tim, this is going to cause you a bit of rebase trouble on loop unrolling but it should actually make your code simpler. On Wed, Oct 5, 2016 at 9:56 PM, Jason Ekstrand wrote: > On Oct 5, 2016 21:42, "Connor Abbott" wrote: > > > > Thanks for doing this! This has always bugged me. For th

Re: [Mesa-dev] [PATCH 1/3] nir: Add asserts to the casting functions

2016-10-05 Thread Jason Ekstrand
On Oct 5, 2016 21:42, "Connor Abbott" wrote: > > Thanks for doing this! This has always bugged me. For the series, Yeah, nir_loop_last_cf_node and friends in particular have been bugging me for a lng time. > Reviewed-by: Connor Abbott Thanks! > On Wed, Oct 5, 2016 at 11:37 PM, Jason Ekstr

Re: [Mesa-dev] [PATCH 1/3] nir: Add asserts to the casting functions

2016-10-05 Thread Connor Abbott
Thanks for doing this! This has always bugged me. For the series, Reviewed-by: Connor Abbott On Wed, Oct 5, 2016 at 11:37 PM, Jason Ekstrand wrote: > This makes calling nir_foo_as_bar a bit safer because we're no longer 100% > trusting in the caller to ensure that it's safe. The caller still n

[Mesa-dev] [PATCH 1/3] nir: Add asserts to the casting functions

2016-10-05 Thread Jason Ekstrand
This makes calling nir_foo_as_bar a bit safer because we're no longer 100% trusting in the caller to ensure that it's safe. The caller still needs to do the right thing but this ensures that we catch invalid casts with an assert rather than by reading garbage data. The one downside is that we do