mesa: add comment/assertion on get_tex_level_parameter_buffer()
authorBrian Paul <brianp@vmware.com>
Fri, 23 Sep 2016 18:59:29 +0000 (12:59 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 6 Oct 2016 17:29:31 +0000 (11:29 -0600)
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/main/texparam.c

index bdd3fcb72dd846224d84b0871dc0172805c2de21..a8147786fa82be869f7fe1e319ddc7279415a06d 100644 (file)
@@ -1486,6 +1486,9 @@ invalid_pname:
 }
 
 
+/**
+ * Handle a glGetTexLevelParamteriv() call for a texture buffer.
+ */
 static void
 get_tex_level_parameter_buffer(struct gl_context *ctx,
                                const struct gl_texture_object *texObj,
@@ -1498,6 +1501,8 @@ get_tex_level_parameter_buffer(struct gl_context *ctx,
    GLenum baseFormat = _mesa_get_format_base_format(texFormat);
    const char *suffix = dsa ? "ture" : "";
 
+   assert(texObj->Target == GL_TEXTURE_BUFFER);
+
    if (!bo) {
       /* undefined texture buffer object */
       switch (pname) {