i965g: Match pitch modification on get buffer as well
authorJakob Bornecrantz <jakob@vmware.com>
Fri, 6 Nov 2009 19:05:41 +0000 (19:05 +0000)
committerJakob Bornecrantz <jakob@vmware.com>
Fri, 6 Nov 2009 19:05:41 +0000 (19:05 +0000)
This is a ugly hack in order to match what the intel
X driver gives us. However putting this in the winsys
where it fits better forces it reach more into the
driver then it already does.

src/gallium/drivers/i965/brw_screen_texture.c

index 842c70a39ad655393c96e837a29d0f12e90adeec..dbefbfc5cca93c2554c75f08bb16bb23910b8178 100644 (file)
@@ -371,7 +371,7 @@ boolean brw_texture_get_winsys_buffer(struct pipe_texture *texture,
 
    *buffer = tex->bo;
    if (stride)
-      *stride = tex->pitch;
+      *stride = tex->pitch * tex->cpp;
 
    return TRUE;
 }