This patch adds texture coordinates to point and area lights in Cycles. Using the Geometry Node/Parametric output, one can now apply procedural and image textures in planar mapping to area lights and in spherical coordinates to point lights.
Area light seems fine, point one has some questions..
Not sure why we need texture coordinate at sample(). And even if we really need it, why it's only done for the point light?
ray_quad_intersect() was only used in a single place. Perhaps we can simply add u and v coordinates there as a return value and avoid having to practically identical functions one of which is not used?
Texture coordinates in sample are necessary for MIS. You are right though, it's missing for area lights - I thought randu and randv were sufficient, but we need to calculate it from the intersection point - see below.
Sure, we can remove it then and have one function do both.