summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_screen.c
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2009-08-04 10:57:47 +0200
committerMichel Dänzer <[email protected]>2009-08-04 10:57:47 +0200
commit048f988aeb06fa360c6c41eaa50cb96b4b86e34e (patch)
treea84fbb0654cecf2b3fd7b5608e84161aabf339f1 /src/gallium/drivers/r300/r300_screen.c
parentd7430d942f6c7950a92367aeb13b80cf76ccad78 (diff)
r300g: Slightly saner initialization of some texture / transfer fields.
Diffstat (limited to 'src/gallium/drivers/r300/r300_screen.c')
-rw-r--r--src/gallium/drivers/r300/r300_screen.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 258e4ac7b2a..96a73046217 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -322,13 +322,14 @@ r300_get_tex_transfer(struct pipe_screen *screen,
trans = CALLOC_STRUCT(r300_transfer);
if (trans) {
pipe_texture_reference(&trans->transfer.texture, texture);
- trans->transfer.format = trans->transfer.format;
+ trans->transfer.format = texture->format;
trans->transfer.width = w;
trans->transfer.height = h;
trans->transfer.block = texture->block;
trans->transfer.nblocksx = texture->nblocksx[level];
trans->transfer.nblocksy = texture->nblocksy[level];
- trans->transfer.stride = tex->stride;
+ trans->transfer.stride = align(pf_get_stride(&trans->transfer.block,
+ texture->width[level]), 32);
trans->transfer.usage = usage;
trans->offset = offset;
}