diff options
author | Eric Anholt <[email protected]> | 2009-11-10 16:01:28 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2009-11-10 16:01:28 -0800 |
commit | e42b156fac6deed21328b89192faca6f4fe904f1 (patch) | |
tree | 99797d34c15f10af04a969820f0ff20cdd9d235a /src/mesa/drivers | |
parent | c5413839b3e99c7b162f1260142f3c175502b0ce (diff) | |
parent | 1220aba99bc78290bb89ade649719508e3031e4b (diff) |
Merge remote branch 'origin/mesa_7_6_branch'
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs_surface_state.c | 12 |
1 files changed, 11 insertions, 1 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 4fa3269bedb..5dac6329693 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c @@ -52,6 +52,7 @@ brw_vs_update_constant_buffer(struct brw_context *brw) const struct gl_program_parameter_list *params = vp->program.Base.Parameters; const int size = params->NumParameters * 4 * sizeof(GLfloat); drm_intel_bo *const_buffer; + int i; /* BRW_NEW_VERTEX_PROGRAM */ if (!vp->use_const_buffer) @@ -61,7 +62,16 @@ brw_vs_update_constant_buffer(struct brw_context *brw) size, 64); /* _NEW_PROGRAM_CONSTANTS */ - dri_bo_subdata(const_buffer, 0, size, params->ParameterValues); + + /* Updates the ParamaterValues[i] pointers for all parameters of the + * basic type of PROGRAM_STATE_VAR. + */ + _mesa_load_state_parameters(&brw->intel.ctx, vp->program.Base.Parameters); + + for (i = 0; i < params->NumParameters; i++) { + dri_bo_subdata(const_buffer, i * 4 * sizeof(float), 4 * sizeof(float), + params->ParameterValues[i]); + } return const_buffer; } |