Problem with glPolygonOffset w/ PowerVR SGX 540 (GLES 2.0)

This topic contains 2 replies, has 2 voices, and was last updated by  Joe Davis 4 years, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #31343

    Philippe
    Member

    Hello,

    I am getting unexpected results when using glPolygonOffset on PowerVR SGX 540 (Samsung Galaxy Tab 2, Kindle Fire HD 7). It seems that I have to negate the 2 values I pass to the glPolygonOffset function to get the same visual result as on iOS devices (PowerVR SGX 543 for example) or other Android devices.
    While I can imagine OEMs probably tweak drivers on their end, I was wondering if you guys have seen this issue and if you can suggest a robust workaround (beside having a different rendering path based on OpenGL Renderer String or device name).

    Thank you in advance

    #37675

    Joe Davis
    Member

    Hi Philippe,

    Sorry for not answering this question sooner. I’ve not heard of this issue before. I’ll talk to our driver team to see if this is a known problem. Unfortunately, using the GL_RENDERER string is likely to be the best way to workaround the problem.

    Can you share the GPU driver version number with us? As explained here, this can be queried with ‘cat /proc/pvr/version’

    Thanks,
    Joe

    #37676

    Joe Davis
    Member

    Hi Philippe,

    I’ve spoken to our driver team & also referred to the OpenGL ES 2.0 spec. Annoyingly, there is no standardized direction to apply the depth offset in, which means the offset direction is implementation dependent. The direction we chose allows us to pass the OpenGL ES 2.0 conformance tests & also causes Quake 3 to render correctly.

    Can you explain your use case for using this feature? I’d recommend translating your objects along the Z axis yourself to ensure you get a consistent result across all of the devices you’re targeting.

    Thanks,
    Joe

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