radeonsi: Untiled textures are linear aligned, not linear general.
authorMichel Dänzer <michel.daenzer@amd.com>
Wed, 29 Aug 2012 10:11:04 +0000 (12:11 +0200)
committerMichel Dänzer <michel@daenzer.net>
Thu, 6 Sep 2012 13:38:45 +0000 (15:38 +0200)
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/drivers/radeonsi/r600_texture.c

index 5b831fdbfce59ae07b8f78f3508b82e17e4c2fe9..0b908c8898d9fd885b738bef05571e468c478a05 100644 (file)
@@ -523,7 +523,7 @@ struct pipe_resource *si_texture_create(struct pipe_screen *screen,
 {
        struct r600_screen *rscreen = (struct r600_screen*)screen;
        struct radeon_surface surface;
-       unsigned array_mode = 0;
+       unsigned array_mode = V_009910_ARRAY_LINEAR_ALIGNED;
        int r;
 
 #if 0
@@ -589,7 +589,7 @@ struct pipe_resource *si_texture_from_handle(struct pipe_screen *screen,
        struct r600_screen *rscreen = (struct r600_screen*)screen;
        struct pb_buffer *buf = NULL;
        unsigned stride = 0;
-       unsigned array_mode = 0;
+       unsigned array_mode = V_009910_ARRAY_LINEAR_ALIGNED;
        enum radeon_bo_layout micro, macro;
        struct radeon_surface surface;
        int r;
@@ -614,7 +614,7 @@ struct pipe_resource *si_texture_from_handle(struct pipe_screen *screen,
        else if (micro == RADEON_LAYOUT_TILED)
                array_mode = V_009910_ARRAY_1D_TILED_THIN1;
        else
-               array_mode = 0;
+               array_mode = V_009910_ARRAY_LINEAR_ALIGNED;
 
        r = r600_init_surface(&surface, templ, array_mode);
        if (r) {