summaryrefslogtreecommitdiff
path: root/src/gen4asm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gen4asm.h')
-rw-r--r--src/gen4asm.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gen4asm.h b/src/gen4asm.h
index 8178290..f9ed161 100644
--- a/src/gen4asm.h
+++ b/src/gen4asm.h
@@ -34,6 +34,17 @@ typedef unsigned int GLuint;
typedef int GLint;
typedef float GLfloat;
+extern long int gen_level;
+
+/* Predicate for Gen X and above */
+#define IS_GENp(x) (gen_level >= (x)*10)
+
+/* Predicate for Gen X exactly */
+#define IS_GENx(x) (gen_level >= (x)*10 && gen_level < ((x)+1)*10)
+
+/* Predicate to match Haswell processors */
+#define IS_HASWELL(x) (gen_level == 75)
+
#include "brw_defines.h"
#include "brw_structs.h"