projects
/
tools
/
apitrace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c1b7ce
)
Don't try to use more samples than the implementation supports
author
José Fonseca
<jose.r.fonseca@gmail.com>
Mon, 9 May 2011 10:32:15 +0000
(11:32 +0100)
committer
José Fonseca
<jose.r.fonseca@gmail.com>
Mon, 9 May 2011 10:32:15 +0000
(11:32 +0100)
glretrace.py
patch
|
blob
|
history
diff --git
a/glretrace.py
b/glretrace.py
index
60cbb24
..
d306754
100644
(file)
--- a/
glretrace.py
+++ b/
glretrace.py
@@
-178,6
+178,15
@@
class GlRetracer(Retracer):
Retracer.extract_arg(self, function, arg, arg_type, lvalue, rvalue)
+ # Don't try to use more samples than the implementation supports
+ if arg.name == 'samples':
+ assert arg.type is glapi.GLsizei
+ print ' GLint max_samples = 0;'
+ print ' glGetIntegerv(GL_MAX_SAMPLES, &max_samples);'
+ print ' if (samples > max_samples) {'
+ print ' samples = max_samples;'
+ print ' }'
+
if __name__ == '__main__':
print r'''