<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2018-06-18 11:19 GMT+02:00 Iago Toral <span dir="ltr"><<a href="mailto:itoral@igalia.com" target="_blank">itoral@igalia.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mon, 2018-06-18 at 10:45 +0200, Gustaw Smolarczyk wrote:<br>
> 2018-06-18 10:39 GMT+02:00 Iago Toral <<a href="mailto:itoral@igalia.com">itoral@igalia.com</a>>:<br>
> > On Mon, 2018-06-18 at 09:43 +0200, Gustaw Smolarczyk wrote:<br>
> > > 2018-06-18 4:39 GMT+02:00 Timothy Arceri <<a href="mailto:tarceri@itsqueeze.com">tarceri@itsqueeze.com</a>>:<br>
> > > > This is required for compatibility profile support. <br>
> > > > ---<br>
> > > >  src/mesa/main/ff_fragment_<wbr>shader.cpp | 6 +++++-<br>
> > > >  1 file changed, 5 insertions(+), 1 deletion(-)<br>
> > > > <br>
> > > > diff --git a/src/mesa/main/ff_fragment_<wbr>shader.cpp<br>
> > > > b/src/mesa/main/ff_fragment_<wbr>shader.cpp<br>
> > > > index a698931d99e..935a21624af 100644<br>
> > > > --- a/src/mesa/main/ff_fragment_<wbr>shader.cpp<br>
> > > > +++ b/src/mesa/main/ff_fragment_<wbr>shader.cpp<br>
> > > > @@ -229,7 +229,11 @@ static GLbitfield filter_fp_input_mask(<br>
> > > > GLbitfield fp_inputs,<br>
> > > >      * since vertex shader state validation comes after<br>
> > > > fragment state<br>
> > > >      * validation (see additional comments in state.c).<br>
> > > >      */<br>
> > > > -   if (vertexShader)<br>
> > > > +   if (ctx->_Shader->CurrentProgram[<wbr>MESA_SHADER_GEOMETRY] !=<br>
> > > > NULL)<br>
> > > > +      vprog = ctx->_Shader-<br>
> > > > >CurrentProgram[MESA_SHADER_<wbr>GEOMETRY];<br>
> > > > +   else if (ctx->_Shader-<br>
> > > > >CurrentProgram[MESA_SHADER_<wbr>TESS_EVAL] != NULL)<br>
> > > > +      vprog = ctx->_Shader-<br>
> > > > >CurrentProgram[MESA_SHADER_<wbr>TESS_EVAL];<br>
> > > > +   else if (vertexShader)<br>
> > > <br>
> > > <br>
> > > Shouldn't you also update the if condition on line 178?<br>
> > > Otherwise, you won't reach the if tree you change when the vertex<br>
> > > shader is missing (unless that was intended - I am not really<br>
> > > familiar with how fixed function shaders work alongside new<br>
> > > features).<br>
> > <br>
> > You don't have Tesselation / Geometry with fixed function GL, so I<br>
> > think this should be fine.<br>
> > <br>
> <br>
> Well, this whole file implements fixed function fragment shader, so<br>
> it will only be reached when the fragment shader is missing. Unless<br>
> you meant that tessellation/geometry shaders cannot be combined with<br>
> fixed function vertex shader but fixed function fragment shader is<br>
> fine.<br>
<br>
</div></div>Yes, that is what I was thinking.  The OpenGL 4.5 spec with<br>
compatibility profile states in 'chapter 12: fixed function vertex<br>
processing":<br>
<br>
"When programmable vertex processing (see chapter 11) is not being<br>
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."<br>
<br>
And then 'Chapter 13: Fixed function vertex post-processing', doesn't<br>
include geometry or tessellation shading, and seems to include the<br>
fixed function stages that start after the geometry stage.<br>
<br>
Iago<br></blockquote><div><br></div><div>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.</div><div><br></div><div>Regards,</div><div>Gustaw Smolarczyk</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
> Regards,<br>
> Gustaw Smolarczyk<br>
</blockquote></div><br></div></div>