aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2016-05-01 13:20:25 -0700
committerMatt Turner <[email protected]>2016-05-03 22:34:01 -0700
commit9f81434c5f593bd50a9069c5e845a5730ed501db (patch)
tree93f6274788df347c3eff17c37e0c1ef5d445d590 /src/mesa/drivers/dri
parentaffaae197fdbc39dc3f9c03b003e22bf61dc7aed (diff)
i965: Define GEN_GE/GEN_LE macros in terms of GEN_LT.
GEN_LT has a straightforward implementation on which we can build the GEN_GE and GEN_LE macros. Suggested-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu.c b/src/mesa/drivers/dri/i965/brw_eu.c
index 369bc348b98..48c8439aca0 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.c
+++ b/src/mesa/drivers/dri/i965/brw_eu.c
@@ -352,8 +352,9 @@ enum gen {
GEN_ALL = ~0
};
-#define GEN_GE(gen) (~((gen) - 1) | gen)
-#define GEN_LE(gen) (((gen) - 1) | gen)
+#define GEN_LT(gen) ((gen) - 1)
+#define GEN_GE(gen) (~GEN_LT(gen))
+#define GEN_LE(gen) (GEN_LT(gen) | (gen))
static const struct opcode_desc opcode_10_descs[] = {
{ .name = "dim", .nsrc = 0, .ndst = 0, .gens = GEN75 },