st/dri: Refactor dri_st_api into other files
[mesa.git] / src / gallium / state_trackers / dri / common / dri_drawable.h
index 98abeb9ec052a56bb617e7e30a13865c21ee7eb1..5fd650ac88ec3d1436065c7050afc06331086809 100644 (file)
@@ -42,20 +42,19 @@ struct dri_context;
 
 struct dri_drawable
 {
+   struct st_framebuffer_iface base;
+   struct st_visual stvis;
+
    /* dri */
    __DRIdrawable *dPriv;
    __DRIscreen *sPriv;
 
-   /* gallium */
-   struct st_framebuffer_iface *stfb;
-   struct st_visual stvis;
-
    __DRIbuffer old[8];
    unsigned old_num;
    unsigned old_w;
    unsigned old_h;
 
-   struct pipe_texture *textures[ST_ATTACHMENT_COUNT];
+   struct pipe_resource *textures[ST_ATTACHMENT_COUNT];
    unsigned int texture_mask, texture_stamp;
 
    struct pipe_fence_handle *swap_fences[DRI_SWAP_FENCES_MAX];
@@ -84,6 +83,16 @@ dri_create_buffer(__DRIscreen * sPriv,
 
 void dri_destroy_buffer(__DRIdrawable * dPriv);
 
+void
+dri_drawable_get_format(struct dri_drawable *drawable,
+                        enum st_attachment_type statt,
+                        enum pipe_format *format,
+                        unsigned *bind);
+
+void
+dri_drawable_validate_att(struct dri_drawable *drawable,
+                          enum st_attachment_type statt);
+
 #endif
 
 /* vim: set sw=3 ts=8 sts=3 expandtab: */