r600g: fixup evergreen miptree setup.
authorDave Airlie <airlied@redhat.com>
Tue, 21 Sep 2010 09:57:15 +0000 (19:57 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 21 Sep 2010 10:53:09 +0000 (20:53 +1000)
eg seems to have a higher pitch aligmment requirement and uses r700 cube setup

this fixes a couple of piglit tests here.

src/gallium/drivers/r600/r600_texture.c

index abfe406402a5806616e0bf6342fe92fb19f5510f..f60fe9f3169044b8f11ac0fa3063523611a0d085 100644 (file)
@@ -84,10 +84,13 @@ static void r600_setup_miptree(struct r600_resource_texture *rtex, enum chip_cla
                h = u_minify(ptex->height0, i);
                h = util_next_power_of_two(h);
                pitch = util_format_get_stride(ptex->format, align(w, 64));
-               pitch = align(pitch, 256);
+               if (chipc == EVERGREEN)
+                       pitch = align(pitch, 512);
+               else
+                       pitch = align(pitch, 256);
                layer_size = pitch * h;
                if (ptex->target == PIPE_TEXTURE_CUBE) {
-                       if (chipc == R700)
+                       if (chipc >= R700)
                                size = layer_size * 8;
                        else
                                size = layer_size * 6;