[Intel-gfx] [Mesa-dev] [PATCH 1/5] intel gen4/5: fix GL_VERTEX_PROGRAM_TWO_SIDE.

Olivier Galibert galibert at pobox.com
Tue Jul 17 10:57:57 CEST 2012


On Mon, Jul 16, 2012 at 08:43:17PM -0700, Paul Berry wrote:
> Also, I'm not convinced that #3 is necessary.  Is there something in the
> spec that dictates this behaviour?  My reading of the spec is that if the
> vertex shader writes to gl_BackColor but not glFrontColor, then the
> contents of gl_Color in the fragment shader is undefined.

Oh, I remember why I did that in the first place.  All the front/back
piglit tests only write the appropriate color slot and not the other
one.

The language is annoying:
  The following built-in vertex output variables are available, but deprecated. A particular one should be
  written to if any functionality in a corresponding fragment shader or fixed pipeline uses it or state derived
  from it. Otherwise, behavior is undefined.
  out vec4 gl_FrontColor;
  out vec4 gl_BackColor;
  out vec4 gl_FrontSecondaryColor;
  out vec4 gl_BackSecondaryColor;
  [...]

One could argue that you don't "use" gl_FrontColor if all your
polygons are back-facing.  Dunno.  Do you consider all of the twoside
piglit tests buggy?  We can fix *that*.

  OG.




More information about the Intel-gfx mailing list