glShaderSource deadlock based on function name

This topic contains 1 reply, has 2 voices, and was last updated by  Gordon 6 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #30537

    djethernet
    Member

    (moved from wrong forum)

    OGLES2_WINDOWS_X86EMULATION_2.08.28.0634 windows 7 64 (AMD x4, nvidia 480)

    This was strange but I’ve found a function name with the word “main” somewhere in it causes glShaderSource to deadlock. main must be in lowercase. ie Foomain(), mainfoo(), foomainfoo(). see shader below. glsl es spec says this is ok.

    For reproducible test case in the example OGLES2Shader directional_lighting.pfx rename DirectionalLight to DirectionalLightmain. glShaderSource deadlocks.

    glShaderSource doesn’t compile the shader but should just do a copy so something fishy is afoot.

    —valid glShaderSource —

    mediump float foo(in mediump float value)

    {

        return value;

    }

    void main(void)

    {

        gl_FragColor = vec4(foo(1.0));

    }

    —deadlock glShaderSource —

    mediump float foomain(in mediump float value)

    {

        return value;

    }

    void main(void)

    {

        gl_FragColor = vec4(foomain(1.0));

    }

    #34920

    Gordon
    Moderator

    Obviously there’s an easy workaround in this case, but I’ve reproduced this bug here (it is now issue BRN33632) and an engineer should look at it shortly.

    Thanks for the report.

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.