From ddc5a371b3d3620bdd7aa5960733f0e34f33bf8e Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 30 Dec 2019 11:40:29 -0500 Subject: [PATCH] glsl: Set .flat for gl_FrontFacing It is a boolean. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Kristian H. Kristensen Tested-by: Marge Bot Part-of: --- src/compiler/glsl/builtin_variables.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/compiler/glsl/builtin_variables.cpp b/src/compiler/glsl/builtin_variables.cpp index ef8aca76e0c..cf2a233d15f 100644 --- a/src/compiler/glsl/builtin_variables.cpp +++ b/src/compiler/glsl/builtin_variables.cpp @@ -1252,10 +1252,13 @@ builtin_variable_generator::generate_fs_special_vars() add_input(VARYING_SLOT_POS, vec4_t, frag_coord_precision, "gl_FragCoord"); } - if (this->state->ctx->Const.GLSLFrontFacingIsSysVal) - add_system_value(SYSTEM_VALUE_FRONT_FACE, bool_t, "gl_FrontFacing"); - else - add_input(VARYING_SLOT_FACE, bool_t, "gl_FrontFacing"); + if (this->state->ctx->Const.GLSLFrontFacingIsSysVal) { + var = add_system_value(SYSTEM_VALUE_FRONT_FACE, bool_t, "gl_FrontFacing"); + var->data.interpolation = INTERP_MODE_FLAT; + } else { + var = add_input(VARYING_SLOT_FACE, bool_t, "gl_FrontFacing"); + var->data.interpolation = INTERP_MODE_FLAT; + } if (state->is_version(120, 100)) { if (this->state->ctx->Const.GLSLPointCoordIsSysVal) -- 2.30.2