summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/nouveau/nv04_surface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nv04_surface.c')
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_surface.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nv04_surface.c b/src/mesa/drivers/dri/nouveau/nv04_surface.c
index 522c94819c0..103453f1b9a 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_surface.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_surface.c
@@ -393,6 +393,15 @@ nv04_surface_copy(struct gl_context *ctx,
393 int dx, int dy, int sx, int sy, 393 int dx, int dy, int sx, int sy,
394 int w, int h) 394 int w, int h)
395{ 395{
396 if (_mesa_is_format_compressed(src->format)) {
397 sx = get_format_blocksx(src->format, sx);
398 sy = get_format_blocksy(src->format, sy);
399 dx = get_format_blocksx(dst->format, dx);
400 dy = get_format_blocksy(dst->format, dy);
401 w = get_format_blocksx(src->format, w);
402 h = get_format_blocksy(src->format, h);
403 }
404
396 /* Linear texture copy. */ 405 /* Linear texture copy. */
397 if ((src->layout == LINEAR && dst->layout == LINEAR) || 406 if ((src->layout == LINEAR && dst->layout == LINEAR) ||
398 dst->width <= 2 || dst->height <= 1) { 407 dst->width <= 2 || dst->height <= 1) {