summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/tgsi/util/tgsi_util.h
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2008-02-15 11:18:04 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2008-02-15 11:18:04 +0000
commit30d0bacf7aecfb6013ddd665d7385209899eeebd (patch)
treece764e101617349add47e4250aed1adde8b6407e /src/gallium/auxiliary/tgsi/util/tgsi_util.h
parent6ac2c1cc0cd1253ba2014d459010032127f185ec (diff)
parent66f22aa3bf7fa546e946b45156aa578e202982c9 (diff)
Merge commit 'origin/gallium-0.1' into gallium-0.1
Diffstat (limited to 'src/gallium/auxiliary/tgsi/util/tgsi_util.h')
-rw-r--r--src/gallium/auxiliary/tgsi/util/tgsi_util.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/util/tgsi_util.h b/src/gallium/auxiliary/tgsi/util/tgsi_util.h
new file mode 100644
index 0000000000..ef14446f0e
--- /dev/null
+++ b/src/gallium/auxiliary/tgsi/util/tgsi_util.h
@@ -0,0 +1,70 @@
+#if !defined TGSI_UTIL_H
+#define TGSI_UTIL_H
+
+#if defined __cplusplus
+extern "C" {
+#endif // defined __cplusplus
+
+void *
+tgsi_align_128bit(
+ void *unaligned );
+
+unsigned
+tgsi_util_get_src_register_swizzle(
+ const struct tgsi_src_register *reg,
+ unsigned component );
+
+unsigned
+tgsi_util_get_src_register_extswizzle(
+ const struct tgsi_src_register_ext_swz *reg,
+ unsigned component);
+
+unsigned
+tgsi_util_get_full_src_register_extswizzle(
+ const struct tgsi_full_src_register *reg,
+ unsigned component );
+
+void
+tgsi_util_set_src_register_swizzle(
+ struct tgsi_src_register *reg,
+ unsigned swizzle,
+ unsigned component );
+
+void
+tgsi_util_set_src_register_extswizzle(
+ struct tgsi_src_register_ext_swz *reg,
+ unsigned swizzle,
+ unsigned component );
+
+unsigned
+tgsi_util_get_src_register_extnegate(
+ const struct tgsi_src_register_ext_swz *reg,
+ unsigned component );
+
+void
+tgsi_util_set_src_register_extnegate(
+ struct tgsi_src_register_ext_swz *reg,
+ unsigned negate,
+ unsigned component );
+
+#define TGSI_UTIL_SIGN_CLEAR 0 /* Force positive */
+#define TGSI_UTIL_SIGN_SET 1 /* Force negative */
+#define TGSI_UTIL_SIGN_TOGGLE 2 /* Negate */
+#define TGSI_UTIL_SIGN_KEEP 3 /* No change */
+
+unsigned
+tgsi_util_get_full_src_register_sign_mode(
+ const struct tgsi_full_src_register *reg,
+ unsigned component );
+
+void
+tgsi_util_set_full_src_register_sign_mode(
+ struct tgsi_full_src_register *reg,
+ unsigned sign_mode );
+
+#if defined __cplusplus
+} // extern "C"
+#endif // defined __cplusplus
+
+#endif // !defined TGSI_UTIL_H
+