main/teximage: Even on failure use valid format for init()
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Fri, 21 Jul 2017 08:49:08 +0000 (11:49 +0300)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Fri, 21 Jul 2017 21:14:16 +0000 (00:14 +0300)
Otherwise init_teximage_fields_ms() (called by
_mesa_init_teximage_fields()) will always assert as it can't
find valid base format.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/main/teximage.c

index 5e13025ed1ba2df730eb40fa7e28a361129634ed..2132aaee76bfe47d485db484c85a70377aafa3c4 100644 (file)
@@ -5772,7 +5772,7 @@ texture_image_multisample(struct gl_context *ctx, GLuint dims,
              * like, but being tidy is good.
              */
             _mesa_init_teximage_fields(ctx, texImage,
-                  0, 0, 0, 0, GL_NONE, MESA_FORMAT_NONE);
+                  0, 0, 0, 0, internalformat, texFormat);
          }
       }