summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorNeha Bhende <[email protected]>2016-08-19 13:52:57 -0600
committerBrian Paul <[email protected]>2016-08-26 06:19:52 -0600
commit3b7341d5476fbeda7df673216d86d062fefd2a55 (patch)
treea534e72a5eba23ae9015b66cfa127ed19cea6292 /src/gallium/drivers
parentb09e4ab13cdde9b0d465c214e6e30452c690eeb1 (diff)
svga: use local variable blit instead of pointer
Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/svga/svga_pipe_blit.c59
1 files changed, 30 insertions, 29 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_blit.c b/src/gallium/drivers/svga/svga_pipe_blit.c
index 9d8c4fe3084..ea0b3968c39 100644
--- a/src/gallium/drivers/svga/svga_pipe_blit.c
+++ b/src/gallium/drivers/svga/svga_pipe_blit.c
@@ -258,12 +258,13 @@ svga_blit(struct pipe_context *pipe,
const struct pipe_blit_info *blit_info)
{
struct svga_context *svga = svga_context(pipe);
+ struct pipe_blit_info blit = *blit_info;
if (!svga_have_vgpu10(svga) &&
- blit_info->src.resource->nr_samples > 1 &&
- blit_info->dst.resource->nr_samples <= 1 &&
- !util_format_is_depth_or_stencil(blit_info->src.resource->format) &&
- !util_format_is_pure_integer(blit_info->src.resource->format)) {
+ blit.src.resource->nr_samples > 1 &&
+ blit.dst.resource->nr_samples <= 1 &&
+ !util_format_is_depth_or_stencil(blit.src.resource->format) &&
+ !util_format_is_pure_integer(blit.src.resource->format)) {
debug_printf("svga: color resolve unimplemented\n");
return;
}
@@ -271,53 +272,53 @@ svga_blit(struct pipe_context *pipe,
if (can_blit_via_copy_region_vgpu10(svga, blit_info)) {
unsigned src_face, src_z, dst_face, dst_z;
- if (blit_info->src.resource->target == PIPE_TEXTURE_CUBE) {
- src_face = blit_info->src.box.z;
+ if (blit.src.resource->target == PIPE_TEXTURE_CUBE) {
+ src_face = blit.src.box.z;
src_z = 0;
- assert(blit_info->src.box.depth == 1);
+ assert(blit.src.box.depth == 1);
}
else {
src_face = 0;
- src_z = blit_info->src.box.z;
+ src_z = blit.src.box.z;
}
- if (blit_info->dst.resource->target == PIPE_TEXTURE_CUBE) {
- dst_face = blit_info->dst.box.z;
+ if (blit.dst.resource->target == PIPE_TEXTURE_CUBE) {
+ dst_face = blit.dst.box.z;
dst_z = 0;
- assert(blit_info->src.box.depth == 1);
+ assert(blit.src.box.depth == 1);
}
else {
dst_face = 0;
- dst_z = blit_info->dst.box.z;
+ dst_z = blit.dst.box.z;
}
copy_region_vgpu10(svga,
- blit_info->src.resource,
- blit_info->src.box.x, blit_info->src.box.y, src_z,
- blit_info->src.level, src_face,
- blit_info->dst.resource,
- blit_info->dst.box.x, blit_info->dst.box.y, dst_z,
- blit_info->dst.level, dst_face,
- blit_info->src.box.width, blit_info->src.box.height,
- blit_info->src.box.depth);
+ blit.src.resource,
+ blit.src.box.x, blit.src.box.y, src_z,
+ blit.src.level, src_face,
+ blit.dst.resource,
+ blit.dst.box.x, blit.dst.box.y, dst_z,
+ blit.dst.level, dst_face,
+ blit.src.box.width, blit.src.box.height,
+ blit.src.box.depth);
return;
}
if (util_can_blit_via_copy_region(blit_info, TRUE) ||
util_can_blit_via_copy_region(blit_info, FALSE)) {
- util_resource_copy_region(pipe, blit_info->dst.resource,
- blit_info->dst.level,
- blit_info->dst.box.x, blit_info->dst.box.y,
- blit_info->dst.box.z, blit_info->src.resource,
- blit_info->src.level, &blit_info->src.box);
+ util_resource_copy_region(pipe, blit.dst.resource,
+ blit.dst.level,
+ blit.dst.box.x, blit.dst.box.y,
+ blit.dst.box.z, blit.src.resource,
+ blit.src.level, &blit.src.box);
return; /* done */
}
- if ((blit_info->mask & PIPE_MASK_S) ||
+ if ((blit.mask & PIPE_MASK_S) ||
!util_blitter_is_blit_supported(svga->blitter, blit_info)) {
debug_printf("svga: blit unsupported %s -> %s\n",
- util_format_short_name(blit_info->src.resource->format),
- util_format_short_name(blit_info->dst.resource->format));
+ util_format_short_name(blit.src.resource->format),
+ util_format_short_name(blit.dst.resource->format));
return;
}
@@ -347,7 +348,7 @@ svga_blit(struct pipe_context *pipe,
svga->curr.sampler_views[PIPE_SHADER_FRAGMENT]);
/*util_blitter_save_render_condition(svga->blitter, svga->render_cond_query,
svga->render_cond_cond, svga->render_cond_mode);*/
- util_blitter_blit(svga->blitter, blit_info);
+ util_blitter_blit(svga->blitter, &blit);
}