v3d: handle new texture state transfer functions in v71

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
This commit is contained in:
Alejandro Piñeiro 2021-10-21 23:21:02 +02:00 committed by Marge Bot
parent b09f915666
commit 80923c889a

View file

@ -1008,12 +1008,12 @@ v3dX(create_texture_shader_state_bo)(struct v3d_context *v3d,
cso->u.buf.size);
}
bool is_srgb = util_format_is_srgb(cso->format);
#if V3D_VERSION <= 42
tex.srgb = util_format_is_srgb(cso->format);
tex.srgb = is_srgb;
#endif
#if V3D_VERSION >= 71
unreachable("HW generation 71 not supported yet.");
tex.transfer_func = is_srgb ? TRANSFER_FUNC_SRGB : TRANSFER_FUNC_NONE;
#endif
#if V3D_VERSION >= 40
@ -1067,9 +1067,6 @@ v3dX(create_texture_shader_state_bo)(struct v3d_context *v3d,
#if V3D_VERSION <= 42
tex.srgb = false;
#endif
#if V3D_VERSION >= 71
unreachable("HW generation 71 not supported yet.");
#endif
} else {
tex.texture_type = v3d_get_tex_format(&screen->devinfo,