Module: Mesa Branch: main Commit: fcdfe91efa387dbcc01d5f18a4c711aaf5eb8d78 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fcdfe91efa387dbcc01d5f18a4c711aaf5eb8d78
Author: Pierre-Eric Pelloux-Prayer <[email protected]> Date: Tue Jun 1 14:02:46 2021 +0200 frontend/dri: fix bool/int comparison Cast tex->bind & PIPE_BIND_PROTECTED to a bool before doing the comparison, otherwise it'll incorrectly fail. Reviewed-by: Marek Olšák <[email protected]> Fixes: 18b7cafc700 ("driconf: add disable_protected_content_check option") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11107> --- src/gallium/frontends/dri/dri2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c index cb7d2478fe5..128b8f15a75 100644 --- a/src/gallium/frontends/dri/dri2.c +++ b/src/gallium/frontends/dri/dri2.c @@ -908,7 +908,7 @@ dri2_create_image_from_winsys(__DRIscreen *_screen, */ const struct driOptionCache *optionCache = &screen->dev->option_cache; if (!driQueryOptionb(optionCache, "disable_protected_content_check") && - (tex->bind & PIPE_BIND_PROTECTED) != is_protected_content) { + (bool)(tex->bind & PIPE_BIND_PROTECTED) != is_protected_content) { pipe_resource_reference(&img->texture, NULL); pipe_resource_reference(&tex, NULL); FREE(img); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
