From: Zack Rusin Date: Wed, 19 Dec 2007 11:00:30 +0000 (-0500) Subject: i965: actually detect whether a sampler is enabled/disabled X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=38de4c5715209171bc168454f7a6dc6c43b341b8;p=mesa.git i965: actually detect whether a sampler is enabled/disabled --- diff --git a/src/mesa/pipe/i965simple/brw_wm_sampler_state.c b/src/mesa/pipe/i965simple/brw_wm_sampler_state.c index fbeea8c8090..cfb430eb09c 100644 --- a/src/mesa/pipe/i965simple/brw_wm_sampler_state.c +++ b/src/mesa/pipe/i965simple/brw_wm_sampler_state.c @@ -236,7 +236,8 @@ static void upload_wm_samplers(struct brw_context *brw) /* BRW_NEW_SAMPLER */ for (unit = 0; unit < BRW_MAX_TEX_UNIT; unit++) { - if (brw->attribs.Samplers[unit]) { /* FIXME: correctly detect enabled ones */ + /* determine unit enable/disable by looking for a bound texture */ + if (brw->attribs.Texture[unit]) { const struct pipe_sampler_state *sampler = brw->attribs.Samplers[unit]; unsigned sdc_gs_offset = upload_default_color(brw, sampler->border_color);