summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>2019-03-19 01:29:43 +0100
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>2019-03-26 09:41:15 +0100
commit82075e3c421b1de7661e61879f2dcbc66011e466 (patch)
treed5e4dd39f913691a456d3fdda27a081c4404e6cd /src
parentc7c432738a68d543dc1b73eae895ec4dfacd92b2 (diff)
ac/nir: Return frag_coord as integer.
To preserve the invariant that nir ssa defs are integers or pointers in LLVM. CC: <mesa-stable@lists.freedesktop.org> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/amd/common/ac_nir_to_llvm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 675623cbfeb7..b25cc6a0a846 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -3232,7 +3232,8 @@ static void visit_intrinsic(struct ac_nir_context *ctx,
ctx->abi->frag_pos[2],
ac_build_fdiv(&ctx->ac, ctx->ac.f32_1, ctx->abi->frag_pos[3])
};
- result = ac_build_gather_values(&ctx->ac, values, 4);
+ result = ac_to_integer(&ctx->ac,
+ ac_build_gather_values(&ctx->ac, values, 4));
break;
}
case nir_intrinsic_load_front_face: