From: Alyssa Rosenzweig Date: Mon, 30 Dec 2019 16:40:29 +0000 (-0500) Subject: glsl: Set .flat for gl_FrontFacing X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ddc5a371b3d3620bdd7aa5960733f0e34f33bf8e;p=mesa.git 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: --- 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)