[Mesa-dev] [PATCH 35/43] i965/gen4: Expose the guts of URB recalculation as a helper
Jason Ekstrand
jason at jlekstrand.net
Tue May 16 22:45:29 UTC 2017
---
src/mesa/drivers/dri/i965/brw_context.h | 2 ++
src/mesa/drivers/dri/i965/brw_urb.c | 15 ++++++++++-----
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 22a84e6..ccedecc 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -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
diff --git a/src/mesa/drivers/dri/i965/brw_urb.c b/src/mesa/drivers/dri/i965/brw_urb.c
index 1ba981a..18daf51 100644
--- a/src/mesa/drivers/dri/i965/brw_urb.c
+++ b/src/mesa/drivers/dri/i965/brw_urb.c
@@ -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 = {
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list