as a parameter, e.g. m_rdp->TexPipe.CalculateClampDiffs(tile1, userdata, object); (but the function depends on the game), or more precisely to the first time the called function tries to access userdata items (like userata.ColorInputs or userdata->m_clamp_s_diff)
could there be any uninitialized piece of the "extent_t extent" parameter?
it might be a coincidence, of course, but maybe you could try to check, just to be sure...