summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_state2.c
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2010-09-19 16:42:29 -0700
committerCorbin Simpson <[email protected]>2010-09-19 18:25:01 -0700
commit5f5bf25af5c4abeeb2f47f46e9efeeb4f8353b28 (patch)
treeb5ff3f123425fc1a648177e80a3b0c5e0d5b4c76 /src/gallium/drivers/r600/r600_state2.c
parent8d1ec80319bad197665f42b77786b94c3e9337f1 (diff)
r600g: Use align() instead of handrolled code.
Diffstat (limited to 'src/gallium/drivers/r600/r600_state2.c')
-rw-r--r--src/gallium/drivers/r600/r600_state2.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_state2.c b/src/gallium/drivers/r600/r600_state2.c
index 86c10a877dd..38fab4bbb6d 100644
--- a/src/gallium/drivers/r600/r600_state2.c
+++ b/src/gallium/drivers/r600/r600_state2.c
@@ -1218,8 +1218,7 @@ static struct pipe_sampler_view *r600_create_sampler_view(struct pipe_context *c
bo[1] = radeon_ws_bo_incref(rscreen->rw, tmp->uncompressed);
#endif
}
- pitch = (tmp->pitch[0] / tmp->bpt);
- pitch = (pitch + 0x7) & ~0x7;
+ pitch = align(tmp->pitch[0] / tmp->bpt, 8);
/* FIXME properly handle first level != 0 */
r600_pipe_state_add_reg(rstate, R600_GROUP_RESOURCE, R_038000_RESOURCE0_WORD0,