Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Leopard, GL_ALPHA and Pixel Buffer Objects



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I'm a bit surprised that I have not gotten a response to this. What I'm
seeing looks very much like a bug in Leopard OpenGL, one that makes the
fast path for texture downloads unusable for GL_ALPHA.

Regards,

  Uli

Ulrich von Zadow wrote:
> Hi,
> 
> using glSubImage2D with internal format GL_ALPHA,
> GL_TEXTURE_RECTANGLE_EXT and Pixel Buffer Objects exposes some strange
> behaviour (NVidia 8600 driver). Here's a partial opengl profiler log
> (I'd attach the complete one but it's too big for the list):
> 
> glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
> glGenTextures(1, 0x18616a48);
> glActiveTexture(GL_TEXTURE0);
> glBindTexture(GL_TEXTURE_RECTANGLE_EXT, 1);
> glTexImage2D(GL_TEXTURE_RECTANGLE_EXT, 0, GL_ALPHA, 48, 48, 0, GL_ALPHA,
>     GL_UNSIGNED_BYTE, 0x00000000);
> glBindBuffer(0x000088ec, 1);
> glBindTexture(GL_TEXTURE_RECTANGLE_EXT, 1);
> glTexSubImage2D(GL_TEXTURE_RECTANGLE_EXT, 0, 0, 0, 48, 48, GL_ALPHA,
>     GL_UNSIGNED_BYTE, 0x00000000);
> 
> The top line of the texture is downloaded correctly. All other lines are
> copies of that line.
> 
> Some more data points:
> - The same code works correctly on Tiger (both PPC and Intel), with
>   NVidia Linux drivers and with NVidia Windows drivers.
> - Changing the last parameter of glTexSubImage2D (the offset into the
>   PBO) to something other than a multiple of - I think - 128 causes the
>   bug to disappear.
> 
> I've implemented a workaround using GL_RGBA instead of GL_ALPHA, but
> that's likely to be an extreme speed hit - these textures are y, u and v
> planes of video frames. Any other ideas for workarounds? I could use an
> offset into the PBO, but I assume that that causes the driver to leave
> an optimized (abeit buggy) path? Is there anything I might be doing wrong?


- --

Ulrich von Zadow | +49-172-7872715
Jabber: email@hidden
Skype: uzadow
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHQBXOGUJpz6XjqGQRAgx0AJwPugnCPik5JviDlJyUzS2yhBgotQCgiQwV
ugYrGkD3+iQDJyks6pvA1p4=
=WNHc
-----END PGP SIGNATURE-----
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden

References: 
 >Leopard, GL_ALPHA and Pixel Buffer Objects (From: Ulrich von Zadow <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.