mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
If parameter is a 'counter', raise GL_INVALID_VALUE if value is negative
Fixes bug 10984.
This commit is contained in:
parent
9993ccce69
commit
a52ce9de7d
1 changed files with 8 additions and 0 deletions
|
|
@ -554,6 +554,14 @@ generic_%u_byte( GLint rop, const void * ptr )
|
|||
condition_list = []
|
||||
for p in f.parameterIterateCounters():
|
||||
condition_list.append( "%s >= 0" % (p.name) )
|
||||
# 'counter' parameters cannot be negative
|
||||
print " if (%s < 0) {" % p.name
|
||||
print " __glXSetError(gc, GL_INVALID_VALUE);"
|
||||
if f.return_type != 'void':
|
||||
print " return 0;"
|
||||
else:
|
||||
print " return;"
|
||||
print " }"
|
||||
|
||||
if skip_condition:
|
||||
condition_list.append( skip_condition )
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue