diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 2844d76fec9..af54e02deec 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -333,25 +333,6 @@ struct dd_function_table { GLfloat width, GLfloat height); /*@}*/ - /** - * \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 */ diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 1227e3692d6..2125893c81c 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -52,6 +52,8 @@ #include "texobj.h" #include "state_tracker/st_cb_fbo.h" +#include "state_tracker/st_cb_eglimage.h" + /** * Notes: * @@ -2754,7 +2756,7 @@ _mesa_EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image) FLUSH_VERTICES(ctx, _NEW_BUFFERS, 0); - ctx->Driver.EGLImageTargetRenderbufferStorage(ctx, rb, image); + st_egl_image_target_renderbuffer_storage(ctx, rb, image); } diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index a219f74fda6..dffae30aa76 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -60,6 +60,7 @@ #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 @@ -3452,11 +3453,11 @@ egl_image_target_texture(struct gl_context *ctx, 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); diff --git a/src/mesa/state_tracker/st_cb_eglimage.c b/src/mesa/state_tracker/st_cb_eglimage.c index a89316aa13b..ec7dcad0323 100644 --- a/src/mesa/state_tracker/st_cb_eglimage.c +++ b/src/mesa/state_tracker/st_cb_eglimage.c @@ -226,10 +226,10 @@ st_pipe_format_to_base_format(enum pipe_format format) 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; @@ -395,11 +395,11 @@ st_bind_egl_image(struct gl_context *ctx, _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; @@ -415,7 +415,7 @@ st_egl_image_target_texture_2d(struct gl_context *ctx, GLenum target, 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, @@ -447,10 +447,6 @@ void 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; } diff --git a/src/mesa/state_tracker/st_cb_eglimage.h b/src/mesa/state_tracker/st_cb_eglimage.h index 9bdffa5ca7a..4a28690f70e 100644 --- a/src/mesa/state_tracker/st_cb_eglimage.h +++ b/src/mesa/state_tracker/st_cb_eglimage.h @@ -35,4 +35,15 @@ extern void 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 */