diff options
author | Eric Anholt <eric@anholt.net> | 2015-12-07 15:18:59 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2015-12-11 17:03:03 -0800 |
commit | c5ca18ec2fb1ce5b5bfbe94543e4244815092d76 (patch) | |
tree | 46b2bed1b8c766d5a009ee0d98823039a5f31b45 /src/gallium/drivers | |
parent | f6cca7a0c91ba1a99271160b9b4c7f22d012a334 (diff) |
vc4: Allow RCL blits to the edge of the surface.
The recent unaligned fix successfully prevented RCL blits that weren't
aligned inside of the surface, but we also want to be able to do RCL blits
for the whole surface when the width or height of the surface aren't
aligned (we don't care what renders inside of the padding).
(cherry picked from commit bf92017ace970104b24219fad0ce5b51bc4509b5)
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_blit.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/vc4/vc4_blit.c b/src/gallium/drivers/vc4/vc4_blit.c index 6f5c91d0909..11d499adc32 100644 --- a/src/gallium/drivers/vc4/vc4_blit.c +++ b/src/gallium/drivers/vc4/vc4_blit.c @@ -70,10 +70,16 @@ vc4_tile_blit(struct pipe_context *pctx, const struct pipe_blit_info *info) return false; } + int dst_surface_width = u_minify(info->dst.resource->width0, + info->dst.level); + int dst_surface_height = u_minify(info->dst.resource->height0, + info->dst.level); if (is_tile_unaligned(info->dst.box.x, tile_width) || is_tile_unaligned(info->dst.box.y, tile_height) || - is_tile_unaligned(info->dst.box.width, tile_width) || - is_tile_unaligned(info->dst.box.height, tile_height)) { + (is_tile_unaligned(info->dst.box.width, tile_width) && + info->dst.box.x + info->dst.box.width != dst_surface_width) || + (is_tile_unaligned(info->dst.box.height, tile_height) && + info->dst.box.y + info->dst.box.height != dst_surface_height)) { return false; } |