summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/xlib/xlib_brw_aub.c
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-02-05 19:41:18 +0100
committerMichel Dänzer <daenzer@vmware.com>2009-02-05 19:41:18 +0100
commit4617981ec72f7985941bee4b03c534d97ff96bc6 (patch)
treec3c8fb33499227cf4e3e905b3c04ff6599666663 /src/gallium/winsys/xlib/xlib_brw_aub.c
parente0c3b4970da052308bf7b4e5cbe9186a4b8321db (diff)
gallium: No longer allow CPU mapping surfaces directly.
Instead, a new pipe_transfer object has to be created and mapped for transferring data between the CPU and a texture. This gives the driver more flexibility for textures in address spaces that aren't CPU accessible. This is a first pass; softpipe/xlib builds and runs glxgears, but it only shows a black window. Looks like something's off related to the Z buffer, so the depth test always fails.
Diffstat (limited to 'src/gallium/winsys/xlib/xlib_brw_aub.c')
-rw-r--r--src/gallium/winsys/xlib/xlib_brw_aub.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/winsys/xlib/xlib_brw_aub.c b/src/gallium/winsys/xlib/xlib_brw_aub.c
index 2956e1b960..c63cd51d32 100644
--- a/src/gallium/winsys/xlib/xlib_brw_aub.c
+++ b/src/gallium/winsys/xlib/xlib_brw_aub.c
@@ -322,10 +322,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 +334,8 @@ 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 = surface->texture->nblocksx[surface->level];
db.xsize = surface->width;
db.ysize = surface->height;
db.addr = gtt_offset;