python: Fix up state tracker for sw api.
[mesa.git] / src / gallium / state_trackers / xorg / xorg_exa.h
index 43949b04a444ecfe4215ee3772b315efcbf62934..f2cefe23b99df79aafe6728d124bf6ffc2a0b167 100644 (file)
@@ -16,11 +16,7 @@ struct exa_context
    ExaDriverPtr pExa;
    struct pipe_context *pipe;
    struct pipe_screen *scrn;
-   struct cso_context *cso;
-   struct xorg_shaders *shaders;
-
-   struct pipe_constant_buffer vs_const_buffer;
-   struct pipe_constant_buffer fs_const_buffer;
+   struct xorg_renderer *renderer;
 
    struct pipe_texture *bound_textures[MAX_EXA_SAMPLERS];
    int num_bound_samplers;
@@ -28,18 +24,38 @@ struct exa_context
    float solid_color[4];
    boolean has_solid_color;
 
+   boolean accel;
+
+   /* float[9] projective matrix bound to pictures */
+   struct {
+      float    src[9];
+      float   mask[9];
+      boolean has_src;
+      boolean has_mask;
+   } transform;
+
    struct {
+      boolean use_surface_copy;
+
       struct exa_pixmap_priv *src;
       struct exa_pixmap_priv *dst;
+
+      struct pipe_surface *src_surface;
+      struct pipe_surface *dst_surface;
+
+      struct pipe_texture *src_texture;
    } copy;
 };
 
-
 struct exa_pixmap_priv
 {
+   int width, height;
+
    int flags;
    int tex_flags;
 
+   int picture_format;
+
    struct pipe_texture *tex;
    struct pipe_texture *depth_stencil_tex;
 
@@ -47,8 +63,17 @@ struct exa_pixmap_priv
    unsigned map_count;
 };
 
+#define XORG_FALLBACK(s, arg...)                              \
+do {                                                          \
+   if (ms->debug_fallback) {                                  \
+      xf86DrvMsg(pScrn->scrnIndex, X_INFO,                    \
+                 "%s fallback " s "\n", __FUNCTION__, ##arg); \
+   }                                                          \
+   return FALSE;                                              \
+} while(0)
+
 struct pipe_surface *
-exa_gpu_surface(struct exa_context *exa, struct exa_pixmap_priv *priv);
+xorg_gpu_surface(struct pipe_screen *scrn, struct exa_pixmap_priv *priv);
 
 void xorg_exa_flush(struct exa_context *exa, uint pipeFlushFlags,
                     struct pipe_fence_handle **fence);