mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 10:08:08 +02:00
mesa: use Elements() macro in program printing code
This commit is contained in:
parent
c67d9cfd9d
commit
529fa77529
1 changed files with 4 additions and 4 deletions
|
|
@ -157,11 +157,11 @@ arb_input_attrib_string(GLint index, GLenum progType)
|
|||
assert(strcmp(vertAttribs[VERT_ATTRIB_GENERIC15], "vertex.attrib[15]") == 0);
|
||||
|
||||
if (progType == GL_VERTEX_PROGRAM_ARB) {
|
||||
assert(index < sizeof(vertAttribs) / sizeof(vertAttribs[0]));
|
||||
assert(index < Elements(vertAttribs));
|
||||
return vertAttribs[index];
|
||||
}
|
||||
else {
|
||||
assert(index < sizeof(fragAttribs) / sizeof(fragAttribs[0]));
|
||||
assert(index < Elements(fragAttribs));
|
||||
return fragAttribs[index];
|
||||
}
|
||||
}
|
||||
|
|
@ -246,11 +246,11 @@ arb_output_attrib_string(GLint index, GLenum progType)
|
|||
};
|
||||
|
||||
if (progType == GL_VERTEX_PROGRAM_ARB) {
|
||||
assert(index < sizeof(vertResults) / sizeof(vertResults[0]));
|
||||
assert(index < Elements(vertResults));
|
||||
return vertResults[index];
|
||||
}
|
||||
else {
|
||||
assert(index < sizeof(fragResults) / sizeof(fragResults[0]));
|
||||
assert(index < Elements(fragResults));
|
||||
return fragResults[index];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue