To pipe drivers, external textures are just 2D textures.
Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
case GL_TEXTURE_1D:
return PIPE_TEXTURE_1D;
case GL_TEXTURE_2D:
+ case GL_TEXTURE_EXTERNAL_OES:
return PIPE_TEXTURE_2D;
case GL_TEXTURE_RECTANGLE_NV:
return PIPE_TEXTURE_RECT;
case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB:
case GL_TEXTURE_RECTANGLE_NV:
case GL_TEXTURE_2D_ARRAY_EXT:
+ case GL_TEXTURE_EXTERNAL_OES:
return 2;
case GL_TEXTURE_3D:
return 3;
#if FEATURE_OES_EGL_image
ctx->Extensions.OES_EGL_image = GL_TRUE;
+ if (ctx->API != API_OPENGL)
+ ctx->Extensions.OES_EGL_image_external = GL_TRUE;
#endif
#if FEATURE_OES_draw_texture
ctx->Extensions.OES_draw_texture = GL_TRUE;
case GLSL_SAMPLER_DIM_BUF:
assert(!"FINISHME: Implement ARB_texture_buffer_object");
break;
+ case GLSL_SAMPLER_DIM_EXTERNAL:
+ inst->tex_target = TEXTURE_EXTERNAL_INDEX;
+ break;
default:
assert(!"Should not get here.");
}
case TEXTURE_RECT_INDEX: return TGSI_TEXTURE_RECT;
case TEXTURE_1D_ARRAY_INDEX: return TGSI_TEXTURE_1D_ARRAY;
case TEXTURE_2D_ARRAY_INDEX: return TGSI_TEXTURE_2D_ARRAY;
+ case TEXTURE_EXTERNAL_INDEX: return TGSI_TEXTURE_2D;
default:
debug_assert( 0 );
return TGSI_TEXTURE_1D;
break;
case GL_TEXTURE_2D:
case GL_TEXTURE_RECTANGLE:
+ case GL_TEXTURE_EXTERNAL_OES:
assert(depthIn == 1);
*widthOut = widthIn;
*heightOut = heightIn;