Module: Mesa
Branch: master
Commit: 4332f6fc185f968e7563e748b8c949021937c935
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4332f6fc185f968e7563e748b8c949021937c935

Author: Alex Deucher <[email protected]>
Date:   Mon Jan  7 15:21:46 2013 -0500

r600g: set the virtual address for the htile buffer

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 <[email protected]>

---

 src/gallium/drivers/r600/evergreen_state.c |    3 ++-
 src/gallium/drivers/r600/r600_state.c      |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/r600/evergreen_state.c 
b/src/gallium/drivers/r600/evergreen_state.c
index 032af78..7635f86 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -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);
diff --git a/src/gallium/drivers/r600/r600_state.c 
b/src/gallium/drivers/r600/r600_state.c
index ef4edca..0cfc4e4 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -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);

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to