A texture-data alignment bug when tracing

José Fonseca jose.r.fonseca at gmail.com
Sat Sep 15 09:37:03 PDT 2012


On Fri, Sep 14, 2012 at 11:22 PM, Carl Worth <cworth at cworth.org> wrote:
> 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.

I tried on my NVIDIA, and it also shows green green blue black.

I read the spec more detailed, and it seems that "element" is a single
channel (not a pixel), where a "group" is a pixel.

I've pushed a change that tries to match the spec precisely. I've
checked that it does the right thing with Paul's sample.

Jose


More information about the apitrace mailing list