mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-10 02:50:28 +01:00
mesa: remove redundant modulus operation
The if check above means we can only get here if size is less than 4. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
4a6fdeab05
commit
fd461b22e9
1 changed files with 2 additions and 3 deletions
|
|
@ -267,9 +267,8 @@ _mesa_add_parameter(struct gl_program_parameter_list *paramList,
|
|||
COPY_4V(paramList->ParameterValues[oldNum + i], values);
|
||||
} else {
|
||||
/* copy 1, 2 or 3 values */
|
||||
GLuint remaining = size % 4;
|
||||
assert(remaining < 4);
|
||||
for (j = 0; j < remaining; j++) {
|
||||
assert(size < 4);
|
||||
for (j = 0; j < size; j++) {
|
||||
paramList->ParameterValues[oldNum + i][j].f = values[j].f;
|
||||
}
|
||||
/* fill in remaining positions with zeros */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue