radeonsi: set a better NUM_PATCHES hard limit
[mesa.git] / src / gallium / drivers / svga / svga_cmd.h
index 26e4690e649f86ff6c88c8f214bba25b74985edf..ab4df5047edd9a37409efb14289e5615400dcab3 100644 (file)
@@ -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
@@ -279,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,
@@ -640,6 +664,22 @@ SVGA3D_vgpu10_UpdateSubResource(struct svga_winsys_context *swc,
 
 enum pipe_error
 SVGA3D_vgpu10_GenMips(struct svga_winsys_context *swc,
-                      const SVGA3dShaderResourceViewId shaderResourceViewId,
+                      SVGA3dShaderResourceViewId shaderResourceViewId,
                       struct svga_winsys_surface *view);
+
+enum pipe_error
+SVGA3D_vgpu10_BufferCopy(struct svga_winsys_context *swc,
+                         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);
+
 #endif /* __SVGA3D_H__ */