mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
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
1 changed files with 1 additions and 1 deletions
|
|
@ -908,7 +908,7 @@ dri2_create_image_from_winsys(__DRIscreen *_screen,
|
||||||
*/
|
*/
|
||||||
const struct driOptionCache *optionCache = &screen->dev->option_cache;
|
const struct driOptionCache *optionCache = &screen->dev->option_cache;
|
||||||
if (!driQueryOptionb(optionCache, "disable_protected_content_check") &&
|
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(&img->texture, NULL);
|
||||||
pipe_resource_reference(&tex, NULL);
|
pipe_resource_reference(&tex, NULL);
|
||||||
FREE(img);
|
FREE(img);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue