diff options
author | José Fonseca <[email protected]> | 2010-02-22 19:20:25 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2010-02-22 21:47:19 +0000 |
commit | 8ea7d8412c5c002b43824a5df5356cbe1a05ce20 (patch) | |
tree | d0928a31078566bd0608a2417f8103cd936ad20a /src/gallium/drivers/svga/svga_cmd.c | |
parent | 066fd70639a1681bfde0a8e1fb7fdca7897158e5 (diff) |
svga: Fix the guest offset of piecewise buffer DMAs.
It was being erroneously set equal to the host offset, but it should be
zero.
Diffstat (limited to 'src/gallium/drivers/svga/svga_cmd.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_cmd.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/svga/svga_cmd.c b/src/gallium/drivers/svga/svga_cmd.c index a0da7d7e5d5..04307d17fe0 100644 --- a/src/gallium/drivers/svga/svga_cmd.c +++ b/src/gallium/drivers/svga/svga_cmd.c @@ -478,7 +478,8 @@ SVGA3D_BufferDMA(struct svga_winsys_context *swc, struct svga_winsys_surface *host, SVGA3dTransferType transfer, // IN uint32 size, // IN - uint32 offset, // IN + uint32 guest_offset, // IN + uint32 host_offset, // IN SVGA3dSurfaceDMAFlags flags) // IN { SVGA3dCmdSurfaceDMA *cmd; @@ -517,19 +518,19 @@ SVGA3D_BufferDMA(struct svga_winsys_context *swc, cmd->transfer = transfer; box = (SVGA3dCopyBox *)&cmd[1]; - box->x = offset; + box->x = host_offset; box->y = 0; box->z = 0; box->w = size; box->h = 1; box->d = 1; - box->srcx = offset; + box->srcx = guest_offset; box->srcy = 0; box->srcz = 0; pSuffix = (SVGA3dCmdSurfaceDMASuffix *)((uint8_t*)cmd + sizeof *cmd + sizeof *box); pSuffix->suffixSize = sizeof *pSuffix; - pSuffix->maximumOffset = offset + size; + pSuffix->maximumOffset = guest_offset + size; pSuffix->flags = flags; swc->commit(swc); |