nouveau: init scaled_image_from_memory object for swizzled surface upload
authorPatrice Mandin <pmandin@caramail.com>
Sun, 21 Sep 2008 12:12:04 +0000 (14:12 +0200)
committerPatrice Mandin <pmandin@caramail.com>
Sun, 21 Sep 2008 12:12:04 +0000 (14:12 +0200)
src/gallium/winsys/drm/nouveau/nv04_surface.c

index 8fa3d106c8c8392cfc014677e8b328909a6f03cf..36c913a7329648603138c81085bae6834133ab8a 100644 (file)
@@ -298,6 +298,22 @@ nouveau_surface_channel_create_nv04(struct nouveau_channel_context *nvc)
        }
 
        BIND_RING (chan, nvc->NvSIFM, nvc->next_subchannel++);
+       BEGIN_RING(chan, nvc->NvSIFM, NV04_SCALED_IMAGE_FROM_MEMORY_DMA_NOTIFY, 1);
+       OUT_RING  (chan, 0);
+       BEGIN_RING(chan, nvc->NvSIFM, NV04_SCALED_IMAGE_FROM_MEMORY_DMA_IMAGE, 1);
+       OUT_RING  (chan, nvc->channel->vram->handle);
+       BEGIN_RING(chan, nvc->NvSIFM, NV04_SCALED_IMAGE_FROM_MEMORY_SURFACE, 1);
+       OUT_RING  (chan, nvc->NvSwzSurf);
+       BEGIN_RING(chan, nvc->NvSIFM, NV04_SCALED_IMAGE_FROM_MEMORY_PATTERN, 1);
+       OUT_RING  (chan, 0);
+       BEGIN_RING(chan, nvc->NvSIFM, NV04_SCALED_IMAGE_FROM_MEMORY_ROP, 1);
+       OUT_RING  (chan, 0);
+       BEGIN_RING(chan, nvc->NvSIFM, NV04_SCALED_IMAGE_FROM_MEMORY_BETA1, 1);
+       OUT_RING  (chan, 0);
+       BEGIN_RING(chan, nvc->NvSIFM, NV04_SCALED_IMAGE_FROM_MEMORY_BETA4, 1);
+       OUT_RING  (chan, 0);
+       BEGIN_RING(chan, nvc->NvSIFM, NV04_SCALED_IMAGE_FROM_MEMORY_OPERATION, 1);
+       OUT_RING  (chan, NV04_SCALED_IMAGE_FROM_MEMORY_OPERATION_SRCCOPY);
 
        return 0;
 }