2 #include "cell/common.h"
3 #include "pipe/p_shader_tokens.h"
4 #include "util/u_debug.h"
5 #include "tgsi/tgsi_parse.h"
6 //#include "tgsi_build.h"
7 #include "tgsi/tgsi_util.h"
10 tgsi_util_get_src_register_swizzle(
11 const struct tgsi_src_register *reg,
31 tgsi_util_get_full_src_register_swizzle(
32 const struct tgsi_full_src_register *reg,
35 return tgsi_util_get_src_register_swizzle(
42 tgsi_util_get_full_src_register_sign_mode(
43 const struct tgsi_full_src_register *reg,
48 if( reg->RegisterExtMod.Absolute ) {
49 /* Consider only the post-abs negation. */
51 if( reg->RegisterExtMod.Negate ) {
52 sign_mode = TGSI_UTIL_SIGN_SET;
55 sign_mode = TGSI_UTIL_SIGN_CLEAR;
59 /* Accumulate the three negations. */
63 negate = reg->Register.Negate;
64 if( reg->RegisterExtMod.Negate ) {
69 sign_mode = TGSI_UTIL_SIGN_TOGGLE;
72 sign_mode = TGSI_UTIL_SIGN_KEEP;