Forums - smaller texture size gives worse performance

2 posts / 0 new
Last post
smaller texture size gives worse performance
Guerkan_Demirci
Join Date: 3 Jan 11
Posts: 9
Posted: Mon, 2011-02-07 05:37

Hi,

I am getting better drawing performance when using bigger textures. A very small texture (64x64) magnified on a planer rect around 480x480 is slower then using a 512x512 texture.

Why?

The magnification filter is set to GL_NEAREST.

To be more specific on the context:

I am copying YUV video frames into the texture. A fragment shader is transforming the YUV colors into rgba. As glTexSubImage2D with GL_LUMINANCE gave me bad performance at the copy-stage, I switched to GL_RGBA, which is very fast copied compared to GL_LUMINANCE. Now I am packing 4 y-pixels into on rgba-pixel. So the texture size got four times smaller as before. And now, the drawing performace is worse as before. I was thinking, it is because of the raised shader complexity. But after optimizing the shader code (which is smaller and faster as the one I was using with GL_LUMINANCE), there was no performance gain. I am getting better drawing performance when using bigger video sizes and due to a bigger texture size. Sure, the video decompression takes more time, but performance counting just the drawing part shows much better results. But it is not the texture magnification filter which should be used more often when drawing small textures into bigger rectangles. This is set to GL_NEAREST. I looks, like re-reading pixel values more often from the same texture location makes things worse. Why?

Kind regards,

Guerkan

  • Up0
  • Down0
Guerkan_Demirci
Join Date: 3 Jan 11
Posts: 9
Posted: Mon, 2011-02-07 13:36

How is the texture cache working in the adreno200? Are rows or columns of texture data loaded into the cache?

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.