[PATCH 2/5] wined3d: Factor out wined3d_texture_validate_sub_resource_idx().