diff options
author | Michal Krol <[email protected]> | 2009-12-23 18:33:44 +0100 |
---|---|---|
committer | Michal Krol <[email protected]> | 2010-01-05 09:27:10 +0100 |
commit | ff56a12051a91c5c69db9afb85e4a3ebdb17ef96 (patch) | |
tree | 6769ddb415d181f6cdbfc841590e76c7c26bd788 /src/gallium/auxiliary/tgsi/tgsi_parse.c | |
parent | b1c55e80aa600c88a20117cdca4bde2a46f79730 (diff) |
tgsi: Support signed/unsigned integer immediate types.
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_parse.c')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_parse.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_parse.c b/src/gallium/auxiliary/tgsi/tgsi_parse.c index fa65ecb9975..8c7062d850c 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_parse.c +++ b/src/gallium/auxiliary/tgsi/tgsi_parse.c @@ -119,17 +119,29 @@ tgsi_parse_token( case TGSI_TOKEN_TYPE_IMMEDIATE: { struct tgsi_full_immediate *imm = &ctx->FullToken.FullImmediate; + uint imm_count; memset(imm, 0, sizeof *imm); copy_token(&imm->Immediate, &token); + imm_count = imm->Immediate.NrTokens - 1; + switch (imm->Immediate.DataType) { case TGSI_IMM_FLOAT32: - { - uint imm_count = imm->Immediate.NrTokens - 1; - for (i = 0; i < imm_count; i++) { - next_token(ctx, &imm->u[i]); - } + for (i = 0; i < imm_count; i++) { + next_token(ctx, &imm->u[i].Float); + } + break; + + case TGSI_IMM_UINT32: + for (i = 0; i < imm_count; i++) { + next_token(ctx, &imm->u[i].Uint); + } + break; + + case TGSI_IMM_INT32: + for (i = 0; i < imm_count; i++) { + next_token(ctx, &imm->u[i].Int); } break; |