From: Jordan Justen Date: Sat, 4 Oct 2014 02:05:32 +0000 (-0700) Subject: i965/fs: Set first_non_payload_grf in assign_curb_setup X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=af48612b88cb51cd3b957e70490462c0c404f92c;p=mesa.git i965/fs: Set first_non_payload_grf in assign_curb_setup first_non_payload_grf may be updated in assign_urb_setup for FS or assign_vs_urb_setup for VS. We need to set this in assign_curb_setup for compute shaders since cs does not have an assign_cs_urb_setup like assign_urb_setup (fs) or assign_vs_urb_setup (vs). Signed-off-by: Jordan Justen Reviewed-by: Kristian Høgsberg --- diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 17cbdf46582..320f612682d 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -1394,6 +1394,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 @@ -1508,8 +1511,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 @@ -1524,8 +1526,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);