diff options
author | Nicolai Hähnle <[email protected]> | 2017-09-15 17:40:05 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-09-29 12:07:33 +0200 |
commit | d713af711d3fdf63358f627b3f318f8b88519e46 (patch) | |
tree | 12bd3647816331bc744f4ff8abd4c1dcf31ee411 /src/gallium/auxiliary/nir | |
parent | 93bf9c114b7c54e4faf342810bd848527b7d0a80 (diff) |
tgsi: infer that DLDEXP's second source has an integer type
Reviewed-by: Marek Olšák <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/nir')
-rw-r--r-- | src/gallium/auxiliary/nir/tgsi_to_nir.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c index 1b630096ffa..a3175523110 100644 --- a/src/gallium/auxiliary/nir/tgsi_to_nir.c +++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c @@ -767,12 +767,13 @@ ttn_get_var(struct ttn_compile *c, struct tgsi_full_dst_register *tgsi_fdst) } static nir_ssa_def * -ttn_get_src(struct ttn_compile *c, struct tgsi_full_src_register *tgsi_fsrc) +ttn_get_src(struct ttn_compile *c, struct tgsi_full_src_register *tgsi_fsrc, + int src_idx) { nir_builder *b = &c->build; struct tgsi_src_register *tgsi_src = &tgsi_fsrc->Register; unsigned tgsi_opcode = c->token->FullInstruction.Instruction.Opcode; - unsigned tgsi_src_type = tgsi_opcode_infer_src_type(tgsi_opcode); + unsigned tgsi_src_type = tgsi_opcode_infer_src_type(tgsi_opcode, src_idx); bool src_is_float = !(tgsi_src_type == TGSI_TYPE_SIGNED || tgsi_src_type == TGSI_TYPE_UNSIGNED); nir_alu_src src; @@ -1644,7 +1645,7 @@ ttn_emit_instruction(struct ttn_compile *c) nir_ssa_def *src[TGSI_FULL_MAX_SRC_REGISTERS]; for (i = 0; i < tgsi_inst->Instruction.NumSrcRegs; i++) { - src[i] = ttn_get_src(c, &tgsi_inst->Src[i]); + src[i] = ttn_get_src(c, &tgsi_inst->Src[i], i); } nir_alu_dest dest = ttn_get_dest(c, tgsi_dst); |