Functional avidity and IL-2/perforin production is linked to the emergence of mutations within HLA-B*5701-restricted epitopes and HIV-1 disease progression.