i965/fs: Properly check for PAD in fragment shaders with > 16 varyings.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_fs.cpp
index 75f1a926c1d96525c2bad88126f6c6951eb812dd..2eef7af4e11d46e963ce5d794c1d4e6ef3007d4a 100644 (file)
@@ -1456,10 +1456,7 @@ fs_visitor::calculate_urb_setup()
          for (int slot = first_slot; slot < prev_stage_vue_map.num_slots;
               slot++) {
             int varying = prev_stage_vue_map.slot_to_varying[slot];
-            /* Note that varying == BRW_VARYING_SLOT_COUNT when a slot is
-             * unused.
-             */
-            if (varying != BRW_VARYING_SLOT_COUNT &&
+            if (varying != BRW_VARYING_SLOT_PAD &&
                 (nir->info.inputs_read & BRW_FS_VARYING_INPUT_MASK &
                  BITFIELD64_BIT(varying))) {
                prog_data->urb_setup[varying] = slot - first_slot;