/* generic attributes */
for (at = actx->attribs; at->func; at++) {
const GLubyte *src = at->array->BufferObj->Data
- + (GLuint) at->array->Ptr
+ + (unsigned long) at->array->Ptr
+ elt * at->array->StrideB;
at->func( at->index, src );
}
/* conventional arrays */
for (aa = actx->arrays; aa->func ; aa++) {
const GLubyte *src = aa->array->BufferObj->Data
- + (GLuint) aa->array->Ptr
+ + (unsigned long) aa->array->Ptr
+ elt * aa->array->StrideB;
aa->func( src );
}
{
*attrib = parse_integer(inst, Program);
- if ((*attrib < 0) || (*attrib > MAX_VERTEX_PROGRAM_ATTRIBS))
+ if (*attrib > MAX_VERTEX_PROGRAM_ATTRIBS)
{
_mesa_set_program_error (ctx, Program->Position,
"Invalid generic vertex attribute index");
{
*coord = parse_integer (inst, Program);
- if ((*coord < 0) || (*coord >= ctx->Const.MaxTextureUnits)) {
+ if (*coord >= ctx->Const.MaxTextureUnits) {
_mesa_set_program_error (ctx, Program->Position,
"Invalid texture unit index");
_mesa_error (ctx, GL_INVALID_OPERATION, "Invalid texture unit index");
parse_param (GLcontext * ctx, GLubyte ** inst, struct var_cache **vc_head,
struct arb_program *Program)
{
- GLuint found, specified_length, err;
+ GLuint found, err;
+ GLint specified_length;
char *error_msg;
struct var_cache *param_var;
GLboolean *IsRelOffset )
{
struct var_cache *src;
- GLuint binding_state, binding_idx, is_generic, found, offset;
+ GLuint binding_state, binding_idx, is_generic, found;
+ GLint offset;
/* And the binding for the src */
switch (*(*inst)++) {
Node *n;
GLboolean error = GL_FALSE;
- if (mode < GL_POINTS || mode > GL_POLYGON) {
+ if (/*mode < GL_POINTS ||*/ mode > GL_POLYGON) {
_mesa_compile_error( ctx, GL_INVALID_ENUM, "Begin (mode)");
error = GL_TRUE;
}