/*@}*/
/**
- * \name GL_OES_EGL_image interface
- */
- void (*EGLImageTargetTexture2D)(struct gl_context *ctx, GLenum target,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage,
- GLeglImageOES image_handle);
- void (*EGLImageTargetRenderbufferStorage)(struct gl_context *ctx,
- struct gl_renderbuffer *rb,
- void *image_handle);
-
- /**
- * \name GL_EXT_EGL_image_storage interface
- */
- void (*EGLImageTargetTexStorage)(struct gl_context *ctx, GLenum target,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage,
- GLeglImageOES image_handle);
-
- /**
* \name GL_ARB_texture_multisample
*/
void (*GetSamplePosition)(struct gl_context *ctx,
#include "texobj.h"
#include "state_tracker/st_cb_fbo.h"
+#include "state_tracker/st_cb_eglimage.h"
+
/**
* Notes:
*
FLUSH_VERTICES(ctx, _NEW_BUFFERS, 0);
- ctx->Driver.EGLImageTargetRenderbufferStorage(ctx, rb, image);
+ st_egl_image_target_renderbuffer_storage(ctx, rb, image);
}
#include "state_tracker/st_cb_texture.h"
#include "state_tracker/st_format.h"
#include "state_tracker/st_gen_mipmap.h"
+#include "state_tracker/st_cb_eglimage.h"
/**
* Returns a corresponding internal floating point format for a given base
texObj->External = GL_TRUE;
if (tex_storage) {
- ctx->Driver.EGLImageTargetTexStorage(ctx, target, texObj, texImage,
- image);
+ st_egl_image_target_tex_storage(ctx, target, texObj, texImage,
+ image);
} else {
- ctx->Driver.EGLImageTargetTexture2D(ctx, target, texObj, texImage,
- image);
+ st_egl_image_target_texture_2d(ctx, target, texObj, texImage,
+ image);
}
_mesa_dirty_texobj(ctx, texObj);
return base_format;
}
-static void
+void
st_egl_image_target_renderbuffer_storage(struct gl_context *ctx,
- struct gl_renderbuffer *rb,
- GLeglImageOES image_handle)
+ struct gl_renderbuffer *rb,
+ GLeglImageOES image_handle)
{
struct st_renderbuffer *strb = st_renderbuffer(rb);
struct st_egl_image stimg;
_mesa_dirty_texobj(ctx, texObj);
}
-static void
+void
st_egl_image_target_texture_2d(struct gl_context *ctx, GLenum target,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage,
- GLeglImageOES image_handle)
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage,
+ GLeglImageOES image_handle)
{
struct st_egl_image stimg;
bool native_supported;
pipe_resource_reference(&stimg.texture, NULL);
}
-static void
+void
st_egl_image_target_tex_storage(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage,
st_init_eglimage_functions(struct dd_function_table *functions,
bool has_egl_image_validate)
{
- functions->EGLImageTargetTexture2D = st_egl_image_target_texture_2d;
- functions->EGLImageTargetTexStorage = st_egl_image_target_tex_storage;
- functions->EGLImageTargetRenderbufferStorage = st_egl_image_target_renderbuffer_storage;
-
if (has_egl_image_validate)
functions->ValidateEGLImage = st_validate_egl_image;
}
st_init_eglimage_functions(struct dd_function_table *functions,
bool has_egl_image_validate);
+void st_egl_image_target_texture_2d(struct gl_context *ctx, GLenum target,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage,
+ GLeglImageOES image_handle);
+void st_egl_image_target_tex_storage(struct gl_context *ctx, GLenum target,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage,
+ GLeglImageOES image_handle);
+void st_egl_image_target_renderbuffer_storage(struct gl_context *ctx,
+ struct gl_renderbuffer *rb,
+ GLeglImageOES image_handle);
#endif /* ST_CB_EGLIMAGE_H */