mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-22 04:10:40 +01:00
r300g: Fix off-by-one errors in array bounds assertions.
This commit is contained in:
parent
43f8a82a76
commit
70f8aaa0c3
2 changed files with 5 additions and 5 deletions
|
|
@ -49,12 +49,12 @@ void r300_shader_read_fs_inputs(struct tgsi_shader_info* info,
|
|||
|
||||
switch (info->input_semantic_name[i]) {
|
||||
case TGSI_SEMANTIC_COLOR:
|
||||
assert(index <= ATTR_COLOR_COUNT);
|
||||
assert(index < ATTR_COLOR_COUNT);
|
||||
fs_inputs->color[index] = i;
|
||||
break;
|
||||
|
||||
case TGSI_SEMANTIC_GENERIC:
|
||||
assert(index <= ATTR_GENERIC_COUNT);
|
||||
assert(index < ATTR_GENERIC_COUNT);
|
||||
fs_inputs->generic[index] = i;
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -61,17 +61,17 @@ static void r300_shader_read_vs_outputs(
|
|||
break;
|
||||
|
||||
case TGSI_SEMANTIC_COLOR:
|
||||
assert(index <= ATTR_COLOR_COUNT);
|
||||
assert(index < ATTR_COLOR_COUNT);
|
||||
vs_outputs->color[index] = i;
|
||||
break;
|
||||
|
||||
case TGSI_SEMANTIC_BCOLOR:
|
||||
assert(index <= ATTR_COLOR_COUNT);
|
||||
assert(index < ATTR_COLOR_COUNT);
|
||||
vs_outputs->bcolor[index] = i;
|
||||
break;
|
||||
|
||||
case TGSI_SEMANTIC_GENERIC:
|
||||
assert(index <= ATTR_GENERIC_COUNT);
|
||||
assert(index < ATTR_GENERIC_COUNT);
|
||||
vs_outputs->generic[index] = i;
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue