From: Marek Olšák Date: Fri, 29 Sep 2017 20:31:21 +0000 (+0200) Subject: radeonsi: don't use the template keyword X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=da3cf0e20605af74c2a3da77e177152750a86455;p=mesa.git radeonsi: don't use the template keyword for C++ editors Reviewed-by: Brian Paul --- diff --git a/src/gallium/drivers/radeonsi/si_uvd.c b/src/gallium/drivers/radeonsi/si_uvd.c index 21582d130b4..8061f5b1fa4 100644 --- a/src/gallium/drivers/radeonsi/si_uvd.c +++ b/src/gallium/drivers/radeonsi/si_uvd.c @@ -48,7 +48,7 @@ struct pipe_video_buffer *si_video_buffer_create(struct pipe_context *pipe, struct radeon_surf *surfaces[VL_NUM_COMPONENTS] = {}; struct pb_buffer **pbs[VL_NUM_COMPONENTS] = {}; const enum pipe_format *resource_formats; - struct pipe_video_buffer template; + struct pipe_video_buffer vidtemplate; struct pipe_resource templ; unsigned i, array_size; @@ -60,15 +60,15 @@ struct pipe_video_buffer *si_video_buffer_create(struct pipe_context *pipe, return NULL; array_size = tmpl->interlaced ? 2 : 1; - template = *tmpl; - template.width = align(tmpl->width, VL_MACROBLOCK_WIDTH); - template.height = align(tmpl->height / array_size, VL_MACROBLOCK_HEIGHT); + vidtemplate = *tmpl; + vidtemplate.width = align(tmpl->width, VL_MACROBLOCK_WIDTH); + vidtemplate.height = align(tmpl->height / array_size, VL_MACROBLOCK_HEIGHT); assert(resource_formats[0] != PIPE_FORMAT_NONE); for (i = 0; i < VL_NUM_COMPONENTS; ++i) { if (resource_formats[i] != PIPE_FORMAT_NONE) { - vl_video_buffer_template(&templ, &template, + vl_video_buffer_template(&templ, &vidtemplate, resource_formats[i], 1, array_size, PIPE_USAGE_DEFAULT, i); /* Set PIPE_BIND_SHARED to avoid reallocation in r600_texture_get_handle, @@ -101,8 +101,8 @@ struct pipe_video_buffer *si_video_buffer_create(struct pipe_context *pipe, resources[i]->resource.buf); } - template.height *= array_size; - return vl_video_buffer_create_ex2(pipe, &template, (struct pipe_resource **)resources); + vidtemplate.height *= array_size; + return vl_video_buffer_create_ex2(pipe, &vidtemplate, (struct pipe_resource **)resources); error: for (i = 0; i < VL_NUM_COMPONENTS; ++i)