From: Timothy Arceri Date: Mon, 18 Jun 2018 02:36:54 +0000 (+1000) Subject: mesa: add ff fragment shader support for geom and tess shaders X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=89a5d6f71517511e809a0d4d163d5f2a3d6201a5;p=mesa.git mesa: add ff fragment shader support for geom and tess shaders This is required for compatibility profile support. Reviewed-by: Marek Olšák Reviewed-by: Iago Toral Quiroga --- diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp index a698931d99e..935a21624af 100644 --- a/src/mesa/main/ff_fragment_shader.cpp +++ b/src/mesa/main/ff_fragment_shader.cpp @@ -229,7 +229,11 @@ static GLbitfield filter_fp_input_mask( GLbitfield fp_inputs, * since vertex shader state validation comes after fragment state * validation (see additional comments in state.c). */ - if (vertexShader) + if (ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY] != NULL) + vprog = ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY]; + else if (ctx->_Shader->CurrentProgram[MESA_SHADER_TESS_EVAL] != NULL) + vprog = ctx->_Shader->CurrentProgram[MESA_SHADER_TESS_EVAL]; + else if (vertexShader) vprog = ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]; else vprog = ctx->VertexProgram.Current;