python: fix python state tracker after some latest changes
authorZack Rusin <zackr@vmware.com>
Wed, 23 Dec 2009 18:43:30 +0000 (13:43 -0500)
committerZack Rusin <zackr@vmware.com>
Fri, 25 Dec 2009 10:52:18 +0000 (05:52 -0500)
src/gallium/state_trackers/python/gallium.i
src/gallium/state_trackers/python/p_texture.i

index 8e323f4896da5a12ddf53cccd218a09fe6ebe7bb..96b13c2258e859d87fbd6141b59b68d9c6ac3d26 100644 (file)
@@ -46,6 +46,7 @@
 #include "util/u_draw_quad.h"
 #include "util/u_tile.h"
 #include "util/u_math.h"
+#include "util/u_format.h"
 #include "util/u_memory.h"
 #include "tgsi/tgsi_text.h"
 #include "tgsi/tgsi_dump.h"
index 1de7f86a3c7eff54e6c875f06265482899d5b758..761587dc533bbd4b24350a63570026789ec7f02b 100644 (file)
@@ -132,8 +132,8 @@ struct st_surface
       struct pipe_transfer *transfer;
       unsigned stride;
 
-      stride = pf_get_stride(texture->format, w);
-      *LENGTH = pf_get_nblocksy(texture->format, h) * stride;
+      stride = util_format_get_stride(texture->format, w);
+      *LENGTH = util_format_get_nblocksy(texture->format, h) * stride;
       *STRING = (char *) malloc(*LENGTH);
       if(!*STRING)
          return;
@@ -159,9 +159,9 @@ struct st_surface
       struct pipe_transfer *transfer;
      
       if(stride == 0)
-         stride = pf_get_stride(texture->format, w);
+         stride = util_format_get_stride(texture->format, w);
       
-      if(LENGTH < pf_get_nblocksy(texture->format, h) * stride)
+      if(LENGTH < util_format_get_nblocksy(texture->format, h) * stride)
          SWIG_exception(SWIG_ValueError, "offset must be smaller than buffer size");
          
       transfer = screen->get_tex_transfer(screen,