diff options
author | Younes Manton <[email protected]> | 2008-12-02 16:12:49 -0500 |
---|---|---|
committer | Younes Manton <[email protected]> | 2008-12-02 16:15:13 -0500 |
commit | 4371a24c320f3d26f07effa0c3e862078762c942 (patch) | |
tree | df7288893407c18509ccf064b2d2702f668a7bf9 /src/gallium/winsys/drm | |
parent | 25eee19cd6e13b6682f4078681a367849c4a0fd5 (diff) |
nouveau: Calc pitch for swizzled textures appropriately.
Diffstat (limited to 'src/gallium/winsys/drm')
-rw-r--r-- | src/gallium/winsys/drm/nouveau/nv04_surface.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/winsys/drm/nouveau/nv04_surface.c b/src/gallium/winsys/drm/nouveau/nv04_surface.c index 11786202400..68338eb814a 100644 --- a/src/gallium/winsys/drm/nouveau/nv04_surface.c +++ b/src/gallium/winsys/drm/nouveau/nv04_surface.c @@ -84,12 +84,15 @@ nv04_scaled_image_format(enum pipe_format format) static void nv04_surface_copy_swizzle(struct nouveau_context *nv, unsigned dx, unsigned dy, - unsigned sx, unsigned sy, unsigned w, unsigned h) + unsigned sx, unsigned sy, unsigned w, unsigned h) { struct nouveau_channel *chan = nv->nvc->channel; struct pipe_surface *dst = nv->surf_dst; struct pipe_surface *src = nv->surf_src; + /* POT or GTFO */ + assert(!(w & (w - 1)) && !(h & (h - 1))); + BEGIN_RING(chan, nv->nvc->NvSwzSurf, NV04_SWIZZLED_SURFACE_DMA_IMAGE, 1); OUT_RELOCo(chan, nouveau_buffer(dst->buffer)->bo, NOUVEAU_BO_GART | NOUVEAU_BO_VRAM | NOUVEAU_BO_WR); |