radeonsi: convert stencil ref state into an atom
[mesa.git] / src / gallium / drivers / svga / svga_cmd.h
index 0e568d78e657c520e4ce1b3b87c348d8c678d492..6f658bf3abfe287c64f7787d1cd3e5b3b4dd9588 100644 (file)
@@ -46,6 +46,7 @@ struct svga_transfer;
 struct svga_winsys_context;
 struct svga_winsys_buffer;
 struct svga_winsys_surface;
+struct svga_winsys_gb_shader;
 
 
 /*
@@ -102,7 +103,8 @@ SVGA3D_SurfaceDMA(struct svga_winsys_context *swc,
                   struct svga_transfer *st,
                   SVGA3dTransferType transfer,
                   const SVGA3dCopyBox *boxes,
-                  uint32 numBoxes);
+                  uint32 numBoxes,
+                  SVGA3dSurfaceDMAFlags flags);
 
 enum pipe_error
 SVGA3D_BufferDMA(struct svga_winsys_context *swc,
@@ -209,11 +211,104 @@ SVGA3D_SetShaderConst(struct svga_winsys_context *swc,
                       uint32 reg, SVGA3dShaderType type,
                       SVGA3dShaderConstType ctype, const void *value);
 
+enum pipe_error
+SVGA3D_SetShaderConsts(struct svga_winsys_context *swc,
+                       uint32 reg,
+                       uint32 numRegs,
+                       SVGA3dShaderType type,
+                       SVGA3dShaderConstType ctype,
+                       const void *values);
+
 enum pipe_error
 SVGA3D_SetShader(struct svga_winsys_context *swc,
                  SVGA3dShaderType type, uint32 shid);
 
 
+/*
+ * Guest-backed surface functions
+ */
+
+enum pipe_error
+SVGA3D_DefineGBShader(struct svga_winsys_context *swc,
+                      struct svga_winsys_gb_shader *gbshader,
+                      SVGA3dShaderType type,
+                      uint32 sizeInBytes);
+
+enum pipe_error
+SVGA3D_BindGBShader(struct svga_winsys_context *swc,
+                    struct svga_winsys_gb_shader *gbshader);
+
+enum pipe_error
+SVGA3D_SetGBShader(struct svga_winsys_context *swc,
+                   SVGA3dShaderType type,
+                   struct svga_winsys_gb_shader *gbshader);
+
+enum pipe_error
+SVGA3D_DestroyGBShader(struct svga_winsys_context *swc,
+                       struct svga_winsys_gb_shader *gbshader);
+
+enum pipe_error
+SVGA3D_BindGBSurface(struct svga_winsys_context *swc,
+                     struct svga_winsys_surface *surface);
+
+enum pipe_error
+SVGA3D_DefineGBContext(struct svga_winsys_context *swc);
+
+enum pipe_error
+SVGA3D_DestroyGBContext(struct svga_winsys_context *swc);
+
+enum pipe_error
+SVGA3D_BindGBContext(struct svga_winsys_context *swc);
+
+enum pipe_error
+SVGA3D_InvalidateGBContext(struct svga_winsys_context *swc);
+
+enum pipe_error
+SVGA3D_UpdateGBImage(struct svga_winsys_context *swc,
+                     struct svga_winsys_surface *surface,
+                     const SVGA3dBox *box,
+                     unsigned face, unsigned mipLevel);
+
+enum pipe_error
+SVGA3D_UpdateGBSurface(struct svga_winsys_context *swc,
+                       struct svga_winsys_surface *surface);
+
+
+enum pipe_error
+SVGA3D_ReadbackGBImage(struct svga_winsys_context *swc,
+                       struct svga_winsys_surface *surface,
+                       unsigned face, unsigned mipLevel);
+
+
+enum pipe_error
+SVGA3D_ReadbackGBSurface(struct svga_winsys_context *swc,
+                         struct svga_winsys_surface *surface);
+
+
+enum pipe_error
+SVGA3D_ReadbackGBImagePartial(struct svga_winsys_context *swc,
+                              struct svga_winsys_surface *surface,
+                              unsigned face, unsigned mipLevel,
+                              const SVGA3dBox *box,
+                              bool invertBox);
+
+
+enum pipe_error
+SVGA3D_InvalidateGBImagePartial(struct svga_winsys_context *swc,
+                                struct svga_winsys_surface *surface,
+                                unsigned face, unsigned mipLevel,
+                                const SVGA3dBox *box,
+                                bool invertBox);
+
+
+enum pipe_error
+SVGA3D_SetGBShaderConstsInline(struct svga_winsys_context *swc,
+                               unsigned regStart,
+                               unsigned numRegs,
+                               SVGA3dShaderType shaderType,
+                               SVGA3dShaderConstType constType,
+                               const void *values);
+
 /*
  * Queries
  */