diff options
author | Kenneth Graunke <[email protected]> | 2012-11-20 16:21:27 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2012-11-26 19:52:34 -0800 |
commit | 4d09fe938e72b26d814b6b52caee5112cf6f1103 (patch) | |
tree | 602a18cd2ab4f0fc2a841501494e9267f4b80c8a /src/mesa/drivers/dri/i965/brw_wm.c | |
parent | 3417b2f2b249d89fc71379bfc0eaa1055de365ba (diff) |
i965/fs: Move uses of brw_compile from do_wm_prog to brw_wm_fs_emit.
The brw_compile structure is closely tied to the Gen4-7 hardware
encoding. However, do_wm_prog is very generic: it just calls out to
get a compiled program and then uploads it.
This isn't ultimately where we want it, but it's a step in the right
direction: it's now closer to the code generator.
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index f22960330cf..289156705a0 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -168,13 +168,13 @@ bool do_wm_prog(struct brw_context *brw, memcpy(&c->key, key, sizeof(*key)); - brw_init_compile(brw, &c->func, c); - c->prog_data.barycentric_interp_modes = brw_compute_barycentric_interp_modes(brw, c->key.flat_shade, &fp->program); - brw_wm_fs_emit(brw, c, &fp->program, prog); + program = brw_wm_fs_emit(brw, c, &fp->program, prog, &program_size); + if (program == NULL) + return false; /* Scratch space is used for register spilling */ if (c->last_scratch) { @@ -191,10 +191,6 @@ bool do_wm_prog(struct brw_context *brw, if (unlikely(INTEL_DEBUG & DEBUG_WM)) fprintf(stderr, "\n"); - /* get the program - */ - program = brw_get_program(&c->func, &program_size); - brw_upload_cache(&brw->cache, BRW_WM_PROG, &c->key, sizeof(c->key), program, program_size, |