mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
mesa/st: Set protected content context flag based on pipe context attributes
If the PIPE_CONTEXT_PROTECTED flag is set in the context attributes, propagate this by enabling GL_CONTEXT_FLAG_PROTECTED_CONTENT_BIT_EXT on the corresponding Mesa GL context. Signed-off-by: jinmiliu <jinming.liu@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40998>
This commit is contained in:
parent
7a627fa8f3
commit
e5392e3d5f
1 changed files with 6 additions and 0 deletions
|
|
@ -23,6 +23,9 @@
|
|||
*
|
||||
* Authors:
|
||||
* Chia-I Wu <olv@lunarg.com>
|
||||
*
|
||||
* Modifications Copyright (C) 2025-2026 Advanced Micro Devices, Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "main/mtypes.h"
|
||||
|
|
@ -1020,6 +1023,9 @@ st_api_create_context(struct pipe_frontend_screen *fscreen,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (attribs->context_flags & PIPE_CONTEXT_PROTECTED)
|
||||
st->ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_PROTECTED_CONTENT_BIT_EXT;
|
||||
|
||||
if (attribs->flags & ST_CONTEXT_FLAG_DEBUG) {
|
||||
if (!_mesa_set_debug_state_int(st->ctx, GL_DEBUG_OUTPUT, GL_TRUE)) {
|
||||
*error = ST_CONTEXT_ERROR_NO_MEMORY;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue