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

2013-04-10 Thread Eric Anholt
Kenneth Graunke writes: > On 04/09/2013 03:55 PM, Eric Anholt wrote: >> Matt Turner 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) <=> (pr

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

2013-04-09 Thread Kenneth Graunke
On 04/09/2013 03:55 PM, Eric Anholt wrote: Matt Turner 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 ra

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

2013-04-09 Thread Matt Turner
On Tue, Apr 9, 2013 at 3:55 PM, Eric Anholt wrote: > Matt Turner 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 wan

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

2013-04-09 Thread Eric Anholt
Matt Turner 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 (p

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

2013-04-09 Thread Matt Turner
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. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 8 +--- src/mesa/drivers/dri/i965/brw_vec4.cpp | 8 +--- src/mesa/drivers/dri/i965/brw