From: Eric Anholt Date: Sat, 22 Oct 2011 18:33:54 +0000 (-0700) Subject: i965: Move program compile to emit() time. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dc9a753f6687133d2d057597e5af86abcdc56781;p=mesa.git i965: Move program compile to emit() time. Only 4 other prepare() functions are left, which don't rely on this. Reviewed-by: Kenneth Graunke Acked-by: Paul Berry --- diff --git a/src/mesa/drivers/dri/i965/brw_clip.c b/src/mesa/drivers/dri/i965/brw_clip.c index ec851b743f4..50cc2462520 100644 --- a/src/mesa/drivers/dri/i965/brw_clip.c +++ b/src/mesa/drivers/dri/i965/brw_clip.c @@ -132,7 +132,8 @@ static void compile_clip_prog( struct brw_context *brw, /* Calculate interpolants for triangle and line rasterization. */ -static void upload_clip_prog(struct brw_context *brw) +static void +brw_upload_clip_prog(struct brw_context *brw) { struct intel_context *intel = &brw->intel; struct gl_context *ctx = &intel->ctx; @@ -260,5 +261,5 @@ const struct brw_tracked_state brw_clip_prog = { .brw = (BRW_NEW_REDUCED_PRIMITIVE), .cache = CACHE_NEW_VS_PROG }, - .prepare = upload_clip_prog + .emit = brw_upload_clip_prog }; diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index 624fa1438bb..91f8d0b5dcb 100644 --- a/src/mesa/drivers/dri/i965/brw_gs.c +++ b/src/mesa/drivers/dri/i965/brw_gs.c @@ -171,7 +171,8 @@ static void populate_key( struct brw_context *brw, /* Calculate interpolants for triangle and line rasterization. */ -static void prepare_gs_prog(struct brw_context *brw) +static void +brw_upload_gs_prog(struct brw_context *brw) { struct brw_gs_prog_key key; /* Populate the key: @@ -200,5 +201,5 @@ const struct brw_tracked_state brw_gs_prog = { .brw = BRW_NEW_PRIMITIVE, .cache = CACHE_NEW_VS_PROG }, - .prepare = prepare_gs_prog + .emit = brw_upload_gs_prog }; diff --git a/src/mesa/drivers/dri/i965/brw_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c index c11daf68359..54c27f98862 100644 --- a/src/mesa/drivers/dri/i965/brw_sf.c +++ b/src/mesa/drivers/dri/i965/brw_sf.c @@ -120,7 +120,8 @@ static void compile_sf_prog( struct brw_context *brw, /* Calculate interpolants for triangle and line rasterization. */ -static void upload_sf_prog(struct brw_context *brw) +static void +brw_upload_sf_prog(struct brw_context *brw) { struct gl_context *ctx = &brw->intel.ctx; struct brw_sf_prog_key key; @@ -195,6 +196,6 @@ const struct brw_tracked_state brw_sf_prog = { .brw = (BRW_NEW_REDUCED_PRIMITIVE), .cache = CACHE_NEW_VS_PROG }, - .prepare = upload_sf_prog + .emit = brw_upload_sf_prog }; diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c index 8813498293a..967f82e1916 100644 --- a/src/mesa/drivers/dri/i965/brw_vs.c +++ b/src/mesa/drivers/dri/i965/brw_vs.c @@ -346,7 +346,7 @@ const struct brw_tracked_state brw_vs_prog = { BRW_NEW_VERTICES), .cache = 0 }, - .prepare = brw_upload_vs_prog + .emit = brw_upload_vs_prog }; bool diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index 63c770debcc..377b8ba2231 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -506,7 +506,8 @@ static void brw_wm_populate_key( struct brw_context *brw, } -static void brw_prepare_wm_prog(struct brw_context *brw) +static void +brw_upload_wm_prog(struct brw_context *brw) { struct intel_context *intel = &brw->intel; struct gl_context *ctx = &intel->ctx; @@ -543,6 +544,6 @@ const struct brw_tracked_state brw_wm_prog = { BRW_NEW_REDUCED_PRIMITIVE), .cache = CACHE_NEW_VS_PROG, }, - .prepare = brw_prepare_wm_prog + .emit = brw_upload_wm_prog };