diff options
author | Brian Paul <[email protected]> | 2011-12-15 16:30:33 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-12-16 12:14:27 -0700 |
commit | d77b963245fd286aecd6c04f7beb748ad22129cf (patch) | |
tree | 0fc8eab8873f99b1b65013258103f2060911bde1 /src/mesa/main/formats.c | |
parent | d842a118b26a56c9c5e4310f30f70199c42ea90e (diff) |
mesa: new _mesa_prepare_mipmap_level() function for mipmap generation
This helper function is used during mipmap generation to prepare space
for the destination mipmap levels.
This improves/fixes two things:
1. If the texture object was created with glTexStorage2D, calling
_mesa_TexImage2D() to allocate the new image would generate
INVALID_OPERATION since the texture is marked as immutable.
2. _mesa_TexImage2D() always frees any existing texture image memory
before allocating new memory. That's inefficient if the existing
image is the right size already.
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/formats.c')
0 files changed, 0 insertions, 0 deletions