r200: use _mesa_get_current_tex_object() in r200SetTexBuffer2()

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
radeon: use _mesa_get_current_tex_object() in radeonSetTexBuffer2()

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
mesa: use _mesa_get_current_tex_object() in GetTexLevelParameteriv()

And update a related comment.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
st/mesa: use _mesa_get_current_tex_object() in st_context_teximage()

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
swrast: use _mesa_get_current_tex_object() in swrastSetTexBuffer2()

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
mesa: remove unused _mesa_select_tex_object() function

The _mesa_get_current_tex_object() function is now used everywhere that
_mesa_select_tex_object() was formerly used.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
mesa: make _mesa_get_proxy_target() static

Wasn't used in any other file.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
translate: reindent translate_sse.c

Trivial.
gallivm: add a few const qualifiers

Trivial.
mesa: remove target param from ctx->Driver.TexParameter()

Not really used anywhere.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
mesa: formatting fixes, 78-column wrappings in dd.h

Trivial.
mesa: simplify comment in texstorage.c

Trivial.
mesa: add some comments about mipmap generation

Trivial.
mesa: don't signal _NEW_TEXTURE in TexSubImage() functions

glTexSubImage(), glCopyTexSubImage() and glCompressedTexSubImage()
only change the texel data, not other state like texture size or format.
If a driver really needs do something special it can hook into the
corresponding driver functions or Map/UnmapTextureImage().

This should avoid some needless state validation effort.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
mesa: move glBlitFramebuffer code into new blit.c file

Just for better organization.
v2: update gl_genexec.py too (not api_exec.c)

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
mesa: move glGenerateMipmap() code into new genmipmap.c file

Mipmap generation has nothing to do with FBOs.
v2: update gl_genexec.py too (not api_exec.c)

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
mesa: make several FBO functions static

The four functions in question weren't called from any other file.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
mesa: Make target_enum_to_index available outside texobj.c

The next patch will use this function in another file.

v2: Rename _mesa_target_enum_to_index to _mesa_tex_target_to_index.
Suggested by Brian.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
mesa: Use common _mesa_tex_target_to_index in tex param code

TEXTURE_BUFFER_INDEX has to be specially called out because it is not
allowed in any of the glTexParameter or glGetTexParameter functions.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
meta: Release resources used by decompress_texture_image

decompress_texture_image creates an FBO, an RBO, a VBO, a VAO, and a
sampler object, but none of them are ever released.  Later patches will
add program objects, exacerbating the problem.  Leaking piles of memory
is generally frowned upon.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Cc: "9.1 9.2 10.0" <mesa-stable@lists.freedesktop.org>