Sculpting with texture as a mask?
I'm pretty sure you're the same person who asked it on Blenderartists, so here's the same answer for other people who fell here instead :

Blender currently doesn't have this feature, but there's a rightclickselect proposal about it, so you should upvote it ! 

In the mean time I found a workaround but it requires 3 add-ons and the detail is limited to the resolution of your current geometry :


Weight-and-Color
Mask Tools
Bake UV-Texture to Vertex Colors (included in Blender, you just have to enable it)


Here's how to do it :


enable Blender Internal renderer
select your object and go in Edit Mode
in UV/Image Editor, select your texture
in 3D view go in Vertex Paint mode
In Tool shelf > Misc tab > Bake, click on "UV Texture to VCols" (you can then go Back to Cycles if that's where you were)
with your cursor hovering the 3D view, hit Space and search for "weight &amp; color"
in Convert, select "Vertex color to weight" and in "Color type" select "Gray scale"
go in Sculpt Mode
In Tool shelf > Sculpt tab > Mask Tools, click on "Create Mask"
MMB drag on the 3D view to refresh the view and reveal the mask
BOOM !
haha !


It gets fast enough when you're used to it. But if someone knows a quicker workaround, TELL ME !!!

Notice that since you can convert vertex colors to a sculpt mask, this means you can use "Paint Dirty Vertex Colors" ! How neat ?
Don't forget that unless you check "Dirt only" you won't have a high contrast with pure white, so you may want to enable it and tweak the angle values to have a good contrast.

ALSO, you may notice that the Mask tools add-on (sculpt tab) has options to directly mask by cavity, but you will find that it looks crappy as f*** compared to "Paint Dirty Vertex Colors".