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

Kenneth Graunke kenneth at whitecape.org
Tue Apr 9 20:09:28 PDT 2013


On 04/09/2013 03:55 PM, Eric Anholt 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).  A bunch of these
> changes are not about compilation failure, anyway.

Is that so?  What about fixed-function VS and a GLSL fragment shader?
I think that's allowed in at least some older specs, and there won't be 
a gl_shader for the VS, but I'd be surprised if there wasn't a 
gl_shader_program...


More information about the mesa-dev mailing list