diff options
author | Marek Olšák <[email protected]> | 2010-05-31 04:01:56 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2010-05-31 04:16:24 +0200 |
commit | 21dfcde3ff54e0d01ddd2c79b14db82b57541433 (patch) | |
tree | 50e951467a32ee9d79fd0c4ec9c6ca21176b33c8 /src/gallium/drivers/r300/r300_texture.c | |
parent | 7a4601db529c1dc1753e059b224522213ec96814 (diff) |
r300g: set correct pitch in libdrm
to match what DDX sets. This prevents some flushes from occuring.
Diffstat (limited to 'src/gallium/drivers/r300/r300_texture.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_texture.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c index 4a5c932b7e8..a4b5d34ce1f 100644 --- a/src/gallium/drivers/r300/r300_texture.c +++ b/src/gallium/drivers/r300/r300_texture.c @@ -963,9 +963,9 @@ struct pipe_resource* r300_texture_create(struct pipe_screen* screen, base->bind, tex->size); rws->buffer_set_tiling(rws, tex->buffer, - tex->pitch[0], - tex->microtile, - tex->macrotile); + tex->pitch[0] * util_format_get_blocksize(tex->b.b.format), + tex->microtile, + tex->macrotile); if (!tex->buffer) { FREE(tex); @@ -1093,9 +1093,9 @@ r300_texture_from_handle(struct pipe_screen* screen, if (override_zb_flags) { rws->buffer_set_tiling(rws, tex->buffer, - tex->pitch[0], - tex->microtile, - tex->macrotile); + tex->pitch[0] * util_format_get_blocksize(tex->b.b.format), + tex->microtile, + tex->macrotile); } return (struct pipe_resource*)tex; } |