diff options
author | Brian Paul <[email protected]> | 2009-01-28 11:42:42 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2009-03-13 17:38:36 -0700 |
commit | 32e314207103b085da964573ed9d2e1947bdbe66 (patch) | |
tree | fd4e11db6bb59c6ae5e7a039c0137b6d839ab212 | |
parent | 66eea4e1045476b6e6602470bd813a7ee37aada7 (diff) |
i965: minor improvements in brw_wm_populate_key() (cherry picked from commit 89fddf978c9d2ab5042f89110015234e979c2686)
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index 24149cf8a17..1683308f44b 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -233,14 +233,14 @@ static void brw_wm_populate_key( struct brw_context *brw, /* _NEW_TEXTURE */ for (i = 0; i < BRW_MAX_TEX_UNIT; i++) { const struct gl_texture_unit *unit = &brw->attribs.Texture->Unit[i]; - const struct gl_texture_object *t = unit->_Current; if (unit->_ReallyEnabled) { - if (t->Image[0][t->BaseLevel]->InternalFormat == GL_YCBCR_MESA) { - key->yuvtex_mask |= 1<<i; - if (t->Image[0][t->BaseLevel]->TexFormat->MesaFormat == - MESA_FORMAT_YCBCR) - key->yuvtex_swap_mask |= 1<< i; + const struct gl_texture_object *t = unit->_Current; + const struct gl_texture_image *img = t->Image[0][t->BaseLevel]; + if (img->InternalFormat == GL_YCBCR_MESA) { + key->yuvtex_mask |= 1 << i; + if (img->TexFormat->MesaFormat == MESA_FORMAT_YCBCR) + key->yuvtex_swap_mask |= 1 << i; } } } |