From df8dd12e5b380ae22991ccd8cc163fe6dc751b70 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 24 Jan 2020 10:54:06 +0100 Subject: [PATCH] spirv: add support for SpvBuiltInBaryCoord* Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: --- src/compiler/spirv/vtn_variables.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index b86a0bcd391..95e941c481a 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -1510,6 +1510,34 @@ vtn_get_builtin_location(struct vtn_builder *b, *location = SYSTEM_VALUE_GLOBAL_GROUP_SIZE; set_mode_system_value(b, mode); break; + case SpvBuiltInBaryCoordNoPerspAMD: + *location = SYSTEM_VALUE_BARYCENTRIC_LINEAR_PIXEL; + set_mode_system_value(b, mode); + break; + case SpvBuiltInBaryCoordNoPerspCentroidAMD: + *location = SYSTEM_VALUE_BARYCENTRIC_LINEAR_CENTROID; + set_mode_system_value(b, mode); + break; + case SpvBuiltInBaryCoordNoPerspSampleAMD: + *location = SYSTEM_VALUE_BARYCENTRIC_LINEAR_SAMPLE; + set_mode_system_value(b, mode); + break; + case SpvBuiltInBaryCoordSmoothAMD: + *location = SYSTEM_VALUE_BARYCENTRIC_PERSP_PIXEL; + set_mode_system_value(b, mode); + break; + case SpvBuiltInBaryCoordSmoothCentroidAMD: + *location = SYSTEM_VALUE_BARYCENTRIC_PERSP_CENTROID; + set_mode_system_value(b, mode); + break; + case SpvBuiltInBaryCoordSmoothSampleAMD: + *location = SYSTEM_VALUE_BARYCENTRIC_PERSP_SAMPLE; + set_mode_system_value(b, mode); + break; + case SpvBuiltInBaryCoordPullModelAMD: + *location = SYSTEM_VALUE_BARYCENTRIC_PULL_MODEL; + set_mode_system_value(b, mode); + break; default: vtn_fail("Unsupported builtin: %s (%u)", spirv_builtin_to_string(builtin), builtin); -- 2.30.2