diff options
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vs_surface_state.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs_surface_state.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c index 675a84ccf24..968cc0336f7 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c @@ -56,7 +56,7 @@ brw_upload_vs_pull_constants(struct brw_context *brw) _mesa_load_state_parameters(&brw->intel.ctx, vp->program.Base.Parameters); /* CACHE_NEW_VS_PROG */ - if (!brw->vs.prog_data->nr_pull_params) { + if (!brw->vs.prog_data->base.nr_pull_params) { if (brw->vs.const_bo) { drm_intel_bo_unreference(brw->vs.const_bo); brw->vs.const_bo = NULL; @@ -68,19 +68,20 @@ brw_upload_vs_pull_constants(struct brw_context *brw) /* _NEW_PROGRAM_CONSTANTS */ drm_intel_bo_unreference(brw->vs.const_bo); - uint32_t size = brw->vs.prog_data->nr_pull_params * 4; + uint32_t size = brw->vs.prog_data->base.nr_pull_params * 4; brw->vs.const_bo = drm_intel_bo_alloc(intel->bufmgr, "vp_const_buffer", size, 64); drm_intel_gem_bo_map_gtt(brw->vs.const_bo); - for (i = 0; i < brw->vs.prog_data->nr_pull_params; i++) { + for (i = 0; i < brw->vs.prog_data->base.nr_pull_params; i++) { memcpy(brw->vs.const_bo->virtual + i * 4, - brw->vs.prog_data->pull_param[i], + brw->vs.prog_data->base.pull_param[i], 4); } if (0) { - for (i = 0; i < ALIGN(brw->vs.prog_data->nr_pull_params, 4) / 4; i++) { + for (i = 0; i < ALIGN(brw->vs.prog_data->base.nr_pull_params, 4) / 4; + i++) { float *row = (float *)brw->vs.const_bo->virtual + i * 4; printf("vs const surface %3d: %4.3f %4.3f %4.3f %4.3f\n", i, row[0], row[1], row[2], row[3]); @@ -142,14 +143,15 @@ brw_vs_upload_binding_table(struct brw_context *brw) if (INTEL_DEBUG & DEBUG_SHADER_TIME) { gen7_create_shader_time_surface(brw, &brw->vs.surf_offset[SURF_INDEX_VS_SHADER_TIME]); - assert(brw->vs.prog_data->num_surfaces <= SURF_INDEX_VS_SHADER_TIME); - brw->vs.prog_data->num_surfaces = SURF_INDEX_VS_SHADER_TIME; + assert(brw->vs.prog_data->base.num_surfaces + <= SURF_INDEX_VS_SHADER_TIME); + brw->vs.prog_data->base.num_surfaces = SURF_INDEX_VS_SHADER_TIME; } /* CACHE_NEW_VS_PROG: Skip making a binding table if we don't use textures or * pull constants. */ - if (brw->vs.prog_data->num_surfaces == 0) { + if (brw->vs.prog_data->base.num_surfaces == 0) { if (brw->vs.bind_bo_offset != 0) { brw->state.dirty.brw |= BRW_NEW_VS_BINDING_TABLE; brw->vs.bind_bo_offset = 0; |