summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/vl
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-04-02 02:13:12 +0200
committerMarek Olšák <[email protected]>2017-04-04 11:14:43 +0200
commite6428092f5e1f5e2dc59601487096fd0ebb3ba6c (patch)
tree5ad753c6ad615622caa14cd3d52e911e1bf92ce2 /src/gallium/auxiliary/vl
parent3dfe61ed6ec6773c2373ec7a139b7dfe794f60c8 (diff)
gallium: decrease the size of pipe_resource - 64 -> 48 bytes
Some other changes needed here. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/vl')
-rw-r--r--src/gallium/auxiliary/vl/vl_video_buffer.c6
1 files changed, 4 insertions, 2 deletions
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