diff options
author | Kenneth Graunke <[email protected]> | 2011-10-18 17:05:30 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2011-10-20 15:25:37 -0700 |
commit | 6e160d01f2c6667cba89e5fa806f9e4b01ca8ced (patch) | |
tree | 8cc8c1eab408df4a2036fab4a140aa402c141d47 | |
parent | b293b3cbb19bc4db8d9801c2f1160f98299481d0 (diff) |
i965: Remove copy and pasted gen7_wm_constants state atom.
Now that this is identical to gen6_wm_constants, just use that instead.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_state_upload.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/gen7_wm_state.c | 55 |
2 files changed, 1 insertions, 56 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index 24e83ff0fe1..5374806cf91 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -200,7 +200,7 @@ const struct brw_tracked_state *gen7_atoms[] = &brw_vs_constants, /* Before vs_surfaces and constant_buffer */ &brw_wm_constants, /* Before wm_surfaces and constant_buffer */ &gen6_vs_constants, /* Before vs_state */ - &gen7_wm_constants, /* Before wm_surfaces and constant_buffer */ + &gen6_wm_constants, /* Before wm_surfaces and constant_buffer */ &brw_vs_surfaces, /* must do before unit */ &gen7_wm_constant_surface, /* must do before wm surfaces/bind bo */ diff --git a/src/mesa/drivers/dri/i965/gen7_wm_state.c b/src/mesa/drivers/dri/i965/gen7_wm_state.c index b63776f7a55..653f6a85d1a 100644 --- a/src/mesa/drivers/dri/i965/gen7_wm_state.c +++ b/src/mesa/drivers/dri/i965/gen7_wm_state.c @@ -32,61 +32,6 @@ #include "intel_batchbuffer.h" static void -gen7_prepare_wm_constants(struct brw_context *brw) -{ - struct intel_context *intel = &brw->intel; - struct gl_context *ctx = &intel->ctx; - /* BRW_NEW_FRAGMENT_PROGRAM */ - const struct brw_fragment_program *fp = - brw_fragment_program_const(brw->fragment_program); - - /* Updates the ParameterValues[i] pointers for all parameters of the - * basic type of PROGRAM_STATE_VAR. - */ - /* XXX: Should this happen somewhere before to get our state flag set? */ - _mesa_load_state_parameters(ctx, fp->program.Base.Parameters); - - /* CACHE_NEW_WM_PROG */ - if (brw->wm.prog_data->nr_params != 0) { - float *constants; - unsigned int i; - - constants = brw_state_batch(brw, AUB_TRACE_WM_CONSTANTS, - brw->wm.prog_data->nr_params * - sizeof(float), - 32, &brw->wm.push_const_offset); - - for (i = 0; i < brw->wm.prog_data->nr_params; i++) { - constants[i] = convert_param(brw->wm.prog_data->param_convert[i], - brw->wm.prog_data->param[i]); - } - - if (0) { - printf("WM constants:\n"); - for (i = 0; i < brw->wm.prog_data->nr_params; i++) { - if ((i & 7) == 0) - printf("g%d: ", brw->wm.prog_data->first_curbe_grf + i / 8); - printf("%8f ", constants[i]); - if ((i & 7) == 7) - printf("\n"); - } - if ((i & 7) != 0) - printf("\n"); - printf("\n"); - } - } -} - -const struct brw_tracked_state gen7_wm_constants = { - .dirty = { - .mesa = _NEW_PROGRAM_CONSTANTS, - .brw = (BRW_NEW_BATCH | BRW_NEW_FRAGMENT_PROGRAM), - .cache = CACHE_NEW_WM_PROG, - }, - .prepare = gen7_prepare_wm_constants, -}; - -static void upload_wm_state(struct brw_context *brw) { struct intel_context *intel = &brw->intel; |