I'm working with a simple shader to render a texture to screen with a triangle fan and OpenGL ES 3. I noticed that centroid in/out is broken in the shaders.
I've got two images, one with centroid in/out enabled and one with regular in/out.
Don't let the texture fool you, it is a rendering from the CPU being output as a texture which I am using the draw to the screen.
This is with the Galaxy S4 with it's version 14 drivers again.
Centroid In/Out: https://docs.google.com/file/d/0B2mTNE31f5JTS3F1blFJSjE2ZDQ/edit?usp=sharing
Thanks for bringing this to our attention...
1) I'm not seeing the image for the Centroid In/Out after selecting the link
2) Could you share the shader code that is using the centroid function?
3) Could you let us know if multisampling is enabled?
4) What's the build number that is shown when About phone is selected?
1) The image is actually just completely white is the issue.
2) Shaders are here
As you can tell, they are just simple shaders.
3) MSAA isn't enabled
I agree that the shader is quite simple, and the output isn't obvious..
I want to clarify a few things on the usage..
1) I don't think the centroid type qualifier is needed for the output of the vertex shader (only for the input of a fragment shader)
2) I believe the centroid type qualifier is only used when MSAA is in effect
The centroid qualifier should be required on both sides to make sure it links up correctly, no?
Also it is only used when MSAA is enabled, but when MSAA is disabled it should act just like a regular in/out qualifier in the shaders, granting ease of movement from enabling and disabling MSAA, so one doesn't need different shaders when MSAA is actually enabled.
1) We did some investigation, and yes, the centroid qualifer should match up between VS output and FS input
2) Yes, when MSAA is disabled, the centroid interpolation falls back to center based interpolation - clearly there's a bug or a shader linker problem that's not caught (can you verfiy that the shader is correctly linking?)
3) We recented fixed some centroid bugs, but are not sure if they're in the build for your device. Can you let us know what "About Phone" shows for your build number and kernel version?
Yes the shaders link.
Build Number: JDQ39.I337UCUAMDB
Has this issue been fixed on Qualcomm's side with development versions?
I would like to mark this off our list of bugs as being fixed in a future driver release.
Would it be possible to extract the Adreno driver version log statements from the logcat generated on your Samsung Galaxy S4, so we can figure out when a fix with the fix would be available?
adb logcat | grep EGL
I'm not too concerned about knowing when a fix will be available. Just hoping that you've already got it fixed since it isn't the biggest issue(Just happens to cause rendering issues when MSAA is used and we can't use centroid). Assuming from the tone of your sentence, it seems that Qualcomm already has this issue fixed in their working code, so I can mark it off my bug tracker as "fixed, pending consumer release."