mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
gallivm: make non-float return code bitcast consistent.
This just uses the same form across the fetches. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
3b97e50b9a
commit
e5c57824ec
1 changed files with 6 additions and 12 deletions
|
|
@ -1403,12 +1403,9 @@ emit_fetch_immediate(
|
|||
res = emit_fetch_64bit(bld_base, stype, res, bld->immediates[reg->Register.Index][swizzle + 1]);
|
||||
}
|
||||
|
||||
if (stype == TGSI_TYPE_UNSIGNED) {
|
||||
res = LLVMBuildBitCast(builder, res, bld_base->uint_bld.vec_type, "");
|
||||
} else if (stype == TGSI_TYPE_SIGNED) {
|
||||
res = LLVMBuildBitCast(builder, res, bld_base->int_bld.vec_type, "");
|
||||
} else if (stype == TGSI_TYPE_DOUBLE) {
|
||||
res = LLVMBuildBitCast(builder, res, bld_base->dbl_bld.vec_type, "");
|
||||
if (stype == TGSI_TYPE_SIGNED || stype == TGSI_TYPE_UNSIGNED || stype == TGSI_TYPE_DOUBLE) {
|
||||
struct lp_build_context *bld_fetch = stype_to_fetch(bld_base, stype);
|
||||
res = LLVMBuildBitCast(builder, res, bld_fetch->vec_type, "");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
@ -1483,12 +1480,9 @@ emit_fetch_input(
|
|||
|
||||
assert(res);
|
||||
|
||||
if (stype == TGSI_TYPE_UNSIGNED) {
|
||||
res = LLVMBuildBitCast(builder, res, bld_base->uint_bld.vec_type, "");
|
||||
} else if (stype == TGSI_TYPE_SIGNED) {
|
||||
res = LLVMBuildBitCast(builder, res, bld_base->int_bld.vec_type, "");
|
||||
} else if (stype == TGSI_TYPE_DOUBLE) {
|
||||
res = LLVMBuildBitCast(builder, res, bld_base->dbl_bld.vec_type, "");
|
||||
if (stype == TGSI_TYPE_SIGNED || stype == TGSI_TYPE_UNSIGNED || stype == TGSI_TYPE_DOUBLE) {
|
||||
struct lp_build_context *bld_fetch = stype_to_fetch(bld_base, stype);
|
||||
res = LLVMBuildBitCast(builder, res, bld_fetch->vec_type, "");
|
||||
}
|
||||
|
||||
return res;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue