diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_state.h | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_sampler_state.c | 12 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/gen7_sampler_state.c | 2 |
3 files changed, 10 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index a1236b7c08f..dde9f1f4423 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -208,7 +208,8 @@ void gen7_upload_3dstate_so_decl_list(struct brw_context *brw, uint32_t translate_wrap_mode(GLenum wrap, bool using_nearest); void upload_default_color(struct brw_context *brw, struct gl_sampler_object *sampler, - int unit, int ss_index); + int unit, + uint32_t *sdc_offset); /* gen6_sf_state.c */ uint32_t diff --git a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c index 40a6d5be1d6..5984e459f45 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c @@ -79,8 +79,10 @@ translate_wrap_mode(GLenum wrap, bool using_nearest) * Upload SAMPLER_BORDER_COLOR_STATE. */ void -upload_default_color(struct brw_context *brw, struct gl_sampler_object *sampler, - int unit, int ss_index) +upload_default_color(struct brw_context *brw, + struct gl_sampler_object *sampler, + int unit, + uint32_t *sdc_offset) { struct gl_context *ctx = &brw->ctx; struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; @@ -142,7 +144,7 @@ upload_default_color(struct brw_context *brw, struct gl_sampler_object *sampler, struct gen5_sampler_default_color *sdc; sdc = brw_state_batch(brw, AUB_TRACE_SAMPLER_DEFAULT_COLOR, - sizeof(*sdc), 32, &brw->wm.sdc_offset[ss_index]); + sizeof(*sdc), 32, sdc_offset); memset(sdc, 0, sizeof(*sdc)); @@ -179,7 +181,7 @@ upload_default_color(struct brw_context *brw, struct gl_sampler_object *sampler, struct brw_sampler_default_color *sdc; sdc = brw_state_batch(brw, AUB_TRACE_SAMPLER_DEFAULT_COLOR, - sizeof(*sdc), 32, &brw->wm.sdc_offset[ss_index]); + sizeof(*sdc), 32, sdc_offset); COPY_4V(sdc->color, color); } @@ -334,7 +336,7 @@ static void brw_update_sampler_state(struct brw_context *brw, sampler->ss3.non_normalized_coord = 1; } - upload_default_color(brw, gl_sampler, unit, ss_index); + upload_default_color(brw, gl_sampler, unit, &brw->wm.sdc_offset[ss_index]); if (brw->gen >= 6) { sampler->ss2.default_color_pointer = brw->wm.sdc_offset[ss_index] >> 5; diff --git a/src/mesa/drivers/dri/i965/gen7_sampler_state.c b/src/mesa/drivers/dri/i965/gen7_sampler_state.c index f09c6b3ffe6..4200f8dff70 100644 --- a/src/mesa/drivers/dri/i965/gen7_sampler_state.c +++ b/src/mesa/drivers/dri/i965/gen7_sampler_state.c @@ -168,7 +168,7 @@ gen7_update_sampler_state(struct brw_context *brw, int unit, int ss_index, sampler->ss3.non_normalized_coord = 1; } - upload_default_color(brw, gl_sampler, unit, ss_index); + upload_default_color(brw, gl_sampler, unit, &brw->wm.sdc_offset[ss_index]); sampler->ss2.default_color_pointer = brw->wm.sdc_offset[ss_index] >> 5; |