v3d: handle new texture state transfer functions in v71
authorAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 21 Oct 2021 21:21:02 +0000 (23:21 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 13 Oct 2023 22:37:43 +0000 (22:37 +0000)
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

src/gallium/drivers/v3d/v3dx_state.c

index 2d19bf7..9dae0f0 100644 (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,