[Mesa-dev] r600-sb: glxgears wrong rendering

Lauri Kasanen cand at gmx.com
Fri May 3 01:56:01 PDT 2013


On Fri, 03 May 2013 00:39:09 +0400
Vadim Girlin <vadimgirlin at gmail.com> wrote:

> I see some issues issues in the dump, looks like compiler doesn't 
> zero-initialize some data (particularly alu_node::bc) in cases where I 
> expect it. Possibly it's my bug, I'll look into it, but the data in 
> question is definitely zero-initialized with gcc 4.8 (also this worked 
> fine for me previously with gcc 4.7). I suspect this could be related to 
> the issues of old gcc releases (e.g. something like [1]).
> 
> Please test with the attached patch.
>
>   [1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33916

With this patch, glxgears has correct output.

Here's the dump with the patch:
http://bayfiles.net/file/PnC9/us249L/glxgears_new.gz

Please note that the behavior you relied on - implicit zeroing of C++
class members - is unreliable in other compilers too. I find it's also
bad practise not to init members in the constructor if you expect them
to have some particular value.

- Lauri


More information about the mesa-dev mailing list