00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef TGSI_UTIL_H
00029 #define TGSI_UTIL_H
00030
00031 #if defined __cplusplus
00032 extern "C" {
00033 #endif
00034
00035 struct tgsi_src_register;
00036 struct tgsi_src_register_ext_swz;
00037 struct tgsi_full_src_register;
00038
00039 void *
00040 tgsi_align_128bit(
00041 void *unaligned );
00042
00043 unsigned
00044 tgsi_util_get_src_register_swizzle(
00045 const struct tgsi_src_register *reg,
00046 unsigned component );
00047
00048 unsigned
00049 tgsi_util_get_src_register_extswizzle(
00050 const struct tgsi_src_register_ext_swz *reg,
00051 unsigned component);
00052
00053 unsigned
00054 tgsi_util_get_full_src_register_extswizzle(
00055 const struct tgsi_full_src_register *reg,
00056 unsigned component );
00057
00058 void
00059 tgsi_util_set_src_register_swizzle(
00060 struct tgsi_src_register *reg,
00061 unsigned swizzle,
00062 unsigned component );
00063
00064 void
00065 tgsi_util_set_src_register_extswizzle(
00066 struct tgsi_src_register_ext_swz *reg,
00067 unsigned swizzle,
00068 unsigned component );
00069
00070 unsigned
00071 tgsi_util_get_src_register_extnegate(
00072 const struct tgsi_src_register_ext_swz *reg,
00073 unsigned component );
00074
00075 void
00076 tgsi_util_set_src_register_extnegate(
00077 struct tgsi_src_register_ext_swz *reg,
00078 unsigned negate,
00079 unsigned component );
00080
00081 #define TGSI_UTIL_SIGN_CLEAR 0
00082 #define TGSI_UTIL_SIGN_SET 1
00083 #define TGSI_UTIL_SIGN_TOGGLE 2
00084 #define TGSI_UTIL_SIGN_KEEP 3
00085
00086 unsigned
00087 tgsi_util_get_full_src_register_sign_mode(
00088 const struct tgsi_full_src_register *reg,
00089 unsigned component );
00090
00091 void
00092 tgsi_util_set_full_src_register_sign_mode(
00093 struct tgsi_full_src_register *reg,
00094 unsigned sign_mode );
00095
00096 #if defined __cplusplus
00097 }
00098 #endif
00099
00100 #endif