debian/changelog | 11 debian/patches/107_winsys_buffer_nullptr.patch | 13 debian/patches/108-r300g-fixup-rs690-tiling-stride-align.patch | 156 ++++++++++ debian/patches/series | 3 4 files changed, 182 insertions(+), 1 deletion(-)
New commits: commit 41ad5137f704d0cc98fe8d8eb2a503ef61cbf5d0 Author: Bryce Harrington <br...@canonical.com> Date: Fri Jan 14 13:40:30 2011 -0800 debian/patches/108-r300g-fixup-rs690-tiling-stride-align.patch * debian/patches/108-r300g-fixup-rs690-tiling-stride-align.patch - Cherry pick 32218e4cc88f7dedebadffe4a80247decf4498f1 from upstream r300g: fixup rs690 tiling stride alignment calculations itself cherrypicked from d19b5cbd317620f3977e68fffb7a74793436b7e2 addressing unity (and other) text and icon rendering problems. (LP: #681915) diff --git a/debian/changelog b/debian/changelog index d1a2a8b..50679eb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +mesa (7.9+repack-1ubuntu5) natty; urgency=low + + * debian/patches/108-r300g-fixup-rs690-tiling-stride-align.patch + - Cherry pick 32218e4cc88f7dedebadffe4a80247decf4498f1 from upstream + r300g: fixup rs690 tiling stride alignment calculations + itself cherrypicked from d19b5cbd317620f3977e68fffb7a74793436b7e2 + addressing unity (and other) text and icon rendering problems. + (LP: #681915) + + -- John S Gruber <johnsgru...@gmail.com> Sun, 09 Jan 2011 14:25:53 -0500 + mesa (7.9+repack-1ubuntu4) natty; urgency=low * debian/patches/winsys_buffer_nullptr.patch: Null pointer check for diff --git a/debian/patches/107_winsys_buffer_nullptr.patch b/debian/patches/107_winsys_buffer_nullptr.patch new file mode 100644 index 0000000..8042d6b --- /dev/null +++ b/debian/patches/107_winsys_buffer_nullptr.patch @@ -0,0 +1,13 @@ +diff --git a/src/gallium/winsys/radeon/drm/radeon_r300.c b/src/gallium/winsys/radeon/drm/radeon_r300.c +index 420522f..2d1bd1e 100644 +--- a/src/gallium/winsys/radeon/drm/radeon_r300.c ++++ b/src/gallium/winsys/radeon/drm/radeon_r300.c +@@ -119,7 +119,7 @@ static struct r300_winsys_buffer *radeon_r300_winsys_buffer_from_handle(struct r + + if (stride) + *stride = whandle->stride; +- if (size) ++ if (size && _buf) + *size = _buf->base.size; + + return radeon_libdrm_winsys_buffer(_buf); diff --git a/debian/patches/108-r300g-fixup-rs690-tiling-stride-align.patch b/debian/patches/108-r300g-fixup-rs690-tiling-stride-align.patch new file mode 100644 index 0000000..f1d2b59 --- /dev/null +++ b/debian/patches/108-r300g-fixup-rs690-tiling-stride-align.patch @@ -0,0 +1,156 @@ +From 32218e4cc88f7dedebadffe4a80247decf4498f1 Mon Sep 17 00:00:00 2001 +From: Dave Airlie <airl...@redhat.com> +Date: Fri, 10 Dec 2010 15:40:48 +1000 +Subject: [PATCH] r300g: fixup rs690 tiling stride alignment calculations. + +The RS690 memory controller prefers things to be on a different +boundary than the discrete GPUs, we had an attempt to fix this, +but it still failed, this consolidates the stride calculation +into one place and removes the really special case check. + +This fixes gnome-shell and 16 piglit tests on my rs690 system. + +NOTE: This is a candidate for both the 7.9 and 7.10 branches. + +Signed-off-by: Dave Airlie <airl...@redhat.com> +(cherry picked from commit d19b5cbd317620f3977e68fffb7a74793436b7e2) +--- + src/gallium/drivers/r300/r300_texture.c | 2 +- + src/gallium/drivers/r300/r300_texture_desc.c | 46 +++++++++---------------- + src/gallium/drivers/r300/r300_texture_desc.h | 2 +- + 3 files changed, 19 insertions(+), 31 deletions(-) + +diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c +index 70fc5d9..6d86bc2 100644 +--- a/src/gallium/drivers/r300/r300_texture.c ++++ b/src/gallium/drivers/r300/r300_texture.c +@@ -899,7 +899,7 @@ struct pipe_surface* r300_create_surface(struct pipe_context * ctx, + tex->desc.b.b.nr_samples, + tex->desc.microtile, + tex->desc.macrotile[level], +- DIM_HEIGHT); ++ DIM_HEIGHT, 0); + + surface->cbzb_height = align((surface->base.height + 1) / 2, + tile_height); +diff --git a/src/gallium/drivers/r300/r300_texture_desc.c b/src/gallium/drivers/r300/r300_texture_desc.c +index aa82c47..7b17391 100644 +--- a/src/gallium/drivers/r300/r300_texture_desc.c ++++ b/src/gallium/drivers/r300/r300_texture_desc.c +@@ -34,7 +34,7 @@ unsigned r300_get_pixel_alignment(enum pipe_format format, + unsigned num_samples, + enum r300_buffer_tiling microtile, + enum r300_buffer_tiling macrotile, +- enum r300_dim dim) ++ enum r300_dim dim, boolean is_rs690) + { + static const unsigned table[2][5][3][2] = + { +@@ -57,6 +57,7 @@ unsigned r300_get_pixel_alignment(enum pipe_format format, + {{ 16, 8}, { 0, 0}, { 0, 0}} /* 128 bits per pixel */ + } + }; ++ + static const unsigned aa_block[2] = {4, 8}; + unsigned tile = 0; + unsigned pixsize = util_format_get_blocksize(format); +@@ -74,6 +75,14 @@ unsigned r300_get_pixel_alignment(enum pipe_format format, + } else { + /* Standard alignment. */ + tile = table[macrotile][util_logbase2(pixsize)][microtile][dim]; ++ if (macrotile == 0 && is_rs690 && dim == DIM_WIDTH) { ++ int align; ++ int h_tile; ++ h_tile = table[macrotile][util_logbase2(pixsize)][microtile][DIM_HEIGHT]; ++ align = 64 / (pixsize * h_tile); ++ if (tile < align) ++ tile = align; ++ } + } + + assert(tile); +@@ -89,7 +98,7 @@ static boolean r300_texture_macro_switch(struct r300_texture_desc *desc, + unsigned tile, texdim; + + tile = r300_get_pixel_alignment(desc->b.b.format, desc->b.b.nr_samples, +- desc->microtile, R300_BUFFER_TILED, dim); ++ desc->microtile, R300_BUFFER_TILED, dim, 0); + if (dim == DIM_WIDTH) { + texdim = u_minify(desc->width0, level); + } else { +@@ -113,6 +122,9 @@ static unsigned r300_texture_get_stride(struct r300_screen *screen, + unsigned level) + { + unsigned tile_width, width, stride; ++ boolean is_rs690 = (screen->caps.family == CHIP_FAMILY_RS600 || ++ screen->caps.family == CHIP_FAMILY_RS690 || ++ screen->caps.family == CHIP_FAMILY_RS740); + + if (desc->stride_in_bytes_override) + return desc->stride_in_bytes_override; +@@ -131,38 +143,14 @@ static unsigned r300_texture_get_stride(struct r300_screen *screen, + desc->b.b.nr_samples, + desc->microtile, + desc->macrotile[level], +- DIM_WIDTH); ++ DIM_WIDTH, is_rs690); + width = align(width, tile_width); + + stride = util_format_get_stride(desc->b.b.format, width); +- +- /* Some IGPs need a minimum stride of 64 bytes, hmm... */ +- if (!desc->macrotile[level] && +- (screen->caps.family == CHIP_FAMILY_RS600 || +- screen->caps.family == CHIP_FAMILY_RS690 || +- screen->caps.family == CHIP_FAMILY_RS740)) { +- unsigned min_stride; +- +- if (desc->microtile) { +- unsigned tile_height = +- r300_get_pixel_alignment(desc->b.b.format, +- desc->b.b.nr_samples, +- desc->microtile, +- desc->macrotile[level], +- DIM_HEIGHT); +- +- min_stride = 64 / tile_height; +- } else { +- min_stride = 64; +- } +- +- return stride < min_stride ? min_stride : stride; +- } +- + /* The alignment to 32 bytes is sort of implied by the layout... */ + return stride; + } else { +- return align(util_format_get_stride(desc->b.b.format, width), 32); ++ return align(util_format_get_stride(desc->b.b.format, width), is_rs690 ? 64 : 32); + } + } + +@@ -179,7 +167,7 @@ static unsigned r300_texture_get_nblocksy(struct r300_texture_desc *desc, + desc->b.b.nr_samples, + desc->microtile, + desc->macrotile[level], +- DIM_HEIGHT); ++ DIM_HEIGHT, 0); + height = align(height, tile_height); + + /* This is needed for the kernel checker, unfortunately. */ +diff --git a/src/gallium/drivers/r300/r300_texture_desc.h b/src/gallium/drivers/r300/r300_texture_desc.h +index 44d8879..121d215 100644 +--- a/src/gallium/drivers/r300/r300_texture_desc.h ++++ b/src/gallium/drivers/r300/r300_texture_desc.h +@@ -41,7 +41,7 @@ unsigned r300_get_pixel_alignment(enum pipe_format format, + unsigned num_samples, + enum r300_buffer_tiling microtile, + enum r300_buffer_tiling macrotile, +- enum r300_dim dim); ++ enum r300_dim dim, boolean is_rs690); + + boolean r300_texture_desc_init(struct r300_screen *rscreen, + struct r300_texture_desc *desc, +-- +1.7.2.3 + diff --git a/debian/patches/series b/debian/patches/series index 74f3c60..c166c22 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -9,4 +9,5 @@ 104_i915_fragment_shader_disable.patch 105_use_shared_libdricore.patch 106_fix_renderbuffer_segfault.patch -winsys_buffer_nullptr.patch +107_winsys_buffer_nullptr.patch +108-r300g-fixup-rs690-tiling-stride-align.patch -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1pdrr4-0005u2...@alioth.debian.org