diff options
Diffstat (limited to 'src/gallium/drivers/svga/svga_cmd.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_cmd.c | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/src/gallium/drivers/svga/svga_cmd.c b/src/gallium/drivers/svga/svga_cmd.c index 04307d17fe..7b2dfe2549 100644 --- a/src/gallium/drivers/svga/svga_cmd.c +++ b/src/gallium/drivers/svga/svga_cmd.c @@ -31,8 +31,9 @@ */ #include "svga_winsys.h" -#include "svga_screen_buffer.h" -#include "svga_screen_texture.h" +#include "svga_resource_buffer.h" +#include "svga_resource_texture.h" +#include "svga_surface.h" #include "svga_cmd.h" /* @@ -279,7 +280,7 @@ SVGA3D_BeginDefineSurface(struct svga_winsys_context *swc, if(!cmd) return PIPE_ERROR_OUT_OF_MEMORY; - swc->surface_relocation(swc, &cmd->sid, sid, PIPE_BUFFER_USAGE_GPU_WRITE); + swc->surface_relocation(swc, &cmd->sid, sid, SVGA_RELOC_WRITE); cmd->surfaceFlags = flags; cmd->format = format; @@ -365,7 +366,7 @@ SVGA3D_DestroySurface(struct svga_winsys_context *swc, if(!cmd) return PIPE_ERROR_OUT_OF_MEMORY; - swc->surface_relocation(swc, &cmd->sid, sid, PIPE_BUFFER_USAGE_GPU_READ); + swc->surface_relocation(swc, &cmd->sid, sid, SVGA_RELOC_READ); swc->commit(swc);; return PIPE_OK; @@ -423,7 +424,7 @@ SVGA3D_SurfaceDMA(struct svga_winsys_context *swc, const SVGA3dCopyBox *boxes, // IN uint32 numBoxes) // IN { - struct svga_texture *texture = svga_texture(st->base.texture); + struct svga_texture *texture = svga_texture(st->base.resource); SVGA3dCmdSurfaceDMA *cmd; SVGA3dCmdSurfaceDMASuffix *pSuffix; uint32 boxesSize = sizeof *boxes * numBoxes; @@ -431,12 +432,12 @@ SVGA3D_SurfaceDMA(struct svga_winsys_context *swc, unsigned surface_flags; if(transfer == SVGA3D_WRITE_HOST_VRAM) { - region_flags = PIPE_BUFFER_USAGE_GPU_READ; - surface_flags = PIPE_BUFFER_USAGE_GPU_WRITE; + region_flags = SVGA_RELOC_READ; + surface_flags = SVGA_RELOC_WRITE; } else if(transfer == SVGA3D_READ_HOST_VRAM) { - region_flags = PIPE_BUFFER_USAGE_GPU_WRITE; - surface_flags = PIPE_BUFFER_USAGE_GPU_READ; + region_flags = SVGA_RELOC_WRITE; + surface_flags = SVGA_RELOC_READ; } else { assert(0); @@ -454,8 +455,8 @@ SVGA3D_SurfaceDMA(struct svga_winsys_context *swc, cmd->guest.pitch = st->base.stride; swc->surface_relocation(swc, &cmd->host.sid, texture->handle, surface_flags); - cmd->host.face = st->base.face; /* PIPE_TEX_FACE_* and SVGA3D_CUBEFACE_* match */ - cmd->host.mipmap = st->base.level; + cmd->host.face = st->base.sr.face; /* PIPE_TEX_FACE_* and SVGA3D_CUBEFACE_* match */ + cmd->host.mipmap = st->base.sr.level; cmd->transfer = transfer; @@ -489,12 +490,12 @@ SVGA3D_BufferDMA(struct svga_winsys_context *swc, unsigned surface_flags; if(transfer == SVGA3D_WRITE_HOST_VRAM) { - region_flags = PIPE_BUFFER_USAGE_GPU_READ; - surface_flags = PIPE_BUFFER_USAGE_GPU_WRITE; + region_flags = SVGA_RELOC_READ; + surface_flags = SVGA_RELOC_WRITE; } else if(transfer == SVGA3D_READ_HOST_VRAM) { - region_flags = PIPE_BUFFER_USAGE_GPU_WRITE; - surface_flags = PIPE_BUFFER_USAGE_GPU_READ; + region_flags = SVGA_RELOC_WRITE; + surface_flags = SVGA_RELOC_READ; } else { assert(0); @@ -584,7 +585,7 @@ SVGA3D_SetRenderTarget(struct svga_winsys_context *swc, cmd->type = type; - surface_to_surfaceid(swc, surface, &cmd->target, PIPE_BUFFER_USAGE_GPU_WRITE); + surface_to_surfaceid(swc, surface, &cmd->target, SVGA_RELOC_WRITE); swc->commit(swc); @@ -1000,8 +1001,8 @@ SVGA3D_BeginSurfaceCopy(struct svga_winsys_context *swc, if(!cmd) return PIPE_ERROR_OUT_OF_MEMORY; - surface_to_surfaceid(swc, src, &cmd->src, PIPE_BUFFER_USAGE_GPU_READ); - surface_to_surfaceid(swc, dest, &cmd->dest, PIPE_BUFFER_USAGE_GPU_WRITE); + surface_to_surfaceid(swc, src, &cmd->src, SVGA_RELOC_READ); + surface_to_surfaceid(swc, dest, &cmd->dest, SVGA_RELOC_WRITE); *boxes = (SVGA3dCopyBox*) &cmd[1]; memset(*boxes, 0, boxesSize); @@ -1043,8 +1044,8 @@ SVGA3D_SurfaceStretchBlt(struct svga_winsys_context *swc, if(!cmd) return PIPE_ERROR_OUT_OF_MEMORY; - surface_to_surfaceid(swc, src, &cmd->src, PIPE_BUFFER_USAGE_GPU_READ); - surface_to_surfaceid(swc, dest, &cmd->dest, PIPE_BUFFER_USAGE_GPU_WRITE); + surface_to_surfaceid(swc, src, &cmd->src, SVGA_RELOC_READ); + surface_to_surfaceid(swc, dest, &cmd->dest, SVGA_RELOC_WRITE); cmd->boxSrc = *boxSrc; cmd->boxDest = *boxDest; cmd->mode = mode; @@ -1373,7 +1374,7 @@ SVGA3D_EndQuery(struct svga_winsys_context *swc, cmd->type = type; swc->region_relocation(swc, &cmd->guestResult, buffer, 0, - PIPE_BUFFER_USAGE_GPU_WRITE); + SVGA_RELOC_WRITE); swc->commit(swc); @@ -1420,7 +1421,7 @@ SVGA3D_WaitForQuery(struct svga_winsys_context *swc, cmd->type = type; swc->region_relocation(swc, &cmd->guestResult, buffer, 0, - PIPE_BUFFER_USAGE_GPU_WRITE); + SVGA_RELOC_WRITE); swc->commit(swc); |