&prog->Vert.ClipDistanceArraySize);
}
+void
+validate_tess_eval_shader_executable(struct gl_shader_program *prog,
+ struct gl_shader *shader)
+{
+ if (shader == NULL)
+ return;
+
+ analyze_clip_usage(prog, shader, &prog->TessEval.UsesClipDistance,
+ &prog->TessEval.ClipDistanceArraySize);
+}
+
/**
* Verify that a fragment shader executable meets all semantic requirements
case MESA_SHADER_VERTEX:
validate_vertex_shader_executable(prog, sh);
break;
+ case MESA_SHADER_TESS_CTRL:
+ /* nothing to be done */
+ break;
+ case MESA_SHADER_TESS_EVAL:
+ validate_tess_eval_shader_executable(prog, sh);
+ break;
case MESA_SHADER_GEOMETRY:
validate_geometry_shader_executable(prog, sh);
break;
if (num_shaders[MESA_SHADER_GEOMETRY] > 0)
prog->LastClipDistanceArraySize = prog->Geom.ClipDistanceArraySize;
+ else if (num_shaders[MESA_SHADER_TESS_EVAL] > 0)
+ prog->LastClipDistanceArraySize = prog->TessEval.ClipDistanceArraySize;
else if (num_shaders[MESA_SHADER_VERTEX] > 0)
prog->LastClipDistanceArraySize = prog->Vert.ClipDistanceArraySize;
else
/** GL_CW or GL_CCW */
GLenum VertexOrder;
bool PointMode;
+ /**
+ * True if gl_ClipDistance is written to. Copied into
+ * gl_tess_eval_program by _mesa_copy_linked_program_data().
+ */
+ GLboolean UsesClipDistance;
+ GLuint ClipDistanceArraySize; /**< Size of the gl_ClipDistance array, or
+ 0 if not present. */
} TessEval;
/**
dst_tep->Spacing = src->TessEval.Spacing;
dst_tep->VertexOrder = src->TessEval.VertexOrder;
dst_tep->PointMode = src->TessEval.PointMode;
+ dst->UsesClipDistanceOut = src->TessEval.UsesClipDistance;
break;
}
case MESA_SHADER_GEOMETRY: {