summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_pipe_blit.c
diff options
context:
space:
mode:
authorNeha Bhende <[email protected]>2016-09-21 12:27:14 -0700
committerBrian Paul <[email protected]>2016-11-03 14:29:22 -0600
commit2cff6f4512a174a23ee6c1d2583c22e24ee1a240 (patch)
tree41f33a60b2fe89d0b0e764ffa3789711af432531 /src/gallium/drivers/svga/svga_pipe_blit.c
parent9a9627a791194a35ffd3573fbfa008cba0511a68 (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_pipe_blit.c')
-rw-r--r--src/gallium/drivers/svga/svga_pipe_blit.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_blit.c b/src/gallium/drivers/svga/svga_pipe_blit.c
index 28b3c69ea40..75576f2d72c 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)