diff options
author | Timothy Arceri <[email protected]> | 2018-02-09 17:17:31 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-02-10 10:46:28 +1100 |
commit | ef8082baf860cb19cbb8c6435e9144ff16b3429f (patch) | |
tree | 0705e258cf1c16adcbebf099549dfd9e3426eccc /src/amd/common | |
parent | 1b1e5f8edfb16b8c8d5170bdd110f730352b6137 (diff) |
ac: convert nir_op_f2f32 src to a float
Fixes the following piglit test:
./bin/arb_vertex_attrib_64bit-check-explicit-location -auto -fbo
Where we would end up with the nir such as:
vec1 64 ssa_11 = pack_64_2x32_split ssa_9, ssa_10
vec1 32 ssa_12 = f2f32 ssa_2
And our pack_64_2x32_split nir to llvm code always produces
a 64bit integer as output.
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd/common')
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 396627bf1b7..cd128054962 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -1957,6 +1957,7 @@ static void visit_alu(struct ac_nir_context *ctx, const nir_alu_instr *instr) result = LLVMBuildFPExt(ctx->ac.builder, src[0], ac_to_float_type(&ctx->ac, def_type), ""); break; case nir_op_f2f32: + src[0] = ac_to_float(&ctx->ac, src[0]); result = LLVMBuildFPTrunc(ctx->ac.builder, src[0], ac_to_float_type(&ctx->ac, def_type), ""); break; case nir_op_u2u32: |