From 70dc017aec72b80e7fd674b90eec4332807e3619 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 31 Jul 2019 15:17:17 -0500 Subject: nir: Stop whacking gl_FrontFacing to a system value We have a cap bit for gallium and a GLSL compiler flag to control this. Just trust what GLSL gives us and stop forcing it. In order for this to be safe, we have to advertise another cap in some of the gallium drivers. Reviewed-by: Alyssa Rosenzweig Reviewed-by: Eric Anholt --- src/compiler/glsl/glsl_to_nir.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/compiler/glsl') diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index 7b454cab623..3238c65cd9c 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -460,13 +460,8 @@ nir_visitor::visit(ir_variable *ir) break; case ir_var_shader_in: - if (shader->info.stage == MESA_SHADER_FRAGMENT && - ir->data.location == VARYING_SLOT_FACE) { - /* For whatever reason, GLSL IR makes gl_FrontFacing an input */ - var->data.location = SYSTEM_VALUE_FRONT_FACE; - var->data.mode = nir_var_system_value; - } else if (shader->info.stage == MESA_SHADER_GEOMETRY && - ir->data.location == VARYING_SLOT_PRIMITIVE_ID) { + if (shader->info.stage == MESA_SHADER_GEOMETRY && + ir->data.location == VARYING_SLOT_PRIMITIVE_ID) { /* For whatever reason, GLSL IR makes gl_PrimitiveIDIn an input */ var->data.location = SYSTEM_VALUE_PRIMITIVE_ID; var->data.mode = nir_var_system_value; -- cgit v1.2.3