mesa: remove a bunch of gl_renderbuffer fields
[mesa.git] / src / mesa / drivers / dri / r300 / r300_context.h
index 3ba34266084e852b922283b26edcb8e1cb6a5fd4..518d5cdbf4f5908a93ecc61091d9e81e411f70a0 100644 (file)
@@ -51,22 +51,6 @@ typedef struct r300_context r300ContextRec;
 typedef struct r300_context *r300ContextPtr;
 
 
-/* From http://gcc. gnu.org/onlinedocs/gcc-3.2.3/gcc/Variadic-Macros.html .
-   I suppose we could inline this and use macro to fetch out __LINE__ and stuff in case we run into trouble
-   with other compilers ... GLUE!
-*/
-#define WARN_ONCE(a, ...)      { \
-       static int warn##__LINE__=1; \
-       if(warn##__LINE__){ \
-               fprintf(stderr, "*********************************WARN_ONCE*********************************\n"); \
-               fprintf(stderr, "File %s function %s line %d\n", \
-                       __FILE__, __FUNCTION__, __LINE__); \
-               fprintf(stderr,  a, ## __VA_ARGS__);\
-               fprintf(stderr, "***************************************************************************\n"); \
-               warn##__LINE__=0;\
-               } \
-       }
-
 #include "r300_vertprog.h"
 
 
@@ -250,6 +234,10 @@ typedef struct r300_context *r300ContextPtr;
 #define R300_ZS_CNTL_2         3
 #define R300_ZS_CMDSIZE                4
 
+#define R300_ZSB_CMD_0         0
+#define R300_ZSB_CNTL_0                1
+#define R300_ZSB_CMDSIZE       2
+
 #define R300_ZB_CMD_0          0
 #define R300_ZB_OFFSET         1
 #define R300_ZB_PITCH          2
@@ -290,6 +278,12 @@ typedef struct r300_context *r300ContextPtr;
 #define R300_TEX_CMDSIZE       (MAX_TEXTURE_UNITS+1)
 */
 
+#define R300_QUERYOBJ_CMD_0  0
+#define R300_QUERYOBJ_DATA_0 1
+#define R300_QUERYOBJ_CMD_1  2
+#define R300_QUERYOBJ_DATA_1  3
+#define R300_QUERYOBJ_CMDSIZE  4
+
 /**
  * Cache for hardware register state.
  */
@@ -353,6 +347,7 @@ struct r300_hw_state {
        struct radeon_state_atom rb3d_aaresolve_ctl;    /* (4E88) */
        struct radeon_state_atom rb3d_discard_src_pixel_lte_threshold;  /* (4E88) I saw it only written on RV350 hardware..  */
        struct radeon_state_atom zs;    /* zstencil control (4F00) */
+       struct radeon_state_atom zsb;   /* zstencil bf */
        struct radeon_state_atom zstencil_format;
        struct radeon_state_atom zb;    /* z buffer (4F20) */
        struct radeon_state_atom zb_depthclearvalue;    /* (4F28) */
@@ -360,6 +355,7 @@ struct r300_hw_state {
        struct radeon_state_atom zb_hiz_offset; /* (4F44) */
        struct radeon_state_atom zb_hiz_pitch;  /* (4F54) */
 
+       struct radeon_state_atom vap_flush;
        struct radeon_state_atom vpi;   /* vp instructions */
        struct radeon_state_atom vpp;   /* vp parameters */
        struct radeon_state_atom vps;   /* vertex point size (?) */
@@ -380,7 +376,6 @@ struct r300_hw_state {
                struct radeon_state_atom border_color;
        } tex;
        struct radeon_state_atom txe;   /* tex enable (4104) */
-
        radeonTexObj *textures[R300_MAX_TEXTURE_UNITS];
 };
 
@@ -505,15 +500,6 @@ struct r300_index_buffer {
        GLuint count;
 };
 
-struct r300_query_object {
-       struct gl_query_object Base;
-       struct radeon_bo *bo;
-       int curr_offset;
-       GLboolean emitted_begin;
-
-       /* Double linked list of not flushed query objects */
-       struct r300_query_object *prev, *next;
-};
 
 /**
  * \brief R300 context structure.
@@ -544,18 +530,10 @@ struct r300_context {
        struct r300_swtcl_info swtcl;
        struct r300_vertex_buffer vbuf;
        struct r300_index_buffer ind_buf;
-       GLboolean vap_flush_needed;
 
        uint32_t fallback;
 
        DECLARE_RENDERINPUTS(render_inputs_bitset);
-
-       struct {
-               struct r300_query_object *current;
-               struct r300_query_object not_flushed_head;
-       } query;
-
-       int num_z_pipes;
 };
 
 #define R300_CONTEXT(ctx)              ((r300ContextPtr)(ctx->DriverCtx))