From: Neha Bhende Date: Wed, 21 Sep 2016 19:27:14 +0000 (-0700) Subject: svga: Allow DXPredCopyRegion for depth_and_stencil formats. X-Git-Tag: upstream/17.1.0~4991 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2cff6f4512a174a23ee6c1d2583c22e24ee1a240;p=platform%2Fupstream%2Fmesa.git svga: Allow DXPredCopyRegion for depth_and_stencil formats. DXPredCopyRegion supports copy between src and dst for depth_and_stencil formats if src and dst have same formats. tested ith piglit v2: As per Brian's comment, allow DXPredCopyRegion for depth+stencil buffers if the blit mask is PIPE_MASK_ZS. Tested with piglit tests and added new piglit test arb_framebuffer_object-depth-stencil-blit to test this particular testcase. Reviewed-by: Brian Paul --- diff --git a/src/gallium/drivers/svga/svga_pipe_blit.c b/src/gallium/drivers/svga/svga_pipe_blit.c index 28b3c69..75576f2 100644 --- a/src/gallium/drivers/svga/svga_pipe_blit.c +++ b/src/gallium/drivers/svga/svga_pipe_blit.c @@ -165,7 +165,6 @@ svga_resource_copy_region(struct pipe_context *pipe, /* vgpu10 */ if (util_format_is_compressed(src_tex->format) == util_format_is_compressed(dst_tex->format) && - !util_format_is_depth_and_stencil(src_tex->format) && stex->handle != dtex->handle && svga_resource_type(src_tex->target) == svga_resource_type(dst_tex->target)) { @@ -260,9 +259,11 @@ can_blit_via_copy_region_vgpu10(struct svga_context *svga, blit_info->src.box.height != blit_info->dst.box.height) return false; - /* depth/stencil copies not supported at this time */ - if (blit_info->mask != PIPE_MASK_RGBA) - return false; + /* For depth+stencil formats, copy with maks != PIPE_MASK_ZS is not + * supported */ + if (util_format_is_depth_and_stencil(blit_info->src.format) && + blit_info->mask != (PIPE_MASK_ZS)) + return false; if (blit_info->alpha_blend || blit_info->render_condition_enable || blit_info->scissor_enable)