Add bindless support for 2D materials. (#24833)