mesa/st: emit string marker based on PIPE_CAP_STRING_MARKER

Fixes: 10ac88b72f ("mesa/st: drop emit string marker device table entry.")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18803>
This commit is contained in:
Yiwei Zhang 2022-09-25 00:37:25 +00:00 committed by Marge Bot
parent 0fba2e0d1e
commit 37900ee2dd
3 changed files with 5 additions and 1 deletions

View file

@ -1089,7 +1089,7 @@ _mesa_DebugMessageInsert(GLenum source, GLenum type, GLuint id,
gl_enum_to_debug_severity(severity),
length, buf);
if (type == GL_DEBUG_TYPE_MARKER && ctx->pipe->emit_string_marker) {
if (type == GL_DEBUG_TYPE_MARKER && ctx->has_string_marker) {
ctx->pipe->emit_string_marker(ctx->pipe, buf, length);
}
}

View file

@ -3631,6 +3631,7 @@ struct gl_context
struct st_config_options *st_opts;
struct cso_context *cso_context;
bool has_invalidate_buffer;
bool has_string_marker;
/* On old libGL's for linux we need to invalidate the drawables
* on glViewpport calls, this is set via a option.
*/

View file

@ -890,6 +890,9 @@ st_create_context(gl_api api, struct pipe_context *pipe,
if (pipe->screen->get_param(pipe->screen, PIPE_CAP_INVALIDATE_BUFFER))
ctx->has_invalidate_buffer = true;
if (pipe->screen->get_param(pipe->screen, PIPE_CAP_STRING_MARKER))
ctx->has_string_marker = true;
st = st_create_context_priv(ctx, pipe, options);
if (!st) {
_mesa_free_context_data(ctx, true);