mesa: Update TexStorage to support ARB_texture_view
authorCourtney Goeltzenleuchter <courtney@LunarG.com>
Mon, 4 Nov 2013 20:31:37 +0000 (13:31 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 13 Dec 2013 19:31:54 +0000 (12:31 -0700)
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>
src/mesa/main/teximage.c
src/mesa/main/texstorage.c

index 7ec3e205bfe2ef2cb997dbf83561493d8763daf4..f9427dcc45f28aa6013061a11a00aa8feae2a850 100644 (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);
    }
 }
index 1dd63a3173745d9a317c3f44bc7a2f40ddf80abe..5062fdb4fd96686f17dbf32f08fb75b316d10093 100644 (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);
+
    }
 }