diff options
author | Francisco Jerez <[email protected]> | 2014-02-19 15:14:02 +0100 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2014-02-19 16:27:22 +0100 |
commit | ae8b066da5862b4cfc510b3a9a0e1273f9f6edd4 (patch) | |
tree | 700ad532f65cbba9e8e76710e0c27b44f40528dc /src/mesa/drivers/dri/i965/brw_curbe.c | |
parent | 7f00c5f1a3e0db20a89cfedefd53cbe817fec9e3 (diff) |
i965: Move up duplicated fields from stage-specific prog_data to brw_stage_prog_data.
There doesn't seem to be any reason for nr_params, nr_pull_params,
param, and pull_param to be duplicated in the stage-specific
subclasses of brw_stage_prog_data. Moving their definition to the
common base class will allow some code sharing in a future commit, the
removal of brw_vec4_prog_data_compare and brw_*_prog_data_free, and
the simplification of the stage-specific brw_*_prog_data_compare.
Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_curbe.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_curbe.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_curbe.c b/src/mesa/drivers/dri/i965/brw_curbe.c index bb1c7978438..19544aa26d5 100644 --- a/src/mesa/drivers/dri/i965/brw_curbe.c +++ b/src/mesa/drivers/dri/i965/brw_curbe.c @@ -57,10 +57,10 @@ static void calculate_curbe_offsets( struct brw_context *brw ) { struct gl_context *ctx = &brw->ctx; /* CACHE_NEW_WM_PROG */ - const GLuint nr_fp_regs = (brw->wm.prog_data->nr_params + 15) / 16; + const GLuint nr_fp_regs = (brw->wm.prog_data->base.nr_params + 15) / 16; /* BRW_NEW_VERTEX_PROGRAM */ - const GLuint nr_vp_regs = (brw->vs.prog_data->base.nr_params + 15) / 16; + const GLuint nr_vp_regs = (brw->vs.prog_data->base.base.nr_params + 15) / 16; GLuint nr_clip_regs = 0; GLuint total_regs; @@ -199,8 +199,8 @@ brw_upload_constant_buffer(struct brw_context *brw) GLuint offset = brw->curbe.wm_start * 16; /* copy float constants */ - for (i = 0; i < brw->wm.prog_data->nr_params; i++) { - buf[offset + i] = *brw->wm.prog_data->param[i]; + for (i = 0; i < brw->wm.prog_data->base.nr_params; i++) { + buf[offset + i] = *brw->wm.prog_data->base.param[i]; } } @@ -237,8 +237,8 @@ brw_upload_constant_buffer(struct brw_context *brw) if (brw->curbe.vs_size) { GLuint offset = brw->curbe.vs_start * 16; - for (i = 0; i < brw->vs.prog_data->base.nr_params; i++) { - buf[offset + i] = *brw->vs.prog_data->base.param[i]; + for (i = 0; i < brw->vs.prog_data->base.base.nr_params; i++) { + buf[offset + i] = *brw->vs.prog_data->base.base.param[i]; } } |