2018-06-18 11:19 GMT+02:00 Iago Toral <ito...@igalia.com>: > On Mon, 2018-06-18 at 10:45 +0200, Gustaw Smolarczyk wrote: > > 2018-06-18 10:39 GMT+02:00 Iago Toral <ito...@igalia.com>: > > > On Mon, 2018-06-18 at 09:43 +0200, Gustaw Smolarczyk wrote: > > > > 2018-06-18 4:39 GMT+02:00 Timothy Arceri <tarc...@itsqueeze.com>: > > > > > This is required for compatibility profile support. > > > > > --- > > > > > src/mesa/main/ff_fragment_shader.cpp | 6 +++++- > > > > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > > > > > > > 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) > > > > > > > > > > > > Shouldn't you also update the if condition on line 178? > > > > Otherwise, you won't reach the if tree you change when the vertex > > > > shader is missing (unless that was intended - I am not really > > > > familiar with how fixed function shaders work alongside new > > > > features). > > > > > > You don't have Tesselation / Geometry with fixed function GL, so I > > > think this should be fine. > > > > > > > Well, this whole file implements fixed function fragment shader, so > > it will only be reached when the fragment shader is missing. Unless > > you meant that tessellation/geometry shaders cannot be combined with > > fixed function vertex shader but fixed function fragment shader is > > fine. > > Yes, that is what I was thinking. The OpenGL 4.5 spec with > compatibility profile states in 'chapter 12: fixed function vertex > processing": > > "When programmable vertex processing (see chapter 11) is not being > performed, the fixed-function operations described in this chapter are > performed instead. Vertices are first transformed as described in section > 12.1, followed by lighting and coloring described described in section > 12.2. The resulting transformed vertices are then processed as described in > chapter 13." > > And then 'Chapter 13: Fixed function vertex post-processing', doesn't > include geometry or tessellation shading, and seems to include the > fixed function stages that start after the geometry stage. > > Iago >
That makes sense then, thanks! Though it might be a good idea to add/update the comment so that there are less confused people in the future. Regards, Gustaw Smolarczyk > > > > Regards, > > Gustaw Smolarczyk >
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev