mesa: add ff fragment shader support for geom and tess shaders
authorTimothy Arceri <tarceri@itsqueeze.com>
Mon, 18 Jun 2018 02:36:54 +0000 (12:36 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Mon, 18 Jun 2018 23:21:33 +0000 (09:21 +1000)
This is required for compatibility profile support.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/mesa/main/ff_fragment_shader.cpp

index a698931d99e0f9826ed1dea7269137849eb03a18..935a21624af7ed93521b98da9f6b518f32cf5204 100644 (file)
@@ -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;