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> (cherry picked from commit37900ee2dd
)
This commit is contained in:
@@ -571,7 +571,7 @@
|
|||||||
"description": "mesa/st: emit string marker based on PIPE_CAP_STRING_MARKER",
|
"description": "mesa/st: emit string marker based on PIPE_CAP_STRING_MARKER",
|
||||||
"nominated": true,
|
"nominated": true,
|
||||||
"nomination_type": 1,
|
"nomination_type": 1,
|
||||||
"resolution": 0,
|
"resolution": 1,
|
||||||
"main_sha": null,
|
"main_sha": null,
|
||||||
"because_sha": "10ac88b72fac70eb3fa698179d48378600f59f74"
|
"because_sha": "10ac88b72fac70eb3fa698179d48378600f59f74"
|
||||||
},
|
},
|
||||||
|
@@ -1089,7 +1089,7 @@ _mesa_DebugMessageInsert(GLenum source, GLenum type, GLuint id,
|
|||||||
gl_enum_to_debug_severity(severity),
|
gl_enum_to_debug_severity(severity),
|
||||||
length, buf);
|
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);
|
ctx->pipe->emit_string_marker(ctx->pipe, buf, length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -3625,6 +3625,7 @@ struct gl_context
|
|||||||
struct st_config_options *st_opts;
|
struct st_config_options *st_opts;
|
||||||
struct cso_context *cso_context;
|
struct cso_context *cso_context;
|
||||||
bool has_invalidate_buffer;
|
bool has_invalidate_buffer;
|
||||||
|
bool has_string_marker;
|
||||||
/* On old libGL's for linux we need to invalidate the drawables
|
/* On old libGL's for linux we need to invalidate the drawables
|
||||||
* on glViewpport calls, this is set via a option.
|
* on glViewpport calls, this is set via a option.
|
||||||
*/
|
*/
|
||||||
|
@@ -869,6 +869,9 @@ st_create_context(gl_api api, struct pipe_context *pipe,
|
|||||||
if (pipe->screen->get_param(pipe->screen, PIPE_CAP_INVALIDATE_BUFFER))
|
if (pipe->screen->get_param(pipe->screen, PIPE_CAP_INVALIDATE_BUFFER))
|
||||||
ctx->has_invalidate_buffer = true;
|
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);
|
st = st_create_context_priv(ctx, pipe, options);
|
||||||
if (!st) {
|
if (!st) {
|
||||||
_mesa_free_context_data(ctx, true);
|
_mesa_free_context_data(ctx, true);
|
||||||
|
Reference in New Issue
Block a user