summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-12-16 15:22:26 -0800
committerEric Anholt <eric@anholt.net>2009-12-22 14:20:26 -0800
commit0b87f143c466f7e5bd730895ee29f1cd20a68f9b (patch)
treebcba66a53e3f80aca37ece435e627582fdea1f6e /src/mesa/drivers/dri/i965/brw_wm_surface_state.c
parent1c96e85c9d6b8c636b0636f3320d1057ab5357b3 (diff)
intel: Replace IS_G4X() across the driver with context structure usage.
Saves ~2KB of code.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm_surface_state.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index 8335e5a650..8810f2a380 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -608,8 +608,7 @@ brw_update_renderbuffer_surface(struct brw_context *brw,
surf.ss1.base_addr = key.draw_offset - tile_offset;
- assert(BRW_IS_G4X(brw) || tile_offset == 0);
- if (BRW_IS_G4X(brw)) {
+ if (brw->has_surface_tile_offset) {
if (key.tiling == I915_TILING_X) {
/* Note that the low bits of these fields are missing, so
* there's the possibility of getting in trouble.
@@ -620,6 +619,8 @@ brw_update_renderbuffer_surface(struct brw_context *brw,
surf.ss5.x_offset = (tile_offset % 128) / key.cpp / 4;
surf.ss5.y_offset = tile_offset / 128 / 2;
}
+ } else {
+ assert(tile_offset == 0);
}
}
if (region_bo != NULL)