965: fix/hack check for NULL texunit in state upload
authorKeith Whitwell <keith@tungstengraphics.com>
Fri, 14 Dec 2007 20:14:30 +0000 (20:14 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Mon, 17 Dec 2007 10:30:38 +0000 (10:30 +0000)
src/mesa/pipe/i965simple/brw_wm_surface_state.c

index 6e68c4c660b73116813c01654ef60bb8c4d216e6..db8f670970fd4d853e4c8e44066dd5d499fa32ac 100644 (file)
@@ -237,6 +237,9 @@ static void upload_wm_surfaces(struct brw_context *brw )
 
    for (i = 0; i < BRW_MAX_TEX_UNIT; i++) {
       const struct brw_texture *texUnit = brw->attribs.Texture[i];
+      if (texUnit == NULL)
+        continue;
+
 
       /* BRW_NEW_TEXTURE
        */