};
void *
-tgsi_align_128bit(
- void *unaligned )
+tgsi_align_128bit(void *unaligned)
{
union pointer_hack ph;
}
unsigned
-tgsi_util_get_src_register_swizzle(
- const struct tgsi_src_register *reg,
- unsigned component )
+tgsi_util_get_src_register_swizzle(const struct tgsi_src_register *reg,
+ unsigned component)
{
switch (component) {
case TGSI_CHAN_X:
unsigned
tgsi_util_get_full_src_register_swizzle(
- const struct tgsi_full_src_register *reg,
- unsigned component )
+ const struct tgsi_full_src_register *reg,
+ unsigned component)
{
- return tgsi_util_get_src_register_swizzle(
- ®->Register,
- component );
+ return tgsi_util_get_src_register_swizzle(®->Register, component);
}
+
void
-tgsi_util_set_src_register_swizzle(
- struct tgsi_src_register *reg,
- unsigned swizzle,
- unsigned component )
+tgsi_util_set_src_register_swizzle(struct tgsi_src_register *reg,
+ unsigned swizzle,
+ unsigned component)
{
- switch( component ) {
+ switch (component) {
case 0:
reg->SwizzleX = swizzle;
break;
reg->SwizzleW = swizzle;
break;
default:
- assert( 0 );
+ assert(0);
}
}
+
unsigned
tgsi_util_get_full_src_register_sign_mode(
- const struct tgsi_full_src_register *reg,
- unsigned component )
+ const struct tgsi_full_src_register *reg,
+ unsigned component)
{
unsigned sign_mode;
- if( reg->Register.Absolute ) {
+ if (reg->Register.Absolute) {
/* Consider only the post-abs negation. */
- if( reg->Register.Negate ) {
+ if (reg->Register.Negate) {
sign_mode = TGSI_UTIL_SIGN_SET;
}
else {
}
}
else {
- if( reg->Register.Negate ) {
+ if (reg->Register.Negate) {
sign_mode = TGSI_UTIL_SIGN_TOGGLE;
}
else {
return sign_mode;
}
+
void
-tgsi_util_set_full_src_register_sign_mode(
- struct tgsi_full_src_register *reg,
- unsigned sign_mode )
+tgsi_util_set_full_src_register_sign_mode(struct tgsi_full_src_register *reg,
+ unsigned sign_mode)
{
- switch (sign_mode)
- {
+ switch (sign_mode) {
case TGSI_UTIL_SIGN_CLEAR:
reg->Register.Negate = 0;
reg->Register.Absolute = 1;
break;
default:
- assert( 0 );
+ assert(0);
}
}
+
/**
* Determine which channels of the specificed src register are effectively
* used by this instruction.
struct tgsi_full_instruction;
void *
-tgsi_align_128bit(
- void *unaligned );
+tgsi_align_128bit(void *unaligned);
unsigned
-tgsi_util_get_src_register_swizzle(
- const struct tgsi_src_register *reg,
- unsigned component );
+tgsi_util_get_src_register_swizzle(const struct tgsi_src_register *reg,
+ unsigned component);
unsigned
unsigned component );
void
-tgsi_util_set_src_register_swizzle(
- struct tgsi_src_register *reg,
- unsigned swizzle,
- unsigned component );
+tgsi_util_set_src_register_swizzle(struct tgsi_src_register *reg,
+ unsigned swizzle,
+ unsigned component);
+
#define TGSI_UTIL_SIGN_CLEAR 0 /* Force positive */
#define TGSI_UTIL_SIGN_SET 1 /* Force negative */
unsigned
tgsi_util_get_full_src_register_sign_mode(
const struct tgsi_full_src_register *reg,
- unsigned component );
+ unsigned component);
void
-tgsi_util_set_full_src_register_sign_mode(
- struct tgsi_full_src_register *reg,
- unsigned sign_mode );
+tgsi_util_set_full_src_register_sign_mode(struct tgsi_full_src_register *reg,
+ unsigned sign_mode);
unsigned
tgsi_util_get_inst_usage_mask(const struct tgsi_full_instruction *inst,