X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fsvga%2Fsvga_cmd_vgpu10.c;h=30e174a754affe14ad7b51e1d8271de670ee7695;hb=ba37d408da30d87b6848d76242d9d797dbef80a0;hp=eb5a482d9ba0360ed0e304138785d6b6c2e365e7;hpb=ccb4ea5a43e89fcc93fff98c881639223f1538e5;p=mesa.git diff --git a/src/gallium/drivers/svga/svga_cmd_vgpu10.c b/src/gallium/drivers/svga/svga_cmd_vgpu10.c index eb5a482d9ba..30e174a754a 100644 --- a/src/gallium/drivers/svga/svga_cmd_vgpu10.c +++ b/src/gallium/drivers/svga/svga_cmd_vgpu10.c @@ -1264,6 +1264,31 @@ SVGA3D_vgpu10_SetSingleConstantBuffer(struct svga_winsys_context *swc, } +enum pipe_error +SVGA3D_vgpu10_SetConstantBufferOffset(struct svga_winsys_context *swc, + unsigned command, + unsigned slot, + uint32 offsetInBytes) +{ + SVGA3dCmdDXSetConstantBufferOffset *cmd; + + assert(offsetInBytes % 256 == 0); + + cmd = SVGA3D_FIFOReserve(swc, command, + sizeof(SVGA3dCmdDXSetConstantBufferOffset), + 0); /* one relocation */ + if (!cmd) + return PIPE_ERROR_OUT_OF_MEMORY; + + cmd->slot = slot; + cmd->offsetInBytes = offsetInBytes; + + swc->commit(swc); + + return PIPE_OK; +} + + enum pipe_error SVGA3D_vgpu10_ReadbackSubResource(struct svga_winsys_context *swc, struct svga_winsys_surface *surface,