diff options
author | Edward O'Callaghan <[email protected]> | 2016-01-08 03:44:45 +1100 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2016-01-08 12:18:24 -0500 |
commit | b42254eff3d982c6cf649e37029c928290d781fd (patch) | |
tree | 3975c2b05605f3e6be229edaff8628a6a59fcf79 /src/gallium/auxiliary | |
parent | d6db7ceedf60622a3c17334d764ca1bcddb5935a (diff) |
gallium/aux: Use TGSI chan name defines inplace of literals
Signed-off-by: Edward O'Callaghan <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_util.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_util.c b/src/gallium/auxiliary/tgsi/tgsi_util.c index 653e650dc4c..5fff3f0787f 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; } |