mirror of
https://github.com/reactos/reactos.git
synced 2025-05-07 10:46:58 +00:00
[MESA]
Partly sync find_value() with MESA 10.4.4. Fixes endless loop when GoogleEarth is started. GoogleEarth now loads and displays the earth, but it doesn't handle any input and makes the entire GUI hang. svn path=/trunk/; revision=66232
This commit is contained in:
parent
becf1bd404
commit
c34281f198
1 changed files with 12 additions and 2 deletions
|
@ -1132,10 +1132,20 @@ find_value(const char *func, GLenum pname, void **p, union value *v)
|
|||
mask = Elements(table) - 1;
|
||||
hash = (pname * prime_factor);
|
||||
while (1) {
|
||||
d = &values[table[hash & mask]];
|
||||
int idx = table[hash & mask];
|
||||
|
||||
/* If the enum isn't valid, the hash walk ends with index 0,
|
||||
* pointing to the first entry of values[] which doesn't hold
|
||||
* any valid enum. */
|
||||
if (unlikely(idx == 0)) {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=%s)", func,
|
||||
_mesa_lookup_enum_by_nr(pname));
|
||||
return &error_value;
|
||||
}
|
||||
|
||||
d = &values[idx];
|
||||
if (likely(d->pname == pname))
|
||||
break;
|
||||
break;
|
||||
|
||||
hash += prime_step;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue