Merge commit 'origin/gallium-winsys-handle-rebased'
[mesa.git] / src / mesa / drivers / dri / radeon / radeon_common_context.h
index 0309345393d8c4d82cebbb3e46f1702ed7744486..d1a24e265f2e14ba1561fe211ea9df3186c073eb 100644 (file)
@@ -92,7 +92,7 @@ struct radeon_renderbuffer
 
        GLuint pf_pending;  /**< sequence number of pending flip */
        GLuint vbl_pending;   /**< vblank sequence number of pending flip */
-       __DRIdrawablePrivate *dPriv;
+       __DRIdrawable *dPriv;
 };
 
 struct radeon_framebuffer
@@ -208,6 +208,10 @@ struct radeon_tex_obj {
         * and so on.
         */
        GLboolean validated;
+       /* Minimum LOD to be used during rendering */
+       unsigned minLod;
+       /* Miximum LOD to be used during rendering */
+       unsigned maxLod;
 
        GLuint override_offset;
        GLboolean image_override; /* Image overridden by GLX_EXT_tfp */
@@ -324,6 +328,7 @@ struct radeon_swtcl_info {
        GLuint vertex_attr_count;
 
        GLuint emit_prediction;
+        struct radeon_bo *bo;
 };
 
 #define RADEON_MAX_AOS_ARRAYS          16
@@ -376,8 +381,8 @@ struct radeon_store {
 };
 
 struct radeon_dri_mirror {
-       __DRIcontextPrivate *context;   /* DRI context */
-       __DRIscreenPrivate *screen;     /* DRI screen */
+       __DRIcontext *context;  /* DRI context */
+       __DRIscreen *screen;    /* DRI screen */
 
        drm_context_t hwContext;
        drm_hw_lock_t *hwLock;
@@ -401,9 +406,6 @@ struct radeon_state {
        struct radeon_depthbuffer_state depth;
        struct radeon_scissor_state scissor;
        struct radeon_stencilbuffer_state stencil;
-
-       struct radeon_cs_space_check bos[RADEON_MAX_BOS];
-       int validated_bo_count;
 };
 
 /**
@@ -502,7 +504,6 @@ struct radeon_context {
 
    struct {
        struct radeon_query_object *current;
-       struct radeon_query_object not_flushed_head;
        struct radeon_state_atom queryobj;
    } query;
 
@@ -517,17 +518,38 @@ struct radeon_context {
           void (*free_context)(GLcontext *ctx);
           void (*emit_query_finish)(radeonContextPtr radeon);
           void (*update_scissor)(GLcontext *ctx);
+          unsigned (*check_blit)(gl_format mesa_format);
+          unsigned (*blit)(GLcontext *ctx,
+                        struct radeon_bo *src_bo,
+                        intptr_t src_offset,
+                        gl_format src_mesaformat,
+                        unsigned src_pitch,
+                        unsigned src_width,
+                        unsigned src_height,
+                        unsigned src_x_offset,
+                        unsigned src_y_offset,
+                        struct radeon_bo *dst_bo,
+                        intptr_t dst_offset,
+                        gl_format dst_mesaformat,
+                        unsigned dst_pitch,
+                        unsigned dst_width,
+                        unsigned dst_height,
+                        unsigned dst_x_offset,
+                        unsigned dst_y_offset,
+                        unsigned reg_width,
+                        unsigned reg_height,
+                        unsigned flip_y);
    } vtbl;
 };
 
 #define RADEON_CONTEXT(glctx) ((radeonContextPtr)(ctx->DriverCtx))
 
-static inline __DRIdrawablePrivate* radeon_get_drawable(radeonContextPtr radeon)
+static inline __DRIdrawable* radeon_get_drawable(radeonContextPtr radeon)
 {
        return radeon->dri.context->driDrawablePriv;
 }
 
-static inline __DRIdrawablePrivate* radeon_get_readable(radeonContextPtr radeon)
+static inline __DRIdrawable* radeon_get_readable(radeonContextPtr radeon)
 {
        return radeon->dri.context->driReadablePriv;
 }
@@ -580,15 +602,16 @@ static INLINE uint32_t radeonPackFloat24(float f)
 GLboolean radeonInitContext(radeonContextPtr radeon,
                            struct dd_function_table* functions,
                            const __GLcontextModes * glVisual,
-                           __DRIcontextPrivate * driContextPriv,
+                           __DRIcontext * driContextPriv,
                            void *sharedContextPrivate);
 
 void radeonCleanupContext(radeonContextPtr radeon);
-GLboolean radeonUnbindContext(__DRIcontextPrivate * driContextPriv);
-void radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable);
-GLboolean radeonMakeCurrent(__DRIcontextPrivate * driContextPriv,
-                           __DRIdrawablePrivate * driDrawPriv,
-                           __DRIdrawablePrivate * driReadPriv);
-extern void radeonDestroyContext(__DRIcontextPrivate * driContextPriv);
+GLboolean radeonUnbindContext(__DRIcontext * driContextPriv);
+void radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable,
+                                GLboolean front_only);
+GLboolean radeonMakeCurrent(__DRIcontext * driContextPriv,
+                           __DRIdrawable * driDrawPriv,
+                           __DRIdrawable * driReadPriv);
+extern void radeonDestroyContext(__DRIcontext * driContextPriv);
 
 #endif