Mesa (master): virgl: only warn about unchecked flags

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 11 08:09:13 UTC 2019


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

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Wed Apr 10 12:18:33 2019 +0200

virgl: only warn about unchecked flags

The other flags are already vetted, so there's no point in reporting
them.

Signed-off-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh at chromium.org>

---

 src/gallium/drivers/virgl/virgl_texture.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/virgl/virgl_texture.c b/src/gallium/drivers/virgl/virgl_texture.c
index 755b7686dd1..c5226f21421 100644
--- a/src/gallium/drivers/virgl/virgl_texture.c
+++ b/src/gallium/drivers/virgl/virgl_texture.c
@@ -63,9 +63,10 @@ static void virgl_copy_region_with_blit(struct pipe_context *pipe,
 
 static unsigned temp_bind(unsigned orig)
 {
-   if (orig & ~(PIPE_BIND_RENDER_TARGET | PIPE_BIND_DEPTH_STENCIL |
-                PIPE_BIND_SAMPLER_VIEW))
-      fprintf(stderr, "Waring, possibly unhandled bind: %x\n", orig);
+   unsigned warn = ~(PIPE_BIND_RENDER_TARGET | PIPE_BIND_DEPTH_STENCIL |
+                     PIPE_BIND_SAMPLER_VIEW);
+   if (orig & warn)
+      fprintf(stderr, "Waring, possibly unhandled bind: %x\n", orig & warn);
    return orig & (PIPE_BIND_DEPTH_STENCIL | PIPE_BIND_RENDER_TARGET);
 }
 




More information about the mesa-commit mailing list