r300g: fix mipmapped texture3D size calculation
[mesa.git] / src / gallium / drivers / r300 / r300_context.h
index 2e248a4d6cdd1fb8fe658fd57208f60d87561462..b6e20591eda682c42469c028f17b32af454f4f93 100644 (file)
@@ -45,6 +45,8 @@ struct r300_atom {
     struct r300_atom *prev, *next;
     /* Name, for debugging. */
     const char* name;
+    /* Stat counter. */
+    uint64_t counter;
     /* Opaque state. */
     void* state;
     /* Emit the state to the context. */
@@ -53,8 +55,6 @@ struct r300_atom {
     unsigned size;
     /* Whether this atom should be emitted. */
     boolean dirty;
-    /* Another dirty flag that is never automatically cleared. */
-    boolean always_dirty;
 };
 
 struct r300_blend_state {
@@ -106,6 +106,16 @@ struct r300_rs_state {
     uint32_t color_control;         /* R300_GA_COLOR_CONTROL: 0x4278 */
     uint32_t polygon_mode;          /* R300_GA_POLY_MODE: 0x4288 */
     uint32_t clip_rule;             /* R300_SC_CLIP_RULE: 0x43D0 */
+
+    /* Specifies top of Raster pipe specific enable controls,
+     * i.e. texture coordinates stuffing for points, lines, triangles */
+    uint32_t stuffing_enable;       /* R300_GB_ENABLE: 0x4008 */
+
+    /* Point sprites texture coordinates, 0: lower left, 1: upper right */
+    float point_texcoord_left;      /* R300_GA_POINT_S0: 0x4200 */
+    float point_texcoord_bottom;    /* R300_GA_POINT_T0: 0x4204 */
+    float point_texcoord_right;     /* R300_GA_POINT_S1: 0x4208 */
+    float point_texcoord_top;       /* R300_GA_POINT_T1: 0x420c */
 };
 
 struct r300_rs_block {
@@ -319,7 +329,8 @@ struct r300_context {
 
     void (*emit_draw_elements)(
             struct r300_context *r300, struct pipe_resource* indexBuffer,
-            unsigned indexSize, unsigned minIndex, unsigned maxIndex,
+            unsigned indexSize, int indexBias,
+            unsigned minIndex, unsigned maxIndex,
             unsigned mode, unsigned start, unsigned count);
 
 
@@ -352,16 +363,18 @@ struct r300_context {
     struct r300_atom blend_color_state;
     /* User clip planes. */
     struct r300_atom clip_state;
-    /* Shader constants. */
-    struct r300_constant_buffer shader_constants[PIPE_SHADER_TYPES];
     /* Depth, stencil, and alpha state. */
     struct r300_atom dsa_state;
     /* Fragment shader. */
     struct r300_atom fs;
     /* Fragment shader RC_CONSTANT_STATE variables. */
     struct r300_atom fs_rc_constant_state;
+    /* Fragment shader constant buffer. */
+    struct r300_atom fs_constants;
     /* Framebuffer state. */
     struct r300_atom fb_state;
+    /* Occlusion query. */
+    struct r300_atom query_start;
     /* Rasterizer state. */
     struct r300_atom rs_state;
     /* RS block state. */
@@ -376,6 +389,8 @@ struct r300_context {
     struct r300_atom vap_output_state;
     /* Vertex shader. */
     struct r300_atom vs_state;
+    /* Vertex shader constant buffer. */
+    struct r300_atom vs_constants;
     /* Viewport state. */
     struct r300_atom viewport_state;
     /* ZTOP state. */
@@ -405,8 +420,6 @@ struct r300_context {
 
     struct pipe_viewport_state viewport;
 
-    /* Bitmask of dirty state objects. */
-    uint32_t dirty_state;
     /* Flag indicating whether or not the HW is dirty. */
     uint32_t dirty_hw;
     /* Whether polygon offset is enabled. */
@@ -418,9 +431,15 @@ struct r300_context {
     /* Whether the two-sided stencil ref value is different for front and
      * back faces, and fallback should be used for r3xx-r4xx. */
     boolean stencil_ref_bf_fallback;
+    /* Point sprites texcoord index,  1 bit per texcoord */
+    int sprite_coord_enable;
+
     /* upload managers */
     struct u_upload_mgr *upload_vb;
     struct u_upload_mgr *upload_ib;
+
+    /* Stat counter. */
+    uint64_t flush_counter;
 };
 
 /* Convenience cast wrapper. */