st/nine: Queries: Fix D3DISSUE_END behaviour.
[mesa.git] / src / gallium / drivers / r300 / r300_context.h
index d88ba3f7ed7bbd1bad5bdfbdbf885890af833c40..4d2b1531ad709d5c19939d4acf1e488b0fc83057 100644 (file)
@@ -36,7 +36,7 @@
 #include "r300_defines.h"
 #include "r300_screen.h"
 #include "compiler/radeon_regalloc.h"
-#include "../../winsys/radeon/drm/radeon_winsys.h"
+#include "radeon/drm/radeon_winsys.h"
 
 struct u_upload_mgr;
 struct r300_context;
@@ -82,6 +82,7 @@ struct r300_blend_state {
 
     uint32_t cb_clamp[COLORMASK_NUM_SWIZZLES][8];
     uint32_t cb_noclamp[8];
+    uint32_t cb_noclamp_noalpha[8];
     uint32_t cb_no_readwrite[8];
 };
 
@@ -579,6 +580,7 @@ struct r300_context {
     /* Whether two-sided color selection is enabled (AKA light_twoside). */
     boolean two_sided_color;
     boolean flatshade;
+    boolean clip_halfz;
     /* Whether fast color clear is enabled. */
     boolean cbzb_clear;
     /* Whether fragment shader needs to be validated. */
@@ -687,6 +689,20 @@ static INLINE void r300_mark_atom_dirty(struct r300_context *r300,
     }
 }
 
+static INLINE struct pipe_surface *
+r300_get_nonnull_cb(struct pipe_framebuffer_state *fb, unsigned i)
+{
+    if (fb->cbufs[i])
+        return fb->cbufs[i];
+
+    /* The i-th framebuffer is NULL, return any non-NULL one. */
+    for (i = 0; i < fb->nr_cbufs; i++)
+        if (fb->cbufs[i])
+            return fb->cbufs[i];
+
+    return NULL;
+}
+
 struct pipe_context* r300_create_context(struct pipe_screen* screen,
                                          void *priv);