summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_eglimage.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_cb_eglimage.c')
-rw-r--r--src/mesa/state_tracker/st_cb_eglimage.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_cb_eglimage.c b/src/mesa/state_tracker/st_cb_eglimage.c
index b39a624a61..c4b84de790 100644
--- a/src/mesa/state_tracker/st_cb_eglimage.c
+++ b/src/mesa/state_tracker/st_cb_eglimage.c
@@ -106,6 +106,7 @@ st_bind_surface(struct gl_context *ctx, GLenum target,
struct st_texture_object *stObj;
struct st_texture_image *stImage;
GLenum internalFormat;
+ gl_format texFormat;
/* map pipe format to base format */
if (util_format_get_component_bits(ps->format, UTIL_FORMAT_COLORSPACE_RGB, 3) > 0)
@@ -122,10 +123,11 @@ st_bind_surface(struct gl_context *ctx, GLenum target,
stObj->surface_based = GL_TRUE;
}
+ texFormat = st_pipe_format_to_mesa_format(ps->format);
+
_mesa_init_teximage_fields(ctx, target, texImage,
- ps->width, ps->height, 1, 0, internalFormat);
- texImage->TexFormat = st_pipe_format_to_mesa_format(ps->format);
- _mesa_set_fetch_functions(texImage, 2);
+ ps->width, ps->height, 1, 0, internalFormat,
+ texFormat);
/* FIXME create a non-default sampler view from the pipe_surface? */
pipe_resource_reference(&stObj->pt, ps->texture);