mesa/st: convert the non-optional egl image to direct calls
Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
This commit is contained in:
parent
7b066ebfb3
commit
601c30c8c1
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue