Mesa (master): glsl_parser_extras.cpp: fixup gl vs mem contexts again.

Dave Airlie airlied at kemper.freedesktop.org
Sun Dec 16 07:30:23 UTC 2012


Module: Mesa
Branch: master
Commit: a9abaaafd8ecdaebdf8b1b7ef2ac1177aa51efca
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a9abaaafd8ecdaebdf8b1b7ef2ac1177aa51efca

Author: Dave Airlie <airlied at gmail.com>
Date:   Sun Dec 16 11:47:01 2012 +1000

glsl_parser_extras.cpp: fixup gl vs mem contexts again.

This should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=58039

Tested-by: Darxus on bug 58039
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/glsl/glsl_parser_extras.cpp |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index d360892..91122cc 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -151,7 +151,7 @@ _mesa_glsl_parse_state::check_version(unsigned required_glsl_version,
 
    va_list args;
    va_start(args, fmt);
-   char *problem = ralloc_vasprintf(ctx, fmt, args);
+   char *problem = ralloc_vasprintf(this, fmt, args);
    va_end(args);
    const char *glsl_version_string
       = glsl_compute_version_string(ctx, false, required_glsl_version);
@@ -159,14 +159,14 @@ _mesa_glsl_parse_state::check_version(unsigned required_glsl_version,
       = glsl_compute_version_string(ctx, true, required_glsl_es_version);
    const char *requirement_string = "";
    if (required_glsl_version && required_glsl_es_version) {
-      requirement_string = ralloc_asprintf(ctx, " (%s or %s required)",
+      requirement_string = ralloc_asprintf(this, " (%s or %s required)",
                                            glsl_version_string,
                                            glsl_es_version_string);
    } else if (required_glsl_version) {
-      requirement_string = ralloc_asprintf(ctx, " (%s required)",
+      requirement_string = ralloc_asprintf(this, " (%s required)",
                                            glsl_version_string);
    } else if (required_glsl_es_version) {
-      requirement_string = ralloc_asprintf(ctx, " (%s required)",
+      requirement_string = ralloc_asprintf(this, " (%s required)",
                                            glsl_es_version_string);
    }
    _mesa_glsl_error(locp, this, "%s in %s%s.",




More information about the mesa-commit mailing list