[Mesa-dev] [PATCH 13/13] i965/fs_surface_builder: Use isl instead of mesa for format info

Chad Versace chad.versace at intel.com
Thu Apr 21 18:24:58 UTC 2016


On Sat 16 Apr 2016, Jason Ekstrand wrote:
> ---
>  .../drivers/dri/i965/brw_fs_surface_builder.cpp    | 118 +++++++++------------
>  1 file changed, 52 insertions(+), 66 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp b/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp
> index 23ad511..fc1fc13 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp


> @@ -1048,19 +1034,19 @@ namespace brw {
>                                get_bit_widths(format));
>           }
>  
> -         if (!_mesa_is_format_integer(format)) {
> +         if (!isl_format_has_int_channel(format)) {
>              if (is_conversion_trivial(devinfo, format)) {
>                 /* Just need to cast the vector to the target type. */
>                 tmp = retype(tmp, BRW_REGISTER_TYPE_F);
>              } else {
>                 /* Do the right sort of type conversion to float. */
> -               if (_mesa_get_format_datatype(format) == GL_FLOAT)
> +               if (isl_format_has_float_channel(format))
>                    tmp = emit_convert_from_float(
>                       bld, tmp, get_bit_widths(format));
>                 else
>                    tmp = emit_convert_from_scaled(
>                       bld, tmp, get_bit_widths(format),
> -                     _mesa_is_format_signed(format));
> +                     isl_format_has_snorm_channel(format));

The above two lines seem to be the only non-trivial diff in this patch.
I inspected it closely, and I'm convinced it's correct.

>              }
>           }

Patch 13 is
Reviewed-by: Chad Versace <chad.versace at intel.com>


More information about the mesa-dev mailing list