summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Arceri <tarceri@itsqueeze.com>2019-01-24 16:02:17 +1100
committerEmil Velikov <emil.l.velikov@gmail.com>2019-01-29 17:44:27 +0000
commit12586d58462aabce553dc09070c95cc6b51e1ce7 (patch)
tree333da30e378c9e9be751314fd239922c15f09807
parente362fe26ea35fc888ed3d53af42cfb2dfc1d2557 (diff)
radv/ac: fix some fp16 handling
Fixes: b722b29f10d4 ("radv: add support for 16bit input/output") Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> (cherry picked from commit 0907ae35ad0e7733535516fada04948ea7125291)
-rw-r--r--src/amd/common/ac_nir_to_llvm.c2
-rw-r--r--src/amd/vulkan/radv_nir_to_llvm.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index fbe010d04e4..c1db8f30389 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -3890,7 +3890,7 @@ ac_handle_shader_output_decl(struct ac_llvm_context *ctx,
}
}
- bool is_16bit = glsl_type_is_16bit(variable->type);
+ bool is_16bit = glsl_type_is_16bit(glsl_without_array(variable->type));
LLVMTypeRef type = is_16bit ? ctx->f16 : ctx->f32;
for (unsigned i = 0; i < attrib_count; ++i) {
for (unsigned chan = 0; chan < 4; chan++) {
diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c
index 446d43e6266..58da610166e 100644
--- a/src/amd/vulkan/radv_nir_to_llvm.c
+++ b/src/amd/vulkan/radv_nir_to_llvm.c
@@ -2169,7 +2169,7 @@ handle_fs_input_decl(struct radv_shader_context *ctx,
interp = lookup_interp_param(&ctx->abi, variable->data.interpolation, interp_type);
}
- bool is_16bit = glsl_type_is_16bit(variable->type);
+ bool is_16bit = glsl_type_is_16bit(glsl_without_array(variable->type));
LLVMTypeRef type = is_16bit ? ctx->ac.i16 : ctx->ac.i32;
if (interp == NULL)
interp = LLVMGetUndef(type);