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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user