memset(&key, 0, sizeof(key));
key.base.program_string_id = gp->id;
- brw_setup_vec4_key_clip_info(brw, &key.base, gp->program.UsesClipDistance);
+ brw_setup_vec4_key_clip_info(brw, &key.base,
+ gp->program.Base.UsesClipDistanceOut);
/* _NEW_LIGHT | _NEW_BUFFERS */
key.base.clamp_vertex_color = ctx->Light._ClampVertexColor;
* the inputs it asks for, whether they are varying or not.
*/
key.base.program_string_id = vp->id;
- brw_setup_vec4_key_clip_info(brw, &key.base, vp->program.UsesClipDistance);
+ brw_setup_vec4_key_clip_info(brw, &key.base,
+ vp->program.Base.UsesClipDistanceOut);
/* _NEW_POLYGON */
if (brw->gen < 6) {
GLboolean UsesGather; /**< Does this program use gather4 at all? */
+ /**
+ * For vertex and geometry shaders, true if the program uses the
+ * gl_ClipDistance output. Ignored for fragment shaders.
+ */
+ GLboolean UsesClipDistanceOut;
+
/** Named parameters, constants, etc. from program text */
struct gl_program_parameter_list *Parameters;
{
struct gl_program Base; /**< base class */
GLboolean IsPositionInvariant;
- GLboolean UsesClipDistance;
};
GLenum InputType; /**< GL_POINTS, GL_LINES, GL_LINES_ADJACENCY_ARB,
GL_TRIANGLES, or GL_TRIANGLES_ADJACENCY_ARB */
GLenum OutputType; /**< GL_POINTS, GL_LINE_STRIP or GL_TRIANGLE_STRIP */
- GLboolean UsesClipDistance;
GLboolean UsesEndPrimitive;
};
struct gl_program *dst)
{
switch (type) {
- case MESA_SHADER_VERTEX: {
- struct gl_vertex_program *dst_vp = (struct gl_vertex_program *) dst;
- dst_vp->UsesClipDistance = src->Vert.UsesClipDistance;
- }
+ case MESA_SHADER_VERTEX:
+ dst->UsesClipDistanceOut = src->Vert.UsesClipDistance;
break;
case MESA_SHADER_GEOMETRY: {
struct gl_geometry_program *dst_gp = (struct gl_geometry_program *) dst;
dst_gp->VerticesOut = src->Geom.VerticesOut;
dst_gp->InputType = src->Geom.InputType;
dst_gp->OutputType = src->Geom.OutputType;
- dst_gp->UsesClipDistance = src->Geom.UsesClipDistance;
+ dst->UsesClipDistanceOut = src->Geom.UsesClipDistance;
dst_gp->UsesEndPrimitive = src->Geom.UsesEndPrimitive;
}
break;