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]) {
|
switch (info->input_semantic_name[i]) {
|
||||||
case TGSI_SEMANTIC_COLOR:
|
case TGSI_SEMANTIC_COLOR:
|
||||||
assert(index <= ATTR_COLOR_COUNT);
|
assert(index < ATTR_COLOR_COUNT);
|
||||||
fs_inputs->color[index] = i;
|
fs_inputs->color[index] = i;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TGSI_SEMANTIC_GENERIC:
|
case TGSI_SEMANTIC_GENERIC:
|
||||||
assert(index <= ATTR_GENERIC_COUNT);
|
assert(index < ATTR_GENERIC_COUNT);
|
||||||
fs_inputs->generic[index] = i;
|
fs_inputs->generic[index] = i;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@@ -61,17 +61,17 @@ static void r300_shader_read_vs_outputs(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case TGSI_SEMANTIC_COLOR:
|
case TGSI_SEMANTIC_COLOR:
|
||||||
assert(index <= ATTR_COLOR_COUNT);
|
assert(index < ATTR_COLOR_COUNT);
|
||||||
vs_outputs->color[index] = i;
|
vs_outputs->color[index] = i;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TGSI_SEMANTIC_BCOLOR:
|
case TGSI_SEMANTIC_BCOLOR:
|
||||||
assert(index <= ATTR_COLOR_COUNT);
|
assert(index < ATTR_COLOR_COUNT);
|
||||||
vs_outputs->bcolor[index] = i;
|
vs_outputs->bcolor[index] = i;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TGSI_SEMANTIC_GENERIC:
|
case TGSI_SEMANTIC_GENERIC:
|
||||||
assert(index <= ATTR_GENERIC_COUNT);
|
assert(index < ATTR_GENERIC_COUNT);
|
||||||
vs_outputs->generic[index] = i;
|
vs_outputs->generic[index] = i;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user