aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/gen7_ds_state.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2016-09-08 23:48:53 -0700
committerKenneth Graunke <[email protected]>2016-10-05 19:21:09 -0700
commite512941537fbc25e97ecd778433e130769e2c6ec (patch)
tree1d905192375521945bd9d286e4ebb8d823fe6831 /src/mesa/drivers/dri/i965/gen7_ds_state.c
parent82c97ac710e31bea1f954060950f8b9faf2fb4d6 (diff)
i965: Eliminate brw->tes.prog_data pointer.
Just say no to: - brw->tes.base.prog_data = &brw->tes.prog_data->base.base; We'll just use the brw_stage_prog_data pointer in brw_stage_state and downcast it to brw_tes_prog_data as needed. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen7_ds_state.c')
-rw-r--r--src/mesa/drivers/dri/i965/gen7_ds_state.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/gen7_ds_state.c b/src/mesa/drivers/dri/i965/gen7_ds_state.c
index a255c53df9b..1edb8fdd495 100644
--- a/src/mesa/drivers/dri/i965/gen7_ds_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_ds_state.c
@@ -37,7 +37,7 @@ gen7_upload_tes_push_constants(struct brw_context *brw)
if (tep) {
/* BRW_NEW_TES_PROG_DATA */
- const struct brw_stage_prog_data *prog_data = &brw->tes.prog_data->base.base;
+ const struct brw_stage_prog_data *prog_data = brw->tes.base.prog_data;
_mesa_shader_write_subroutine_indices(&brw->ctx, MESA_SHADER_TESS_EVAL);
gen6_upload_push_constants(brw, &tep->program.Base, prog_data,
stage_state, AUB_TRACE_VS_CONSTANTS);
@@ -67,9 +67,11 @@ gen7_upload_ds_state(struct brw_context *brw)
bool active = brw->tess_eval_program;
/* BRW_NEW_TES_PROG_DATA */
- const struct brw_tes_prog_data *tes_prog_data = brw->tes.prog_data;
- const struct brw_vue_prog_data *vue_prog_data = &tes_prog_data->base;
- const struct brw_stage_prog_data *prog_data = &vue_prog_data->base;
+ const struct brw_stage_prog_data *prog_data = stage_state->prog_data;
+ const struct brw_vue_prog_data *vue_prog_data =
+ brw_vue_prog_data(stage_state->prog_data);
+ const struct brw_tes_prog_data *tes_prog_data =
+ brw_tes_prog_data(stage_state->prog_data);
const unsigned thread_count = (devinfo->max_tes_threads - 1) <<
(brw->is_haswell ? HSW_DS_MAX_THREADS_SHIFT : GEN7_DS_MAX_THREADS_SHIFT);