Squashed commit of the following:
[mesa.git] / src / gallium / state_trackers / xorg / xorg_exa.h
index fe1f1cd103c4260f872e080b781511092aa644a1..a35e9a5c9012d6d27fdbb7e4d0fe2abfeea90501 100644 (file)
@@ -16,42 +16,64 @@ struct exa_context
    ExaDriverPtr pExa;
    struct pipe_context *pipe;
    struct pipe_screen *scrn;
-   struct cso_context *cso;
-   struct xorg_shaders *shaders;
+   struct xorg_renderer *renderer;
 
-   struct pipe_constant_buffer vs_const_buffer;
-   struct pipe_constant_buffer fs_const_buffer;
-
-   struct pipe_texture *bound_textures[MAX_EXA_SAMPLERS];
+   struct pipe_sampler_view *bound_sampler_views[MAX_EXA_SAMPLERS];
    int num_bound_samplers;
 
    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;
-   } copy;
 
-   /* we should combine these two */
-   float vertices2[4][2][4];
-   float vertices3[4][3][4];
+      struct pipe_surface *src_surface;
+      struct pipe_surface *dst_surface;
+
+      struct pipe_resource *src_texture;
+   } copy;
 };
 
 struct exa_pixmap_priv
 {
+   int width, height;
+
    int flags;
    int tex_flags;
 
-   struct pipe_texture *tex;
-   struct pipe_texture *depth_stencil_tex;
+   int picture_format;
+
+   struct pipe_resource *tex;
+   struct pipe_resource *depth_stencil_tex;
 
    struct pipe_transfer *map_transfer;
    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);