[Mesa-dev] [PATCH 2/3] mesa: Handle OES_texture_view tokens

Francesco Ansanelli francians at gmail.com
Sun Aug 28 14:24:45 UTC 2016


Signed-off-by: Francesco Ansanelli <francians at gmail.com>
---
 src/mesa/main/texparam.c |   48 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index bdd3fcb..4dd97b1 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -1960,6 +1960,30 @@ get_tex_parameterfv(struct gl_context *ctx,
          *params = (GLfloat) obj->NumLayers;
          break;
 
+      case GL_TEXTURE_VIEW_MIN_LEVEL_OES:
+         if (!ctx->Extensions.OES_texture_view)
+            goto invalid_pname;
+         *params = (GLfloat) obj->MinLevel;
+         break;
+
+      case GL_TEXTURE_VIEW_NUM_LEVELS_OES:
+         if (!ctx->Extensions.OES_texture_view)
+            goto invalid_pname;
+         *params = (GLfloat) obj->NumLevels;
+         break;
+
+      case GL_TEXTURE_VIEW_MIN_LAYER_OES:
+         if (!ctx->Extensions.OES_texture_view)
+            goto invalid_pname;
+         *params = (GLfloat) obj->MinLayer;
+         break;
+
+      case GL_TEXTURE_VIEW_NUM_LAYERS_OES:
+         if (!ctx->Extensions.OES_texture_view)
+            goto invalid_pname;
+         *params = (GLfloat) obj->NumLayers;
+         break;
+
       case GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES:
          if (!_mesa_is_gles(ctx) || !ctx->Extensions.OES_EGL_image_external)
             goto invalid_pname;
@@ -2192,6 +2216,30 @@ get_tex_parameteriv(struct gl_context *ctx,
          *params = (GLint) obj->NumLayers;
          break;
 
+      case GL_TEXTURE_VIEW_MIN_LEVEL_OES:
+         if (!ctx->Extensions.OES_texture_view)
+            goto invalid_pname;
+         *params = (GLint) obj->MinLevel;
+         break;
+
+      case GL_TEXTURE_VIEW_NUM_LEVELS_OES:
+         if (!ctx->Extensions.OES_texture_view)
+            goto invalid_pname;
+         *params = (GLint) obj->NumLevels;
+         break;
+
+      case GL_TEXTURE_VIEW_MIN_LAYER_OES:
+         if (!ctx->Extensions.OES_texture_view)
+            goto invalid_pname;
+         *params = (GLint) obj->MinLayer;
+         break;
+
+      case GL_TEXTURE_VIEW_NUM_LAYERS_OES:
+         if (!ctx->Extensions.OES_texture_view)
+            goto invalid_pname;
+         *params = (GLint) obj->NumLayers;
+         break;
+
       case GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES:
          if (!_mesa_is_gles(ctx) || !ctx->Extensions.OES_EGL_image_external)
             goto invalid_pname;
-- 
1.7.9.5



More information about the mesa-dev mailing list