<param name="pixels" type="const GLvoid *"/>
</proto>
- <desc name="target">
- <value name="GL_TEXTURE_2D"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES" category="OES_texture_cube_map"/>
- </desc>
-
<desc name="internalFormat">
<value name="GL_ALPHA"/>
<param name="border" type="GLint"/>
</proto>
- <desc name="target">
- <value name="GL_TEXTURE_2D"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES" category="OES_texture_cube_map"/>
- </desc>
-
<desc name="internalFormat" error="GL_INVALID_VALUE">
<value name="GL_ALPHA"/>
<value name="GL_RGB"/>
<param name="width" type="GLsizei"/>
<param name="height" type="GLsizei"/>
</proto>
-
- <desc name="target">
- <value name="GL_TEXTURE_2D"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES" category="OES_texture_cube_map"/>
- </desc>
</template>
<template name="TexSubImage2D">
<param name="pixels" type="const GLvoid *"/>
</proto>
- <desc name="target">
- <value name="GL_TEXTURE_2D"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES" category="OES_texture_cube_map"/>
- </desc>
-
<desc name="format">
<value name="GL_ALPHA"/>
<param name="pixels" type="const GLvoid *"/>
</proto>
- <desc name="target">
- <value name="GL_TEXTURE_3D_OES"/>
- </desc>
-
<desc name="internalFormat">
<value name="GL_ALPHA"/>
<value name="GL_RGB"/>
<param name="pixels" type="const GLvoid *"/>
</proto>
- <desc name="target">
- <value name="GL_TEXTURE_3D_OES"/>
- </desc>
-
<desc name="format">
<value name="GL_ALPHA"/>
<param name="width" type="GLsizei"/>
<param name="height" type="GLsizei"/>
</proto>
-
- <desc name="target">
- <value name="GL_TEXTURE_3D_OES"/>
- </desc>
</template>
<template name="MultiTexCoord">
<param name="imagesize" type="GLsizei"/>
<param name="data" type="const GLvoid *"/>
</proto>
-
- <desc name="target">
- <value name="GL_TEXTURE_3D_OES"/>
- </desc>
</template>
<template name="CompressedTexSubImage3D">
<param name="imagesize" type="GLsizei"/>
<param name="data" type="const GLvoid *"/>
</proto>
-
- <desc name="target">
- <value name="GL_TEXTURE_3D_OES"/>
- </desc>
</template>
<template name="ActiveTexture">
<param name="data" type="const GLvoid *"/>
</proto>
- <desc name="target">
- <value name="GL_TEXTURE_2D"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES" category="OES_texture_cube_map"/>
- </desc>
-
<desc name="internalFormat">
<value name="GL_ETC1_RGB8_OES" category="OES_compressed_ETC1_RGB8_texture"/>
<param name="data" type="const GLvoid *"/>
</proto>
- <desc name="target">
- <value name="GL_TEXTURE_2D"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z" category="GLES2.0"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES" category="OES_texture_cube_map"/>
- <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES" category="OES_texture_cube_map"/>
- </desc>
-
<desc name="format">
<value name="GL_COMPRESSED_RGB_S3TC_DXT1_EXT" category="EXT_texture_compression_dxt1"/>
<value name="GL_COMPRESSED_RGBA_S3TC_DXT1_EXT" category="EXT_texture_compression_dxt1"/>
switch (target) {
case GL_TEXTURE_1D:
case GL_PROXY_TEXTURE_1D:
- return GL_TRUE;
+ return _mesa_is_desktop_gl(ctx);
default:
return GL_FALSE;
}
case 2:
switch (target) {
case GL_TEXTURE_2D:
- case GL_PROXY_TEXTURE_2D:
return GL_TRUE;
+ case GL_PROXY_TEXTURE_2D:
+ return _mesa_is_desktop_gl(ctx);
case GL_PROXY_TEXTURE_CUBE_MAP:
+ return _mesa_is_desktop_gl(ctx)
+ && ctx->Extensions.ARB_texture_cube_map;
case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
return ctx->Extensions.ARB_texture_cube_map;
case GL_TEXTURE_RECTANGLE_NV:
case GL_PROXY_TEXTURE_RECTANGLE_NV:
- return ctx->Extensions.NV_texture_rectangle;
+ return _mesa_is_desktop_gl(ctx)
+ && ctx->Extensions.NV_texture_rectangle;
case GL_TEXTURE_1D_ARRAY_EXT:
case GL_PROXY_TEXTURE_1D_ARRAY_EXT:
- return (ctx->Extensions.MESA_texture_array ||
- ctx->Extensions.EXT_texture_array);
+ return _mesa_is_desktop_gl(ctx)
+ && (ctx->Extensions.MESA_texture_array ||
+ ctx->Extensions.EXT_texture_array);
default:
return GL_FALSE;
}
case 3:
switch (target) {
case GL_TEXTURE_3D:
- case GL_PROXY_TEXTURE_3D:
return GL_TRUE;
+ case GL_PROXY_TEXTURE_3D:
+ return _mesa_is_desktop_gl(ctx);
case GL_TEXTURE_2D_ARRAY_EXT:
+ return (_mesa_is_desktop_gl(ctx)
+ && (ctx->Extensions.MESA_texture_array ||
+ ctx->Extensions.EXT_texture_array))
+ || _mesa_is_gles3(ctx);
case GL_PROXY_TEXTURE_2D_ARRAY_EXT:
- return (ctx->Extensions.MESA_texture_array ||
- ctx->Extensions.EXT_texture_array);
+ return _mesa_is_desktop_gl(ctx)
+ && (ctx->Extensions.MESA_texture_array ||
+ ctx->Extensions.EXT_texture_array);
default:
return GL_FALSE;
}
{
switch (dims) {
case 1:
- return target == GL_TEXTURE_1D;
+ return _mesa_is_desktop_gl(ctx) && target == GL_TEXTURE_1D;
case 2:
switch (target) {
case GL_TEXTURE_2D:
case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
return ctx->Extensions.ARB_texture_cube_map;
case GL_TEXTURE_RECTANGLE_NV:
- return ctx->Extensions.NV_texture_rectangle;
+ return _mesa_is_desktop_gl(ctx)
+ && ctx->Extensions.NV_texture_rectangle;
case GL_TEXTURE_1D_ARRAY_EXT:
- return (ctx->Extensions.MESA_texture_array ||
- ctx->Extensions.EXT_texture_array);
+ return _mesa_is_desktop_gl(ctx)
+ && (ctx->Extensions.MESA_texture_array ||
+ ctx->Extensions.EXT_texture_array);
default:
return GL_FALSE;
}
case GL_TEXTURE_3D:
return GL_TRUE;
case GL_TEXTURE_2D_ARRAY_EXT:
- return (ctx->Extensions.MESA_texture_array ||
- ctx->Extensions.EXT_texture_array);
+ return (_mesa_is_desktop_gl(ctx)
+ && (ctx->Extensions.MESA_texture_array ||
+ ctx->Extensions.EXT_texture_array))
+ || _mesa_is_gles3(ctx);
default:
return GL_FALSE;
}