i965: Move program compile to emit() time.

Only 4 other prepare() functions are left, which don't rely on this.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
This commit is contained in:
Eric Anholt 2011-10-22 11:33:54 -07:00
parent 0969568fce
commit dc9a753f66
5 changed files with 13 additions and 9 deletions

View file

@ -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
};

View file

@ -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
};

View file

@ -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
};

View file

@ -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

View file

@ -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
};