summaryrefslogtreecommitdiff
path: root/src/i830.h
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2007-11-13 12:56:13 -0800
committerEric Anholt <eric@anholt.net>2008-04-10 16:03:29 -0700
commitbaa55ffe3b67ca952e4d1ef7087335d76eb2f24b (patch)
tree5a6bc4b589de3c628e69b07d77cce8ed4b45dbfa /src/i830.h
parentd5a80e1e3ab5724d34b20f9ee6f830efd0f5b076 (diff)
Enumerate all possible cc_state objects
We need one for each possible combination of src and dst blend_factors. Again, as with recent changes, this eliminates state updates from prepare_composite and allows that function to instead simply reference an existing object initialized within gen4_state_init. Thanks to Dave Airlie (and git-bisect) for pointing out that with gnome-terminal all text was appearing as solid black with an early version of this commit. As expected the bug was an alignment issue. (cherry picked from 0c0ab52c2d100c47f38c7ef826ef585c8b9815e9 commit) Performance is approximately equivalent on text tests, but may be around +2%.
Diffstat (limited to 'src/i830.h')
-rw-r--r--src/i830.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/i830.h b/src/i830.h
index 6465bd63..4e82036b 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -654,6 +654,8 @@ typedef struct _I830Rec {
#define I830PTR(p) ((I830Ptr)((p)->driverPrivate))
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
+
#define I830_SELECT_FRONT 0
#define I830_SELECT_BACK 1
#define I830_SELECT_DEPTH 2