]> git.cworth.org Git - apitrace/blobdiff - retrace/glstate_images.cpp
Fix max units computation.
[apitrace] / retrace / glstate_images.cpp
index f16cba41194a3c5b58ff219b1ec8fcc70d6c762a..84c6db1793b88b0581457fd39f746b2362145929 100644 (file)
@@ -467,7 +467,7 @@ dumpTextures(JSONWriter &json, Context &context)
      * proper value for this, but rather returns 0. The GL(ES) specification
      * mandates a minimum value of 2, so use this as a fall-back value.
      */
-    max_units = std::min(max_units, 2);
+    max_units = std::max(max_units, 2);
 
     for (GLint unit = 0; unit < max_units; ++unit) {
         GLenum texture = GL_TEXTURE0 + unit;