tgsi: whitespace clean-ups in tgsi_util.[ch]
authorBrian Paul <brianp@vmware.com>
Wed, 15 Nov 2017 05:17:49 +0000 (22:17 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 15 Nov 2017 23:12:44 +0000 (16:12 -0700)
Trivial.

src/gallium/auxiliary/tgsi/tgsi_util.c
src/gallium/auxiliary/tgsi/tgsi_util.h

index 6fc0530fe45810fd5255939c9adc40fb511b009f..78a5413b9d710188eaecf2ea1d358f81f84d00ce 100644 (file)
@@ -40,8 +40,7 @@ union pointer_hack
 };
 
 void *
-tgsi_align_128bit(
-   void *unaligned )
+tgsi_align_128bit(void *unaligned)
 {
    union pointer_hack ph;
 
@@ -52,9 +51,8 @@ tgsi_align_128bit(
 }
 
 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:
@@ -74,21 +72,19 @@ tgsi_util_get_src_register_swizzle(
 
 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(
-      &reg->Register,
-      component );
+   return tgsi_util_get_src_register_swizzle(&reg->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;
@@ -102,21 +98,22 @@ tgsi_util_set_src_register_swizzle(
       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 {
@@ -124,7 +121,7 @@ tgsi_util_get_full_src_register_sign_mode(
       }
    }
    else {
-      if( reg->Register.Negate ) {
+      if (reg->Register.Negate) {
          sign_mode = TGSI_UTIL_SIGN_TOGGLE;
       }
       else {
@@ -135,13 +132,12 @@ tgsi_util_get_full_src_register_sign_mode(
    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;
@@ -163,10 +159,11 @@ tgsi_util_set_full_src_register_sign_mode(
       break;
 
    default:
-      assert( 0 );
+      assert(0);
    }
 }
 
+
 /**
  * Determine which channels of the specificed src register are effectively
  * used by this instruction.
index ac04004751f10799fe0711efba55aae7c5760e16..686b90f467e14159eef777624981494b5e17e98e 100644 (file)
@@ -39,13 +39,11 @@ struct tgsi_full_src_register;
 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
@@ -54,10 +52,10 @@ tgsi_util_get_full_src_register_swizzle(
    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 */
@@ -67,12 +65,11 @@ tgsi_util_set_src_register_swizzle(
 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,