Lines Matching refs:first_param
1419 for (int first_param = list->FirstStateVarIndex; in _mesa_optimize_state_parameters() local
1420 first_param < (int)list->NumParameters; first_param++) { in _mesa_optimize_state_parameters()
1421 int last_param = first_param; in _mesa_optimize_state_parameters()
1424 switch (list->Parameters[first_param].StateIndexes[0]) { in _mesa_optimize_state_parameters()
1446 if (list->Parameters[first_param].Size % 4) in _mesa_optimize_state_parameters()
1450 for (int i = first_param + 1; i < (int)list->NumParameters; i++) { in _mesa_optimize_state_parameters()
1463 if (last_param > first_param) { in _mesa_optimize_state_parameters()
1464 int first_vec = list->Parameters[first_param].StateIndexes[2]; in _mesa_optimize_state_parameters()
1468 assert(last_vec - first_vec == last_param - first_param); in _mesa_optimize_state_parameters()
1471 list->Parameters[first_param].StateIndexes[3] = last_vec; in _mesa_optimize_state_parameters()
1472 list->Parameters[first_param].Size = (last_vec - first_vec + 1) * 4; in _mesa_optimize_state_parameters()
1474 param_diff = last_param - first_param; in _mesa_optimize_state_parameters()
1480 if (list->Parameters[first_param].Size != in _mesa_optimize_state_parameters()
1481 _mesa_program_state_value_size(list->Parameters[first_param].StateIndexes)) in _mesa_optimize_state_parameters()
1485 for (int i = first_param + 1; i < (int)list->NumParameters; i++) { in _mesa_optimize_state_parameters()
1505 if (last_param > first_param) { in _mesa_optimize_state_parameters()
1507 list->Parameters[first_param].StateIndexes[0] = STATE_LIGHT_ARRAY; in _mesa_optimize_state_parameters()
1509 list->Parameters[first_param].StateIndexes[1] = in _mesa_optimize_state_parameters()
1510 list->Parameters[first_param].StateIndexes[1] * /* light index */ in _mesa_optimize_state_parameters()
1512 (list->Parameters[first_param].StateIndexes[2] - STATE_AMBIENT) * 4; in _mesa_optimize_state_parameters()
1515 list->Parameters[first_param].StateIndexes[2] = in _mesa_optimize_state_parameters()
1518 list->Parameters[first_param].ValueOffset; in _mesa_optimize_state_parameters()
1521 list->Parameters[first_param].Size = in _mesa_optimize_state_parameters()
1524 list->Parameters[first_param].ValueOffset; in _mesa_optimize_state_parameters()
1526 param_diff = last_param - first_param; in _mesa_optimize_state_parameters()
1534 if (list->Parameters[first_param].StateIndexes[2] == STATE_ATTENUATION) { in _mesa_optimize_state_parameters()
1535 for (int i = first_param + 1; i < (int)list->NumParameters; i++) { in _mesa_optimize_state_parameters()
1548 if (last_param > first_param) { in _mesa_optimize_state_parameters()
1549 param_diff = last_param - first_param; in _mesa_optimize_state_parameters()
1552 list->Parameters[first_param].StateIndexes[0] = in _mesa_optimize_state_parameters()
1557 list->Parameters[first_param].StateIndexes[2] = size; in _mesa_optimize_state_parameters()
1558 list->Parameters[first_param].Size = size * 4; in _mesa_optimize_state_parameters()
1568 if (list->Parameters[first_param].Size != 4) in _mesa_optimize_state_parameters()
1572 for (int i = first_param + 1; i < (int)list->NumParameters; i++) { in _mesa_optimize_state_parameters()
1583 if (last_param > first_param) { in _mesa_optimize_state_parameters()
1593 list->Parameters[first_param].StateIndexes[0]++; in _mesa_optimize_state_parameters()
1595 param_diff = last_param - first_param; in _mesa_optimize_state_parameters()
1599 list->Parameters[first_param].StateIndexes[2] = size; in _mesa_optimize_state_parameters()
1600 list->Parameters[first_param].Size = size * 4; in _mesa_optimize_state_parameters()
1605 if (list->Parameters[first_param].Size != 4) in _mesa_optimize_state_parameters()
1630 while (first_param + (num_lights + 1) * num_attribs <= in _mesa_optimize_state_parameters()
1633 unsigned i = 0, base = first_param + num_lights * num_attribs; in _mesa_optimize_state_parameters()
1636 if (list->Parameters[first_param].StateIndexes[1] + num_lights == in _mesa_optimize_state_parameters()
1663 if (last_param > first_param) { in _mesa_optimize_state_parameters()
1664 param_diff = last_param - first_param; in _mesa_optimize_state_parameters()
1666 list->Parameters[first_param].StateIndexes[0] = state; in _mesa_optimize_state_parameters()
1667 list->Parameters[first_param].StateIndexes[2] = num_lights; in _mesa_optimize_state_parameters()
1668 list->Parameters[first_param].Size = (param_diff + 1) * 4; in _mesa_optimize_state_parameters()
1675 if (list->Parameters[first_param].Size != 4) in _mesa_optimize_state_parameters()
1678 for (int i = first_param + 1; i < (int)list->NumParameters; i++) { in _mesa_optimize_state_parameters()
1689 if (last_param > first_param) { in _mesa_optimize_state_parameters()
1690 param_diff = last_param - first_param; in _mesa_optimize_state_parameters()
1697 list->Parameters[first_param].StateIndexes[0]++; in _mesa_optimize_state_parameters()
1701 list->Parameters[first_param].StateIndexes[2] = size; in _mesa_optimize_state_parameters()
1702 list->Parameters[first_param].Size = size * 4; in _mesa_optimize_state_parameters()
1708 free((void*)list->Parameters[first_param].Name); in _mesa_optimize_state_parameters()
1709 list->Parameters[first_param].Name = in _mesa_optimize_state_parameters()
1710 _mesa_program_state_string(list->Parameters[first_param].StateIndexes); in _mesa_optimize_state_parameters()
1713 for (int i = first_param + 1; i <= last_param; i++) in _mesa_optimize_state_parameters()
1718 memmove(&list->Parameters[first_param + 1], in _mesa_optimize_state_parameters()