Mesa (master): mesa: Update TexStorage to support ARB_texture_view

Brian Paul brianp at kemper.freedesktop.org
Fri Dec 13 19:44:53 UTC 2013


Module: Mesa
Branch: master
Commit: 375f660e27d418a09cda75cf49ace2eb0211e64f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=375f660e27d418a09cda75cf49ace2eb0211e64f

Author: Courtney Goeltzenleuchter <courtney at LunarG.com>
Date:   Mon Nov  4 13:31:37 2013 -0700

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 at LunarG.com>

Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/mesa/main/teximage.c   |    6 ++++++
 src/mesa/main/texstorage.c |    5 +++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 7ec3e20..f9427dc 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -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);
    }
 }
diff --git a/src/mesa/main/texstorage.c b/src/mesa/main/texstorage.c
index 1dd63a3..5062fdb 100644
--- a/src/mesa/main/texstorage.c
+++ b/src/mesa/main/texstorage.c
@@ -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);
+
    }
 }
 




More information about the mesa-commit mailing list