This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

glInvalidateFramebuffer problem

Hello,

My app works OK on:

-Windows Desktop GL

-Apple iOS iPad mini 2

-Samsung Galaxy Note 4 (ARM Mali-T760)

-Sony Xperia XZ2 Adreno 630

However when running on:

Huawei Mate 20 X (ARM Mali-G76) version OpenGL ES 3.2 v1.r16p0-01rel0.95d2435cbe2284d49b9bbcf5b1624fdd

Then I'm getting problems.

Expected results:

ARM Mali results:

after touching the screen to rotate the camera

I'm suspecting a driver bug.

This problem appears to be related to 'glInvalidateFramebuffer', if I replace all glInvalidateFramebuffer calls with glClear (or just remove the glInvalidateFramebuffer calls), then it starts to work ok.

Please check this link which includes APK files and images:

https://www.dropbox.com/sh/17lho4zzuwhuh4r/AACiAVIiSTxSv5_CeMDSqPSZa?dl=0

Thank you,

Greg

Parents
  • Hi Greg, 

    I'll take a look at this properly in the morning when I'm in the office, but just to check a few things based on the images.

    It looks like are you are setting a scissor box which is smaller than the whole image and are just redrawing that (the square part on the screen which is getting drawn)?

    A call to glClear behaves like a draw call so it will be impacted by the scissor box, so assuming you e.g. have EGL_BUFFER_PRESERVE set the parts outside of the scissor will be reliably preserved from the previous frame. 

    Most importantly a call to glInvalidateFramebuffer is *not* restricted by the scissor box - it will always invalidate the entire framebuffer. If you are then only redrawing the part of the frame inside the scissor then the contents outside of that are undefined. There is no guarantee what is rendered unless you redraw an invalidated region.

    I'm not sure that's what you are doing here, but  it would fit the behavior shown in the images.

    HTH, 
    Pete

Reply
  • Hi Greg, 

    I'll take a look at this properly in the morning when I'm in the office, but just to check a few things based on the images.

    It looks like are you are setting a scissor box which is smaller than the whole image and are just redrawing that (the square part on the screen which is getting drawn)?

    A call to glClear behaves like a draw call so it will be impacted by the scissor box, so assuming you e.g. have EGL_BUFFER_PRESERVE set the parts outside of the scissor will be reliably preserved from the previous frame. 

    Most importantly a call to glInvalidateFramebuffer is *not* restricted by the scissor box - it will always invalidate the entire framebuffer. If you are then only redrawing the part of the frame inside the scissor then the contents outside of that are undefined. There is no guarantee what is rendered unless you redraw an invalidated region.

    I'm not sure that's what you are doing here, but  it would fit the behavior shown in the images.

    HTH, 
    Pete

Children