Module: Mesa
Branch: master
Commit: 4310649ccb37481fd0f15ab0c826ed626bf81caa
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4310649ccb37481fd0f15ab0c826ed626bf81caa

Author: Neha Bhende <[email protected]>
Date:   Wed May 10 12:17:44 2017 -0700

svga: avoid try_blit() for some depth formats on non vgpu10.

On non vgpu10, driver doesn't support util_blitter_blit for SVGA3D_Z_D16,
SVGA3D_Z_D24x8, SVGA3D_Z_D24S8. Patch fixes following piglit tests regression 
on hwv8 caused
by commit 27bf35caea5e:
spec@arb_depth_texture@fbo-depth-gl-depth-component16-blit
spec@arb_depth_texture@fbo-depth-gl-depth-component24-blit
spec@arb_depth_texture@fbo-depth-gl-depth-component32-blit

Tested with mtt-piglit on hw 8,9,10,11,13 and mtt-glretrace on windows and 
linux.

Reviewed-by: Charmaine Lee <[email protected]>

---

 src/gallium/drivers/svga/svga_pipe_blit.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/gallium/drivers/svga/svga_pipe_blit.c 
b/src/gallium/drivers/svga/svga_pipe_blit.c
index d97f623870..4237860556 100644
--- a/src/gallium/drivers/svga/svga_pipe_blit.c
+++ b/src/gallium/drivers/svga/svga_pipe_blit.c
@@ -594,6 +594,19 @@ try_blit(struct svga_context *svga, const struct 
pipe_blit_info *blit_info)
    SVGA_STATS_TIME_PUSH(sws, SVGA_STATS_TIME_BLITBLITTER);
    
    /**
+    * Avoid using util_blitter_blit() for these depth formats on non-vgpu10
+    * devices because these depth formats only support comparison mode
+    * and not ordinary sampling.
+    */
+   if (!svga_have_vgpu10(svga) && (blit.mask & PIPE_MASK_Z) &&
+       (svga_texture(dst)->key.format == SVGA3D_Z_D16 ||
+       svga_texture(dst)->key.format == SVGA3D_Z_D24X8 ||
+       svga_texture(dst)->key.format == SVGA3D_Z_D24S8)) {
+      ret = false;
+      goto done;
+  }
+
+   /**
     * If format is srgb and blend is enabled then color values need
     * to be converted into linear format.
     */

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to