radv: bitcast 16-bit outputs to integers

16-bit outputs are stored as 16-bit floats in the outputs array, so they
have to be bitcast.

Fixes: b722b29f10 ('radv: add support for 16bit input/output')
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
This commit is contained in:
Rhys Perry
2018-12-06 12:10:41 +00:00
parent 23b485c920
commit 64065aa504

View File

@@ -2507,7 +2507,7 @@ si_llvm_init_export_args(struct radv_shader_context *ctx,
if (is_16bit) {
for (unsigned chan = 0; chan < 4; chan++)
values[chan] = LLVMBuildZExt(ctx->ac.builder,
values[chan],
ac_to_integer(&ctx->ac, values[chan]),
ctx->ac.i32, "");
}
break;
@@ -2518,7 +2518,7 @@ si_llvm_init_export_args(struct radv_shader_context *ctx,
if (is_16bit) {
for (unsigned chan = 0; chan < 4; chan++)
values[chan] = LLVMBuildSExt(ctx->ac.builder,
values[chan],
ac_to_integer(&ctx->ac, values[chan]),
ctx->ac.i32, "");
}
break;