softpipe: further tighen up sample_cube()