diff options
author | Charmaine Lee <[email protected]> | 2016-03-02 09:31:58 -0800 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-11-03 14:29:22 -0600 |
commit | 76f5f76468225a540c31877bf11fa11d0dcf3225 (patch) | |
tree | 934e8a7f38b145ad9500e399e8e335a105a3c3f8 /src/gallium/drivers/svga | |
parent | f3d387867f74ae758b41168f23992671f7dce254 (diff) |
svga: add SVGA_3D_CMD_INVALIDATE_GB_SURFACE support
This command will be used in a subsequent patch to invalidate a surface.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r-- | src/gallium/drivers/svga/svga_cmd.c | 18 | ||||
-rw-r--r-- | src/gallium/drivers/svga/svga_cmd.h | 4 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_cmd.c b/src/gallium/drivers/svga/svga_cmd.c index ecf2e9d2ca0..7b78cb73547 100644 --- a/src/gallium/drivers/svga/svga_cmd.c +++ b/src/gallium/drivers/svga/svga_cmd.c @@ -1870,6 +1870,24 @@ SVGA3D_InvalidateGBImagePartial(struct svga_winsys_context *swc, return PIPE_OK; } +enum pipe_error +SVGA3D_InvalidateGBSurface(struct svga_winsys_context *swc, + struct svga_winsys_surface *surface) +{ + SVGA3dCmdInvalidateGBSurface *cmd = + SVGA3D_FIFOReserve(swc, + SVGA_3D_CMD_INVALIDATE_GB_SURFACE, + sizeof *cmd, + 1); /* one relocation */ + if (!cmd) + return PIPE_ERROR_OUT_OF_MEMORY; + + swc->surface_relocation(swc, &cmd->sid, NULL, surface, + SVGA_RELOC_READ | SVGA_RELOC_INTERNAL); + swc->commit(swc); + + return PIPE_OK; +} enum pipe_error SVGA3D_SetGBShaderConstsInline(struct svga_winsys_context *swc, diff --git a/src/gallium/drivers/svga/svga_cmd.h b/src/gallium/drivers/svga/svga_cmd.h index db0f8908e5d..cd2cb6509ea 100644 --- a/src/gallium/drivers/svga/svga_cmd.h +++ b/src/gallium/drivers/svga/svga_cmd.h @@ -299,6 +299,10 @@ SVGA3D_InvalidateGBImagePartial(struct svga_winsys_context *swc, const SVGA3dBox *box, bool invertBox); +enum pipe_error +SVGA3D_InvalidateGBSurface(struct svga_winsys_context *swc, + struct svga_winsys_surface *surface); + enum pipe_error SVGA3D_SetGBShaderConstsInline(struct svga_winsys_context *swc, |