r600g: add alignment cases for linear aligned
authorAlex Deucher <alexdeucher@gmail.com>
Mon, 14 Feb 2011 18:07:29 +0000 (13:07 -0500)
committerAlex Deucher <alexdeucher@gmail.com>
Mon, 14 Feb 2011 18:07:29 +0000 (13:07 -0500)
Matches the drm and ddx.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
src/gallium/drivers/r600/r600_texture.c

index b8bc365bcbd6f60b52395c68f934e7a0bbb147ce..793bdc4d5ec47b326137fb960971a858e559df8c 100644 (file)
@@ -103,6 +103,9 @@ static unsigned r600_get_pixel_alignment(struct pipe_screen *screen,
                               (((rscreen->tiling_info->group_bytes / 8 / pixsize)) *
                                rscreen->tiling_info->num_banks)) * 8;
                break;
+       case V_038000_ARRAY_LINEAR_ALIGNED:
+               p_align = MAX2(64, rscreen->tiling_info->group_bytes / pixsize);
+               break;
        case V_038000_ARRAY_LINEAR_GENERAL:
        default:
                p_align = rscreen->tiling_info->group_bytes / pixsize;
@@ -122,6 +125,7 @@ static unsigned r600_get_height_alignment(struct pipe_screen *screen,
                h_align = rscreen->tiling_info->num_channels * 8;
                break;
        case V_038000_ARRAY_1D_TILED_THIN1:
+       case V_038000_ARRAY_LINEAR_ALIGNED:
                h_align = 8;
                break;
        default:
@@ -147,6 +151,8 @@ static unsigned r600_get_base_alignment(struct pipe_screen *screen,
                               p_align * pixsize * h_align);
                break;
        case V_038000_ARRAY_1D_TILED_THIN1:
+       case V_038000_ARRAY_LINEAR_ALIGNED:
+       case V_038000_ARRAY_LINEAR_GENERAL:
        default:
                b_align = rscreen->tiling_info->group_bytes;
                break;