Hi, I have discovered that my SGX 544 devices has a limitation of 8 fragment shader texture fetches. First 8 fetches working correct, but others return random garbage.
All my fetches are independent and use just 8 varyings. Fetch occurs from 4 textures.
My question is: does this limitation exists and if it’s true, how can I detect this kind of limitation (using opengles calls) to provide fallback shader?
Hi,
The OpenGL ES 2.0 default required number of texture units is 8. If you application needs to exceed this default, you should use glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, *) to query the number of units available (glGet reference page here).
All my fetches are independent and use just 8 varyings. Fetch occurs from 4 textures.
Can you share a representitve shader with us? If you would prefer to share this with us confidentially, you can attach it to a support ticket: https://pvrsupport.imgtec.com/new-ticket
Thanks,
Joe
Hi, Joe. Deeper analysis shows that problem is not with texture fetch count, but with shader compiler. My fragment shader is relatively complex (about 60 cycles) and changing small part of it remove the issue. If you are interested I can send you original shader which has a problem.
Glad to hear you’ve isolated the cause. Are able to workaround the issue?
If you attach the shader to a support ticket, I can take a look and file a bug report against our shader compiler.
Joe