+
+enum pipe_error
+SVGA3D_vgpu10_ResolveCopy(struct svga_winsys_context *swc,
+ unsigned dstSubResource,
+ struct svga_winsys_surface *dst,
+ unsigned srcSubResource,
+ struct svga_winsys_surface *src,
+ const SVGA3dSurfaceFormat copyFormat)
+{
+ SVGA3dCmdDXResolveCopy *cmd =
+ SVGA3D_FIFOReserve(swc,
+ SVGA_3D_CMD_DX_RESOLVE_COPY,
+ sizeof(SVGA3dCmdDXResolveCopy),
+ 2); /* two relocations */
+ if (!cmd)
+ return PIPE_ERROR_OUT_OF_MEMORY;
+
+ cmd->dstSubResource = dstSubResource;
+ swc->surface_relocation(swc, &cmd->dstSid, NULL, dst, SVGA_RELOC_WRITE);
+ cmd->srcSubResource = srcSubResource;
+ swc->surface_relocation(swc, &cmd->srcSid, NULL, src, SVGA_RELOC_READ);
+ cmd->copyFormat = copyFormat;
+
+ swc->commit(swc);
+
+ return PIPE_OK;
+}