Mipmapping a single level

Quick question, is there a way you can mipmap a single level, for example instead of generating 5 mipmaps for a texture, that you would generate only one but at a certain level, ie. texture is 512x512, but you only generate on for 32x32, instead of generating all 256x256, 128x128…etc

Thanks

Is there a good reason why you’d want to do that?

I guess the only reason would be memory efficiency …

I have seen another reason, cheap pseudo depth of field effects.

maybe texture lod bias

If you generate the mipmaps yourself, you could generate the 32x32 and then scale it up to 64x64 and 128x128 with a simple 1texel --> 2x2 --> 4x4 area?

according to the opengl standard you either must generate no mipmaps or all down to 1x1.
everything else may cause ‘undefined beahvior’ (;