From e6428092f5e1f5e2dc59601487096fd0ebb3ba6c Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sun, 2 Apr 2017 02:13:12 +0200 Subject: gallium: decrease the size of pipe_resource - 64 -> 48 bytes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some other changes needed here. Reviewed-by: Nicolai Hähnle Reviewed-by: Brian Paul --- src/gallium/auxiliary/vl/vl_video_buffer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gallium/auxiliary/vl') diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.c b/src/gallium/auxiliary/vl/vl_video_buffer.c index f6b3cb5e9f9..3b97ac81af9 100644 --- a/src/gallium/auxiliary/vl/vl_video_buffer.c +++ b/src/gallium/auxiliary/vl/vl_video_buffer.c @@ -248,6 +248,8 @@ vl_video_buffer_template(struct pipe_resource *templ, unsigned depth, unsigned array_size, unsigned usage, unsigned plane) { + unsigned height = tmpl->height; + memset(templ, 0, sizeof(*templ)); if (depth > 1) templ->target = PIPE_TEXTURE_3D; @@ -257,14 +259,14 @@ vl_video_buffer_template(struct pipe_resource *templ, templ->target = PIPE_TEXTURE_2D; templ->format = resource_format; templ->width0 = tmpl->width; - templ->height0 = tmpl->height; templ->depth0 = depth; templ->array_size = array_size; templ->bind = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET | tmpl->bind; templ->usage = usage; - vl_video_buffer_adjust_size(&templ->width0, &templ->height0, plane, + vl_video_buffer_adjust_size(&templ->width0, &height, plane, tmpl->chroma_format, false); + templ->height0 = height; } static void -- cgit v1.2.3