diff options
author | Christoph Bumiller <e0425955@student.tuwien.ac.at> | 2010-08-31 20:36:45 +0200 |
---|---|---|
committer | Christoph Bumiller <e0425955@student.tuwien.ac.at> | 2010-09-01 18:02:50 +0200 |
commit | e08f70a41d1012a0270468866614485a3415168e (patch) | |
tree | 00731e941018bc94714b836075324c950bae9b1d /src/gallium/drivers/nv50/nv50_tgsi_to_nc.c | |
parent | 6f9978050eb8648888a728fc09b99e279c2b7b15 (diff) |
nv50: make use of TGSI immediate type
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_tgsi_to_nc.c')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_tgsi_to_nc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c b/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c index 27d851e9fd..141d2cd325 100644 --- a/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c +++ b/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c @@ -1022,7 +1022,15 @@ emit_fetch(struct bld_context *bld, const struct tgsi_full_instruction *insn, case TGSI_FILE_IMMEDIATE: assert(idx < bld->ti->immd32_nr); res = bld_load_imm_u32(bld, bld->ti->immd32[idx * 4 + swz]); - res->reg.type = type; + + switch (bld->ti->immd32_ty[idx]) { + case TGSI_IMM_FLOAT32: res->reg.type = NV_TYPE_F32; break; + case TGSI_IMM_UINT32: res->reg.type = NV_TYPE_U32; break; + case TGSI_IMM_INT32: res->reg.type = NV_TYPE_S32; break; + default: + res->reg.type = type; + break; + } break; case TGSI_FILE_INPUT: res = bld_saved_input(bld, idx, swz); |