From af48612b88cb51cd3b957e70490462c0c404f92c Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Fri, 3 Oct 2014 19:05:32 -0700 Subject: [PATCH] i965/fs: Set first_non_payload_grf in assign_curb_setup MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- 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 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); -- 2.30.2