[Mesa-dev] [PATCH 02/13] i965: Change header_present to header_size in backend_instruction

Kenneth Graunke kenneth at whitecape.org
Tue Apr 14 01:28:27 PDT 2015


On Wednesday, April 01, 2015 06:19:13 PM Jason Ekstrand wrote:
[snip]
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
> index bd12147..f88c041 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
[snip]
> @@ -1180,7 +1180,7 @@ fs_generator::generate_varying_pull_constant_load_gen7(fs_inst *inst,
>     /* Varying-offset pull constant loads are treated as a normal expression on
>      * gen7, so the fact that it's a send message is hidden at the IR level.
>      */
> -   assert(!inst->header_present);
> +   assert(!inst->header_size != 0);
>     assert(!inst->mlen);
>     assert(index.type == BRW_REGISTER_TYPE_UD);

This would be a lot easier to read as:

   assert(inst->header_size == 0);

[snip]
> diff --git a/src/mesa/drivers/dri/i965/brw_shader.h b/src/mesa/drivers/dri/i965/brw_shader.h
> index 8a3263e..c3738f8 100644
> --- a/src/mesa/drivers/dri/i965/brw_shader.h
> +++ b/src/mesa/drivers/dri/i965/brw_shader.h
> @@ -140,12 +140,13 @@ struct backend_instruction {
>     bool no_dd_check:1;
>     bool saturate:1;
>     bool shadow_compare:1;
> -   bool header_present:1;
>  
>     /* Chooses which flag subregister (f0.0 or f0.1) is used for conditional
>      * mod and predication.
>      */
>     unsigned flag_subreg:1;
> +

Please add a comment which mentions this field's units, such as:

   /** The number of hardware registers used for a message header. */

> +   uint8_t header_size;
>  };
>  
>  #ifdef __cplusplus

With those changes, patches 1-2 are:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150414/c67702b0/attachment.sig>


More information about the mesa-dev mailing list