#include "svga_types.h"
+#include "svga_winsys.h"
#include "svga_reg.h"
#include "svga3d_reg.h"
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
enum pipe_error
SVGA3D_BeginDefineSurface(struct svga_winsys_context *swc,
struct svga_winsys_surface *sid,
- SVGA3dSurfaceFlags flags,
+ SVGA3dSurface1Flags flags,
SVGA3dSurfaceFormat format,
SVGA3dSurfaceFace **faces,
SVGA3dSize **mipSizes,
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,
uint32 offsetInBytes,
uint32 sizeInBytes);
+enum pipe_error
+SVGA3D_vgpu10_SetConstantBufferOffset(struct svga_winsys_context *swc,
+ unsigned command,
+ unsigned slot,
+ uint32 offsetInBytes);
+
enum pipe_error
SVGA3D_vgpu10_UpdateSubResource(struct svga_winsys_context *swc,
struct svga_winsys_surface *surface,
enum pipe_error
SVGA3D_vgpu10_GenMips(struct svga_winsys_context *swc,
- const SVGA3dShaderResourceViewId shaderResourceViewId,
+ SVGA3dShaderResourceViewId shaderResourceViewId,
struct svga_winsys_surface *view);
enum pipe_error
struct svga_winsys_surface *src,
struct svga_winsys_surface *dst,
unsigned srcx, unsigned dstx, unsigned width);
+
+enum pipe_error
+SVGA3D_vgpu10_TransferFromBuffer(struct svga_winsys_context *swc,
+ struct svga_winsys_surface *src,
+ unsigned srcOffset, unsigned srcPitch,
+ unsigned srcSlicePitch,
+ struct svga_winsys_surface *dst,
+ unsigned dstSubResource,
+ SVGA3dBox *dstBox);
+
+/*Cap2 commands*/
+enum pipe_error
+SVGA3D_vgpu10_IntraSurfaceCopy(struct svga_winsys_context *swc,
+ struct svga_winsys_surface *src,
+ unsigned level, unsigned face,
+ const SVGA3dCopyBox *box);
+
+enum pipe_error
+SVGA3D_vgpu10_ResolveCopy(struct svga_winsys_context *swc,
+ unsigned dstSubResource,
+ struct svga_winsys_surface *dst,
+ unsigned srcSubResource,
+ struct svga_winsys_surface *src,
+ const SVGA3dSurfaceFormat copyFormat);
+
+enum pipe_error
+SVGA3D_sm5_DrawIndexedInstancedIndirect(struct svga_winsys_context *swc,
+ struct svga_winsys_surface *argBuffer,
+ unsigned argOffset);
+
+enum pipe_error
+SVGA3D_sm5_DrawInstancedIndirect(struct svga_winsys_context *swc,
+ struct svga_winsys_surface *argBuffer,
+ unsigned argOffset);
+
+enum pipe_error
+SVGA3D_sm5_Dispatch(struct svga_winsys_context *swc,
+ const uint32 threadGroupCount[3]);
+
+enum pipe_error
+SVGA3D_sm5_DispatchIndirect(struct svga_winsys_context *swc,
+ struct svga_winsys_surface *argBuffer,
+ uint32 argOffset);
+
+enum pipe_error
+SVGA3D_sm5_DefineAndBindStreamOutput(struct svga_winsys_context *swc,
+ SVGA3dStreamOutputId soid,
+ uint32 numOutputStreamEntries,
+ uint32 numOutputStreamStrides,
+ uint32 streamOutputStrideInBytes[SVGA3D_DX_MAX_SOTARGETS],
+ struct svga_winsys_buffer *declBuf,
+ uint32 rasterizedStream,
+ uint32 sizeInBytes);
+
#endif /* __SVGA3D_H__ */