i965: Make use of the vertex format functions in i965.
authorMathias Fröhlich <mathias.froehlich@web.de>
Tue, 11 Dec 2018 17:45:43 +0000 (18:45 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 10 Mar 2020 14:28:37 +0000 (14:28 +0000)
v2: Style fixes.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/308>

src/mesa/drivers/dri/i965/brw_draw.c

index 152012a6c1642ac42026d8d69bc84f0206012e81..815dc2bc969d10b73fefc21bc3b0e76006593731 100644 (file)
@@ -347,9 +347,8 @@ brw_merge_inputs(struct brw_context *brw)
       unsigned vaomask = vs_inputs & _mesa_draw_array_bits(ctx);
       while (vaomask) {
          const gl_vert_attrib i = u_bit_scan(&vaomask);
-         const struct gl_array_attributes *glattrib =
-            _mesa_draw_array_attrib(vao, i);
-         const uint8_t wa_flags = get_wa_flags(&glattrib->Format);
+         const uint8_t wa_flags =
+            get_wa_flags(_mesa_draw_array_format(vao, i));
 
          if (brw->vb.attrib_wa_flags[i] != wa_flags) {
             brw->vb.attrib_wa_flags[i] = wa_flags;
@@ -360,9 +359,8 @@ brw_merge_inputs(struct brw_context *brw)
       unsigned currmask = vs_inputs & _mesa_draw_current_bits(ctx);
       while (currmask) {
          const gl_vert_attrib i = u_bit_scan(&currmask);
-         const struct gl_array_attributes *glattrib =
-            _mesa_draw_current_attrib(ctx, i);
-         const uint8_t wa_flags = get_wa_flags(&glattrib->Format);
+         const uint8_t wa_flags =
+            get_wa_flags(_mesa_draw_current_format(ctx, i));
 
          if (brw->vb.attrib_wa_flags[i] != wa_flags) {
             brw->vb.attrib_wa_flags[i] = wa_flags;