summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Rusin <zack@tungstengraphics.com>2007-12-19 06:00:30 -0500
committerZack Rusin <zack@tungstengraphics.com>2007-12-19 06:24:16 -0500
commit38de4c5715209171bc168454f7a6dc6c43b341b8 (patch)
tree6ddee64f8975289f7ea8281e1c298e8f19ba299d
parentaba4ee24cf1de8e1ec9a7f02c2d97c3156d87eef (diff)
i965: actually detect whether a sampler is enabled/disabled
-rw-r--r--src/mesa/pipe/i965simple/brw_wm_sampler_state.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/pipe/i965simple/brw_wm_sampler_state.c b/src/mesa/pipe/i965simple/brw_wm_sampler_state.c
index fbeea8c809..cfb430eb09 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);