[Mesa-dev] [PATCH 1/2] i965: NULL check prog on compilation failure.

Matt Turner mattst88 at gmail.com
Tue Apr 9 16:09:27 PDT 2013


On Tue, Apr 9, 2013 at 3:55 PM, Eric Anholt <eric at anholt.net> wrote:
> Matt Turner <mattst88 at gmail.com> writes:
>
>> I believe that prog can only be NULL for ARB programs. Neither
>> brw_fs_fp.cpp nor brw_vec4_vp.cpp call fail(), but not NULL checking
>> prog is obviously fragile.
>
> (shader != NULL) <=> (prog != NULL), so if you want consistency I'd
> rather see the if (shader) changed to if (prog).

Ah, that's better.

> A bunch of these
> changes are not about compilation failure, anyway.

The changes to brw_vs.c and brw_wm.c? They actually are --
brw_vs_debug_recompile and brw_wm_debug_recompile are called below the
modified hunks in brw_vec4.cpp and brw_fs.cpp. But they're called from
inside if (shader) tests, so never mind.

So, this patch is crap.


More information about the mesa-dev mailing list