diff options
Diffstat (limited to 'src/gallium/drivers/svga/svga_cmd.h')
-rw-r--r-- | src/gallium/drivers/svga/svga_cmd.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_cmd.h b/src/gallium/drivers/svga/svga_cmd.h index 06e1b4a3253..47a33ec3932 100644 --- a/src/gallium/drivers/svga/svga_cmd.h +++ b/src/gallium/drivers/svga/svga_cmd.h @@ -35,6 +35,7 @@ #include "svga_types.h" +#include "svga_winsys.h" #include "svga_reg.h" #include "svga3d_reg.h" @@ -60,6 +61,25 @@ SVGA3D_FIFOReserve(struct svga_winsys_context *swc, uint32 cmd, uint32 cmdSize, void SVGA_FIFOCommitAll(struct svga_winsys_context *swc); +/** + * Return the last command id put in the command buffer. + */ +static inline SVGAFifo3dCmdId +SVGA3D_GetLastCommand(const struct svga_winsys_context *swc) +{ + return swc->last_command; +} + +/** + * Reset/clear the last command put in the command buffer. + * To be called when buffer is flushed. + */ +static inline void +SVGA3D_ResetLastCommand(struct svga_winsys_context *swc) +{ + swc->last_command = 0; +} + /* * Context Management |