summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/tgsi/tgsi_exec.h
diff options
context:
space:
mode:
authorMichal Krol <michal@tungstengraphics.com>2008-08-18 15:42:26 +0200
committerMichal Krol <michal@tungstengraphics.com>2008-08-18 17:20:06 +0200
commite2da7edd642198d7c515dbc0b9ba77d4286c3262 (patch)
tree82e5efd78af87c641058db67d7424bf8dd080764 /src/gallium/auxiliary/tgsi/tgsi_exec.h
parent087ee474ed1dcf9b09c13227d442e6580f828f57 (diff)
tgsi: Add condition code (CC) register.
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_exec.h')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.h29
1 files changed, 24 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.h b/src/gallium/auxiliary/tgsi/tgsi_exec.h
index 4f30650b07..c4e649e69c 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.h
@@ -1,6 +1,6 @@
/**************************************************************************
*
- * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -25,7 +25,7 @@
*
**************************************************************************/
-#if !defined TGSI_EXEC_H
+#ifndef TGSI_EXEC_H
#define TGSI_EXEC_H
#include "pipe/p_compiler.h"
@@ -140,11 +140,30 @@ struct tgsi_exec_labels
#define TGSI_EXEC_TEMP_PRIMITIVE_I (TGSI_EXEC_NUM_TEMPS + 2)
#define TGSI_EXEC_TEMP_PRIMITIVE_C 2
-#define TGSI_EXEC_TEMP_THREE_I (TGSI_EXEC_NUM_TEMPS + 2)
-#define TGSI_EXEC_TEMP_THREE_C 3
+/* NVIDIA condition code (CC) vector
+ */
+#define TGSI_EXEC_CC_GT 0x01
+#define TGSI_EXEC_CC_EQ 0x02
+#define TGSI_EXEC_CC_LT 0x04
+#define TGSI_EXEC_CC_UN 0x08
+
+#define TGSI_EXEC_CC_X_MASK 0x000000ff
+#define TGSI_EXEC_CC_X_SHIFT 0
+#define TGSI_EXEC_CC_Y_MASK 0x0000ff00
+#define TGSI_EXEC_CC_Y_SHIFT 8
+#define TGSI_EXEC_CC_Z_MASK 0x00ff0000
+#define TGSI_EXEC_CC_Z_SHIFT 16
+#define TGSI_EXEC_CC_W_MASK 0xff000000
+#define TGSI_EXEC_CC_W_SHIFT 24
+
+#define TGSI_EXEC_TEMP_CC_I (TGSI_EXEC_NUM_TEMPS + 2)
+#define TGSI_EXEC_TEMP_CC_C 3
+
+#define TGSI_EXEC_TEMP_THREE_I (TGSI_EXEC_NUM_TEMPS + 3)
+#define TGSI_EXEC_TEMP_THREE_C 0
#define TGSI_EXEC_TEMP_HALF_I (TGSI_EXEC_NUM_TEMPS + 3)
-#define TGSI_EXEC_TEMP_HALF_C 0
+#define TGSI_EXEC_TEMP_HALF_C 1
#define TGSI_EXEC_TEMP_R0 (TGSI_EXEC_NUM_TEMPS + 4)