r600g: set the virtual address for the htile buffer
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Jan 2013 20:21:46 +0000 (15:21 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Jan 2013 20:21:46 +0000 (15:21 -0500)
Fixes cayman and TN with htile enabled.  Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=59089
https://bugs.freedesktop.org/show_bug.cgi?id=58667
Possibly others.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_state.c

index 032af78c1f1197da62fb7891cb27c9e7924b2eb6..7635f86721069cfae80f587f9a7c20a9f5e050bc 100644 (file)
@@ -1548,8 +1548,9 @@ static void evergreen_init_depth_surface(struct r600_context *rctx,
        surf->htile_enabled = 0;
        /* use htile only for first level */
        if (rtex->htile && !level) {
+               uint64_t va = r600_resource_va(rctx->screen, rtex->htile);
                surf->htile_enabled = 1;
-               surf->db_htile_data_base = 0;
+               surf->db_htile_data_base = va >> 8;
                surf->db_htile_surface = S_028ABC_HTILE_WIDTH(1) |
                                        S_028ABC_HTILE_HEIGHT(1) |
                                        S_028ABC_LINEAR(1);
index ef4edca807ab3abd3f7166d0fceee9f3a58307a1..0cfc4e4ee685b690de56dc5b541990c3d20c1ca9 100644 (file)
@@ -1443,8 +1443,9 @@ static void r600_init_depth_surface(struct r600_context *rctx,
        surf->htile_enabled = 0;
        /* use htile only for first level */
        if (rtex->htile && !level) {
+               uint64_t va = r600_resource_va(rctx->screen, rtex->htile);
                surf->htile_enabled = 1;
-               surf->db_htile_data_base = 0;
+               surf->db_htile_data_base = va >> 8;
                surf->db_htile_surface = S_028D24_HTILE_WIDTH(1) |
                                        S_028D24_HTILE_HEIGHT(1) |
                                        S_028D24_LINEAR(1);