Series is: Reviewed-by: Nicolai Hähnle <nicolai.haeh...@amd.com>

On 07.01.2016 11:44, Edward O'Callaghan wrote:
Signed-off-by: Edward O'Callaghan <eocallag...@alterapraxis.com>
---
  src/gallium/auxiliary/tgsi/tgsi_util.c | 13 +++++++------
  1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_util.c 
b/src/gallium/auxiliary/tgsi/tgsi_util.c
index 653e650..5fff3f0 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_util.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_util.c
@@ -29,6 +29,7 @@
  #include "pipe/p_shader_tokens.h"
  #include "tgsi_parse.h"
  #include "tgsi_util.h"
+#include "tgsi_exec.h"

  union pointer_hack
  {
@@ -53,17 +54,17 @@ tgsi_util_get_src_register_swizzle(
     const struct tgsi_src_register *reg,
     unsigned component )
  {
-   switch( component ) {
-   case 0:
+   switch (component) {
+   case TGSI_CHAN_X:
        return reg->SwizzleX;
-   case 1:
+   case TGSI_CHAN_Y:
        return reg->SwizzleY;
-   case 2:
+   case TGSI_CHAN_Z:
        return reg->SwizzleZ;
-   case 3:
+   case TGSI_CHAN_W:
        return reg->SwizzleW;
     default:
-      assert( 0 );
+      assert(0);
     }
     return 0;
  }

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to