Squashed commit of the following:
[mesa.git] / src / gallium / drivers / i965 / brw_wm.c
index 5164c90ed60cf6261d41dd25a7a52d9df8dfc401..5d66e61fbc1384e9ed9f62aad1ccb912b87957ef 100644 (file)
@@ -35,6 +35,7 @@
 #include "brw_wm.h"
 #include "brw_state.h"
 #include "brw_debug.h"
+#include "brw_resource.h"
 #include "brw_pipe_rast.h"
 
 
@@ -251,13 +252,13 @@ static void brw_wm_populate_key( struct brw_context *brw,
 
 
    /* PIPE_NEW_BOUND_TEXTURES */
-   for (i = 0; i < brw->curr.num_textures; i++) {
-      const struct brw_texture *tex = brw_texture(brw->curr.texture[i]);
+   for (i = 0; i < brw->curr.num_fragment_sampler_views; i++) {
+      const struct brw_texture *tex = brw_texture(brw->curr.fragment_sampler_views[i]->texture);
         
-      if (tex->base.format == PIPE_FORMAT_YCBCR)
+      if (tex->b.b.format == PIPE_FORMAT_UYVY)
         key->yuvtex_mask |= 1 << i;
 
-      if (tex->base.format == PIPE_FORMAT_YCBCR_REV)
+      if (tex->b.b.format == PIPE_FORMAT_YUYV)
         key->yuvtex_swap_mask |= 1 << i;
 
       /* XXX: shadow texture