virgl: do not warn about display-target binding
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 10 Apr 2019 10:22:34 +0000 (12:22 +0200)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Thu, 11 Apr 2019 07:53:22 +0000 (09:53 +0200)
We never want to display a transfer-temp surface, so let's ignore that
flag when calculating the new binding flags.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
src/gallium/drivers/virgl/virgl_texture.c

index c5226f21421c3ea4e4059c8241a696ed65f681f7..75ee059fe76165debcbbb9f4413568eb1bcc4cb4 100644 (file)
@@ -64,7 +64,7 @@ static void virgl_copy_region_with_blit(struct pipe_context *pipe,
 static unsigned temp_bind(unsigned orig)
 {
    unsigned warn = ~(PIPE_BIND_RENDER_TARGET | PIPE_BIND_DEPTH_STENCIL |
-                     PIPE_BIND_SAMPLER_VIEW);
+                     PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_DISPLAY_TARGET);
    if (orig & warn)
       fprintf(stderr, "Waring, possibly unhandled bind: %x\n", orig & warn);
    return orig & (PIPE_BIND_DEPTH_STENCIL | PIPE_BIND_RENDER_TARGET);