On 01/06/15 22:59, Matt Turner wrote:
On Mon, Jun 1, 2015 at 12:44 PM, Marek Olšák <mar...@gmail.com> wrote:
From: Marek Olšák <marek.ol...@amd.com>

eglCreateContext was failing.

Broken by 03fd6704db9f1d0f203bf8da18bd587c7e35ce60
---
  src/mesa/main/version.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c
index 409e5ae..572f2da 100644
--- a/src/mesa/main/version.c
+++ b/src/mesa/main/version.c
@@ -137,7 +137,7 @@ bool
  _mesa_override_gl_version_contextless(struct gl_constants *consts,
                                        gl_api *apiOut, GLuint *versionOut)
  {
-   int version;
+   int version = 0;
     bool fwd_context, compat_context;

     get_gl_override(*apiOut, &version, &fwd_context, &compat_context);
The problem is that get_gl_override() doesn't initialize version,
fwd_context, or compat_context for GLES1 because it contains an
early-out:

    if (api == API_OPENGLES)
       return;

(and the compiler warns about it, and you can't *not* see it because
version.c gets recompiled nearly every time)

I guess your change is okay, since the rest of the function is inside
an if (version > 0), but I'm really not sure how Ian thought this was
supposed to work...

I pushed a fix for this:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=184e4de3a126fa21945fe59f68b8a29977919fc4
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to