diff options
author | Philipp Zabel <[email protected]> | 2017-03-29 09:44:20 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-03-29 18:04:12 +0200 |
commit | d10172d52791b1fc0b791dd10c823668ecb7a4f8 (patch) | |
tree | 9760aaa4786acda22389553da6ce42a239b7d7a9 /src/mesa/state_tracker/st_manager.c | |
parent | 2f8d6bd57844f86547b95d1381c82aaceb83c356 (diff) |
st/mesa: move st_manager_get_egl_image_surface into st_cb_eglimage.c
The only callers are here, and we will add generation of GL errors in
the following patch. Rename the function to st_egl_image_get_surface,
pass the gl_context instead of st_context, and move the cast from
GLeglImageOES to void* into st_egl_image_get_surface.
Signed-off-by: Philipp Zabel <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_manager.c')
-rw-r--r-- | src/mesa/state_tracker/st_manager.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 5942bb7c8f4..f469ebd3a0d 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -844,36 +844,6 @@ st_manager_flush_frontbuffer(struct st_context *st) } /** - * Return the surface of an EGLImage. - * FIXME: I think this should operate on resources, not surfaces - */ -struct pipe_surface * -st_manager_get_egl_image_surface(struct st_context *st, void *eglimg) -{ - struct st_manager *smapi = - (struct st_manager *) st->iface.st_context_private; - struct st_egl_image stimg; - struct pipe_surface *ps, surf_tmpl; - - if (!smapi || !smapi->get_egl_image) - return NULL; - - memset(&stimg, 0, sizeof(stimg)); - if (!smapi->get_egl_image(smapi, eglimg, &stimg)) - return NULL; - - u_surface_default_template(&surf_tmpl, stimg.texture); - surf_tmpl.format = stimg.format; - surf_tmpl.u.tex.level = stimg.level; - surf_tmpl.u.tex.first_layer = stimg.layer; - surf_tmpl.u.tex.last_layer = stimg.layer; - ps = st->pipe->create_surface(st->pipe, stimg.texture, &surf_tmpl); - pipe_resource_reference(&stimg.texture, NULL); - - return ps; -} - -/** * Re-validate the framebuffers. */ void |