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
->SrcRegisterExtMod
.Absolute
) {
49 /* Consider only the post-abs negation. */
51 if( reg
->SrcRegisterExtMod
.Negate
) {
52 sign_mode
= TGSI_UTIL_SIGN_SET
;
55 sign_mode
= TGSI_UTIL_SIGN_CLEAR
;
59 /* Accumulate the three negations. */
63 negate
= reg
->SrcRegister
.Negate
;
64 if( reg
->SrcRegisterExtMod
.Negate
) {
69 sign_mode
= TGSI_UTIL_SIGN_TOGGLE
;
72 sign_mode
= TGSI_UTIL_SIGN_KEEP
;