summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/xlib/xlib_brw_aub.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys/xlib/xlib_brw_aub.c')
-rw-r--r--src/gallium/winsys/xlib/xlib_brw_aub.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gallium/winsys/xlib/xlib_brw_aub.c b/src/gallium/winsys/xlib/xlib_brw_aub.c
index 2956e1b960..b6bd849ef2 100644
--- a/src/gallium/winsys/xlib/xlib_brw_aub.c
+++ b/src/gallium/winsys/xlib/xlib_brw_aub.c
@@ -34,8 +34,9 @@
#include "xlib_brw_aub.h"
#include "pipe/p_context.h"
#include "pipe/p_state.h"
-#include "pipe/p_debug.h"
+#include "util/u_debug.h"
#include "util/u_memory.h"
+#include "softpipe/sp_texture.h"
struct brw_aubfile {
@@ -322,10 +323,10 @@ void brw_aub_dump_bmp( struct brw_aubfile *aubfile,
struct aub_dump_bmp db;
unsigned format;
- assert(surface->block.width == 1);
- assert(surface->block.height == 1);
+ assert(surface->texture->block.width == 1);
+ assert(surface->texture->block.height == 1);
- if (surface->block.size == 4)
+ if (surface->texture->block.size == 4)
format = 0x7;
else
format = 0x3;
@@ -334,8 +335,9 @@ void brw_aub_dump_bmp( struct brw_aubfile *aubfile,
db.xmin = 0;
db.ymin = 0;
db.format = format;
- db.bpp = surface->block.size * 8;
- db.pitch = surface->stride/surface->block.size;
+ db.bpp = surface->texture->block.size * 8;
+ db.pitch = softpipe_texture(surface->texture)->stride[surface->level] /
+ surface->texture->block.size;
db.xsize = surface->width;
db.ysize = surface->height;
db.addr = gtt_offset;