Merge branch 'mesa_7_5_branch' into mesa_7_6_branch
[mesa.git] / src / mesa / drivers / dri / radeon / radeon_fbo.c
index 3d7c9708e1a9e413a1c5ab52f26ffdfd10bacb11..d83b166742c781014cc842b756c9f13f6b103d83 100644 (file)
@@ -40,7 +40,7 @@
 #include "radeon_common.h"
 #include "radeon_mipmap_tree.h"
 
-#define FILE_DEBUG_FLAG DEBUG_TEXTURE
+#define FILE_DEBUG_FLAG RADEON_TEXTURE
 #define DBG(...) do {                                           \
         if (RADEON_DEBUG & FILE_DEBUG_FLAG)                      \
                 _mesa_printf(__VA_ARGS__);                      \
@@ -178,12 +178,13 @@ radeon_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
                                              width, height);
    }
    else {
-     uint32_t size = width * height * cpp;
+     uint32_t size;
      uint32_t pitch = ((cpp * width + 63) & ~63) / cpp;
 
      fprintf(stderr,"Allocating %d x %d radeon RBO (pitch %d)\n", width,
          height, pitch);
 
+     size = pitch * height * cpp;
      rrb->pitch = pitch * cpp;
      rrb->cpp = cpp;
      rrb->bo = radeon_bo_open(radeon->radeonScreen->bom,