radeonsi: Fix 1D tiling mode index for non-scanout resources.
authorMichel Dänzer <michel.daenzer@amd.com>
Thu, 17 Jan 2013 18:15:15 +0000 (19:15 +0100)
committerMichel Dänzer <michel@daenzer.net>
Mon, 21 Jan 2013 13:10:52 +0000 (14:10 +0100)
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeonsi/si_state.c

index f7fe603f115bbf613acf4ebdd5e08375e2102f84..ee353edb816892a4674e405a0d1a62a05c6568a3 100644 (file)
@@ -1524,7 +1524,10 @@ static unsigned si_tile_mode_index(struct r600_resource_texture *rtex, unsigned
        case RADEON_SURF_MODE_LINEAR_ALIGNED:
                return 8;
        case RADEON_SURF_MODE_1D:
-               return 9;
+               if (rtex->surface.flags & RADEON_SURF_SCANOUT)
+                       return 9;
+               else
+                       return 13;
        case RADEON_SURF_MODE_2D:
                if (rtex->surface.flags & RADEON_SURF_SCANOUT) {
                        switch (util_format_get_blocksize(rtex->real_format)) {