[Mesa-dev] [Mesa-dev, 3/5] i965/fs: Set first_non_payload_grf in assign_curb_setup

Kristian Høgsberg krh at bitplanet.net
Wed Sep 9 15:34:59 PDT 2015


Jordan Justen <jordan.l.justen at intel.com> writes:

> first_non_payload_grf may be updated in assign_urb_setup for FS or
> assign_vs_urb_setup for VS.

Patch looks good, but I think we should clarify in the commit message
that we're doing this so that compute will get first_non_payload_grf set
up in assign_curb_setup().

Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>

> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
>
> ---
> src/mesa/drivers/dri/i965/brw_fs.cpp | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
> index 4292aa6..39ed89a 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
> @@ -1324,6 +1324,9 @@ fs_visitor::assign_curb_setup()
>  	 }
>        }
>     }
> +
> +   /* This may be updated in assign_urb_setup or assign_vs_urb_setup. */
> +   this->first_non_payload_grf = payload.num_regs + prog_data->curb_read_length;
>  }
>  
>  void
> @@ -1438,8 +1441,7 @@ fs_visitor::assign_urb_setup()
>     }
>  
>     /* Each attribute is 4 setup channels, each of which is half a reg. */
> -   this->first_non_payload_grf =
> -      urb_start + prog_data->num_varying_inputs * 2;
> +   this->first_non_payload_grf += prog_data->num_varying_inputs * 2;
>  }
>  
>  void
> @@ -1454,8 +1456,7 @@ fs_visitor::assign_vs_urb_setup()
>        count++;
>  
>     /* Each attribute is 4 regs. */
> -   this->first_non_payload_grf =
> -      payload.num_regs + prog_data->curb_read_length + count * 4;
> +   this->first_non_payload_grf += count * 4;
>  
>     unsigned vue_entries =
>        MAX2(count, vs_prog_data->base.vue_map.num_slots);


More information about the mesa-dev mailing list