[PATCH 2/9] intel gen4-5: simplify the bfc copy in the sf.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Olivier Galibert <galibert at pobox.com> writes:
> @@ -121,12 +108,15 @@ static void do_twoside_color( struct brw_sf_compile *c )
>     brw_push_insn_state(p);
>     brw_CMP(p, vec4(brw_null_reg()), backface_conditional, c->det, brw_imm_f(0));
>     brw_IF(p, BRW_EXECUTE_4);
> -   {
> -      switch (c->nr_verts) {
> -      case 3: copy_bfc(c, c->vert[2]);
> -      case 2: copy_bfc(c, c->vert[1]);
> -      case 1: copy_bfc(c, c->vert[0]);
> -      }
> +   for (i=0; i<c->nr_verts; i++) {

We tend to put spaces around our binary operators.

> +      if (need_0)
> +	 brw_MOV(p, 
> +		 get_vert_result(c, c->vert[i], VERT_RESULT_COL0),
> +		 get_vert_result(c, c->vert[i], VERT_RESULT_BFC0));
> +      if (need_1)
> +	 brw_MOV(p, 
> +		 get_vert_result(c, c->vert[i], VERT_RESULT_COL1),
> +		 get_vert_result(c, c->vert[i], VERT_RESULT_BFC1));

trim trailing whitespace.

Other than that,

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20120726/7ce95760/attachment.pgp>


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux