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

samplerExternalOES performance on Mali-400

Hi,

I've just noticed that texture lookups using samplerExternalOES (as specified in the OES_EGL_image_external extension) seem to come with a performance impact on Mali-400, at least if the instruction counts reported by Mali Offline Compiler are correct.

While a texture2D sampler lookup takes 1 cycle, the Mali Offline compiler reports the following for a samplerExternalOES access:

Number of instruction words emitted:            5
Number of cycles for shortest code path:        2
Number of cycles for longest code path:         5

Could someone shed some light on why accessing a samplerExternalOES would be so expensive?

How can I ensure that the fast path is hit (2 cycles)?

Is there a - perhaps less flexible - alternative to OES_EGL_image_external, which would allow for zero-copy textures without this overhead?

Could the cycle counts just be misreported by the Mali Offline Compiler?

Parents
  • Great to hear, thank you for looking into this. My only worry is the following wording in the OES_EGL_image spec.

    As a result of this referencing operation, all of the pixel
        data in the <buffer> used as the EGLImage source resource (i.e., the
        <buffer> parameter passed to the CreateImageOES command that returned
        <image>) will become undefined.

    This is a significant departure from the OES_EGL_image_external, which states:

    A EGLImageTargetTexture2DOES() call with <target> set to
        TEXTURE_EXTERNAL_OES will not modify the pixel data values in the
        EGLImage.

    Not sure if the undefined data applies to dma imports? If you could get some reassurance from the driver 
    team that this would leave our source data untouched I would greatly appreciate :-)

    Thanks Pete for all the input, it's greatly appreciated!
Reply
  • Great to hear, thank you for looking into this. My only worry is the following wording in the OES_EGL_image spec.

    As a result of this referencing operation, all of the pixel
        data in the <buffer> used as the EGLImage source resource (i.e., the
        <buffer> parameter passed to the CreateImageOES command that returned
        <image>) will become undefined.

    This is a significant departure from the OES_EGL_image_external, which states:

    A EGLImageTargetTexture2DOES() call with <target> set to
        TEXTURE_EXTERNAL_OES will not modify the pixel data values in the
        EGLImage.

    Not sure if the undefined data applies to dma imports? If you could get some reassurance from the driver 
    team that this would leave our source data untouched I would greatly appreciate :-)

    Thanks Pete for all the input, it's greatly appreciated!
Children