A texture-data alignment bug when tracing

Carl Worth cworth at cworth.org
Fri Sep 14 15:22:23 PDT 2012


Paul Berry <stereotype441 at gmail.com> writes:
> I think you're right, Jose.  And unless I'm much mistaken, Mesa has never
> followed this rule correctly.

Cool, an implementation bug!

> Carl, would you mind sending me the test program you were using to
> investigate this?  I'd like to try it on my nVidia machine.  Assuming
> that the nVidia driver follows the spec, I'll file a Mesa bug report.

Sure thing. It's attached. The program initializes a 2x2 RGB texture
with 12 bytes of data, (so according to José's understanding of the
specification). And according to that interpretation it should result in
a texture with 4 texels, all green.

When I run this with Mesa, I get 2 green pixels, then one blue, then one
of uncertain color as Mesa reads past my allocated array, (and
triggering an error if you run the program under valgrind).

I'll be quite interested to see what you find.

-Carl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: unpack-alignment-bug.c
Type: text/x-csrc
Size: 8113 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/apitrace/attachments/20120914/26bea355/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/apitrace/attachments/20120914/26bea355/attachment.pgp>


More information about the apitrace mailing list