r300g: re-order caps
[mesa.git] / src / gallium / drivers / r300 / r300_context.h
index 2e91a5b26598cf5e0608a0df908e1f18cf4e86e9..5ad448978b9d572efe04127de030a397ec5ecff8 100644 (file)
@@ -94,6 +94,7 @@ struct r300_rs_state {
     uint32_t vap_control_status;    /* R300_VAP_CNTL_STATUS: 0x2140 */
     uint32_t antialiasing_config;   /* R300_GB_AA_CONFIG: 0x4020 */
     uint32_t point_size;            /* R300_GA_POINT_SIZE: 0x421c */
+    uint32_t point_minmax;          /* R300_GA_POINT_MINMAX: 0x4230 */
     uint32_t line_control;          /* R300_GA_LINE_CNTL: 0x4234 */
     float depth_scale;            /* R300_SU_POLY_OFFSET_FRONT_SCALE: 0x42a4 */
                                   /* R300_SU_POLY_OFFSET_BACK_SCALE: 0x42ac */
@@ -151,6 +152,10 @@ struct r300_texture_format_state {
 struct r300_sampler_view {
     struct pipe_sampler_view base;
 
+    /* Swizzles in the UTIL_FORMAT_SWIZZLE_* representation,
+     * derived from base. */
+    unsigned char swizzle[4];
+
     /* Copy of r300_texture::texture_format_state with format-specific bits
      * added. */
     struct r300_texture_format_state format;
@@ -166,6 +171,13 @@ struct r300_texture_fb_state {
     uint32_t zb_format; /* R300_ZB_FORMAT */
 };
 
+struct r300_texture_sampler_state {
+    struct r300_texture_format_state format;
+    uint32_t filter0;      /* R300_TX_FILTER0: 0x4400 */
+    uint32_t filter1;      /* R300_TX_FILTER1: 0x4440 */
+    uint32_t border_color;  /* R300_TX_BORDER_COLOR: 0x45c0 */
+};
+
 struct r300_textures_state {
     /* Textures. */
     struct r300_sampler_view *sampler_views[16];
@@ -177,12 +189,7 @@ struct r300_textures_state {
     /* This is the merge of the texture and sampler states. */
     unsigned count;
     uint32_t tx_enable;         /* R300_TX_ENABLE: 0x4101 */
-    struct r300_texture_sampler_state {
-        struct r300_texture_format_state format;
-        uint32_t filter0;      /* R300_TX_FILTER0: 0x4400 */
-        uint32_t filter1;      /* R300_TX_FILTER1: 0x4440 */
-        uint32_t border_color;  /* R300_TX_BORDER_COLOR: 0x45c0 */
-    } regs[16];
+    struct r300_texture_sampler_state regs[16];
 };
 
 struct r300_vertex_stream_state {
@@ -314,8 +321,6 @@ struct r300_vertex_element_state {
     struct r300_vertex_stream_state vertex_stream;
 };
 
-extern struct pipe_viewport_state r300_viewport_identity;
-
 struct r300_context {
     /* Parent class */
     struct pipe_context context;
@@ -435,6 +440,8 @@ struct r300_context {
     boolean stencil_ref_bf_fallback;
     /* Point sprites texcoord index,  1 bit per texcoord */
     int sprite_coord_enable;
+    /* Whether two-sided color selection is enabled (AKA light_twoside). */
+    boolean two_sided_color;
 
     /* upload managers */
     struct u_upload_mgr *upload_vb;