<div dir="auto">I don't think that's right. Gremedy is a debugger application that exposes the extension to allow the app to send info to a debugger. It should not be exposed under normal circumstances as it may enable debug code paths in applications.<div dir="auto"><br></div><div dir="auto">If the issue is that an application is erroneously calling this function, the solution is to not make calling the function an error, but leave the extension off under normal circumstances.</div><div dir="auto"><br></div><div dir="auto">Also in that case, don't call the driver function as it will cause the driver to do things. Nouveau also emits the contents into the command stream.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Feb 15, 2017 7:59 PM, "Kenneth Graunke" <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Equivalent marker functionality is already included in KHR_debug, which<br>
we already expose unconditionally in all drivers (dummy_true).<br>
<br>
Grim Fandango Remastered apparently calls glStringMarkerGREMEDY()<br>
without checking for the extension, spewing GL errors.  Assuming the<br>
existence of the extension is definitely not valid, but it also seems<br>
kinda mean to spew GL errors when we could simply expose the feature<br>
and silently ignore the provided string markers.<br>
<br>
This patch enables GREMEDY_string_marker everywhere, and makes the calls<br>
no-ops if the driver doesn't provide the EmitStringMarker() hook, just<br>
like we did for the KHR_debug functionality.<br>
<br>
This may impact freedreno, which actually puts markers in its command<br>
buffers.<br>
<br>
Signed-off-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
---<br>
 src/mesa/main/debug_output.c           | 4 +---<br>
 src/mesa/main/extensions_<wbr>table.h       | 2 +-<br>
 src/mesa/state_tracker/st_<wbr>debug.c      | 1 -<br>
 src/mesa/state_tracker/st_<wbr>debug.h      | 3 +--<br>
 src/mesa/state_tracker/st_<wbr>extensions.c | 4 ----<br>
 5 files changed, 3 insertions(+), 11 deletions(-)<br>
<br>
diff --git a/src/mesa/main/debug_output.c b/src/mesa/main/debug_output.c<br>
index bc933db93d4..1d2dee128b4 100644<br>
--- a/src/mesa/main/debug_output.c<br>
+++ b/src/mesa/main/debug_output.c<br>
@@ -1308,12 +1308,10 @@ void GLAPIENTRY<br>
 _mesa_StringMarkerGREMEDY(<wbr>GLsizei len, const GLvoid *string)<br>
 {<br>
    GET_CURRENT_CONTEXT(ctx);<br>
-   if (ctx->Extensions.GREMEDY_<wbr>string_marker) {<br>
+   if (ctx->Driver.EmitStringMarker) {<br>
       /* if length not specified, string will be null terminated: */<br>
       if (len <= 0)<br>
          len = strlen(string);<br>
       ctx->Driver.EmitStringMarker(<wbr>ctx, string, len);<br>
-   } else {<br>
-      _mesa_error(ctx, GL_INVALID_OPERATION, "StringMarkerGREMEDY");<br>
    }<br>
 }<br>
diff --git a/src/mesa/main/extensions_<wbr>table.h b/src/mesa/main/extensions_<wbr>table.h<br>
index 7ea56c8422d..ec48aadde3f 100644<br>
--- a/src/mesa/main/extensions_<wbr>table.h<br>
+++ b/src/mesa/main/extensions_<wbr>table.h<br>
@@ -285,7 +285,7 @@ EXT(EXT_vertex_array                        , dummy_true<br>
 EXT(EXT_vertex_array_bgra                   , EXT_vertex_array_bgra                  , GLL, GLC,  x ,  x , 2008)<br>
 EXT(EXT_window_rectangles                   , EXT_window_rectangles                  , GLL, GLC,  x ,  30, 2016)<br>
<br>
-EXT(GREMEDY_string_marker                   , GREMEDY_string_marker                  , GLL, GLC,  x ,  x , 2007)<br>
+EXT(GREMEDY_string_marker                   , dummy_true                             , GLL, GLC,  x ,  x , 2007)<br>
<br>
 EXT(IBM_multimode_draw_arrays               , dummy_true                             , GLL, GLC,  x ,  x , 1998)<br>
 EXT(IBM_rasterpos_clip                      , dummy_true                             , GLL,  x ,  x ,  x , 1996)<br>
diff --git a/src/mesa/state_tracker/st_<wbr>debug.c b/src/mesa/state_tracker/st_<wbr>debug.c<br>
index d6cb5cd57d8..f2e982c8c7a 100644<br>
--- a/src/mesa/state_tracker/st_<wbr>debug.c<br>
+++ b/src/mesa/state_tracker/st_<wbr>debug.c<br>
@@ -58,7 +58,6 @@ static const struct debug_named_value st_debug_flags[] = {<br>
    { "buffer",   DEBUG_BUFFER, NULL },<br>
    { "wf",       DEBUG_WIREFRAME, NULL },<br>
    { "precompile",  DEBUG_PRECOMPILE, NULL },<br>
-   { "gremedy",  DEBUG_GREMEDY, "Enable GREMEDY debug extensions" },<br>
    { "noreadpixcache", DEBUG_NOREADPIXCACHE, NULL },<br>
    DEBUG_NAMED_VALUE_END<br>
 };<br>
diff --git a/src/mesa/state_tracker/st_<wbr>debug.h b/src/mesa/state_tracker/st_<wbr>debug.h<br>
index 6c1e915f68c..4b92a669a37 100644<br>
--- a/src/mesa/state_tracker/st_<wbr>debug.h<br>
+++ b/src/mesa/state_tracker/st_<wbr>debug.h<br>
@@ -50,8 +50,7 @@ st_print_current(void);<br>
 #define DEBUG_BUFFER    0x200<br>
 #define DEBUG_WIREFRAME 0x400<br>
 #define DEBUG_PRECOMPILE   0x800<br>
-#define DEBUG_GREMEDY   0x1000<br>
-#define DEBUG_NOREADPIXCACHE 0x2000<br>
+#define DEBUG_NOREADPIXCACHE 0x1000<br>
<br>
 #ifdef DEBUG<br>
 extern int ST_DEBUG;<br>
diff --git a/src/mesa/state_tracker/st_<wbr>extensions.c b/src/mesa/state_tracker/st_<wbr>extensions.c<br>
index 37fe4469c37..d9057c77657 100644<br>
--- a/src/mesa/state_tracker/st_<wbr>extensions.c<br>
+++ b/src/mesa/state_tracker/st_<wbr>extensions.c<br>
@@ -1167,10 +1167,6 @@ void st_init_extensions(struct pipe_screen *screen,<br>
       extensions->ARB_vertex_attrib_<wbr>64bit = GL_TRUE;<br>
    }<br>
<br>
-   if ((ST_DEBUG & DEBUG_GREMEDY) &&<br>
-       screen->get_param(screen, PIPE_CAP_STRING_MARKER))<br>
-      extensions->GREMEDY_string_<wbr>marker = GL_TRUE;<br>
-<br>
    if (screen->get_param(screen, PIPE_CAP_COMPUTE)) {<br>
       int compute_supported_irs =<br>
          screen->get_shader_param(<wbr>screen, PIPE_SHADER_COMPUTE,<br>
--<br>
2.11.1<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</blockquote></div></div>