summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/tgsi
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/tgsi')
-rw-r--r--src/gallium/auxiliary/tgsi/util/tgsi_dump.c2
-rw-r--r--src/gallium/auxiliary/tgsi/util/tgsi_text.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/tgsi/util/tgsi_dump.c b/src/gallium/auxiliary/tgsi/util/tgsi_dump.c
index cae74a9267..8220e09199 100644
--- a/src/gallium/auxiliary/tgsi/util/tgsi_dump.c
+++ b/src/gallium/auxiliary/tgsi/util/tgsi_dump.c
@@ -716,7 +716,7 @@ tgsi_dump_instruction(
TXT( "_SAT" );
break;
case TGSI_SAT_MINUS_PLUS_ONE:
- TXT( "_SAT[-1,1]" );
+ TXT( "_SATNV" );
break;
default:
assert( 0 );
diff --git a/src/gallium/auxiliary/tgsi/util/tgsi_text.c b/src/gallium/auxiliary/tgsi/util/tgsi_text.c
index d5a9480f4a..f3fc675807 100644
--- a/src/gallium/auxiliary/tgsi/util/tgsi_text.c
+++ b/src/gallium/auxiliary/tgsi/util/tgsi_text.c
@@ -588,6 +588,7 @@ static const char *texture_names[TGSI_TEXTURE_COUNT] =
static boolean parse_instruction( struct translate_ctx *ctx )
{
uint i;
+ uint saturate = TGSI_SAT_NONE;
const struct opcode_info *info;
struct tgsi_full_instruction inst;
uint advance;
@@ -599,7 +600,11 @@ static boolean parse_instruction( struct translate_ctx *ctx )
const char *cur = ctx->cur;
if (str_match_no_case( &cur, opcode_info[i].mnemonic )) {
- /* TODO: _SAT suffix */
+ if (str_match_no_case( &cur, "_SATNV" ))
+ saturate = TGSI_SAT_MINUS_PLUS_ONE;
+ else if (str_match_no_case( &cur, "_SAT" ))
+ saturate = TGSI_SAT_ZERO_ONE;
+
if (*cur == '\0' || eat_white( &cur )) {
ctx->cur = cur;
break;
@@ -614,6 +619,7 @@ static boolean parse_instruction( struct translate_ctx *ctx )
inst = tgsi_default_full_instruction();
inst.Instruction.Opcode = i;
+ inst.Instruction.Saturate = saturate;
inst.Instruction.NumDstRegs = info->num_dst;
inst.Instruction.NumSrcRegs = info->num_src;