* 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];
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));
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);
}
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;
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;