diff options
author | Dave Airlie <[email protected]> | 2012-02-06 15:35:05 +0000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2012-02-17 17:39:02 +0000 |
commit | 141f2c2fc9325a5d30629373bb962f42517967ae (patch) | |
tree | 330b563e5d2bab51b3b2e39b17f85f7235aee646 /src/gallium/auxiliary/gallivm/lp_bld_tgsi.c | |
parent | 66461aa249a95053fd5887df75ab791558c3a486 (diff) |
gallivm: enable fetch for integer opcodes. (v2)
The infers the type of data required using the opcode,
and casts the input to the appropriate type.
So far this only handles non-indirect constant and temporaries.
v2: as per Jose suggestion, fetch immediates via floats
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_tgsi.c')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_tgsi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c index 261301ce542..e05ad81c302 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c @@ -298,6 +298,7 @@ lp_build_emit_fetch( const struct tgsi_full_src_register *reg = &inst->Src[src_op]; unsigned swizzle; LLVMValueRef res; + enum tgsi_opcode_type stype = tgsi_opcode_infer_src_type(inst->Instruction.Opcode); if (chan_index == LP_CHAN_ALL) { swizzle = ~0; @@ -312,7 +313,7 @@ lp_build_emit_fetch( assert(reg->Register.Index <= bld_base->info->file_max[reg->Register.File]); if (bld_base->emit_fetch_funcs[reg->Register.File]) { - res = bld_base->emit_fetch_funcs[reg->Register.File](bld_base, reg, + res = bld_base->emit_fetch_funcs[reg->Register.File](bld_base, reg, stype, swizzle); } else { assert(0 && "invalid src register in emit_fetch()"); |