summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2019-02-22 14:24:28 +0100
committerBas Nieuwenhuizen <[email protected]>2019-02-22 17:06:55 +0100
commitf3247841040a202faffe4709c07da9bd41693580 (patch)
tree5a4186e57ffba8aa7495eb831b1787018ff21649 /src/amd/vulkan
parenta1fdd4a4a73604469b6204a56457b08f8ae4a948 (diff)
radv: Allow interpolation on non-float types.
In particular structs containing floats and 16-bit floating point types. Fixes: 62024fa7750 "radv: enable VK_KHR_16bit_storage extension / 16bit storage features" Fixes: da295946361 "spirv: Only split blocks" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109735 Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r--src/amd/vulkan/radv_nir_to_llvm.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c
index dae09f7ddce..36f499be212 100644
--- a/src/amd/vulkan/radv_nir_to_llvm.c
+++ b/src/amd/vulkan/radv_nir_to_llvm.c
@@ -2297,17 +2297,16 @@ handle_fs_input_decl(struct radv_shader_context *ctx,
mask = ((1ull << attrib_count) - 1) << variable->data.location;
- if (glsl_get_base_type(glsl_without_array(variable->type)) == GLSL_TYPE_FLOAT) {
- unsigned interp_type;
- if (variable->data.sample)
- interp_type = INTERP_SAMPLE;
- else if (variable->data.centroid)
- interp_type = INTERP_CENTROID;
- else
- interp_type = INTERP_CENTER;
+ unsigned interp_type;
+ if (variable->data.sample)
+ interp_type = INTERP_SAMPLE;
+ else if (variable->data.centroid)
+ interp_type = INTERP_CENTROID;
+ else
+ interp_type = INTERP_CENTER;
+
+ interp = lookup_interp_param(&ctx->abi, variable->data.interpolation, interp_type);
- interp = lookup_interp_param(&ctx->abi, variable->data.interpolation, interp_type);
- }
if (interp == NULL)
interp = LLVMGetUndef(ctx->ac.i32);