mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 04:40:09 +01:00
driconf: add disable_protected_content_check option
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5096>
This commit is contained in:
parent
9b0ffa9ecd
commit
18b7cafc70
3 changed files with 7 additions and 1 deletions
|
|
@ -39,6 +39,7 @@ DRI_CONF_SECTION_DEBUG
|
|||
DRI_CONF_OVERRIDE_VRAM_SIZE()
|
||||
DRI_CONF_GLX_EXTENSION_OVERRIDE()
|
||||
DRI_CONF_INDIRECT_GL_EXTENSION_OVERRIDE()
|
||||
DRI_CONF_DISABLE_PROTECTED_CONTENT_CHECK(false)
|
||||
DRI_CONF_SECTION_END
|
||||
|
||||
DRI_CONF_SECTION_MISCELLANEOUS
|
||||
|
|
|
|||
|
|
@ -833,7 +833,9 @@ dri2_create_image_from_winsys(__DRIscreen *_screen,
|
|||
/* Reject image creation if there's an inconsistency between
|
||||
* content protection status of tex and img.
|
||||
*/
|
||||
if ((tex->bind & PIPE_BIND_PROTECTED) != is_protected_content) {
|
||||
const struct driOptionCache *optionCache = &screen->dev->option_cache;
|
||||
if (!driQueryOptionb(optionCache, "disable_protected_content_check") &&
|
||||
(tex->bind & PIPE_BIND_PROTECTED) != is_protected_content) {
|
||||
pipe_resource_reference(&img->texture, NULL);
|
||||
pipe_resource_reference(&tex, NULL);
|
||||
FREE(img);
|
||||
|
|
|
|||
|
|
@ -225,6 +225,9 @@
|
|||
DRI_CONF_OPT_S(indirect_gl_extension_override, def, \
|
||||
"Allow enabling/disabling a list of indirect-GL extensions")
|
||||
|
||||
#define DRI_CONF_DISABLE_PROTECTED_CONTENT_CHECK(def) \
|
||||
DRI_CONF_OPT_B(disable_protected_content_check, def, \
|
||||
"Don't reject image import if protected_content attribute doesn't match")
|
||||
|
||||
/**
|
||||
* \brief Image quality-related options
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue