[Mesa-dev] [PATCH v2] glsls: Modify exec_list to avoid strict-aliasing violations

Davin McCall davmac at davmac.org
Thu Jun 25 15:43:49 PDT 2015

On 25/06/15 14:32, Eero Tamminen wrote:
> Hi,
> On 06/25/2015 03:53 PM, Davin McCall wrote:
>> On 25/06/15 12:27, Eero Tamminen wrote:
>>> On 06/25/2015 02:48 AM, Davin McCall wrote:
>>>> In terms of performance:
>>>> (export LIBGL_ALWAYS_SOFTWARE=1; time glmark2)
>>> For Intel driver, INTEL_NO_HW=1 could be used.
>>> (Do other drivers have something similar?)
>> Unfortunately I do not have an Intel display set up.

Ok, scratch that - I've set up an Intel-based display (Haswell i7-4790K, 
GT2). When run as:

     INTEL_NO_HW=1 glmark2 --off-screen

The scores I get are:
no-strict-aliasing:    60922
strict-aliasing:         61533

(CPU usage was consistently 100% throughout).

There's really not that much of a difference here. But different 
architectures might see different results, and there is a small 
reduction in footprint. I personally feel that fixing any aliasing 
violations is worth it even without a significant performance 
improvement, just because it means the code will actually conform to the 
language spec and you don't need to rely on some compiler crutch to make 
it work right.

But, to be clear: the patch doesn't remove -fno-strict-aliasing. It just 
fixes some strict aliasing violations, which potentially allows 
-fno-strict-aliasing to be removed from the build options at some later 


More information about the mesa-dev mailing list