diff options
author | Kenneth Graunke <[email protected]> | 2014-05-14 01:32:54 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-05-18 23:35:20 -0700 |
commit | 8b994d0f3bb4249fc33a9fe1a6fcad1755fbba20 (patch) | |
tree | 87d6715f7de7972bf68b6243c3101fb0ee49e4f6 /src/mesa | |
parent | cca6dc9f0fd43db366730d67baae1affdca8c6de (diff) |
i965/fs: Stop copying the program key.
We already have a perfectly good copy of the program key, and nobody is
going to modify it. The only reason we copied it was because the
brw_wm_compile structure embedded the key rather than pointing to it.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Chris Forbes <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index 1664b18b0ee..dfd008ee416 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -174,14 +174,12 @@ bool do_wm_prog(struct brw_context *brw, rzalloc_array(NULL, const float *, param_count); c->prog_data.base.nr_params = param_count; - memcpy(&c->key, key, sizeof(*key)); - c->prog_data.barycentric_interp_modes = - brw_compute_barycentric_interp_modes(brw, c->key.flat_shade, - c->key.persample_shading, + brw_compute_barycentric_interp_modes(brw, key->flat_shade, + key->persample_shading, &fp->program); - program = brw_wm_fs_emit(brw, mem_ctx, &c->key, &c->prog_data, + program = brw_wm_fs_emit(brw, mem_ctx, key, &c->prog_data, &fp->program, prog, &program_size); if (program == NULL) { ralloc_free(mem_ctx); @@ -197,7 +195,7 @@ bool do_wm_prog(struct brw_context *brw, fprintf(stderr, "\n"); brw_upload_cache(&brw->cache, BRW_WM_PROG, - &c->key, sizeof(c->key), + key, sizeof(struct brw_wm_prog_key), program, program_size, &c->prog_data, sizeof(c->prog_data), &brw->wm.base.prog_offset, &brw->wm.prog_data); |