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@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
This commit is contained in:
Erik Faye-Lund 2019-04-10 12:18:33 +02:00
parent 8f1a147d68
commit 27d94a83cd
1 changed files with 4 additions and 3 deletions

View File

@ -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);
}