From 5c053cc6ec310481e61631515e0ae7044faf9335 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 24 Jan 2020 10:16:56 +0100 Subject: [PATCH] spirv: add support for SpvDecorationExplicitInterpAMD Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: --- src/compiler/spirv/spirv_to_nir.c | 4 ++++ src/compiler/spirv/vtn_variables.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index abf27d5e6b0..258e33b723b 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -779,6 +779,9 @@ struct_member_decoration_cb(struct vtn_builder *b, case SpvDecorationFlat: ctx->fields[member].interpolation = INTERP_MODE_FLAT; break; + case SpvDecorationExplicitInterpAMD: + ctx->fields[member].interpolation = INTERP_MODE_EXPLICIT; + break; case SpvDecorationCentroid: ctx->fields[member].centroid = true; break; @@ -984,6 +987,7 @@ type_decoration_cb(struct vtn_builder *b, case SpvDecorationPatch: case SpvDecorationCentroid: case SpvDecorationSample: + case SpvDecorationExplicitInterpAMD: case SpvDecorationVolatile: case SpvDecorationCoherent: case SpvDecorationNonWritable: diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 77595742933..b86a0bcd391 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -1530,6 +1530,9 @@ apply_var_decoration(struct vtn_builder *b, case SpvDecorationFlat: var_data->interpolation = INTERP_MODE_FLAT; break; + case SpvDecorationExplicitInterpAMD: + var_data->interpolation = INTERP_MODE_EXPLICIT; + break; case SpvDecorationCentroid: var_data->centroid = true; break; -- 2.30.2