diff options
Diffstat (limited to 'src/gallium/winsys/xlib/xlib_brw_aub.c')
-rw-r--r-- | src/gallium/winsys/xlib/xlib_brw_aub.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gallium/winsys/xlib/xlib_brw_aub.c b/src/gallium/winsys/xlib/xlib_brw_aub.c index ce4b5f83fff..b6bd849ef21 100644 --- a/src/gallium/winsys/xlib/xlib_brw_aub.c +++ b/src/gallium/winsys/xlib/xlib_brw_aub.c @@ -36,6 +36,7 @@ #include "pipe/p_state.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; |