SGX fails to link multiple shader objects

This topic contains 1 reply, has 2 voices, and was last updated by  Xmas 9 years, 1 month ago.

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

    TomCooksey
    Member

    I’ve been working on the assumption that I can use multiple shader objects and link them all together to create a program. I have a single vertex shader with a main() but 2 fragment shaders, one with a main() and the other without (but defines a function which the main() shader calls). This works perfectly under desktop emulation, but I’ve just tried it on a Zoom LPD3430 and the shader compiler fails with:

    ERROR: main() function is missing.

    ERROR: 1 compilation errors. No code generated.

    It’s absolutely correct, the main() function IS missing – it’s in the other object.

    Surely this is supposed to work??

    #32317

    Xmas
    Member

    Hi Tom,

    TomCooksey wrote:
    Surely this is supposed to work??

    Actually it isn’t, and the fact that it works in PC emulation is a bug. We’ll have a look at this, thanks for reporting. OpenGL ES 2.0 doesn’t allow multiple shader objects of the same type to be attached to a program object. From the ES 2.0 spec:

    Quote:
    Multiple shader objects of the same type may not be attached to a single program object.[…]The error INVALID_OPERATION is generated if shader is already attached to program, or if another shader object of the same type as shader is already attached to program.

    Regards,

    GeorgXmas2008-09-30 12:01:46

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