tgsi: use TGSI_INTERPOLATE_x arguments instead of zeros in ureg code
authorBrian Paul <brianp@vmware.com>
Thu, 8 Feb 2018 01:29:12 +0000 (18:29 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 8 Feb 2018 16:49:03 +0000 (09:49 -0700)
TGSI_INTERPOLATE_CONSTANT and TGSI_INTERPOLATE_LOC_CENTER have the
value zero so there's no change in behavior.  It seems funny to
declare these fs input registers with constant interpolation.  But
it looks like ureg_DECL_input_layout() is not called anywhere and
ureg_DECL_input() is only called from
util_make_geometry_passthrough_shader().

Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/tgsi/tgsi_ureg.c

index b2cc45da63f76732e15a81d79018db391d681f12..40a047a255575a7056f9718ebbd2cee013fb5366 100644 (file)
@@ -371,7 +371,8 @@ ureg_DECL_input_layout(struct ureg_program *ureg,
                 unsigned array_size)
 {
    return ureg_DECL_fs_input_cyl_centroid_layout(ureg,
-               semantic_name, semantic_index, 0, 0, 0,
+               semantic_name, semantic_index,
+               TGSI_INTERPOLATE_CONSTANT, 0, TGSI_INTERPOLATE_LOC_CENTER,
                index, usage_mask, array_id, array_size);
 }
 
@@ -384,7 +385,9 @@ ureg_DECL_input(struct ureg_program *ureg,
                 unsigned array_size)
 {
    return ureg_DECL_fs_input_cyl_centroid(ureg, semantic_name, semantic_index,
-                                          0, 0, 0, array_id, array_size);
+                                          TGSI_INTERPOLATE_CONSTANT, 0,
+                                          TGSI_INTERPOLATE_LOC_CENTER,
+                                          array_id, array_size);
 }