On Intel hardware when a geometry shader outputs GL_POINTS primitives we
only need to emit vertex control bits if it emits vertices to non-zero
streams, so use a flag to track this.
This flag will be set to TRUE when a geometry shader calls EmitStreamVertex()
or EndStreamPrimitive() with a non-zero stream parameter in a later patch.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
GL_TRIANGLES, or GL_TRIANGLES_ADJACENCY_ARB */
GLenum OutputType; /**< GL_POINTS, GL_LINE_STRIP or GL_TRIANGLE_STRIP */
bool UsesEndPrimitive;
+ bool UsesStreams;
};
GLuint ClipDistanceArraySize; /**< Size of the gl_ClipDistance array, or
0 if not present. */
bool UsesEndPrimitive;
+ bool UsesStreams;
} Geom;
/** Vertex shader state */
dst_gp->OutputType = src->Geom.OutputType;
dst->UsesClipDistanceOut = src->Geom.UsesClipDistance;
dst_gp->UsesEndPrimitive = src->Geom.UsesEndPrimitive;
+ dst_gp->UsesStreams = src->Geom.UsesStreams;
}
break;
case MESA_SHADER_FRAGMENT: {
prog->Geom.InputType = GL_TRIANGLES;
prog->Geom.OutputType = GL_TRIANGLE_STRIP;
prog->Geom.UsesEndPrimitive = false;
+ prog->Geom.UsesStreams = false;
prog->TransformFeedback.BufferMode = GL_INTERLEAVED_ATTRIBS;
gpc->Invocations = gp->Invocations;
gpc->OutputType = gp->OutputType;
gpc->UsesEndPrimitive = gp->UsesEndPrimitive;
+ gpc->UsesStreams = gp->UsesStreams;
}
break;
default: