spirv: add support for SpvDecorationExplicitInterpAMD
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 24 Jan 2020 09:16:56 +0000 (10:16 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Jan 2020 09:49:50 +0000 (09:49 +0000)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3578>

src/compiler/spirv/spirv_to_nir.c
src/compiler/spirv/vtn_variables.c

index abf27d5e6b06840a93d0993c3200e19939c3fa5c..258e33b723b45620c33323df311b0db2048a0d26 100644 (file)
@@ -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:
index 775957429334074ed6379afc2cb0410f739e28b5..b86a0bcd39170e9cddd4f2a2438e3a929259aa04 100644 (file)
@@ -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;