[Mesa-dev] [PATCH] Fix strict-aliasing violations in GLSL shader list implementation

Dave Airlie airlied at gmail.com
Tue Jun 23 20:54:28 PDT 2015

On 24 June 2015 at 12:57, Michel Dänzer <michel at daenzer.net> wrote:
> On 24.06.2015 11:39, Dave Airlie wrote:
>>> Actually, I'm almost 100% certain that there are lots of other strict
>>> aliasing violations in the Mesa code. That's why we've always disabled it.
>>> More generally, IMO it's unrealistic to rely on strict aliasing for
>>> optimization, because very few people really understand it (I'm not one
>>> of them).
>> I personally think we should get past the, aliasing is hard, lets go shopping,
> I'm not saying that. I'm saying we'll keep getting it wrong, which will
> cause subtle and very hard to debug problems.
Well my hope is gcc and clang got better, that said I know the kernel
disables it as well, but they do a lot worse things.

   text       data        bss        dec        hex    filename
5489951     187400      25712    5703063     570597    lib/mesa_dri_drivers.so

  text       data        bss        dec        hex    filename
5446885     187400      25712    5659997     565d5d    lib/mesa_dri_drivers.so

here is a i965 driver, 43k code size drop.

Again fixing things may not help that.


More information about the mesa-dev mailing list