i965/gen4: Expose the guts of URB recalculation as a helper
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 12 May 2017 05:23:36 +0000 (22:23 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 26 May 2017 14:58:01 +0000 (07:58 -0700)
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_urb.c

index 22a84e6197ca011c1c0409140a019fbaf934d7d6..ccedeccf3094a1552dabd7865ae53c41b377f65a 100644 (file)
@@ -1361,6 +1361,8 @@ void brw_destroy_shader_time(struct brw_context *brw);
 
 /* brw_urb.c
  */
+void brw_calculate_urb_fence(struct brw_context *brw, unsigned csize,
+                             unsigned vsize, unsigned sfsize);
 void brw_upload_urb_fence(struct brw_context *brw);
 
 /* brw_curbe.c
index 1ba981a5464196583dcd844952b05042a09c517d..18daf5137bd39227f6815d9e454db9927db18f7f 100644 (file)
@@ -112,12 +112,10 @@ static bool check_urb_layout(struct brw_context *brw)
 /* Most minimal update, forces re-emit of URB fence packet after GS
  * unit turned on/off.
  */
-static void recalculate_urb_fence( struct brw_context *brw )
+void
+brw_calculate_urb_fence(struct brw_context *brw, unsigned csize,
+                        unsigned vsize, unsigned sfsize)
 {
-   GLuint csize = brw->curbe.total_size;
-   GLuint vsize = brw_vue_prog_data(brw->vs.base.prog_data)->urb_entry_size;
-   GLuint sfsize = brw->sf.prog_data->urb_entry_size;
-
    if (csize < limits[CS].min_entry_size)
       csize = limits[CS].min_entry_size;
 
@@ -208,6 +206,13 @@ done:
    }
 }
 
+static void recalculate_urb_fence( struct brw_context *brw )
+{
+   brw_calculate_urb_fence(brw, brw->curbe.total_size,
+                           brw_vue_prog_data(brw->vs.base.prog_data)->urb_entry_size,
+                           brw->sf.prog_data->urb_entry_size);
+}
+
 
 const struct brw_tracked_state brw_recalculate_urb_fence = {
    .dirty = {