mesa: Update TexStorage to support ARB_texture_view

Call TextureView helper function to set TextureView state
appropriately for the TexStorage calls.

Misc updates from review feedback.

Signed-off-by: Courtney Goeltzenleuchter <courtney@LunarG.com>

Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Courtney Goeltzenleuchter 2013-11-04 13:31:37 -07:00 committed by Brian Paul
parent 1db4cb841b
commit 375f660e27
2 changed files with 9 additions and 2 deletions

View file

@ -48,6 +48,7 @@
#include "texobj.h"
#include "texstate.h"
#include "texstorage.h"
#include "textureview.h"
#include "mtypes.h"
#include "glformats.h"
@ -4335,6 +4336,11 @@ teximagemultisample(GLuint dims, GLenum target, GLsizei samples,
}
texObj->Immutable = immutable;
if (immutable) {
_mesa_set_texture_view_state(ctx, texObj, target, 1);
}
_mesa_update_fbo_texture(ctx, texObj, 0, 0);
}
}

View file

@ -39,6 +39,7 @@
#include "texobj.h"
#include "mipmap.h"
#include "texstorage.h"
#include "textureview.h"
#include "mtypes.h"
@ -415,8 +416,8 @@ texstorage(GLuint dims, GLenum target, GLsizei levels, GLenum internalformat,
return;
}
texObj->Immutable = GL_TRUE;
texObj->ImmutableLevels = levels;
_mesa_set_texture_view_state(ctx, texObj, target, levels);
}
}