r300g: Fix off-by-one errors in array bounds assertions.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user