mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 13:10:10 +01:00
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:
parent
0fba2e0d1e
commit
37900ee2dd
3 changed files with 5 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue