radeon: Unifdef RADEON_R300 and RADEON_R600.
[mesa.git] / src / mesa / drivers / dri / radeon / radeon_common_context.h
index 024e31f8ec7dc1c023bc27f11270f50c5810762b..ef39913b24ad02d216d631cb0495dc829f03a3e8 100644 (file)
@@ -13,8 +13,8 @@
 #include "radeon_drm.h"
 #include "dri_util.h"
 #include "tnl/t_vertex.h"
+#include "swrast/s_context.h"
 
-#include "dri_metaops.h"
 struct radeon_context;
 
 #include "radeon_bocs_wrapper.h"
@@ -159,8 +159,8 @@ struct radeon_state_atom {
         GLuint *cmd;           /* one or more cmd's */
        GLuint *lastcmd;                /* one or more cmd's */
        GLboolean dirty;        /* dirty-mark in emit_state_list */
-        int (*check) (GLcontext *, struct radeon_state_atom *atom); /* is this state active? */
-        void (*emit) (GLcontext *, struct radeon_state_atom *atom);
+        int (*check) (struct gl_context *, struct radeon_state_atom *atom); /* is this state active? */
+        void (*emit) (struct gl_context *, struct radeon_state_atom *atom);
 };
 
 struct radeon_hw_state {
@@ -175,8 +175,13 @@ struct radeon_hw_state {
 /* Texture related */
 typedef struct _radeon_texture_image radeon_texture_image;
 
+
+/**
+ * This is a subclass of swrast_texture_image since we use swrast
+ * for software fallback rendering.
+ */
 struct _radeon_texture_image {
-       struct gl_texture_image base;
+       struct swrast_texture_image base;
 
        /**
         * If mt != 0, the image is stored in hardware format in the
@@ -316,7 +321,7 @@ struct radeon_dma {
          * flush must be called before non-active vertex allocations can be
          * performed.
          */
-        void (*flush) (GLcontext *);
+        void (*flush) (struct gl_context *);
 };
 
 /* radeon_swtcl.c
@@ -432,7 +437,7 @@ struct radeon_cmdbuf {
 };
 
 struct radeon_context {
-   GLcontext *glCtx;
+   struct gl_context *glCtx;
    radeonScreenPtr radeonScreen;       /* Screen private DRI data */
 
    /* Texture object bookkeeping
@@ -509,8 +514,6 @@ struct radeon_context {
     */
    GLboolean is_front_buffer_reading;
 
-   struct dri_metaops meta;
-
    struct {
        struct radeon_query_object *current;
        struct radeon_state_atom queryobj;
@@ -518,17 +521,17 @@ struct radeon_context {
 
    struct {
           void (*get_lock)(radeonContextPtr radeon);
-          void (*update_viewport_offset)(GLcontext *ctx);
+          void (*update_viewport_offset)(struct gl_context *ctx);
           void (*emit_cs_header)(struct radeon_cs *cs, radeonContextPtr rmesa);
-          void (*swtcl_flush)(GLcontext *ctx, uint32_t offset);
+          void (*swtcl_flush)(struct gl_context *ctx, uint32_t offset);
           void (*pre_emit_atoms)(radeonContextPtr rmesa);
           void (*pre_emit_state)(radeonContextPtr rmesa);
-          void (*fallback)(GLcontext *ctx, GLuint bit, GLboolean mode);
-          void (*free_context)(GLcontext *ctx);
+          void (*fallback)(struct gl_context *ctx, GLuint bit, GLboolean mode);
+          void (*free_context)(struct gl_context *ctx);
           void (*emit_query_finish)(radeonContextPtr radeon);
-          void (*update_scissor)(GLcontext *ctx);
+          void (*update_scissor)(struct gl_context *ctx);
           unsigned (*check_blit)(gl_format mesa_format);
-          unsigned (*blit)(GLcontext *ctx,
+          unsigned (*blit)(struct gl_context *ctx,
                         struct radeon_bo *src_bo,
                         intptr_t src_offset,
                         gl_format src_mesaformat,
@@ -611,7 +614,7 @@ static INLINE uint32_t radeonPackFloat24(float f)
 
 GLboolean radeonInitContext(radeonContextPtr radeon,
                            struct dd_function_table* functions,
-                           const __GLcontextModes * glVisual,
+                           const struct gl_config * glVisual,
                            __DRIcontext * driContextPriv,
                            void *sharedContextPrivate);