aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/gen8_hs_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
commit82c97ac710e31bea1f954060950f8b9faf2fb4d6 (patch)
treef4c4e1c1d19406a8c90a1707e45c546ad7db3b16 /src/mesa/drivers/dri/i965/gen8_hs_state.c
parent40258a13d5bf81303585eaf1859fcb85e373be3e (diff)
i965: Eliminate brw->tcs.prog_data pointer.
Just say no to: - brw->tcs.base.prog_data = &brw->tcs.prog_data->base.base; We'll just use the brw_stage_prog_data pointer in brw_stage_state and downcast it to brw_tcs_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/gen8_hs_state.c')
-rw-r--r--src/mesa/drivers/dri/i965/gen8_hs_state.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/gen8_hs_state.c b/src/mesa/drivers/dri/i965/gen8_hs_state.c
index 14af89aaf32..ee47e5e54a0 100644
--- a/src/mesa/drivers/dri/i965/gen8_hs_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_hs_state.c
@@ -33,24 +33,26 @@ gen8_upload_hs_state(struct brw_context *brw)
const struct brw_stage_state *stage_state = &brw->tcs.base;
/* BRW_NEW_TESS_PROGRAMS */
bool active = brw->tess_eval_program;
- /* BRW_NEW_HS_PROG_DATA */
- const struct brw_vue_prog_data *prog_data = &brw->tcs.prog_data->base;
+ /* BRW_NEW_TCS_PROG_DATA */
+ const struct brw_stage_prog_data *prog_data = stage_state->prog_data;
+ const struct brw_tcs_prog_data *tcs_prog_data =
+ brw_tcs_prog_data(stage_state->prog_data);
if (active) {
BEGIN_BATCH(9);
OUT_BATCH(_3DSTATE_HS << 16 | (9 - 2));
OUT_BATCH(SET_FIELD(DIV_ROUND_UP(stage_state->sampler_count, 4),
GEN7_HS_SAMPLER_COUNT) |
- SET_FIELD(prog_data->base.binding_table.size_bytes / 4,
+ SET_FIELD(prog_data->binding_table.size_bytes / 4,
GEN7_HS_BINDING_TABLE_ENTRY_COUNT));
OUT_BATCH(GEN7_HS_ENABLE |
GEN7_HS_STATISTICS_ENABLE |
(devinfo->max_tcs_threads - 1) << GEN8_HS_MAX_THREADS_SHIFT |
- SET_FIELD(brw->tcs.prog_data->instances - 1,
+ SET_FIELD(tcs_prog_data->instances - 1,
GEN7_HS_INSTANCE_COUNT));
OUT_BATCH(stage_state->prog_offset);
OUT_BATCH(0);
- if (prog_data->base.total_scratch) {
+ if (prog_data->total_scratch) {
OUT_RELOC64(stage_state->scratch_bo,
I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
ffs(stage_state->per_thread_scratch) - 11);
@@ -59,7 +61,7 @@ gen8_upload_hs_state(struct brw_context *brw)
OUT_BATCH(0);
}
OUT_BATCH(GEN7_HS_INCLUDE_VERTEX_HANDLES |
- SET_FIELD(prog_data->base.dispatch_grf_start_reg,
+ SET_FIELD(prog_data->dispatch_grf_start_reg,
GEN7_HS_DISPATCH_START_GRF));
OUT_BATCH(0); /* MBZ */
ADVANCE_BATCH();