Re: [Mesa-dev] [PATCH 4/6] i965: Replace 0 with ISL_FORMAT_UNSUPPORTED in format table

2017-06-01 Thread Chad Versace
On Wed 31 May 2017, Jason Ekstrand wrote: > On May 31, 2017 9:32:23 PM Ian Romanick wrote: > > > Having the unsupported format value not be zero isn't very safe. The > > C99 rules say that any field missing an initializer is implicitly > > initialized to zero. If a

Re: [Mesa-dev] [PATCH 4/6] i965: Replace 0 with ISL_FORMAT_UNSUPPORTED in format table

2017-06-01 Thread Matt Turner
On Wed, May 31, 2017 at 10:42 PM, Jason Ekstrand wrote: > On May 31, 2017 9:32:23 PM Ian Romanick wrote: > >> Having the unsupported format value not be zero isn't very safe. The >> C99 rules say that any field missing an initializer is implicitly >>

Re: [Mesa-dev] [PATCH 4/6] i965: Replace 0 with ISL_FORMAT_UNSUPPORTED in format table

2017-05-31 Thread Jason Ekstrand
On May 31, 2017 9:32:23 PM Ian Romanick wrote: Having the unsupported format value not be zero isn't very safe. The C99 rules say that any field missing an initializer is implicitly initialized to zero. If a MESA_FORMAT_ value is added but is not added to the array

Re: [Mesa-dev] [PATCH 4/6] i965: Replace 0 with ISL_FORMAT_UNSUPPORTED in format table

2017-05-31 Thread Ian Romanick
Having the unsupported format value not be zero isn't very safe. The C99 rules say that any field missing an initializer is implicitly initialized to zero. If a MESA_FORMAT_ value is added but is not added to the array initializer, we'll have this same problem... but in a way that is much harder

Re: [Mesa-dev] [PATCH 4/6] i965: Replace 0 with ISL_FORMAT_UNSUPPORTED in format table

2017-05-31 Thread Jason Ekstrand
2-4 are also Reviewed-by: Jason Ekstrand On May 31, 2017 4:44:11 PM Chad Versace wrote: When given an *unsupported* mesa_format, brw_isl_format_for_mesa_format() returned 0, a *valid* isl_format, ISL_FORMAT_R32G32B32A32_FLOAT. The problem is that

[Mesa-dev] [PATCH 4/6] i965: Replace 0 with ISL_FORMAT_UNSUPPORTED in format table

2017-05-31 Thread Chad Versace
When given an *unsupported* mesa_format, brw_isl_format_for_mesa_format() returned 0, a *valid* isl_format, ISL_FORMAT_R32G32B32A32_FLOAT. The problem is that brw_isl_format_for_mesa_format's inner table used 0 instead of ISL_FORMAT_UNSUPPORTED to indicate unsupported mesa formats. Some callers