aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/gen8_surface_state.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-01-13 09:50:37 -0800
committerJason Ekstrand <[email protected]>2015-01-22 10:21:07 -0800
commit117a1d69de84c6cb7d895ce7e157f434facde7c9 (patch)
tree25c0f383435cedb7e55356f59d4015119d336856 /src/mesa/drivers/dri/i965/gen8_surface_state.c
parent404660e3c7bc6d13ae1d40185a02bfff6b956ac9 (diff)
i965: Apply the miptree offset to surface state for renderbuffers
Previously, we were completely ignoring the mt->offset field for renderbuffers. While it does have some alignment constraints, it is valid to use it. This patch adds the code to each of the 4 surface state setup functions to handle it. Reviewed-by: Neil Roberts <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen8_surface_state.c')
-rw-r--r--src/mesa/drivers/dri/i965/gen8_surface_state.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/gen8_surface_state.c b/src/mesa/drivers/dri/i965/gen8_surface_state.c
index d1b095cf535..45c35db0a4d 100644
--- a/src/mesa/drivers/dri/i965/gen8_surface_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_surface_state.c
@@ -432,7 +432,8 @@ gen8_update_renderbuffer_surface(struct brw_context *brw,
SET_FIELD(HSW_SCS_BLUE, GEN7_SURFACE_SCS_B) |
SET_FIELD(HSW_SCS_ALPHA, GEN7_SURFACE_SCS_A);
- *((uint64_t *) &surf[8]) = mt->bo->offset64; /* reloc */
+ assert(mt->offset % mt->cpp == 0);
+ *((uint64_t *) &surf[8]) = mt->bo->offset64 + mt->offset; /* reloc */
if (aux_mt) {
*((uint64_t *) &surf[10]) = aux_mt->bo->offset64;