[Mesa-dev] [PATCH shaderdb 1/2] run: fall back to v3.1 core ctx if v3.2 fails
Rob Clark
robdclark at gmail.com
Sun Jan 28 17:46:37 UTC 2018
On Sun, Jan 28, 2018 at 11:34 AM, Rob Clark <robdclark at gmail.com> wrote:
> On Sun, Jan 28, 2018 at 11:24 AM, Rob Clark <robdclark at gmail.com> wrote:
>> On Sat, Jan 27, 2018 at 9:07 PM, Matt Turner <mattst88 at gmail.com> wrote:
>>> On Sat, Jan 27, 2018 at 4:08 PM, Rob Clark <robdclark at gmail.com> wrote:
>>>> On Sat, Jan 27, 2018 at 7:02 PM, Matt Turner <mattst88 at gmail.com> wrote:
>>>>> On Sat, Jan 27, 2018 at 10:06 AM, Rob Clark <robdclark at gmail.com> wrote:
>>>>>> Signed-off-by: Rob Clark <robdclark at gmail.com>
>>>>>> ---
>>>>>> run.c | 12 ++++++++++++
>>>>>> 1 file changed, 12 insertions(+)
>>>>>>
>>>>>> diff --git a/run.c b/run.c
>>>>>> index 69fe23d..20a0a6a 100644
>>>>>> --- a/run.c
>>>>>> +++ b/run.c
>>>>>> @@ -520,6 +520,18 @@ main(int argc, char **argv)
>>>>>> };
>>>>>> EGLContext core_ctx = eglCreateContext(egl_dpy, cfg, EGL_NO_CONTEXT,
>>>>>> attribs);
>>>>>> +
>>>>>> + if (core_ctx == EGL_NO_CONTEXT) {
>>>>>> + static const EGLint attribs_31[] = {
>>>>>> + EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR,
>>>>>> + EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR,
>>>>>
>>>>> Profiles are only introduced in v3.2. I can't see how this can work.
>>>>>
>>>>
>>>> entirely possible by accident.. not quite sure when shader-db started
>>>> asking for 3.2 core profile, but that broke things for freedreno (and
>>>> this patch "fixed" things)
>>>
>>> Must have never worked. run.c created core profiles from its inception.
>>
>> Hmm, I could be wrong then.. I *thought* glsl 140 shaders worked at some point.
>>
>> So then, how *does* one create a 3.1 core context? Since atm compat
>> context only exposes 3.0.
>>
>
> Hmm, ok, actually removing those two lines might actually be working.
> But from somewhere (libepoxy?) I'm getting an error "Couldn't find
> current GLX or EGL context."..
>
yeah, that seems to be coming from libepoxy..
I think at this point I blame a combination of libglvnd and libepoxy..
seems like libepoxy is calling
eglQueryContext(EGL_CONTEXT_CLIENT_TYPE) to figure out the current
API, but somehow that doesn't get through to mesa so the return ends
up being EGL_NONE. This happen's from run.c's glCreateProgram() call,
but somehow a previous eglQueryContext(EGL_CONTEXT_CLIENT_TYPE) when
run switched context before calling glCreateProgram() worked ok!?!
Sigh..
BR,
-R
More information about the mesa-dev
mailing list