From: Brian Paul Date: Sat, 11 Feb 2012 01:46:07 +0000 (-0700) Subject: st/mesa: use u_surface_default_template() helper X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fc855f85d03c0e3de54443fbfecd235e0d703be9;p=mesa.git st/mesa: use u_surface_default_template() helper Reviewed-by: Jose Fonseca --- diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 7efc17305ea..d54b7ed62bd 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -805,9 +805,7 @@ st_manager_get_egl_image_surface(struct st_context *st, if (!smapi->get_egl_image(smapi, eglimg, &stimg)) return NULL; - memset(&surf_tmpl, 0, sizeof(surf_tmpl)); - surf_tmpl.format = stimg.texture->format; - surf_tmpl.usage = usage; + u_surface_default_template(&surf_tmpl, stimg.texture, usage); surf_tmpl.u.tex.level = stimg.level; surf_tmpl.u.tex.first_layer = stimg.layer; surf_tmpl.u.tex.last_layer = stimg.layer;