From 38de4c5715209171bc168454f7a6dc6c43b341b8 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Wed, 19 Dec 2007 06:00:30 -0500 Subject: [PATCH] i965: actually detect whether a sampler is enabled/disabled --- src/mesa/pipe/i965simple/brw_wm_sampler_state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.11.0