unsigned dstSubResource,
SVGA3dBox *dstBox);
+/*Cap2 commands*/
+enum pipe_error
+SVGA3D_vgpu10_IntraSurfaceCopy(struct svga_winsys_context *swc,
+ struct svga_winsys_surface *src,
+ unsigned level, unsigned face,
+ const SVGA3dCopyBox *box);
+
+
#endif /* __SVGA3D_H__ */
swc->commit(swc);
return PIPE_OK;
}
+
+enum pipe_error
+SVGA3D_vgpu10_IntraSurfaceCopy(struct svga_winsys_context *swc,
+ struct svga_winsys_surface *surface,
+ unsigned level, unsigned face,
+ const SVGA3dCopyBox *box)
+{
+ SVGA3dCmdIntraSurfaceCopy *cmd =
+ SVGA3D_FIFOReserve(swc,
+ SVGA_3D_CMD_INTRA_SURFACE_COPY,
+ sizeof(SVGA3dCmdIntraSurfaceCopy),
+ 1); /* one relocation */
+ if (!cmd)
+ return PIPE_ERROR_OUT_OF_MEMORY;
+
+ swc->surface_relocation(swc, &cmd->surface.sid, NULL, surface, SVGA_RELOC_READ | SVGA_RELOC_WRITE);
+ cmd->surface.face = face;
+ cmd->surface.mipmap = level;
+ cmd->box = *box;
+
+ swc->commit(swc);
+
+ return PIPE_OK;
+}
dump_SVGA3dBox(&cmd->destBox);
}
+static void
+dump_SVGA3dCmdIntraSurfaceCopy(const SVGA3dCmdIntraSurfaceCopy *cmd)
+{
+ SVGA3D_DUMP_PARAMETER(surface.sid, u);
+ SVGA3D_DUMP_PARAMETER(surface.face, u);
+ SVGA3D_DUMP_PARAMETER(surface.mipmap, u);
+ dump_SVGA3dCopyBox(&cmd->box);
+}
+
static void
dump_SVGA3dCmdInvalidateGBSurface(const SVGA3dCmdInvalidateGBSurface *cmd)
{
body = (const uint8_t *)&cmd[1];
}
break;
+ case SVGA_3D_CMD_INTRA_SURFACE_COPY:
+ _debug_printf("\tSVGA_3D_CMD_INTRA_SURFACE_COPY\n");
+ {
+ const SVGA3dCmdIntraSurfaceCopy *cmd = (const SVGA3dCmdIntraSurfaceCopy *)body;
+ dump_SVGA3dCmdIntraSurfaceCopy(cmd);
+ body = (const uint8_t *)&cmd[1];
+ }
+ break;
default:
_debug_printf("\t0x%08x\n", cmd_id);
break;