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 <marek.olsak@amd.com>
Fixes: 18b7cafc70
("driconf: add disable_protected_content_check option")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11107>
This commit is contained in:
parent
5e6f92f82c
commit
fcdfe91efa
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue